Skip to main content
MMüll.5
Associate II
May 22, 2024
Question

ST-Link contolled by Python

  • May 22, 2024
  • 3 replies
  • 1990 views

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

3 replies

Andrew Neil
Super User
May 22, 2024
A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.
Pavel A.
Super User
May 22, 2024

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.

 

 

Christian N
ST Employee
May 29, 2024

This post has been escalated to the ST Online Support Team for additional assistance. We'll contact you directly.