FontFlashSection in memory mapped SDRAM
Hello,
My architecture is based on STM32H750 with an external memory mapped SDRAM used to store the framebuffer and -willingly- used to store at runtime assest such as texts fonts and images.
I’ve modified my linker file to:
MEMORY
{
FWINFO (rx) : ORIGIN = 0x24000000, LENGTH = 16
FWVER (rx) : ORIGIN = 0x24000100, LENGTH = 256
RAM_EXEC (xrw) : ORIGIN = 0x24000200, LENGTH = 523776
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
SDRAM (xrw) : ORIGIN = 0xC0400000, LENGTH = 4096K
SDRAMASSETS(xrw) : ORIGIN = 0xC0000000, LENGTH = 4096K
}
[…]
FontSearchFlashSection :
{
*(FontSearchFlashSection FontSearchFlashSection.*)
. = ALIGN(4);
} >SDRAMASSETS
TextFlashSection :
{
*(TextFlashSection TextFlashSection.*)
. = ALIGN(4);
} >SDRAMASSETS
FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
. = ALIGN(4);
} >SDRAMASSETS
ExtFlashSection :
{
*(ExtFlashSection ExtFlashSection.*)
. = ALIGN(4);
} >SDRAMASSETSSDRAM will contain the frambuffer, while SDRAMASSETS will contain the font and images sections.
I wrote an external loader which loads assets in the external SDRAM before firmware execution. I’ve checked that the copied binary is byte-to-byte with the expected binary file. To do this I’ve executed after compile the command:
call arm-none-eabi-objcopy.exe -O binary -v --gap-fill 0xff FW08_Application.elf FW00_Application_SDRAM.bin -j FontFlashSection -j ExtFlashSection -j TextFlashSection -j FontSearchFlashSectionand checked with a tool (winmerge) that is exactly what is written in SDRAM memory.
The application runs (it’s just a test application) but I get even characters garbled: 0 is ok, 1 garbled, 2 ok, 3 garbled.
Running the exact same application but changing
FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
. = ALIGN(4);
} > RAM_EXECMakes it work perfectly: see picture below.
Any hints on how to solve this?
