cancel
Showing results for 
Search instead for 
Did you mean: 

Code execution FLASH & RAM - STM32F756xx

robert239955_stm1_st
Associate II
Posted on January 13, 2016 at 11:42

Hi, 

I have 2 applications. The first one I download to flash on adress 0x08000000. First application should copy second app from flash (adress 0x08040000) to RAM which start from 0x20010000.

I'm using Keil 5.

Configuration of first application is:

IROM1: Start: 0x8000000, size: 0x20000

IRAM1: Start: 0x20040000, size: 0x10000

Configuration of second application is:

IROM1: Start: 0x20010000, size: 0x30000

IRAM1: Start: 0x20040000, size: 0x10000

In second app I also uncomment line: #define VECT_TAB_SRAM 

The second application is copied to RAM OK, but it stops on its startup function.

Do I need to repeat the configuration in both applications (for eg. HAL_Init() or SystemClock_Config() functions)?

Have you some advice how to execute second app in RAM?

Regards,

Robert
3 REPLIES 3
piececakeof
Associate II
Posted on January 13, 2016 at 12:00

Hi Robert! Keil Ide is very complexcity ide, and whrn you build you project it INSERT a startup code where are some peripherals has initialized - NVIC, SYS_TICK,

FMC(if needed) and some other.. and then runs to main. So you can reinitialize this peripherals in different manner. Also watch to ini file that keil also can use as startup. for first aap i think you may not change this, but for the seconed - first thing you need - get deal you app with previous startup initialization. Also watch on the interrupt vector table - second app can make offset for it (always this file has named - startup.s). Sorry for my distinguish english. Best regards!

Posted on January 13, 2016 at 12:29

Other than setting SCB->VTOR none of the code in SystemInit() needs to run again if you did it in your loader application.

Make sure you don't have interrupts (SysTick?) running as you hand over control.

Suggest you step through the hand-over and into the app to understand where exactly it is jamming up.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
robert239955_stm1_st
Associate II
Posted on January 13, 2016 at 15:49

The problem was in size of RAM

The correct size is 0xC000.

Thanks for help 🙂