|
From: Christoph K. <ku...@ku...> - 2025-09-17 11:57:40
|
Sorry, I was a bit hasty. So, step by step: I added -c "arm semihosting enable" -c "arm semihosting_fileio enable" to the OpenOCD Command line options field in STM32CubeIDE Debugger launch panel: Show command line gives: /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.4.200.202505051030/tools/bin/openocd "-f" "SEMI Debug.cfg" "-s" "/Users/kuku/STM32CubeIDE/workspace_1.4.0/SEMI" "-s" "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.100.202501240831/resources/openocd/st_scripts" "-c" "arm semihosting enable" "-c" "arm semihosting_fileio enable" "-c" "gdb_report_data_abort enable" "-c" "gdb_port 3333" "-c" "tcl_port 6666" "-c" "telnet_port 4444" Started and got the following error message: Open On-Chip Debugger 0.12.0+dev-00623-g0ba753ca7 (2025-04-30-14:20) [https://github.com/STMicroelectronics/OpenOCD <https://github.com/STMicroelectronics/OpenOCD>] Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html <http://openocd.org/doc/doxygen/bugs.html> Error: The 'arm semihosting' command must be used after 'init'. So I thought, I'd add a -c "init" in front of that, which make the two options (arm semihosting enable and arm semihosting_fileio enable" obviously understood by OpenOCD since it writes them out: Open On-Chip Debugger 0.12.0+dev-00623-g0ba753ca7 (2025-04-30-14:20) [https://github.com/STMicroelectronics/OpenOCD <https://github.com/STMicroelectronics/OpenOCD>] Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html <http://openocd.org/doc/doxygen/bugs.html> Info : STLINK V2J46M33 (API v2) VID:PID 0483:374B Info : Target voltage: 3.229804 Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : clock speed 4000 kHz Info : stlink_dap_op_connect(connect) Info : SWD DPIDR 0x6ba02477 Info : [STM32H503CBTx.ap0] Examination succeed Info : [STM32H503CBTx.cpu] Cortex-M33 r0p4 processor detected Info : [STM32H503CBTx.cpu] target has 8 breakpoints, 4 watchpoints STM32H503CBTx.cpu in Non-Secure state STM32H503CBTx TrustZone disabled STM32H503CBTx.cpu work-area address is set to 0x20000000 STM32H503CBTx.cpu work-area is enabled Info : [STM32H503CBTx.cpu] Examination succeed Info : gdb port disabled Info : starting gdb server for STM32H503CBTx.cpu on 3333 Info : Listening on port 3333 for gdb connections semihosting is enabled semihosting fileio is enabled Error: The 'gdb_report_data_abort' command must be used before 'init'. But then this last line? And as a control you can see the command line now: /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.4.200.202505051030/tools/bin/openocd "-f" "SEMI Debug.cfg" "-s" "/Users/kuku/STM32CubeIDE/workspace_1.4.0/SEMI" "-s" "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.100.202501240831/resources/openocd/st_scripts" "-c" "init" "-c" "arm semihosting enable" "-c" "arm semihosting_fileio enable" "-c" "gdb_report_data_abort enable" "-c" "gdb_port 3333" "-c" "tcl_port 6666" "-c" "telnet_port 4444" > Am 16.09.2025 um 23:33 schrieb Tommy Murphy <tom...@ho...>: > > With applied, I'm told that these commands have occur after an "init" command. > So I added > > -c "init" in front of the above two flags. > > Result is this: > Error: The 'gdb_report_data_abort' command must be used before 'init'. > This is the complete command line of OpenOCD: > > /Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.externaltools.openocd.macos64_2.4.200.202505051030/tools/bin/openocd "-f" "SEMI Debug.cfg" "-s" "/Users/kuku/STM32CubeIDE/workspace_1.4.0/SEMI" "-s" "/Applications/STM32CubeIDE.app/Contents/Eclipse/plugins/com.st.stm32cube.ide.mcu.debug.openocd_2.3.100.202501240831/resources/openocd/st_scripts" "-c" "arm semihosting enable" "-c" "arm semihosting_fileio enable" "-c" "gdb_report_data_abort enable" "-c" "gdb_port 3333" "-c" "tcl_port 6666" "-c" "telnet_port 4444" > > There's no -c "init" in that command line. |