cancel
Showing results for 
Search instead for 
Did you mean: 

Firmware update : Dual-Bank External Flash Management for TouchGFX Storage

ClemD
Associate

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

1 REPLY 1

Most of the stuff the linker will be generating has a fixed address. Not sure the TouchGFX provides for a more abstract or file-system approach.

One of the problems would be that you can't memory map and write to the QSPI peripheral concurrently.

You could stage new material in the second bank, and then copy it to the first, or run a complete second instance from the second bank, but it would need to be built for that address.

There isn't a remapping method to make it appear at the earlier address

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..