Loading...
 

SW4STM32 and SW4Linux fully supports the STM32MP1 asymmetric multicore Cortex/A7+M4 MPUs

   With System Workbench for Linux, Embedded Linux on the STM32MP1 family of MPUs from ST was never as simple to build and maintain, even for newcomers in the Linux world. And, if you install System Workbench for Linux in System Workbench for STM32 you can seamlessly develop and debug asymmetric applications running partly on Linux, partly on the Cortex-M4.
You can get more information from the ac6-tools website and download (registration required) various documents highlighting:

System Workbench for STM32


Multiple targets flashing with openocd

Hello,

I’m using OpenOCD to flash STM32 with the command window. I want to know
how I can flash different target by using the serial port, or the id, or
other things that allow multiple flashing by using cmd command. (He
needs to be in a program who automate that so isnt possible to switch
manually the ID in the code.

For the moment i’m using basic cfg script :
openocd -f /board/st_nucleo_f0.cfg -f flash.cfg”

with flash.cfg :

init
reset init
halt
flash write_image erase P:/ProjetS8/Projet8/envoie_puf.bin 0x08000000
reset
shutdown

If also try to find multiple target by writing this in the board cfg but it doesnt work:

source find target/stm32f0x.cfg
source find target/stm32f0x1.cfg

targets
foreach t target names {
targets $t
targets
reset_config srst_only
init
reset init
halt
flash write_image erase P:/ProjetS8/Projet8/envoie_puf.bin 0x08000000
reset
shutdown
}

Thanks for your help !

Hi,

not really sure how you can flash all of the available devices using just OpenOCD, but I have this config to select specific boards:


interface hla
hla_serial 066CFF485457725187111418



So, for each new ST-Link I have to find their USB device ID, create a new %ID%.cfg file with the text above (using the new USB_ID instead of 066CFF485457725187111418.

I guess you can develop a program to scan for all USB devices with the ST-Link PID and VID, get their serial number and use it to create a new .cfg file and call openocd again.

If you find a solution thet just uses a .cfg file let me know, I never had to do this but it seems interesting.

EDIT

I use ((https://www.nirsoft.net/utils/usb_devices_view.html|USBDeview ))with Windows 10 to get the serial numbers. I’ve attached a screenshot of what an ST Link shows using that program.


I can’t use this solution, but thanks for your help :-)
At the end, I want a mass production api that can flash all connected STM with only a click on a button (C# code behind the api).

If I can find different target, I think I can flash them one by one. But the problem, I dont know how to scan to find different target and to check if they really exist or not, because one time there can be 3 stm and the other time only 2.


Hello,
And why not using STLink utility CLI (on windows) or the new Cube Programmer (all Oses).
You could call the CLI exe from your tool software.
But it is the same approach using the STLINK S/N to select the ID.

Not using S/N, you could use the STVP_CMdLine.exe for windows only.
ST Visual Programmer can program STM32 and with the CLI, you can use an option “NbTools” to loop on all STLink connected.
It will program your appli on all targets automatically.
ST toolset Install available here :
http://www.st.com/content/st_com/en/products/development-tools/software-development-tools/stm32-software-development-tools/stm32-programmers/stvp-stm32.htmlQuestion

Rgds,
Laurent


Had no idea that such tool existed. Problem solved :-)

Which one are you using finally, STVP ?

I’m still trying with Openocd.
I’m pretty sure something like that can work :

source find stlink-v2-1.cfg

transport select hla_swd

set CHIPNAME test1
source find stm32f0x.cfg
set CHIPNAME test2
source find stm32f0x.cfg

reset_config srst_only

foreach t target names {
targets $t
flash bank 0 stm32f1x 0x08000000 0x00000000 0 0 $t
flash list
flash write_image erase envoie_puf.elf 0x08000000
reset
}
shutdown

But actually I have this error : invalid subcommand “write_image erase”.
If I use “program envoie_puf.elf” instead it’s work but only for one target detected. If there is more, OPENOCD crashs.
Dont know if using ST toolset will help me.