|
发表于 2019-12-20 18:49:19
|
显示全部楼层
本帖最后由 dukelec 于 2019-12-20 18:53 编辑
我表示也經常遇到這個問題,我用的是開源的命令行工具,下載代碼後有一定概率不能自動運行,硬件也是 stlink-v2 和 2 線 sw
下代碼命令是:
st-flash --reset write build/xxx.bin 0x08000000
解決方法是單獨調用一下:
st-flash reset
反正寫在腳本裏面,多一行沒所謂。
幫助信息:
- duke@duke-pc ~ $ st-flash --help
- invalid command line
- stlinkv1 command line: ./st-flash [--debug] [--reset] [--format <format>] [--flash=<fsize>] {read|write} /dev/sgX <path> <addr> <size>
- stlinkv1 command line: ./st-flash [--debug] /dev/sgX erase
- stlinkv2 command line: ./st-flash [--debug] [--reset] [--serial <serial>] [--format <format>] [--flash=<fsize>] {read|write} <path> <addr> <size>
- stlinkv2 command line: ./st-flash [--debug] [--serial <serial>] erase
- stlinkv2 command line: ./st-flash [--debug] [--serial <serial>] reset
- Use hex format for addr, <serial> and <size>.
- fsize: Use decimal, octal or hex by prefix 0xXXX for hex, optionally followed by k=KB, or m=MB (eg. --flash=128k)
- Format may be 'binary' (default) or 'ihex', although <addr> must be specified for binary format only.
- ./st-flash [--version]
- duke@duke-pc ~ $
- duke@duke-pc ~ $ st-flash --version
- v1.5.1-18-g522188d
- duke@duke-pc ~ $
复制代码 |
|