cancel
Showing results for 
Search instead for 
Did you mean: 

I need support for Linker configuration to place critical section of code in internal flash

ADeva.2
Associate II

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 ??

4 REPLIES 4
FBL
ST Employee

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.


I'm out of offce with limited access to my emails.
Happy New Year!
ADeva.2
Associate II

Sorry MCU is STM32H745

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.​

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

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