Skip to main content
Graduate
February 28, 2024
Question

STM32H563ZI, Openocd configure and flash

  • February 28, 2024
  • 5 replies
  • 4679 views

Greetings!

 

Getting back into embedded after a long while. As the title says I am wanting to use STM32H563ZI with openocd, but it is not supported out of the box. I have gone through the readme and it looks like I need to create a specific `target/stm32h5x.cfg` file to use with this board. I just want to get working on command line right now. I am on a Mac.

 

I think I am missing something fundamental and/or gotten tunnel vision.

* Is there a template to create a new .cfg for this board somewhere.

* What is the usual process to get support for a new board ? Fork below repo, add new file, and submit a PR?

* I have looked at the following links but must be missing something. Thanks in advance!

https://openocd.org/doc/pdf/openocd.pdf

https://github.com/STMicroelectronics/OpenOCD

https://community.st.com/t5/stm32-mcus-products/nucleo-stm32h5-debugging-openocd/td-p/618225

 

 

    This topic has been closed for replies.

    5 replies

    Super User
    February 28, 2024

    The ST fork of OpenOCD is bundled with CubeIDE and it supports STM32H5. Just specify OpenOCD in your debugger configuration instead of "GDB server". It will create .cfg file for OpenOCD. If this does not work please report a bug.

     What is the usual process to get support for a new board

    If you mean - board based on STM32 - get the latest CubeIDE, it should support all released MCUs

     

    tebelAuthor
    Graduate
    February 28, 2024

    Got it, will take a look. Thanks!

    tebelAuthor
    Graduate
    February 29, 2024

    I am not seeing OpenOCD as an option. Also, my ultimate goal is to use Rust as a programming language. It looks like CubeIDE does not support this. What would be the best way to get this to work.Screenshot 2024-02-28 at 7.55.12 PM.pngScreenshot 2024-02-28 at 7.54.20 PM.png

    Super User
    March 2, 2024

    As Pavel writes, select stm32...appli. , like mine here:

     

    AScha3_0-1709417267174.png

    +

    >In Rust we don't trust.   :)  :)

    maybe...look here:

    https://community.st.com/t5/stm32-mcus-embedded-software/rust-support/m-p/234668

    ST Employee
    July 18, 2024

    Regarding Rust support, you can use probe-rs tools.

    Also if you use VS Code you can install rust-analyzer extension, and "debugger for probe-rs" extension.

     

    Super User
    March 2, 2024

    Select STM32 application. You've selected generic C++ app. (no idea why they left it in the menu).

    PavelA_0-1709416397082.png

    Rust... Sorry, not my sort of burger. In Rust we don't trust.

    Visitor II
    July 29, 2025

    OpenOCD setups for the STM32H563ZI can be a bit tricky, especially with newer targets. From what I’ve seen, ensuring you have the latest OpenOCD build with STM32H5 support and a proper .cfg file (matching the flash size and chip ID) makes a big difference. Sometimes adding a manual  in the script helps prevent flashing errors too.

    On a side note, I work on a side project called checkers spicy chicken  sandwich calories, which is more food-tech inspired than hardware, but I’ve learned a lot from microcontroller forums like this one when tinkering with IoT kitchen gadgets. Always great to see the community sharing solutions here.