File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,16 @@ ENTRY(call_start_cpu0)
1919
2020SECTIONS
2121{
22+ /* Put the stack at the bottom of DRAM, so that the application will
23+ * crash on stack overflow instead of silently corrupting memory.
24+ * See: http://blog.japaric.io/stack-overflow-protection/ */
25+ .stack (NOLOAD) :
26+ {
27+ . = ALIGN (16 );
28+ . += _stack_size;
29+ _stack_top = .;
30+ } >DRAM
31+
2232 /* Constant literals and code. Loaded into IRAM for now. Eventually, most
2333 * code should be executed directly from flash.
2434 * Note that literals must be before code for the l32r instruction to work.
@@ -27,7 +37,7 @@ SECTIONS
2737{
2838 *(.literal .call_start_cpu0 )
2939 *(.text .call_start_cpu0 )
30- } >IRAM
40+ } >IRAM AT >DRAM
3141
3242/* All other code and literals */
3343.text : ALIGN (4 )
@@ -36,17 +46,7 @@ SECTIONS
3646 *(.literal .* .text .*)
3747 *(.text )
3848 *(.text .*)
39- } >IRAM
40-
41- /* Put the stack at the bottom of DRAM, so that the application will
42- * crash on stack overflow instead of silently corrupting memory.
43- * See: http://blog.japaric.io/stack-overflow-protection/ */
44- .stack (NOLOAD) :
45- {
46- . = ALIGN (16 );
47- . += _stack_size;
48- _stack_top = .;
49- } >DRAM
49+ } >IRAM AT >DRAM
5050
5151 /* Constant global variables.
5252 * They are loaded in DRAM for ease of use. Eventually they should be stored
You can’t perform that action at this time.
0 commit comments