cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 External Loader

yldzmuhammed
Associate III

Hello everyone,

I am developing a project with STM32F750N8 using Keil IDE, JLink Edu debugger.

Also using W25Q128 QSPI Flash. I want to load my hex to the qspi flash and run the software from there (with memory mapped mode).

I build a BSP Library that can hadle read, write, init, sector (64KB) and full chip erase, enabling memory mapped mode. Tested every function and no problem.

But somehow my external loader project not working. I cant program my board with external loader.

I attached my project folder.

What should i do?

4 REPLIES 4

Do you record HEX? Write down at what address? It looks like 0x90000000. The first, the executable code must be written in bin format, the second, where you have control transfer to the program being written. Your code always starts with 0x08000000.

Hello,

Have you noticed that, that project is External Loader project. Not Application project.

"Your code always starts with 0x08000000." how do you know? I have changed the linker script and project setting menu values. But for external loaders, that address has to be 0x20000000?

yldzmuhammed
Associate III

I still have this problem.

HMcKi
Associate III

Hey @yldzmuhammed​ , are you still stuck on this?

The examples and resources to write a 'Flash Programming Algorithm' for Keil looked too difficult and time consuming for me. I thought it would be simpler to write an external loader for STCubeMXProgrammer (v2.2.1) instead. The ST examples aren't great, but they are far more palatable than the Keil ones in my opinion.

Took me 2 days but I now have an external loader working with a custom board, STM32F765, Keil IDE, ST-Link Debugger,W25Q128JV via QSPI. The external loader uses the HAL libraries and would easily hook into your bsp_qspi_flash.c.

Once its working with the STCubeMXProgrammer tool I think it would be alot easier to get a Keil 'Flash Programming Algorithm' working.

Resources:

UM2237 User manual STM32CubeProgrammer software description Page 25

Example External Loader Projects after installing STM32CubeProgrammer are located in C:\Program Files\STMicroelectronics\STM32Cube\STM32CubeProgrammer\bin\ExternalLoader

Example External Loader Project for STM32F7XX after installing ST-Link

C:\Program Files (x86)\STMicroelectronics\STM32 ST-LINK Utility\ST-LINK Utility\ExternalLoader\N25Q512A_STM32F769I-EVAL