Introduction: STM32F103C8X Minimal Development Board + ST Link V2 + STM Workbench

Picture of STM32F103C8X Minimal Development Board + ST Link V2 + STM Workbench

How to get start with STM32? You have seen tutorial around "how to program STM32 using Arduino", but in this tutorial I am going to setup environment on STM Test bench for native development of STM32 microcontroller

Step 1: Development Board

STM32F103C8x is powerful ARM Cortex M3 microcontroller ( Datasheet). Having 64k of flash memmory and 20k of SRAM. it is suitable for small form factor devices. the development board I used here can be buy from

Step 2: ST Link V2

Picture of ST Link V2

This programmer is clone of original ST link V2. It can support JTAG and SWD protocol for debugging. Its is very cheap programmer which can program STM8 and STM32 both microcontrollers. her also given pin names we are going to use 5 pins .






Drivers for windows

Download and install this drivers

Step 3: Hardware Connections

Picture of Hardware Connections

Connect board and ST link in following manner.

STLINK------>STM32 Board






Step 4: Install STM Workbench for Windows

Downlaod STM work bench from official website of ST semiconductors. It is free IDE for STM development.You need to sign up for download it.

STM work bench

Install it.

Step 5: Create Blinky Project to Blink LED

Picture of Create Blinky Project to Blink LED

On board PC13 Pin is connected to LED we are goinig to blink it

Create new Project as shown in images

Step 6: Configure Project Path

Picture of Configure Project Path

navigate as shown in image.

It is important to configure minimum required path for project to avoid conflict with other utilities from GCC compilers.

I used this path variable

C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.1.201701261202\tools\compiler\bin;C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_1.13.1.201701261202\tools\make;C:/Program Files/Java/jdk1.8.0_77/bin/../jre/bin/server;C:/Program Files/Java/jdk1.8.0_77/bin/../jre/bin;C:/Program Files/Java/jdk1.8.0_77/bin/../jre/lib/amd64;C:\Windows\system32;C:\Program Files\Java\jdk1.8.0_77\bin;C:\Ac6\SystemWorkbench

Step 7: Write Main.c Code

Copy past following code into src>main.c

Download This Program And Build using build button

Step 8: Debugging

Picture of Debugging

For load .elf file in controller you have to configure debugger. configuration shown in image

Step 9: Execution of Progrma

Picture of Execution of Progrma

after successful open debug made. click on Play button and see break point hit. and observe the led on board star blink


boingx (author)2017-02-23

I really enjoyed following along on your Instructable. I ran into a problem using Workbench when I tried to go into debug. It gave an error and would not reset or transfer the program to the board. I could transfer the bin file using the ST-LINK utility successfully.

I have used your program in the free version of Atollic TrueSTUDIO without any issues, but would like to get Workbench working.

Have you or anyone by chance run into this type of problem? I saw on the web where it was suggested to change the reset line in the .cfg file. It didn't work for me.

dkhairnar (author)boingx2017-02-27

boingx can you post your debug log. It would help to track problem

DavidV12 (author)2017-02-18

Note that nearly all (every one of the 20+ I own) C8 chips actually have 128k of flash and can be programmed as a CB.

dkhairnar made it! (author)DavidV122017-02-20

I verified memory using STM32 ST link utility it shows 64k of memory. If you have reference then please reply

DavidV12 (author)dkhairnar2017-02-20

The stm32flash serial flash utility will let you access the full range if present.

dkhairnar (author)DavidV122017-02-19

Thank you David for your reply.The value I picked up from datasheet, is the minimum value of memory size i.e. – 64 or 128 Kbytes of Flash memory. I will verify memory map on hardware.

MarcoV37 (author)2017-02-18

Do you have a link to that tutorial for the stm32 with Arduino?

dkhairnar (author)MarcoV372017-02-19

no I dont have any link but I can create it.

About This Instructable



More by dkhairnar:Start Programming ESP3212 With Arduino IDEArduino 2.4 TFT Touch Screen LCD InterfaceGesture Controlled HID Mouse Using STM32 and Accelerometer
Add instructable to: