使用到的 stlink 命令行工具
https://github.com/stlink-org/stlink

st-flash 烧录,读写芯片,擦除之类
st-info 主要获取芯片相关信息
st-util gdb调试的

在mac下推荐的安装方式如下:
brew install stlink

擦除芯片
./st-flash erase
2020-08-21T23:56:08 INFO common.c: F04x: 6 KiB SRAM, 16 KiB flash in at least 1 KiB pages.
Mass erasing

烧录
./st-flash write xxx.bin 0x8000000
file xxx.bin md5 checksum: f44aa7045a596c4693a908fc68a1972, stlink checksum: 0x0001ac10
2020-08-21T23:55:11 INFO common.c: Attempting to write 1220 (0x4c4) bytes to stm32 address: 134217728 (0x8000000)
2020-08-21T23:55:11 INFO common.c: Flash page at addr: 0x08000000 erased
2020-08-21T23:55:11 INFO common.c: Flash page at addr: 0x08000400 erased
2020-08-21T23:55:11 INFO common.c: Finished erasing 2 pages of 1024 (0x400) bytes
2020-08-21T23:55:11 INFO common.c: Starting Flash write for VL/F0/F3/F1_XL core id
2020-08-21T23:55:11 INFO flash_loader.c: Successfully loaded flash loader in sram
2/2 pages written
2020-08-21T23:55:11 INFO common.c: Starting verification of write complete
2020-08-21T23:55:11 INFO common.c: Flash written and verified! jolly good!

标签: none

添加新评论