cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 Programmer CLI - Read Without Reconnecting

AJelen
Associate II

Hello there

As per document UM2237, I am using command:

STM32_Programmer_CLI.exe -c port=SWD index=1 mode=HOTPLUG

to connect to the device. Successfully, device is connected.

In case of reading a specified memory, one uses e.g. command:

STM32_Programmer_CLI.exe -c port=SWD index=1 Fast mode=HOTPLUG -r32 0x20000000 0x00000002

Which works as a charm. However... these command (directly taken from ST UM2237), issue a connection each time a read is issued.

Of course I tried with only command:

STM32_Programmer_CLI.exe -r32 0x20000000 0x00000002

However the "Error: connection to target must be established first." pops up.

Here bares the question. Is it possible to connect to target only once and then trigger some readings, without reconnecting each time?

Thank you!

1 ACCEPTED SOLUTION

Accepted Solutions
Sara BEN HADJ YAHYA
ST Employee

Hello @AJelen​ ,

Thanks for your feedback,

Using STM32 CubeProgrammer CLI, you need to connect the target in each command. However, you can use Cubeprogrammer Script Manager which supports all STM32CubeProgrammer CLI commands and some macros to manipulate data read from STM32 MCU (more details in UM2237, section 2.10)

You can also use CubeProgrammer C++ API to write your own code to program the memories STM32 microcontrollers (more details in UM2237, section 6).

I hope this helps!

Sara.

View solution in original post

3 REPLIES 3
Pavel A.
Evangelist III

> Is it possible to connect to target only once and then trigger some readings, without reconnecting each time?

CubeIDE has API library which should enable you to do this (write some code...)

Sara BEN HADJ YAHYA
ST Employee

Hello @AJelen​ ,

Thanks for your feedback,

Using STM32 CubeProgrammer CLI, you need to connect the target in each command. However, you can use Cubeprogrammer Script Manager which supports all STM32CubeProgrammer CLI commands and some macros to manipulate data read from STM32 MCU (more details in UM2237, section 2.10)

You can also use CubeProgrammer C++ API to write your own code to program the memories STM32 microcontrollers (more details in UM2237, section 6).

I hope this helps!

Sara.

AJelen
Associate II

Thank you Sara and Pavel for the response.

Have a nice Easter! :)