cancel
Showing results for 
Search instead for 
Did you mean: 

Must Flash.Id file be edited to write/erase an external flash memory?

FLuba.1
Associate III

Hi, i wanted to know the following. Must Flash.Id file be edited to write/erase an external flash memory? The following is written in Flash.ID file: " Set memory bank area and size if external memory is used". 

How can TouchGfx know that it must write(put all pictures) to external flash memory?

4 REPLIES 4

It's for the Linker to understand how to construct the object files. It doesn't care about how the memory works, or the erase and write methods. You could perhaps infer the alignment or allocation unit size.

The erasing and writing is the domain of the External Loader, and how STM32 Cube Programmer deals with the board, wiring and parts you have built.

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

Thanks for the answer. If i understand you correct, it's necessary to edit the "Flash .ID" file if i want to write and erase the external flash memory(with indirect write mode). i don't need an external bootloader, because i use my external flash memory to store images and data. Where can i find the necessary information about how i can edit this file to match the external memory that i use? Since i don't know what i precisely need to modify in this file etc.

People have written books on Linker Scripts, explaining how everything works is a bit beyond the scope of my participation. It's basically linear rules about how to place code/data in memory. There are lots of examples within the HAL examples.

You need something along the lines of this. Will need to change names and objects to suit

/* Specify the memory areas */
MEMORY
{
...
QSPI (rx)      : ORIGIN = 0x90000000, LENGTH = 16M
}

/* Define output sections */
SECTIONS
{
...
   .ExtQSPIFlashSection : { *(.ExtQSPIFlashSection) } >QSPI
}

 

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

If you just address the external flash thru a pointer or array located at absolute address, you don't have to touch the linker script (because the linker does not care). You only need to provide the base address and size of external flash in the linker script if you want the linker to automatically place data there (and in this case you'll need an "external loader" too).