2019-04-23 02:40 AM
Hi,
I use STM32L476QE.
I want to use the entire RAM (96KB SRAM1 and 32KB SRAM2) as one continuous memory, is that possible?
I use IAR
2019-04-23 03:03 AM
The memory is continous, so you can combine it. I do not know how IAR linker file work, but in principle remoce the SRAM2 definition and extend the SRAM1 upper limit to the SRAM2 upper limit.
2019-04-23 03:15 AM
But they are not mapped continuously:
define symbol __ICFEDIT_region_RAM_start__ = 0x20000000;
define symbol __ICFEDIT_region_RAM_end__ = 0x20017FFF;
define symbol __ICFEDIT_region_SRAM2_start__ = 0x10000000;
define symbol __ICFEDIT_region_SRAM2_end__ = 0x10007FFF;
2019-04-28 12:56 AM
No one has any ideas?
Currently I add variables to SRAM2 manually, which is very inconvenient.
using:
#pragma default_variable_attributes = @ "SRAM2_MEM"
2019-04-28 07:51 AM
For a memory segment there should be some #pragma to put the variables in the right sector.
Read the compiler and especially linker documentation.
Otherwise, put the stack in the 16kbyte region SRAM2 to get started with minimal C coding efforts.
2019-04-28 10:14 PM
I don't think you read my post and comments.
I already use the pragma, and the SRMA2 is 32KB, too big for just stack.
I was looking for a way to combine them so I wouldn't have to do it manually.
2019-04-28 10:40 PM
What you ask is very specific and should be asked to the compiler toolchain support team or forum. So far I would say such linker mecanics maynot exist as rarely asked.