Skip to content

Commit 12bc1c2

Browse files
committed
[Nucleo-L432KC] Provide full SRAM access
STM32L432xx SRAM is split into two blocks: • 48 Kbyte mapped at address 0x2000 0000 (SRAM1) • 16 Kbyte located at address 0x1000 0000 with hardware parity check (SRAM2). This memory is also mapped at address 0x2000 C000, offering a contiguous address space with the SRAM1 (16 Kbyte aliased by bit band Signed-off-by: Frederic.Pillon <frederic.pillon@st.com>
1 parent b25ccca commit 12bc1c2

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

variants/NUCLEO_L432KC/ldscript.ld

+4-24
Original file line numberDiff line numberDiff line change
@@ -33,17 +33,16 @@
3333
ENTRY(Reset_Handler)
3434

3535
/* Highest address of the user mode stack */
36-
_estack = 0x2000c000; /* end of RAM */
36+
_estack = 0x20010000; /* end of RAM */
3737
/* Generate a link error if heap and stack don't fit into RAM */
3838
_Min_Heap_Size = 0x200; /* required amount of heap */
3939
_Min_Stack_Size = 0x400; /* required amount of stack */
4040

4141
/* Specify the memory areas */
4242
MEMORY
4343
{
44-
FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 256K
45-
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 48K
46-
SRAM2 (rw) : ORIGIN = 0x10000000, LENGTH = 16K
44+
RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 64K
45+
FLASH (rx) : ORIGIN = 0x8000000, LENGTH = 256K
4746
}
4847

4948
/* Define output sections */
@@ -58,7 +57,7 @@ SECTIONS
5857
} >FLASH
5958

6059
/* The program code and other data goes into FLASH */
61-
.text ALIGN(8):
60+
.text :
6261
{
6362
. = ALIGN(8);
6463
*(.text) /* .text sections (code) */
@@ -140,25 +139,6 @@ SECTIONS
140139
_edata = .; /* define a global symbol at data end */
141140
} >RAM AT> FLASH
142141

143-
_sisram2 = LOADADDR(.sram2);
144-
145-
/* CCM-RAM section
146-
*
147-
* IMPORTANT NOTE!
148-
* If initialized variables will be placed in this section,
149-
* the startup code needs to be modified to copy the init-values.
150-
*/
151-
.sram2 :
152-
{
153-
. = ALIGN(8);
154-
_ssram2 = .; /* create a global symbol at sram2 start */
155-
*(.sram2)
156-
*(.sram2*)
157-
158-
. = ALIGN(8);
159-
_esram2 = .; /* create a global symbol at sram2 end */
160-
} >SRAM2 AT> FLASH
161-
162142

163143
/* Uninitialized data section */
164144
. = ALIGN(4);

0 commit comments

Comments
 (0)