From 7cef6c46552a988c1c710a0a2404316a27ef1d43 Mon Sep 17 00:00:00 2001 From: Oliver Hahm <oleg@hobbykeller.org> Date: Wed, 13 Mar 2013 16:49:23 +0100 Subject: [PATCH] * adapted thread_stack_init() for ARM and msp430 to the new prototype introduced by bd5b46628f --- Makefile.include | 4 ++-- cpu/arm_common/Makefile | 2 -- cpu/arm_common/arm_cpu.c | 4 ++-- cpu/msp430-common/cpu.c | 4 ++-- 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Makefile.include b/Makefile.include index a5c850024b..6aa42d5b5e 100644 --- a/Makefile.include +++ b/Makefile.include @@ -4,8 +4,8 @@ CFLAGS += -DBOARD=$(BB) export CFLAGS # mandatory include! -include $(RIOTBASE)/Makefile.modules include $(RIOTBOARD)/$(BOARD)/Makefile.include +include $(RIOTBASE)/Makefile.modules # your binaries to link BASELIBS += $(RIOTBOARD)/$(BOARD)/bin/$(BOARD)_base.a @@ -36,7 +36,7 @@ clean: rm -f $(PROJBINDIR)/* flash: all - $(FLASH) $(PORT) $(PROJBINDIR)/$(PROJECT).hex + $(FLASHER) $(PORT) $(PROJBINDIR)/$(PROJECT).hex term: $(TERM) $(PORT) diff --git a/cpu/arm_common/Makefile b/cpu/arm_common/Makefile index 46db97e247..23949ac078 100644 --- a/cpu/arm_common/Makefile +++ b/cpu/arm_common/Makefile @@ -3,5 +3,3 @@ INCLUDES = -Iinclude -I../$(CPU)/include -I../../sys/lib -I../../drivers/include include $(RIOTBASE)/Makefile.base - - diff --git a/cpu/arm_common/arm_cpu.c b/cpu/arm_common/arm_cpu.c index a5ffb50f45..997005bfc8 100644 --- a/cpu/arm_common/arm_cpu.c +++ b/cpu/arm_common/arm_cpu.c @@ -33,10 +33,10 @@ void thread_yield() { // Processor specific routine - here for ARM7 // sizeof(void*) = sizeof(int) //---------------------------------------------------------------------------- -char * thread_stack_init(void * task_func, void * stack_start) +char * thread_stack_init(void * task_func, void * stack_start, int stack_size) { unsigned int * stk; - stk = (unsigned int *) stack_start; + stk = (unsigned int *) stack_start + stack_size; stk--; *stk = 0x77777777; diff --git a/cpu/msp430-common/cpu.c b/cpu/msp430-common/cpu.c index c7288cb94a..c3be41ec58 100644 --- a/cpu/msp430-common/cpu.c +++ b/cpu/msp430-common/cpu.c @@ -97,10 +97,10 @@ void cpu_switch_context_exit(void){ //---------------------------------------------------------------------------- // Processor specific routine - here for MSP //---------------------------------------------------------------------------- -char *thread_stack_init(void *task_func, void *stack_start) +char *thread_stack_init(void *task_func, void *stack_start, int stack_size) { unsigned short * stk; - stk = (unsigned short *) stack_start; + stk = (unsigned short *) stack_start + stack_size; *stk = (unsigned short) sched_task_exit; --stk; -- GitLab