Sorry if this has already been addressed, I just can't find anything about it and I've been searching for ages.
I'm used to projects using stand-alone Atmega chips and Arduino Bootloader, there are plenty of tutorials online and it's simple to do. I've done several PCBs with just the MCU, a couple of capacitors, a crystal, and the SPI pins, and that's all you need to upload the Arduino bootloader and upload your code with an Arduino IDE. I'm sure many of you are familiar with this process.
But my problem now is that I need to do something similar with an STM32F103C8T6. I made a prototype for a project using a Blue Pill board. I'm using PlatformIO and uploading the code with a ST-LINK V2 using the Arduino framework. Essentially an Arduino code, as you can see from this snippet of my platformio.ini file:
Code: Select all
[env:bluepill_f103c8]
platform = ststm32
board = bluepill_f103c8
framework = arduino
upload_port = COM[11]
My goal is to build a PCB for my project using a stand-alone STM32F103C8T6 chip like this: https://br.mouser.com/ProductDetail/STM ... 2FDA%3D%3D
And I would like to be able to upload the same code I already did with my ST-LINK v2, obviously making small necessary adjustments. I just don't know exactly how to do it. I'm assuming it's not just cloning the schematics to my board, connecting the ST-LINK to the DCLK and DIO, and hitting upload on the IDE. Is there a way to, say, upload an Arduino bootloader? Is there some proper way to do this? Or do I have to rely on a STM32CubeIDE and rewrite my entire code?
Thanks!