cancel
Showing results for 
Search instead for 
Did you mean: 

Programming external QSPI flash on a custom Board

Hello

I'm working with a custom board based on a STM32F767IIT MCU with the framework touchGFX. The external flash is MT25QL512ABB8ESF.

Is there any solution to load the external flash with st-link utility or another tool?

Do I have to write an external loader for st-link? If so how can this be done?

Regards

Dejan

20 REPLIES 20
hansd56
Senior II

Download STM32CubeProgrammer. It has some external loaders.

0690X00000983vhQAA.jpg

Hi @hansd56​ 

The external loaders in STM32CubeProgrammer are only for the specific ST boards.

I have already tried some loader in this tool and didn't get it working.

I think my board is only working with a customized loader.

Regards

Dejan

hansd56
Senior II

Not sure if you can get the source code for the external loader.

https://mvdlande.wordpress.com/2015/10/14/building-an-custom-external-loader-for-st-link/

cameronf
Senior

If you plan on eventually writing a custom bootloader for this board you could prioritize that and use that as your primary way of flashing the external FLASH. That's what I've done in the past because I wasn't sure what options there were for custom external loaders and if it was feasible to make one with minimal effort.

I would definitely agree that you should write the flashing methods for your own loader first, in a way that you can thoroughly test and debug them. Whether they take data via serial/X-MODEM, or pull a file from an SD Card, having these working first will save a lot of time.

The External Loaders require a level of familiarity with the compiler, and linker, along with object files and methods used by loaders. The loaders here are very similar in construction to those used by Keil, so review/analysis of those is recommended.

Figure 1-day or 1-week of effort to write one, depending on experience.

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..
Andreas Bolsch
Lead II

If you don't want to write your own loader for STLink tool, you might give openocd with this patch http://openocd.zylin.com/4321 a try. The configuration for a particular board/chip is quite simple, more or less setting up the GPIOs for the proper alternate functions. Example setups for various discovery boards are included.

I would suggest using an STLink-V3, with 24 MHz SWD-clock programming up to 1 MByte/s is possible.

Thanks for all your responses.

I have tried to modify N25Q512A_STM32F769I-EVAL loader in Atollic TrueStudio. The build was successful and I renamed the .elf file to .stldr and copied it to the bin folder of ST Link-Utility and Cube Programmer. Both Tools are not displaying the modified external loader.

I have followed the instructions of UM2237 and the readme file of N25Q512A_STM32F769I-EVAL loader.

Has someone a hint for me?

Regards

Dejan

Hello,

How did you import N25Q512A_STM32F769I-EVAL to TrueStudio?

I've followed the readme copying to BSP folders but I couldn't get a compile project, it imports as file and not as a project.

@par How to use it ?

 - Place the folder "N25Q512A_STM32F769I-EVAL" under the following path inside the STM32F7 Cube firmware package   "STM32Cube_FW_F7_Vx.y.z" folder:

  STM32Cube_FW_F7_Vx.y.z\Projects\STM32F769I-EVAL\Examples\QSPI

 - Open your preferred toolchain

 - Rebuild all files and load your image into target memory

 - After build, the loader should be displayed in the external loaders window, ready-to-use

I've tried in TrueStudio, SW4STM32 and CubeIDE with same result.

Thanks.

Hi @eng23​ 

I've opened the .project file. Then created a folder "Loader" in the project and linked the c-files (as shown in the screenshot).

I got it compiling but it didn't work with the ST Link-Utility and Cube Programmer.

The ST Cube Programmer shows that it couldn't load the external loader.

0690X000009887mQAA.png