The_M_Code
The_M_Code

Reputation: 157

How to setup STM32f103c8T Bluepill + Platformio + UART the right way?

I've been trying to figure out how to upload a code to a STM32103c8T bulepill board. My setup is

1- MacOs Catalina 2- STM32103c8T bulepill board 3- SLAB UART USB-TTL CP2012 V3.0 4- Platformio IDE 5- STM32 CUBE Programmer software which detects and connects to my board through UART. meaning that It has no problem connecting but there are issue with setting up the Platformio

BTW I am new to the ARM world and I bought this board to examine its speed and deep sleep and interrupt, I mean all the things that an Arduino Uno can't do.

The thing is I have no idea on how to setup the platformio.ini File to comunicate with the board using the UART method and not requesting ST-link dongle!

What I have now in Platformio.ini is:

[env:bluepill_f103c8]

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

and when trying to upload the program i get:

Uploading .pio/build/bluepill_f103c8/firmware.elf xPack OpenOCD, x86_64 Open On-Chip Debugger 0.10.0+dev-00378-ge5be992df (2020-06-26-12:31) Licensed under GNU GPL v2 For bug reports, read http://openocd.org/doc/doxygen/bugs.html

debug_level: 1

hla_swd

none separate

Error: open failed

in procedure 'program'

OpenOCD init failed

shutdown command invoked

[upload] Error 1

I just need help getting the system talk to each-other and see each-other

P.S. I want to go as bareMetal as possible and not to use arduino firmware HAL

Upvotes: 2

Views: 1888

Answers (1)

Cogno-Slayer
Cogno-Slayer

Reputation: 13

You can use the following configurations:

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

Upvotes: 1

Related Questions