cancel
Showing results for 
Search instead for 
Did you mean: 

External Loaders for ST-Link V2

lee2399
Associate II
Posted on September 10, 2015 at 16:53

I'm looking for a good source of either developed external loaders for the ST-Link V2 or a good reference on modifying the existing loaders that come with the ST-Link utility, I am trying to program a NOR flash (N25Q032A11EF6) attached to a STM32F405RGT6 or a STM32F401RET6. Can anyone help? Thanks. 

Ultimately the goal is to be able to individually address 10 different ST-Link V2s (I need to be able to use the command line interface to select a unique programmer based on the serial number) to program 10 units nearly simultaneously. The way I am currently programming the external memory is with a program loaded to the STM32 through a make file that is part of the WICED SDK, which has config files to be able to use the ST-Link, a Olimex, etc. 

#stm32f4 #st-link
5 REPLIES 5
Posted on September 10, 2015 at 17:58

Can anyone help?

Looks straightforward enough, what are you offering?

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lee2399
Associate II
Posted on September 10, 2015 at 18:46

My heartfelt gratitude? 

Posted on September 10, 2015 at 20:55

Unfortunately that won't paint my fence..

So what's the technical hurdle here?

You are presumably familiar with your own hardware configuration, and using the flash device outside of the programming applet?

The loader applet is an ELF object, with specific function/variable names (symbols) which ST's loader is expecting. It payloads your code into RAM, and then calls you to initialize your hardware (processor clocks, PLL, pins, SPI, etc), and then with data buffers it provides expects you to Read or Write blocks of data to your device, or Erase/Mass Erase, etc. The ST tools are responsible to get your code into memory, and the pattern buffers in/out, and your code is responsible to deal with your hardware as it presents on the device.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
lee2399
Associate II
Posted on September 11, 2015 at 00:38

That's the problem, I am not that familiar with this particular STM32 chip. I am developing a test platform that will be loading someone else's firmware, and then running a long series of tests using LabView and TestStand. I need to find a way to 'gang program' the units under test to reduce the overall test time.

I know all of the hex commands for the nor flash, and know where the STM32F401 maps that external memory, I can get all of the GPIO/SPI pins that are connected to the nor flash from the schematic that I have, but I am not experienced with using the MDK_ARM /uVision debugger development environments, so I don't know how to get that information into the Dev_Inf.c and Loader_Src.c files, where to find the chip specific include files (none of the examples that ST provides are for the STM32F4 family) or how to build those files into a new .stldr file. I was hopping someone would have a link to somewhere with fairly detailed instructions on how to do this, or even an online database where ST-Link users shared .stldr files that they had developed.

Thanks for your interest Clive1.  

Posted on September 11, 2015 at 01:36

ST only released this feature in the most recent ST-LINK Utilities, the source released has been highly selective, not least because they technically ''don't have'' a Standard Peripheral Library (SPL) for the L4 and F7 parts, and it's pretty apparent they do. The underlying code for the RCC, SPI, GPIO, etc is the SPL, or a subset of it. It's building to a relocatable object/library rather than to a .HEX or .BIN, as it's drawing out symbols and structures.

The apps here are highly board and chip specific, so it's the kind of task that would normally fall on the Board-Support-Package guy on the team. The detail is perhaps a bit light, but I think there's enough detail to port to any given platform, and it's not markedly different from similar methods used by tool chains like Keil for their Flash Algorithm implementations.

I should perhaps create an App Store, and build to order.

I don't work for ST.

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