[riot-users] STM32 Nucleo L476RG: how to instruct compiler to use SRAM2?

C.H. 6haker at informatik.uni-hamburg.de
Sat Oct 12 17:51:30 CEST 2019


Dear RIOTers,

I got a question regarding the modification of linker script in order to 
configure SRAM usage of a STM32 Nucleo-64 L476RG board.

I got a program which is nearly 128 KB size due to some larger 
statically defined arrays. It runs fine on a Nucleo-64 F446RE board, but 
not on a L476RG due to the RAM split ins SRAM1 (96K) and SRAM2 (32K).

The program needs to run on a L476RG because LoRa does not work properly 
on a F446RE.

Due to some posts in [1], [2], [3] I understand it is possible to use 
the other 32K, too.

Can anyone please explain to me how I can modify the linker script in 
order for the compiler to include SRAM2 to the program? Unfortunately I 
haven't found the right place and way in RIOT OS to do so and I need to 
get to run the program quite soon due to a tightly set deadline.

Thank you helping out.

Regards,

Carsten

[1] https://forum.micropython.org/viewtopic.php?t=3702

[2] 
https://stackoverflow.com/questions/50610987/gnu-ld-linker-script-stack-placement

[3] 
https://www.hackster.io/yusefkarim/upload-code-to-stm32l4-using-linux-gnu-make-and-openocd-a3d4de



More information about the users mailing list