【问题标题】:How to setup STM32f103c8T Bluepill + Platformio + UART the right way?如何正确设置 STM32f103c8T Bluepill + Platformio + UART?
【发布时间】:2020-12-05 06:36:21
【问题描述】:

我一直试图弄清楚如何将代码上传到 STM32103c8T bulepill 板。 我的设置是

1- MacOs Catalina 2- STM32103c8T bulepill 板 3- SLAB UART USB-TTL CP2012 V3.0 4- Platformio IDE 5- STM32 CUBE Programmer 软件,通过 UART 检测并连接到我的开发板。 表示连接没有问题,但设置 Platformio 有问题

顺便说一句,我是 ARM 世界的新手,我买了这个板来检查它的速度和深度睡眠和中断,我的意思是 Arduino Uno 无法做的所有事情。

问题是我不知道如何设置 platformio.ini 文件来与开发板通信 使用 UART 方式,不请求 ST-link dongle!

我现在在 Platformio.ini 中拥有的是:

[env:bluepill_f103c8]

platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_protocol = stlink
upload_port = tty.slab_usbtoUART

当我尝试上传程序时,我得到:

正在上传 .pio/build/bluepill_f103c8/firmware.elf xPack OpenOCD、x86_64 开放式片上调试器 0.10.0+dev-00378-ge5be992df (2020-06-26-12:31) 在 GNU GPL v2 下获得许可 有关错误报告,请阅读 http://openocd.org/doc/doxygen/bugs.html

调试级别:1

hla_swd

没有分开

错误:打开失败

在程序“程序”中

OpenOCD 初始化失败

调用关机命令

[上传]错误1

我只需要帮助让系统相互交谈并看到对方

附: 我想尽可能使用bareMetal,而不是使用arduino固件HAL

【问题讨论】:

    标签: stm32 uart platformio bluepill


    【解决方案1】:

    您可以使用以下配置:

    upload_protocol = serial
    upload_port = COMX/ttyx //whichever applies
    

    【讨论】:

      猜你喜欢
      • 2021-02-17
      • 2022-12-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-04-15
      • 2020-08-20
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多