first commit

This commit is contained in:
2026-08-10 23:36:24 +08:00
commit d363e04b64
63 changed files with 40518 additions and 0 deletions

26
openocd.cfg Normal file
View 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]