mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
fix main return for msp430
mspgcc handles main specially, this introduces code to make main behave normally
This commit is contained in:
parent
69f6748a7c
commit
2a8411b6a3
@ -39,6 +39,14 @@ void cpu_switch_context_exit(void)
|
||||
__restore_context();
|
||||
}
|
||||
|
||||
/**
|
||||
* mspgcc handles main specially - it does not return but falls
|
||||
* through to section .fini9.
|
||||
* To "fix" this, we put a return in section .fini9 to make main
|
||||
* behave like a regular function. This enables a common
|
||||
* thread_stack_init behavior. */
|
||||
__attribute__((section (".fini9"))) void __main_epilogue(void) { __asm__("ret"); }
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
// Processor specific routine - here for MSP
|
||||
//----------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user