I am using the STM32F429 microcontroller to control a controller display via the FCM peripheral. Currently this is working since it takes the images saved as bitmap in the internal flash. Due to limited space, the idea is to use an external nor flash memory.
All these images are defined in a .c file, each one represented by a const array. In scatter file it was defined that this file is placed in the external flash (0x600000000). Then the program compiles and links without problem and when the variables are displayed in the display window they have the correct memory position.
However, all external memory is full of 0xFF, it does not store the values of the variables.
How can this goal be achieved? Is the solution well posed using const array for each bitmap or is there a better solution?
you need an external loader algorithm. In Keil, you can find some pre-defined algorithms in the Keil installation folder (C:\Keil\ARM\Flash) maybe there is a compatible algorithm with your MCU and external nor flas. If there isn't you must implement you own algorithm
Hello Jordi, thank you very much for the answer. I have already defined a new algorithm from one of the predefined ones. Then add the algorithm in: Options for target -> Utilities -> Settings -> Flash download. Is it enough or do I need to use external software such as ST-LINK UTILITY or STM32CUBE PROGRAMMER? In case it is enough, if the memory is full of OxFF (erasure value), could the algorithm be wrong? Many thanks Juan
External Loaders are highly specific for memory chip, and board level wiring and pin choices.
You'd need something matching your design. If you lifted a reference design unchanged you could use the loader that was configured for that, ie one for an EVAL or DISCO board, for example.
You would need to define the memory to the linker by way of the Target GUI, or a scatter file, and then direct objects or content into the specific load region, either by name or attribute.
Like says Westonsupermare Pier, external Loader is hardware dependent. If you use a custom board design, with your components, you need implement your external loader for this hardware desing.
View all questions in Keil forum