first commit
This commit is contained in:
26
openocd.cfg
Normal file
26
openocd.cfg
Normal file
@@ -0,0 +1,26 @@
|
||||
# STM32F103C8 "Blue Pill" — OpenOCD 配置
|
||||
# 关键:必须声明调试器(interface) + 选择传输方式(transport),再 source 目标芯片
|
||||
# 原因:OpenOCD 自带的 board/stm32f103c8_blue_pill.cfg 只有 target,缺 interface,
|
||||
# 会报 "Debug adapter does not support any transports"
|
||||
|
||||
# ===== 1. 调试器 (interface) =====
|
||||
# ST-LINK/V2(含廉价克隆版 USB 小棒)—— 蓝色 Pill 最常见
|
||||
source [find interface/stlink.cfg]
|
||||
|
||||
# 如果你用的是别的调试器,注释掉上面那行,改成下面其中一行:
|
||||
# source [find interface/stlink-v2.cfg] # 仅 ST-LINK/V2
|
||||
# source [find interface/stlink-v2-1.cfg] # ST-LINK/V2-1 (Nucleo 板载)
|
||||
# source [find interface/cmsis-dap.cfg] # DAPLink / CMSIS-DAP 兼容器
|
||||
# source [find interface/jlink.cfg] # SEGGER J-LINK
|
||||
|
||||
# ===== 2. 传输方式 (transport) =====
|
||||
# stlink.cfg 用的是 hla 适配器,必须用 hla_swd(不能写 swd)
|
||||
transport select hla_swd
|
||||
# 若上面改用了 cmsis-dap.cfg,请改用: transport select cmsis-dap
|
||||
# 若上面改用了 jlink.cfg, 请改用: transport select swd
|
||||
|
||||
adapter speed 1000
|
||||
|
||||
# ===== 3. 目标芯片 (target) =====
|
||||
set FLASH_SIZE 0x20000
|
||||
source [find target/stm32f1x.cfg]
|
||||
Reference in New Issue
Block a user