2022-08-08 06:58 AM
I'm using the STM32WLE5JBI6 part which has 128kB Flash and 48kB SRAM but it is not clear what address these have as the STM32CubeMX generated linker and header files is for the 256kB Flash and 64kB SRAM part
Am I correct in thinking the layout for this part is as follows:
Flash start address: 0x08000000 length: 128K
SRAM1 start address: 0x20000000 length: 16K
SRAM2 start address: 0x20008000 length: 32K
If so this is quite strange as the SRAM memory is no longer contiguous but I can't see anything that says otherwise
Solved! Go to Solution.
2022-08-08 08:18 AM
Okay thanks Remi, so the region 0x20004000 to 0x20008000 is unusable on the STM32WLE5JBI6 part due to it only have 16K of SRAM1?
2022-08-08 07:01 AM
STM32WL variants are made such that there should be no need to modify the SRAM addresses => hence only one unique linker file to generate.
2022-08-08 07:12 AM
Hi Remi, thanks for the fast response!
If I don't change the linker file then my compiler is free to generate a >128kB application which won't fit in my part. The same is true for using too much RAM
In my application I am using more than 16K RAM for the data and bss regions combined so need to move them into the SRAM2 region but I don't know which address to use for this
Are you saying the SRAM layout is as follows?
SRAM1 start address: 0x20000000 length: 16K
SRAM2 start address: 0x20004000 length: 32K
2022-08-08 08:15 AM
SRAM2, up to 32 Kbytes is located at address 0x2000 8000
This is why the linker file always has this line
RAM2 (xrw) : ORIGIN = 0x20008000, LENGTH = 32K
2022-08-08 08:18 AM
Okay thanks Remi, so the region 0x20004000 to 0x20008000 is unusable on the STM32WLE5JBI6 part due to it only have 16K of SRAM1?
2022-08-08 08:22 AM
exactly!
2022-08-08 08:24 AM
Great, thanks Remi. I'll adjust the linker file so it warns me when I overrun it