cancel
Showing results for 
Search instead for 
Did you mean: 

How to run code from RAM in stm32h7b3i using CubeIDE.

Skuma.6
Associate II

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.

1 ACCEPTED SOLUTION

Accepted Solutions
Skuma.6
Associate II

I could make it work by changing .ld with this

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

Now i can run for RAM without issue.

View solution in original post

2 REPLIES 2
Skuma.6
Associate II

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
Associate II

I could make it work by changing .ld with this

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

Now i can run for RAM without issue.