arduino 操作stm32

操作步骤

  1. 下载相关文件点击这里,主要下载Arduino_STM32  STM32duino-bootloader两个压缩包
  2. Arduino_STM32放到arduino\hardware目录下面,
  3. 添加开发板
  4. 向STM32烧写Bootloader,把boot0插到1的位置,boot1插到0的位置。然后插入你的串口下载线(C8T6,这个片子的Tx和Rx分别对应引脚PA9和PA10)
  5. CDM输入如下命令(注意串口号)

    stm32flash.exe -w generic_boot20_pc13.bin -v -g 0x0 COM14

    如果出现了下面提示,需要按一下核心板上的rest复位键

    λ stm32flash.exe -w generic_boot20_pc13.bin -v -g 0x0 COM5
    stm32flash 0.4

    http://stm32flash.googlecode.com/

    Using Parser : Raw BINARY
    Interface serial_w32: 57600 8E1
    Failed to init device.
     

    之后烧录正常

    λ stm32flash.exe -w generic_boot20_pc13.bin -v -g 0x0 COM5
    stm32flash 0.4

    http://stm32flash.googlecode.com/

    Using Parser : Raw BINARY
    Interface serial_w32: 57600 8E1
    Version      : 0x22
    Option 1     : 0x00
    Option 2     : 0x00
    Device ID    : 0x0410 (Medium-density)
    - RAM        : 20KiB  (512b reserved by bootloader)
    - Flash      : 128KiB (sector size: 4x1024)
    - Option RAM : 16b
    - System RAM : 2KiB
    Write to memory
    Erasing memory
    Wrote and verified address 0x080056fc (100.00%) Done.

    Starting execution at address 0x08000000... done.

  6. 之后可以使用电源接口下载程序了

路过的坑

一、git因为墙太慢,在这里分享下https://ageshare.lanzous.com/ibp9v2d

二、之前用的ttl连接win10电脑有问题,可以更新驱动解决,驱动分享https://ageshare.lanzous.com/ibpdmub

未完待续。。。

猜你喜欢

转载自blog.csdn.net/yyandad/article/details/105659633