2021-08-12 12:19 AM
Hi,
I am currently working on a resource-hungry project which requires a lot of memory for storing various buffers and RTOS threads stacks and objects. We are using the STM32L476 controller with Keil uVersion 5.34 IDE and Keil RTX5 as RTOS (CMSISv2) for the development. As of now, we can only use 96KBytes (SRAM1 mapped at address 0x2000 0000) of the total RAM which is not sufficient and 32KByte of SRAM2 (located at address 0x1000 0000) is not contiguous with SRAM1.
So can anyone guide us on how to store variables in SRAM2 so that we can utilize the entire memory space?
2021-08-12 06:01 AM
You need to create a new section in your linker script and add it. You'll need to place variables here manually, the link can't automatically divvy up things between two discontinuous places.
This link shows how, but replace CCRAM and the associated addresses with SRAM2 and its address.
https://www.openstm32.org/Using%2BCCM%2BMemory