2024-05-22 05:25 AM
Hello everybody,
I am building a regression test system and I want to control an ST-Link with a Python script/program. I need the capability to set Breakpoints and optimally extract them automatically from the hex file that gets flashed on the MCU. I need to be able to toggle some debug pins on the MCU as well from within the same program and I need to flash the MCU. So, the question is what is the best way to do things like that and is there any official support from ST for something like that or something similar.
Thanks in advance
2024-05-22 05:48 AM - edited 2024-05-22 06:10 AM
Go via GDB ?
Added: https://developers.redhat.com/blog/2017/11/10/gdb-python-api
and/or use the STM32CubeProgrammer command-line or C++ API ?
2024-05-22 06:27 AM
https://github.com/pyocd/pyOCD ?
> I need the capability to set Breakpoints and optimally extract them automatically from the hex file that gets flashed on the MCU.
Sorry, what? extract breakpoints from hex file? If you mean to patch bkpt instructions in the hex, of course you can do this with python.
2024-05-29 09:56 AM
This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.