Firmware update : Dual-Bank External Flash Management for TouchGFX Storage
Hi ST community,
I am developing firmware on the STM32H743 and I store the images and texts in BANK1 of an external Flash memory, specifically the 8MB MX25R6435F. To update my firmware, I write the new images, fonts, and texts to BANK2 (0x90400000) in the external flash and I utilize the swap memory of the STM32H7.
Here is my linker script:
/* Memories definition */
MEMORY
{
DTCMRAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
ITCMRAM (xrw) : ORIGIN = 0x00000000, LENGTH = 64K
RAM_D1 (xrw) : ORIGIN = 0x24000000, LENGTH = 512K
RAM_D2 (xrw) : ORIGIN = 0x30000000, LENGTH = 288K
RAM_D3 (xrw) : ORIGIN = 0x38000000, LENGTH = 64K
FLASH (rx) : ORIGIN = 0x8020000, LENGTH = 896K - 4 /* Last 4 bytes are used to store the CRC */
CRC (rx) : ORIGIN = 0x80FFFFC, LENGTH = 4
QUADSPI_BANK1 (r) : ORIGIN = 0x90000000, LENGTH = 4M
QUADSPI_BANK2 (r) : ORIGIN = 0x90400000, LENGTH = 4M
}
/* External Flash Section */
ExtFlashSection :
{
*(ExtFlashSection ExtFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK1
FontFlashSection :
{
*(FontFlashSection FontFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK1
TextFlashSection :
{
*(TextFlashSection TextFlashSection.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK1
/* External Flash Section updated Part */
ExtFlashSection_updated :
{
*(ExtFlashSection_updated ExtFlashSection_updated.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK2
FontFlashSection_updated :
{
*(FontFlashSection_updated FontFlashSection_updated.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK2
TextFlashSection_updated :
{
*(TextFlashSection_updated TextFlashSection_updated.*)
*(.gnu.linkonce.r.*)
. = ALIGN(0x4);
} >QUADSPI_BANK2
Initially, the image, font, and text data are stored in the QUADSPI_BANK1 section. How can I, after a swap memory by the H7, reconfigure TouchGFX to modify the new start adress to QUADSPI_BANK2 to access the updated images, fonts, and texts?
Thanks everyone for your help.
Clément
