STM32F103C8T6 with Arduino IDE

Add the Arduino STM32 core. Goto and download the entire repository as a zip file. Extract the zip file to ~/Documents/Arduino/hardware on a mac, My Documents\Arduino\Hardware on windows. If the hardware folder does not exist, create it. If your zip file extracts to anything other than a folder called Arduino_STM32, rename it to Arduino_STM32.

Add the Arduino SAM Board Manager from within the Arduino IDE. Open Tools > Board > Boards Manager and search for SAM. Install that Board Manager (Arduino SAM Boards).

As Board choose Generic STM32F103 Series. As Variant selectSTM32F103C8 20K Ram 64K Flash. As Upload Method choose serial. CPU speed 72Mhz normal.

Connect the STM 32 microcontroller to the USB serial adapter and that adapter to your PC via usb. The USB Adapter has to be switched to 3.3 Volts using the jumper.

If you look at the Adapter so that the USB connection points away from you and the pins point towards you, we will number the pins from left to right (Pin 1, Pin 2 (TX) , Pin 3 (RX), Pin 4, Pin 5 (VDD), Pin 6 (GND))

The USB adapter will supply power to the microcontroller because it is connected to the PC via USB. To route the power to the microcontroller, connect GND from the adapter to the GND pin on the Microcontroller and the 3.3Volt line to the 3.3V input on the Microcontroller.

For the data transfer via the serial protocol, connect TX and RX. The documentation says that TX is Pin PA9 on the Microcontroller and Pin 2 on the Adapter. RX is Pin PA10 on the Microcontroller and Pin 3 on the Adapter.

In order for the Microcontroller to write data from the serial pins into the flash, place the jumper BOOT 0 into the position labeled with a 1.

In the Arduino IDE, select a blink sketch. File > Examples > A_STM_Examples > Digital > Blink. There is also a General > Blink which you should not use. Use the Digital > Blink.

No change PB1 in the code to PC13 because this is the on board LED on the STM32F103C8T6 boards. There are several occurences in the sketch, replace all of them.

Upload the sketch to the board which makes the LED blink.

As a sidenote, I tried programming the board after putting in on the yellow pins that came with the controller and connecting the USB serial adapter via cables plugged into the breadboard and not directly into the Microcontroller Board. I could not programm the board even once using the yellow pins! It just would not work. I think the proper way is to solder connectors onto the Microcontroller board.