cancel
Showing results for 
Search instead for 
Did you mean: 

ST Utility External Loader Example

gokhannsahin
Associate II

Hi everyone,

I have to write a custom external loader and reviewed the examples. The read text of these examples say that after the folder placed inside cube files, it will run seamlessly. However, I can't do this, it needs lots of files to build. Please help me.

Using example: N25Q512A_STM32F769I-EVAL

Placed folder: ..STM32Cube_FW_F7_V1.12.0\Projects\STM32F769I_EVAL\Examples\QSPI

Toolchain : SW4STM32

28 REPLIES 28
gokhannsahin
Associate II

Thank you @Community member​ 

It works to build the project. However, it isn't still connected the external flash. Where do I mistake, please review my project ? All function run correctly, all has been double-checked.

Rebuilt based on understanding of the required functionality.

Assuming use of STM32 Cube Programmer tool.

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

Thank you, but it doesn't work. Again not connected to the external memory or erase it. I have checked the CS pin afterclicked the erase sector button on STCube Programmer. However, I don't see any changes this pin.

It gives an error as in attached image.

Unfortunately don't have any hardware to replicate the situation, working blind here.

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

I have tried set the a LED when Cube programmer calls the init function, but noticed that it never calls init function. Why? I set wrong setting of Keil?

Also, does it need a program is on internal flash in order to program the external memory with loader? Or not need, so the MCU can be empty?

Hi gokhannsahin !

I'am having somme weird issue too, trying to build a flash loader for the same STM32H750 but with a different flash chip.

I am using True studio and not Keil but I don't think this really is a IDE related issue.

My functions are tested and working too and we are at the same stage.

However I am a bit concerned about the structure StorageInfo, it is not really clear how to fill in the infos. For ex, the comment about the page size : I also have a 256bytes per page flash so I put 0x100 but looking at the comment "//Programming Page Size 16Bytes" does this mean the field unit is not 1 byte but one chuck of 16bytes ?

I also don't get why the default linker consider the start of the RAM at 0x20000004 specifically and not 0x20000000 ?

Anyway documentation is clearly missing here (or I did not found it).

Did you manage to get it working at the end ?

I think it is 0x20000004 because ST used 0x20000000 for other purposes, and it uses the remainder of RAM, beyond the loader(s), to store data it wants you to write to memory. The info section doesn't even need to load. But most of this is immaterial.

It might also want to relocate things, which is why it uses the ELF format, and have you use address independent code. Many of the boards have multiple external loaders for the different memories present.

The comments in the StorageInfo structure don't always track the content, ST does a rough edit rather than making things consistent/coherent. Beyond the size and address the Utilities/Programmer do their own thing, including estimating expected time-outs, etc.

If the part has 256 byte pages, code in 256

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

Did you manage to solve the problem? I am having the same issue. I am replicating the external loader of STM32H743I-EVAL with single Bank QSPI and facing the same issue.

Been several months, would need to dig up the notes/code. I do have an STM32H743I-EVAL and means to debug the loaders. Did have the NOR loader working, and have built QSPI loaders for a couple of the platforms. ST makes the process long, difficult and expensive.

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