Skip to main content
Kaniel Outis
Associate II
May 20, 2018
Question

Execute a binary file (code) from SDRAM on STM32F7 ?

  • May 20, 2018
  • 7 replies
  • 2417 views
Posted on May 20, 2018 at 16:13

Hi,

I want to execute my application code (binary file) from the SDRAM and not from internal flash.

I tried to begin with the example in the Cube FW package (FMC_SDRAM_MemRemap) but this example describes how to execute a function in sdram and not the whole code.

Could someone help me ? what should i modify to let the whole code (binary file .bin) executes from SDRAM ?

Thanks

Note that i'm using an STM32F756-Eval board

ELMHIRI.Syrine

‌

##external-sdram #sdram-fmc #sdram
This topic has been closed for replies.

7 replies

Tesla DeLorean
Guru
May 20, 2018
Posted on May 20, 2018 at 22:37

Do you want to copy the code out of FLASH into SDRAM, or run in SDRAM directly from the debugger?

In the debugger case you'll need to make a debugger script, or initialization file, that stands up all the clocks, pins, controller and memory for your specific board/parts before the debugger can download and execute for there.

For an application you'd get the linker to build an image for the SDRAM address, and then make a small FLASH based loader to stand up the SDRAM, copy the image, and then transfer control to it.

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
Kaniel Outis
Associate II
May 21, 2018
Posted on May 21, 2018 at 00:18

<< In the debugger case you'll need to make a debugger script, or initialization file, that stands up all the clocks, pins, controller and memory for your specific board/parts before the debugger can download and execute for there. >>

I didn't understand you, sorry!

I thought I must change something in the linker file and in the startup file in order to run my code from SDRAM. 

All i want is to execute the code from the SDRAN and not from FLASH.

what shoud i do ?

Tesla DeLorean
Guru
May 21, 2018
Posted on May 21, 2018 at 13:42

Changing the linker settings is one issue.

How are you planning on getting the code into the SDRAM?

Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..