File tree Expand file tree Collapse file tree 3 files changed +24
-6
lines changed
Expand file tree Collapse file tree 3 files changed +24
-6
lines changed Original file line number Diff line number Diff line change @@ -174,12 +174,18 @@ SECTIONS
174174 } >RAM
175175
176176 /* User_heap_stack section, used to check that there is enough RAM left */
177- ._user_heap_stack :
177+ ._user_heap :
178178 {
179179 . = ALIGN (4 );
180180 PROVIDE ( end = . );
181181 PROVIDE ( _end = . );
182182 . = . + _Min_Heap_Size;
183+ . = ALIGN (4 );
184+ } >RAM
185+
186+ ._user_stack :
187+ {
188+ . = ALIGN (4 );
183189 . = . + _Min_Stack_Size;
184190 . = ALIGN (4 );
185191 } >FAST_RAM
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ ENTRY(Reset_Handler)
55_estack = ORIGIN(FAST_RAM) + LENGTH(FAST_RAM); /* end of 128K RAM */
66
77/* Generate a link error if heap and stack don't fit into RAM */
8- _Min_Heap_Size = 0x2000 ; /* required amount of heap */
8+ _Min_Heap_Size = 0x4000 ; /* required amount of heap */
99_Min_Stack_Size = 0x4000 ; /* required amount of stack */
1010
1111/* Specify the memory areas */
@@ -141,12 +141,18 @@ SECTIONS
141141 } >RAM
142142
143143 /* User_heap_stack section, used to check that there is enough RAM left */
144- ._user_heap_stack :
144+ ._user_heap :
145145 {
146146 . = ALIGN (4 );
147147 PROVIDE ( end = . );
148148 PROVIDE ( _end = . );
149149 . = . + _Min_Heap_Size;
150+ . = ALIGN (4 );
151+ } >RAM
152+
153+ ._user_stack :
154+ {
155+ . = ALIGN (4 );
150156 . = . + _Min_Stack_Size;
151157 . = ALIGN (4 );
152158 } >FAST_RAM
Original file line number Diff line number Diff line change 1111ENTRY (Reset_Handler)
1212
1313/* Highest address of the user mode stack */
14- _estack = ORIGIN(RAM ) + LENGTH(RAM ); /* end of "RAM" Ram type memory */
14+ _estack = ORIGIN(FAST_RAM ) + LENGTH(FAST_RAM ); /* end of "RAM" Ram type memory */
1515
1616_Min_Heap_Size = 0x4000 ; /* required amount of heap */
1717_Min_Stack_Size = 0x4000 ; /* required amount of stack */
@@ -173,16 +173,22 @@ SECTIONS
173173 } >RAM
174174
175175 /* User_heap_stack section, used to check that there is enough "RAM" Ram type memory left */
176- ._user_heap_stack :
176+ ._user_heap :
177177 {
178178 . = ALIGN (8 );
179179 PROVIDE ( end = . );
180180 PROVIDE ( _end = . );
181181 . = . + _Min_Heap_Size;
182- . = . + _Min_Stack_Size;
183182 . = ALIGN (8 );
184183 } >RAM
185184
185+ ._user_stack :
186+ {
187+ . = ALIGN (8 );
188+ . = . + _Min_Stack_Size;
189+ . = ALIGN (8 );
190+ } >FAST_RAM
191+
186192 /* Remove information from the compiler libraries */
187193 /DISCARD/ :
188194 {
You can’t perform that action at this time.
0 commit comments