Tagged: fmc stm32 nor execute in place
June 11, 2018 at 12:59 #21070
I’m trying to use the FMC bus of a STM32F427 with an external NOR flash memory.
I want to put some constant in the external flash and acces it like if it was into the internal memory.
It’s for an audio player, get constant data from external memory and play it on the SAI peripheral.
It’s working perfectly with constant data into internal memory, but I don’t have enougth space, that’s why I want to use an extrnal NOR flash on FMC bus.
I’ve found the tutorial https://visualgdb.com/tutorials/arm/memories/
But I don’t have a VisualGDB Custom Edition, and so I can’t use the “Additional Memories” feature.
I would like to know if I can just modify the linker script and startup file to add a text section to another address like :
FLASH (RX) : ORIGIN = 0x08000000, LENGTH = 1M
SRAM (RWX) : ORIGIN = 0x20000000, LENGTH = 192K
CCMRAM (RWX) : ORIGIN = 0x10000000, LENGTH = 64K
NOR_FLASH_EXT (RX) :ORIGIN = 0x90000000, LENGTH = 64M
. = ALIGN(2);
_stext_ext_const = .;
. = ALIGN(2);
_etext = .;
} > NOR_FLASH_EXT
Or if I need more modifications ? If yes, what is it ?
Is the binary file will include automatically the constant data of the external NOR flash ?
How can I programm the MCU after ? with st link utility ?
I’m newbee with the FMC bus usage, so sorry for all this questions.
Thanks all for your replies
JulienJune 12, 2018 at 04:16 #21074
The External Memories page of VisualGDB Project Properties is essentially a convenient graphical way of editing the linker scripts and defining the macros for assigning individual variables to sections. So if you are not using the Custom edition, you can achieve the same functionality by editing the files manually (we can also show the necessary modifications to the XML files to make the custom memories appear in Embedded Memory Explorer). You can find extensive documentation on the GNU linker scripts here. Another source of information would be to look through the ST examples from STM32Cube that support external memories (e.g. QSPI).
That said, if you don’t want to manually handle the linker scripts and prefer a convenient GUI that will handle the necessary edits for you, upgrading to the Custom edition might be worthwhile. You could use this page to get an automatic upgrade quote.June 12, 2018 at 08:57 #21075
Thanks for your answer.
I’ve already modify some linker script by hand to add bootloader or enable CCM RAM.
So I gess I can modify by hand too to add the external memory, based on the ST examples.
I just was afraid if something else was modifyed, but you said not, so I happy 😉
Thanks againJune 13, 2018 at 04:36 #21081
No problem. Let us know if you encounter any further problems and we will be happy to help.
You must be logged in to reply to this topic.