diff options
Diffstat (limited to 'os/ports')
-rw-r--r-- | os/ports/GCC/ARMCMx/crt0.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/os/ports/GCC/ARMCMx/crt0.c b/os/ports/GCC/ARMCMx/crt0.c index e2cb2b3de..0737c467b 100644 --- a/os/ports/GCC/ARMCMx/crt0.c +++ b/os/ports/GCC/ARMCMx/crt0.c @@ -251,13 +251,14 @@ __attribute__((naked)) void ResetHandler(void) {
uint32_t psp, ctl;
- /* Process Stack initialization, it is allocated below the main stack. The
- main stack is assumed to be allocated starting from @p __ram_end__
- extending downward.*/
+ /* Process Stack initialization, it is allocated starting from the
+ symbol __process_stack_end__ and its lower limit is the symbol
+ __process_stack_base__.*/
asm volatile ("cpsid i");
psp = SYMVAL(__process_stack_end__);
asm volatile ("msr PSP, %0" : : "r" (psp));
+ /* CPU mode initialization.*/
ctl = CRT0_CONTROL_INIT;
asm volatile ("msr CONTROL, %0" : : "r" (ctl));
asm volatile ("isb");
|