$ st-flash write ./bin/stm32_bin_image.bin 0x08000000 以下日志表示成功 st-flash 1.8.0 2024-07-08T14:53:24 INFO common.c: STM32F1xx_MD: 20 KiB SRAM, 64 KiB flash in at least 1 KiB pages. file ./bin/stm32_bin_image.bin md5 checksum: 5e908f9c1f5ce5aa7b606ea58a28bf, stlink checksum: 0x0002a810 2024-07-08T14:53:24 INFO common_flash.c: Attempting to write 3308 (0xcec) bytes to stm32 address: 134217728 (0x8000000) -> Flash page at 0x8000c00 erased (size: 0x400) 2024-07-08T14:53:24 INFO flash_loader.c: Starting Flash write for VL/F0/F3/F1_XL 2024-07-08T14:53:24 INFO flash_loader.c: Successfully loaded flash loader in sram 2024-07-08T14:53:24 INFO flash_loader.c: Clear DFSR 2024-07-08T14:53:24 INFO flash_loader.c: Clear CFSR 2024-07-08T14:53:24 INFO flash_loader.c: Clear HFSR 4/4 pages written 2024-07-08T14:53:24 INFO common_flash.c: Starting verification of write complete 2024-07-08T14:53:24 INFO common_flash.c: Flash written and verified! jolly good! 2024-07-08T14:53:24 INFO common.c: Go to Thumb mode
Failed to enter SWD mode Found 1 stlink programmers version: V2J37S7 serial: 0F000900012D353436455744 flash: 0 (pagesize: 0) sram: 0 chipid: 0x000 dev-type: unknown
问题
1、缺少动态库
1 2 3
# st-flash write ./bin/stm32_bin_image.bin 0x08000000 st-flash: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory
st-flash write ./bin/stm32_bin_image.bin 0x08000000 st-flash 1.8.0 Failed to enter SWD mode Failed to connect to target Failed to parse flash type or unrecognized flash type