ghostkinglee 2022-07-16 17:49 采纳率: 0%
浏览 466

stm32g4系列使用cmsis dap与openocd下载程序时报错

cmsis-dap 在swd模式下 使用openocd下载,之前是可以下载的,但现在一直出现

 Warn : Adding extra erase range, 0x0801eb30 .. 0x080407ff
Error: write into gap from 0x08010000 to 0x0803FFFF
Error: error writing to flash at address 0x08000000 at offset 0x00000000
embedded:startup.tcl:1162: Error: ** Programming Failed ** in procedure 'program'

情况如下:

xPack OpenOCD x86_64 Open On-Chip Debugger 0.11.0+dev (2022-03-25-17:32)
Licensed under GNU GPL v2
For bug reports, read
        http://openocd.org/doc/doxygen/bugs.html
Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,disable}
Info : CMSIS-DAP: SWD  supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : clock speed 2000 kHz
Info : SWD DPIDR 0x2ba01477
Info : [stm32g4x.cpu] Cortex-M4 r0p1 processor detected
Info : [stm32g4x.cpu] target has 6 breakpoints, 4 watchpoints
Info : gdb port disabled
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
** Programming Started **
Info : device idcode = 0x20036469 (STM32G47/G48xx - Rev 'unknown' : 0x2003)
Info : RDP level 0 (0xAA)
Info : flash size = 128kbytes
Info : flash mode : dual-bank
Info : gap detected from 0x08010000 to 0x0803FFFF
Warn : Adding extra erase range, 0x0801eb30 .. 0x080407FF
Error: write into gap from 0x08010000 to 0x0803FFFF
Error: error writing to flash at address 0x08000000 at offset 0x00000000
embedded:startup.tcl:1162: Error: ** Programming Failed **
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 1227
at file "embedded:startup.tcl", line 1162

已经尝试更改过keil编译下载没有出现问题
也更改了openocd的版本,除了"embedded:startup.tcl", line 的号码不同外其他信息相同

还请高人指点一二,这个已经折磨我两天了。

  • 写回答

4条回答 默认 最新

  • 「已注销」 2022-10-10 22:52
    关注

    D:\OpenOCD\bin\openocd.exe -s D:\OpenOCD\share\openocd\scripts -f E:\GitHub\STM32H7VBT6\ClionTemplate\LED\stm32h750b-disco.cfg -c "tcl_port disabled" -c "gdb_port disabled" -c "tcl_port disabled" -c "program "E:/GitHub/STM32H7VBT6/ClionTemplate/LED/cmake-build-debug/LED.elf"" -c reset -c shutdown
    [0m[0mOpen On-Chip Debugger 0.11.0 (2021-11-18) [https://github.com/sysprogs/openocd]
    Licensed under GNU GPL v2
    libusb1 09e75e98b4d9ea7909e8837b7a3f00dda4589dc3
    For bug reports, read
    http://openocd.org/doc/doxygen/bugs.html
    Info : DEPRECATED target event trace-config; use TPIU events {pre,post}-{enable,
    disable}
    none separate

    Info : CMSIS-DAP: SWD supported
    Info : CMSIS-DAP: Atomic commands supported
    Info : CMSIS-DAP: FW Version = 1.11
    Info : CMSIS-DAP: Interface Initialised (SWD)
    Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
    Info : CMSIS-DAP: Interface ready
    Info : clock speed 1000 kHz
    Info : SWD DPIDR 0x6ba02477
    Info : stm32f1x.cpu: Cortex-M7 r1p1 processor detected
    Info : stm32f1x.cpu: target has 8 breakpoints, 4 watchpoints
    Error: stm32f1x.cpu -- clearing lockup after double fault
    Polling target stm32f1x.cpu failed, trying to reexamine
    Info : stm32f1x.cpu: Cortex-M7 r1p1 processor detected
    Info : stm32f1x.cpu: target has 8 breakpoints, 4 watchpoints
    Info : gdb port disabled
    target halted due to debug-request, current mode: Thread
    xPSR: 0x01000000 pc: 0xfffffffe msp: 0xfffffffc
    ** Programming Started **
    Error: Cannot identify target as a stm32x
    Error: auto_probe failed
    embedded:startup.tcl:1029: Error: ** Programming Failed **
    in procedure 'program'
    in procedure 'program_error' called at file "embedded:startup.tcl", line 1094
    at file "embedded:startup.tcl", line 1029

    评论

报告相同问题?

问题事件

  • 创建了问题 7月16日

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分