I know Cortex-M4 doesn't support virtual memory. Do you always have to load VA from some LA in flash? For instance you allocate empty value memory at compile time.
This is a single thread application. I compiled an empty memory array in some sram section. I review my memory mapping and see that this section is loaded from empty flash region? I wonder why it need his load address from flash?
This is the array in sram:
static U32 extMem[GUI_NUMBYTES / 4] __attribute__((section(".ExtRAMData")));
Hi jvanmont,
do you say that the empty memory array is assigned to the flash region regardless to your intention? Please show us your linker directive and the result memory map.
Best Regards,Yasuhiko Koumoto.
yasuhikokoumoto I have this mapping.
But I like to view the complete LA region in my mapping. For now it is not shown.
I am now confusing to see the mapping. Is it the result after the linker? Or, is it your input for the linker? Are you using Cortex-M4? why is such the mapping that VA is not equal to LA possible? I am afraid the ExtRAMData would be always located at the address 0x19000. That is, VA might be ignored. By the way, what the tool chain do you use?
Best regards,
Yasuhiko Koumoto.
Sorry, I wasn't clear on the mapping. ExtRAMData section VA is in ram at 0x2000099c and it is loaded from 0x08017170. The size of ExtRAMData is 0x19000.
I think I understood your situation. You should copy from 0x08017170 (flash) to 0x2000099c (SRAM) in the startup routine. The value of SRAM area is undefined and you should initialize it by the values in the flash. If the ExtRAMData is an array of null data, you can directly write the values of 0 in the ExtRAMData. The program would be carried out only by VA.
Best regards,Yasuhiko Koumoto.