STM32CubeIDE使用PTD01 DAP Debugger配置方法

开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

问题:

STM32CubeIDE默认都是ST-Link的配置,突然换到PTD01 DAP Debugger,需要做调整配置,这里做个记录,为后续开发做点铺垫。STM32CubeIDE使用PTD01 DAP Debugger配置方法。

原理图设计:

原理图设计如下,这里看,没有拉出来复位线,需要使用软件复位,下面配置有说关于复位的方式

修改配置文件

修改配置文件,步骤如下图所示,这里主要时修改工程目录下的.cfg文件

实际修改后的文件如下,这里注意,还对复位方式做了修改

这里给出了复位指令

仍然存在问题:

修改配置文件完成,并使用后,还出现如下问题。这些错误表面还是没有配置好.cfg文件,文件最后给出一个正常使用的配置文件

Debug时提示如下错误

详细错误如下:

Error in final launch sequence: Failed to execute MI command: load D:\\xxx\\DelayTest.elf Error message from debugger back end: Error erasing flash with vFlashErase packet Failed to execute MI command: load D:\\xxx\DelayTest.elf Error message from debugger back end: Error erasing flash with vFlashErase packet Failed to execute MI command: load D:\\xxx\\DelayTest.elf Error message from debugger back end: Error erasing flash with vFlashErase packet Error erasing flash with vFlashErase packet

Error in final launch sequence:

Failed to execute MI command:

target extended-remote localhost:3333

Error message from debugger back end:

localhost:3333: Connection timed out.

Failed to execute MI command:

target extended-remote localhost:3333

Error message from debugger back end:

localhost:3333: Connection timed out.

localhost:3333: Connection timed out.

有效的配置文件参考

有效的配置文件,选择了软复位,可以和读者的.cfg进行比对,看看哪里出错了。如果上述原理图设计了引出了复位线,应该也可以选择硬复位。

# This is an genericBoard board with a single STM32F407IGTx 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/cmsis-dap.cfg]


set WORKAREASIZE 0x8000

transport select "swd"

set CHIPNAME STM32F407IGTx
set BOARDNAME genericBoard

# 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 software system reset if reset done
reset_config none
set CONNECT_UNDER_RESET 0
set CORE_RESET 0

# ACCESS PORT NUMBER
set AP_NUM 0
# GDB PORT
set GDB_PORT 3333





# BCTM CPU variables

source [find target/stm32f4x.cfg]

$_TARGETNAME configure -event gdb-detach {
    gdb_detach_hook
    reset
}

开发板推荐:天空星STM32F407VET6开发板

超高性价比 STM32主控 | 超高主频 | 一板兼容百芯 | 比赛神器 | 沉金彩色丝印

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

大牛攻城狮

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值