peng-zhihui / ElectronBot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

求助:使用Clion编译stm32f429IGT6工程无报错,但是无法下载,以下是配置文件和输出信息

Ccccccccat opened this issue · comments

openOCD 配置文件:ST_link.cfg
`# choose st-link/j-link/dap-link etc.
#adapter driver cmsis-dap
#transport select swd
source [find interface/stlink.cfg]
transport select hla_swd
source [find target/stm32f4x.cfg]

download speed = 10MHz

adapter speed 100`

下载时运行窗口的信息:
"D:\Program Files\STMicroelectronics\STM32Cube\OpenOCD-20211118-0.11.0\bin\openocd.exe" -s "D:\Program Files\STMicroelectronics\STM32Cube\OpenOCD-20211118-0.11.0\share\openocd\scripts" -f C:\Users\kangjia\CLionProjects\stm32\test\config\ST_link.cfg -c "tcl_port disabled" -c "gdb_port disabled" -c "tcl_port disabled" -c "program "C:/Users/kangjia/CLionProjects/stm32/test/cmake-build-debug-mingw-_stm32/test.elf"" -c reset -c shutdown
�[0mOpen On-Chip Debugger 0.11.0 (2021-11-18) [https://github.com/sysprogs/openocd]
�[0mLicensed under GNU GPL v2
libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
Info : The selected transport took over low-level target control. The results mi
ght differ compared to plain JTAG/SWD
adapter speed: 100 kHz

Info : clock speed 100 kHz
Info : STLINK V2J37S7 (API v2) VID:PID 0483:3748
Info : Target voltage: 3.217426
Info : stm32f4x.cpu: Cortex-M4 r0p1 processor detected
Info : stm32f4x.cpu: target has 6 breakpoints, 4 watchpoints
Info : gdb port disabled
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000d3c msp: 0x20030000
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
Info : Unable to match requested speed 8000 kHz, using 4000 kHz
** Programming Started **
Info : device id = 0x20016419
Info : flash size = 1024 kbytes
Info : Single Bank 1024 kiB STM32F42x/43x/469/479 found
** Programming Finished **
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
shutdown command invoked

下载的时候虽然一阵飘红,实际上程序已经烧录进去,现在的问题是不能仿真......
ScreenClip

问题已解决,原因是我安装openOCD的路径中含空格,导致Clion找不到相应的文件。
仔细看log才发现的。