Set up a stack
I forgot to actually set up a stack for the program but strangely it (mostly) worked - probably due to inlining.
Этот коммит содержится в:
родитель
c940617849
коммит
f4ee774866
1 изменённых файлов: 8 добавлений и 0 удалений
8
arm.ld
8
arm.ld
|
@ -26,6 +26,14 @@ SECTIONS
|
||||||
/* used by the startup to initialize data */
|
/* used by the startup to initialize data */
|
||||||
_sidata = LOADADDR(.data);
|
_sidata = LOADADDR(.data);
|
||||||
|
|
||||||
|
/* Put the stack at the bottom of RAM, so that the application will
|
||||||
|
* crash on stack overflow instead of silently corrupting memory.
|
||||||
|
* See: http://blog.japaric.io/stack-overflow-protection/ */
|
||||||
|
.stack :
|
||||||
|
{
|
||||||
|
KEEP(*(.stack))
|
||||||
|
} >RAM
|
||||||
|
|
||||||
/* This is the initialized data section
|
/* This is the initialized data section
|
||||||
The program executes knowing that the data is in the RAM
|
The program executes knowing that the data is in the RAM
|
||||||
but the loader puts the initial values in the FLASH (inidata).
|
but the loader puts the initial values in the FLASH (inidata).
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче