cancel
Showing results for 
Search instead for 
Did you mean: 

External flash loader for h7

sivaram
Associate III

I am trying to develop external flash loader, which will use the cubeprogrammer utility, I am facing the following error,

1) When I try to use cubeide for the project, If I remove the main and made necessary changes in startup.s and in linker, getting the following linker error "./arm-none-eabi/lib/crt0.o: In function `_start'"

2) When I try to use the atollocstudio, I am able to compile and run in target but the processor resets on executing the following line of HAL Init

 SystemCoreClock = HAL_RCC_GetSysClockFreq() >> ((D1CorePrescTable[(RCC->D1CFGR & RCC_D1CFGR_D1CPRE)>> RCC_D1CFGR_D1CPRE_Pos]) & 0x1FU);

Same code when ran from Flash memory executes without any issues.

3) Also I found that when I moved all the programs to RAM then the ISR's are being hit, the same code executing from flash works without any issues.

12 REPLIES 12

Examined the elf using objcopy seems to be correct, compared with the example stldr of the H7. Tried reading, writing from the cubeprogrammer, and programmed to turn on led on those respective functions. Not working. Attaching the output of readelf.

cVass.1
Associate II

Hello.

did you manage to create the external loader for your stm32h.

Yes, can you share your loader project with me.

thank you

sivaram
Associate III

We couldn't make it work, ended up writing our own loader which will execute from flash.