# This is an STM32U083C-DK board with a single STM32U083MCTx chip # # Generated by STM32CubeIDE # Take care that such file, as generated, may be overridden without any early notice. Please have a look to debug launch configuration setup(s)
source [find interface/stlink-dap.cfg]
set WORKAREASIZE 0x8000
transport select "dapdirect_swd"
set CHIPNAME STM32U083MCTx set BOARDNAME STM32U083C-DK
# Enable debug when in low power modes set ENABLE_LOW_POWER 1
# Stop Watchdog counters when halt set STOP_WATCHDOG 1
# STlink Debug clock frequency set CLOCK_FREQ 8000
# Reset configuration # use hardware reset, connect under reset # connect_assert_srst needed if low power mode application running (WFI...) reset_config srst_only srst_nogate connect_assert_srst set CONNECT_UNDER_RESET 1 set CORE_RESET 0
# ACCESS PORT NUMBER set AP_NUM 0 # GDB PORT set GDB_PORT 3333
/usr/bin/openocd -s /usr/share/openocd/scripts -f "/home/shishengmi/code/STM32/U0_debug_test/U0_debug_test Debug.cfg" -c "tcl_port disabled" -c "gdb_port disabled" -c "tcl_port disabled" -c "program \"/home/shishengmi/code/STM32/STM32U0DK_Test/cmake-build-debug-arm_gcc/STM32U0DK_Test.elf\"" -c reset -c shutdown Open On-Chip Debugger 0.12.0 Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html Info : STLINK V2J43M28 (API v2) VID:PID 0483:3752 Info : Target voltage: 3.208438 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 : [STM32U083MCTx.cpu] Cortex-M0+ r0p1 processor detected Info : [STM32U083MCTx.cpu] target has 4 breakpoints, 2 watchpoints Info : gdb port disabled Info : [STM32U083MCTx.cpu] external reset detected [STM32U083MCTx.cpu] halted due to debug-request, current mode: Thread xPSR: 0xf1000000 pc: 0x08001210 msp: 0x20008000 Info : Unable to match requested speed 8000 kHz, using 4000 kHz Info : Unable to match requested speed 8000 kHz, using 4000 kHz ** Programming Started ** Warn : Cannot identify target as an STM32G0/G4/L4/L4+/L5/U5/WB/WL family device. Error: auto_probe failed embedded:startup.tcl:1516: Error: ** Programming Failed ** in procedure 'program' in procedure 'program_error' called at file "embedded:startup.tcl", line 1581 at file "embedded:startup.tcl", line 1516
这里非常重要我们可以看到这里提示“Cannot identify target as an STM32G0G4/L4/L4+/L5/U5/WB/WL family device.”,就是说我本地全局安装的的OpenOCD还是识别不了STM32U0,但是为什么STM32的OpenOCD就可以识别并下载呢?我们来仔细看一下CubeIDE的OpenOCD开头,