Skip to main content
Skuma.6
Associate II
October 20, 2020
Solved

How to run code from RAM in stm32h7b3i using CubeIDE.

  • October 20, 2020
  • 2 replies
  • 1363 views

Hi

By changing linker script file of GPIO_Toggle code such that it points to RAM . And loaded the .hex and .bin ( specifying start program address as 0x20000000 ). The code looks like get stuck and never toggles LED. But when run in debug mode through cubeIDE . I see LED toggling. Can you please point out what and where i need to do changes to make code run in RAM other than in linker script Using stm32h7b3i-dk , cubIDE and cubeprogramer.

This topic has been closed for replies.
Best answer by Skuma.6

I could make it work by changing .ld with this

RAM  (xrw)  : ORIGIN = 0x24000000,  LENGTH = 1024K

Now i can run for RAM without issue.

2 replies

Skuma.6
Skuma.6Author
Associate II
October 20, 2020

I also uncommented this line

#define VECT_TAB_SRAM in "system_stm32h7xx.c" file.

All works well with debugger but when i load .hex to RAM the code does not run.

Skuma.6
Skuma.6AuthorBest answer
Associate II
October 21, 2020

I could make it work by changing .ld with this

RAM  (xrw)  : ORIGIN = 0x24000000,  LENGTH = 1024K

Now i can run for RAM without issue.