2024-03-08 07:35 AM
Hi all,
we have successully used an external SPI memory to store images.
We have defined an external Flash section in our linker file
ExtFlashSection :
{
*(ExtFlashSection ExtFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >SPI_FLASH
and then extract the images from elf file with this command:
arm-none-eabi-objcopy.exe --dump-section ExtFlashSection=images.bin Test.elf
All works perfectly.
Now we want to store the fonts into the external memory. From the TouchGfx guide we see that we have to add the font section into linker file and thats ok.
ExtFlashSection :
{
*(ExtFlashSection ExtFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >SPI_FLASH
FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >SPI_FLASH
Now:
should we extract two separate bin files (one for the images and one for the fonts)? And in that case should we merge the bin togheter?
arm-none-eabi-objcopy.exe --dump-section ExtFlashSection=images.bin Test.elf
arm-none-eabi-objcopy.exe --dump-section FontFlashSection=font.bin Test.elf
Do you have any hints?
Thank you in advance for your help.
Best regards
Solved! Go to Solution.
2024-03-14 06:49 AM
Hello @SafeDev ,
No, you don't need to separate them into two different binaries. You just need to dump both sections into one .elf file. As a reference, you can take a look at the Board Setup available for STM32G071RB_NUCLEO on TouchGFX Designer. There is a similar setup for having Fonts and Images on the SPI Flash.
I hope this helps you,
Good luck
2024-03-14 06:49 AM
Hello @SafeDev ,
No, you don't need to separate them into two different binaries. You just need to dump both sections into one .elf file. As a reference, you can take a look at the Board Setup available for STM32G071RB_NUCLEO on TouchGFX Designer. There is a similar setup for having Fonts and Images on the SPI Flash.
I hope this helps you,
Good luck
2024-03-14 11:52 PM
Hi Mohammad,
well in the end we solved by extract the two files and then merge them with an external tool and it works!
Thank you
Best regards
2024-03-15 03:33 AM
Hi Mohammad,
ok, got it but how I could load my external flash with the elf file using STM Cube Programmer?
Thank you
Best regards
2024-03-15 03:54 AM
Hello again,
There is a broad documentation available here that you can refer to for assistance. You can create your own custom external loader.
Kind regards,