2025-12-28 3:00 AM - edited 2025-12-28 3:01 AM
Hello,
I am using a custom environment for development and debugging for NUCLEIO-STM32F767ZI.
It is based on a custom devcontainer, VSCode and gdb-multiarch. On the server side I have OpenOCD, running on a ubuntu 24.04 PC. This is connected via USB to the board. The Board itself is not changed in any way, maybe I changed jumpers at some point, I would need to check this if this might effect the behavior.
The first connection after Powerup works always as expected, the Firmware is flashed and works as expected.
If I rebuild the project or flash the firmware again, the MCU is in some kind of undefined state.
Calls to different HAL functions fail, return Errors. As some return values are not verified within the generated calls, I don´t see the errors immediately, but very late during debugging. Missing interrupts as an example. The code is a simply generated STM32CubeMX project, without any changes. I am using only GPIOs and Systick interrupt so far.
I need the right Reset command for OpenOCD BEFORE or AFTER Firmware flashing.
According OpenOCD documentation, this depends on the board and how STLink is wired to the MCU.
Does anyone has experience on such a setup and have some tipps for the correct Reset command.
And which type of Reset is used inside STM32CubeIDE? Is there a way to retrieve any Logs from GDBServer and GDB inside STM32CubeIDE? If I try to connect STM32CubeIDE to OpenOCD, it fails with something like: This is not a STM32 Chip.
If I plug the board into my Windows PC, everything works as expected. But I want to use my Ubuntu PC for debugging and Development.
I tried to use
shows also the same, The chip restarts with initialization, but the errors are still there.
Inside OpenOCD are also commands like:
monitor soft_reset_halt
But they are refused by openocd with:
[stm32f7x.cpu] requesting target halt and executing a soft reset
Target stm32f7x.cpu does not support soft_reset_halt
I do not have further configuration in OpenOCD beside the delivered scripts for initialization. My openocd startup arguments look like this:
-f /usr/share/openocd/scripts/interface/stlink.cfg -f /usr/share/openocd/scripts/target/stm32f7x.cfg -f /home/<user>/openocd.cfg.
openocd.cfg contains only: bindto 0.0.0.0
I know, that there are STM32 Extensions for VSCode, But in the Videos I saw, they used a direct USB connection.
I want OpenOCD to be available on my network.
Thanks in Advance and Best Regards.
Dietrich
2025-12-28 3:52 AM - edited 2025-12-28 3:56 AM
I would also appreciate any type of documentation for the board, stlink or its connection to stm32f7.
I am still not used to ST documents. But this is not related to the documentatton itself.
Version information:
openocd --version
Open On-Chip Debugger 0.12.0
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
gdb-multiarch --version
GNU gdb (Debian 13.1-3) 13.1
Copyright (C) 2023 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.