Skip to content

Commit 7a2408b

Browse files
committed
added also in Ram.ld
1 parent 7e83b03 commit 7a2408b

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

STM32H723ZGTX_RAM.ld

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,9 @@
4141
/* Entry Point */
4242
ENTRY(Reset_Handler)
4343

44+
4445
/* Highest address of the user mode stack */
46+
_sstack = ORIGIN(DTCMRAM);
4547
_estack = ORIGIN(DTCMRAM) + LENGTH(DTCMRAM); /* end of RAM */
4648
/* Generate a link error if heap and stack don't fit into RAM */
4749
_Min_Heap_Size = 0x200 ; /* required amount of heap */
@@ -52,7 +54,9 @@ MEMORY
5254
{
5355
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
5456
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
55-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K-128K
57+
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 1024K-128K - 128K
58+
FLASH_ST (rx) : ORIGIN = 0x080C0000, LENGTH = 128K
59+
FLASH_BT (rx) : ORIGIN = 0x080E0000, LENGTH = 128K
5660
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 320K
5761
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 32K
5862
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 16K
@@ -89,6 +93,8 @@ SECTIONS
8993
.text :
9094
{
9195
. = ALIGN(4);
96+
_stext = .;
97+
9298
*(.text) /* .text sections (code) */
9399
*(.text*) /* .text* sections (code) */
94100
*(.glue_7) /* glue arm to thumb code */
@@ -111,6 +117,14 @@ SECTIONS
111117
. = ALIGN(4);
112118
} >RAM_D1
113119

120+
.hardfault_stack (NOLOAD) : /*Stack memory to avoid memfault inside hardfault handler*/
121+
{
122+
. = ALIGN(8);
123+
_hf_stack_start = .;
124+
. += 0x400; /* 1 KB */
125+
_hf_stack_end = .;
126+
} >DTCMRAM
127+
114128
.ARM.extab (READONLY): { *(.ARM.extab* .gnu.linkonce.armextab.*) } >RAM_D1
115129
.ARM (READONLY): {
116130
__exidx_start = .;
@@ -183,6 +197,17 @@ SECTIONS
183197
_edata = .; /* define a global symbol at data end */
184198
} >DTCMRAM
185199

200+
/*
201+
.hard_fault_log has to be the first thing in the FLASH_ST
202+
*/
203+
204+
.hardfault_stack (NOLOAD) : /*Stack memory to avoid memfault inside hardfault handler*/
205+
{
206+
. = ALIGN(8);
207+
_hf_stack_start = .;
208+
. += 0x400; /* 1 KB */
209+
_hf_stack_end = .;
210+
} >DTCMRAM
186211
/* Uninitialized data section */
187212
. = ALIGN(4);
188213
.bss :

0 commit comments

Comments
 (0)