Linux ubuntu串口下载stm32(工具爲stm32flash)

来源:互联网 发布:吉他如何挑选知乎 编辑:程序博客网 时间:2024/06/06 11:35

  进入root

  cd /home/heyaowu/桌面/stm32flash

Linux下用于串口下载stm32固件的程序,

Usage:./stm32flash [-bvngfhc] [-[rw] filename] /dev/ttyS0

-brate Baud rate (default 57600)

-rfilename Read flash to file

-wfilename Write flash to file

-uDisable the flash write-protection

-en Only erase n pages before writing the flash

-vVerify writes

-ncount Retry failed writes up to count times (default 10)

-gaddress Start execution at specified address (0 filename= flashstart)

-sstart_page Flash at specified page (0 = flash start)

-fForce binary parser

-hShow this help

-cResume the connection (don't send initial INIT)

*Baudrate must be kept the same as the first init*

Thisis useful if the reset fails

Examples:

Getdevice information:

./stm32flash/dev/ttyS0

Writewith verify and then start execution:

./stm32flash-w filename -v -g 0x0 /dev/ttyS0

Readflash to file:

./stm32flash-r filename /dev/ttyS0

Startexecution:

./stm32flash-g 0x0 /dev/ttyS0

OK 就这么简单
0 0
原创粉丝点击