2023-03-12 03:14 PM
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!
Solved! Go to Solution.
2023-03-13 03:10 AM
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.
2023-03-12 05:54 PM
> 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...)
2023-03-13 03:10 AM
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.
2023-04-12 03:29 AM
Thank you Sara and Pavel for the response.
Have a nice Easter! :)