cancel
Showing results for 
Search instead for 
Did you mean: 

Building a custom external loader for a custom board based on a STM32F7 MCU

soumaya BEN MANSOUR
Associate II
Posted on April 26, 2017 at 16:32

Hi community,

I have to write an external loader that is capable of programming a flash memory.

I'm working on a custom board based on a STM32F7 MCU with the framework touchGFX to realise a graphical user interface.For this I use an external loader which will allow the ST link to load the code into the card. I need the external loader for touchGFX because the assets (images, font ...) are too large to be loaded into the memory of the MCU and have to be loaded directly into the flash.

The micro controller that I’m using at present is

the same as the STM32F769I-Discovery board

,NOR Flash Memory is from micron

(

N25Q128A13ESE40E)and IDE is keil.

The difficulty is actually what to put exactly in the external loader in addition to the information of the flash, what's the whole file structure and especially how to compile the code so that it is readable by the ST link.

Do you have any experiences writing an external loader on your own? or do you have examples codes for the external loader of stm32f769i or stm32f746g?

Thanks in advance

Note: this post was migrated and contained many threaded conversations, some content may be missing.
8 REPLIES 8
Khouloud GARSI
Lead II
Posted on April 26, 2017 at 18:24

Hi Soumaya,

There is an application note

http://www.st.com/content/ccc/resource/technical/document/application_note/group0/a7/3c/23/3b/05/2d/45/73/DM00281415/files/DM00281415.pdf/jcr:content/translations/en.DM00281415.pdf

: Programming an external Flash memory using the UART bootloader built-in STM32 microcontrollers.

This application note is provided with an example firmware '

http://www.st.com/en/embedded-software/x-cube-extboot.html

' showing how to program an external Quad-SPI flash memory using a developed user boot-code based on the internal UART bootloader protocol. 

In fact, the example has been tested with STMicroelectronics STM32446E-EVAL board; But, it can be easily tailored to any other supported device and development board.

I advise you to have a look at it.

Khouloud.

Posted on June 09, 2017 at 13:04

Hi Khouloud,

You have just marked my question as resolved, and until yet I didn't find the solution.

Can you tell me what is your solution please.

Thanks in Advance

Posted on June 09, 2017 at 13:29

Hi Soumaya,

The

 '

X-CUBE-EXTBOOT

'

  frmware uses 

STM32446, but you may refer to it to build your own bootloader application using the STM

32f769 or STM32f746 devices.

Please keep me posted if something is not clear on the example.

Khouloud.

Posted on June 19, 2017 at 11:47

Hi , I have same problem. I am going  to program w25q128FV from ST-Link with custom stm32f746bg board.

I used N25Q256A_STM32L476G-EVAL example in installed ST-Link software. but .stldr file generated with this example does not correctly  identify with ST-Link.

0690X00000603tXQAQ.jpg

why??

Posted on June 19, 2017 at 13:49

Hi nahvi, at the beginning, I have the same problem

. Then I used the old iar 7.4 to compile the example. The 

.stldr file can be identified correctly by ST-Link Utility, but not sure the functions are OK. I implemented a program loader of N25Q064A with custom stm32f746ng board. It can be identified but functions are not working. and I am still struggling with it.

Posted on June 19, 2017 at 14:33

Your options generally are to instrument the code you have implemented so it outputs telemetry/diagnostic info via a USART, or that you test the code prior to integrating it into the loader.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on June 21, 2017 at 16:53

Thank you, I already implemented the qspi serial flash loader, everything works well. So the only issue is ST-Link Utility can NOT recognize the loader generated by new IAR (I tried 7.70.1, and 8.11.2)

Posted on June 21, 2017 at 19:22

Not using IAR, but suspect you'd need to review the .ICF file, the ST-LINK utils have specific requirements in the form/presentation of the object file.

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