赞
踩
Processing bluepill_f103c8 (platform: ststm32; board: bluepill_f103c8; framework: libopencm3) ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- Verbose mode can be enabled via `-v, --verbose` option CONFIGURATION: https://docs.platformio.org/page/boards/ststm32/bluepill_f103c8.html PLATFORM: ST STM32 5.4.3 > BluePill F103C8 HARDWARE: STM32F103C8T6 72MHz, 20KB RAM, 64KB Flash DEBUG: Current (stlink) External (blackmagic, jlink, stlink) PACKAGES: tool-stm32duino 1.0.1, framework-libopencm3 1.1.0, toolchain-gccarmnoneeabi 1.70201.0 (7.2.1), tool-openocd 2.1000.190422 (10.0) LDF: Library Dependency Finder -> http://bit.ly/configure-pio-ldf LDF Modes: Finder ~ chain, Compatibility ~ soft Found 0 compatible libraries Scanning dependencies... No dependencies Checking size .pio/build/bluepill_f103c8/firmware.elf Memory Usage -> http://bit.ly/pio-memory-usage DATA: [ ] 0.0% (used 0 bytes from 20480 bytes) PROGRAM: [ ] 1.0% (used 684 bytes from 65536 bytes) Configuring upload protocol... AVAILABLE: blackmagic, dfu, jlink, mbed, stlink CURRENT: upload_protocol = stlink Uploading .pio/build/bluepill_f103c8/firmware.elf GNU MCU Eclipse OpenOCD, 64-bitOpen On-Chip Debugger 0.10.0+dev-00593-g23ad80df4 (2019-04-22-20:18) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html debug_level: 1 hla_swd adapter speed: 1000 kHz adapter_nsrst_delay: 100 none separate none separate Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477 in procedure 'program' ** OpenOCD init failed ** shutdown command invoked *** [upload] Error 1 ================================================================================== [ERROR] Took 1.05 seconds ================================================================================== The terminal process terminated with exit code: 1 Terminal will be reused by tasks, press any key to close it.
Warn : UNEXPECTED idcode: 0x2ba01477 Error: expected 1 of 1: 0x1ba01477
~/.platformio/packages/tool-openocd/scripts/target/stm32f1x.cfg
把set _CPUTAPID 0x1ba01477
改为set _CPUTAPID 0x2ba01477
。platformio.ini
中[env...]
下添加upload_flags = -c set CPUTAPID 0x2ba01477
swj_newdap $_CHIPNAME cpu -irlen 4 -ircapture 0x1 -irmask 0xf
后添加-expected-id $_CPUTAPID -expected-id 0x2ba01477
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。