2023-03-21 10:29 PM
We are using STM32H743 MCU (dual core). we are running our code for external SD RAM. We are using SPI2 peripheral with DMA and need to place the code for SPI driver and library in internal flash so that it can be run at max speed on M4 core
Can you send the linker file to place certain code in internal flash ??
2023-03-22 03:30 AM
Hello @ADeva.2
Thank you for contacting ST Community,
STM32H743 is single core. Could you be more specific about your question: "Can you send the linker file to place certain code in internal flash ??"
> Using STM32CubeIDE, for example, here is some steps, in your main file, you can declare a buffer of variables with the correct attributes for the memory region.
Then in the linker script, you can define a memory region where you can define the section needed. You can check this introduction to linker script.
Hope this helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2023-03-22 03:33 AM
Sorry MCU is STM32H745
2023-03-22 03:37 AM
It would help to see the current script and how exactly you expect to floorplan the memory.
The sections of memory should be easy enough to define, and how content is directed via __attribute__ is reasonably well defined.
2023-03-22 08:01 PM
To be more specific I want the following things:
1) All peripheral driver code (GPIO and SPI) to be run from internal and not external SD RAM (Currently all the code is going in external SD RAM)
2) I have a specific library for interfacing external ADC which also goes into external SD RAM
Since we are using M4 core and running it from SD RAM it is having some performance degradation in terms of execution speed compared to running it from internal flash
I have attached the current linker script here