cancel
Showing results for 
Search instead for 
Did you mean: 

Program multiple STM32 MCUs at the same time

BBori.1
Associate II

Hello!

I'm trying to program multiple STM32F432VIT6 MCUs at the same time, from the same computer using many ST-LINKV2 connected via USB.

I want it to be automatic so I'm using the ST-LINK Utility CLI to program them via C#.

So far I've been able to list all the ST-LINK devices connected to the computer and to program the board when only one device is connected, but when I connect two devices I can not give the program instruction -P the serial number of the device I want to target.

I think it should be possible since the ST-LINK Utility Tool has a list in which one can select the target device.

I'm following the ST-LINK Utility Manual

Does someone has an idea of how can I achieve this?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions

-c is not one command, it's a switch. You can and shall use several switches simultaneously. The -c switch tells the program, which STLink are you going to use, the -P switch tells, which file is to be programmed.

JW

View solution in original post

4 REPLIES 4

> -P the serial number of the device I want to target.

Where do you get this from?

-P is used to determine the file to be programmed.

You want to use -c ID=*** or -c SN=xxxx

Syntax: -c [ID=/SN=] [JTAG/SWD] [FREQ=] [UR/HOTPLUG] [LPM]

[ID=]: ID of ST-LINK[0..9] to be used when multiple probes are connected to the host

[SN=]: Serial Number of the chosen ST-LINK probe.

JW

The Cube Programmer app might have​ additional options, but I'm sure it could accept and index.

To scale you might want to use the DLL interface.​

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

Hello, thank you for you answer

Maybe I'm not fully understanding the use of the command -c, but how do I load a hex file into a micro using this command? I can specify the SN, but can I flash the device?

-c is not one command, it's a switch. You can and shall use several switches simultaneously. The -c switch tells the program, which STLink are you going to use, the -P switch tells, which file is to be programmed.

JW