mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
* adapted thread_stack_init() for ARM and msp430 to the new prototype introduced by bd5b46628f
This commit is contained in:
parent
bd5b46628f
commit
7cef6c4655
@ -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)
|
||||
|
@ -3,5 +3,3 @@ INCLUDES = -Iinclude -I../$(CPU)/include -I../../sys/lib -I../../drivers/include
|
||||
|
||||
include $(RIOTBASE)/Makefile.base
|
||||
|
||||
|
||||
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user