Skip to main content
ADeva.2
Associate
March 22, 2023
Question

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

  • March 22, 2023
  • 4 replies
  • 1470 views

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

This topic has been closed for replies.

4 replies

Technical Moderator
March 22, 2023

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 "Best answer" on the reply which solved your issue or answered your question.Best regards,FBL
ADeva.2
ADeva.2Author
Associate
March 22, 2023

Sorry MCU is STM32H745

Tesla DeLorean
Guru
March 22, 2023

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 VenmoUp vote any posts that you find helpful, it shows what's working..
ADeva.2
ADeva.2Author
Associate
March 23, 2023

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