diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-10-05 17:00:13 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2011-10-05 17:00:13 +0000 |
commit | 1351fded5a9c460166637d276616a73be0b72392 (patch) | |
tree | d235caac00b814f124ab19f92f5b96a77c0ac58d /os/ports | |
parent | 85cf040f27470066f73aa53401b738e1dff47200 (diff) | |
download | ChibiOS-1351fded5a9c460166637d276616a73be0b72392.tar.gz ChibiOS-1351fded5a9c460166637d276616a73be0b72392.tar.bz2 ChibiOS-1351fded5a9c460166637d276616a73be0b72392.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3426 35acf78f-673a-0410-8e92-d51de3d6d3f4
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");
|