STM32F103C8X Minimal Development Board + ST Link V2 + STM Workbench
by dkhairnar in Circuits > Microcontrollers
19488 Views, 32 Favorites, 0 Comments
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
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 ebay.in.
http://www.ebay.in/itm/STM32F103C8T6-ARM-STM32-Minimum-System-Development-Board-Module-/132081076420
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 .
3.3v
Reset
DIO
CLK
GND
Download and install this drivers
Hardware Connections
Connect board and ST link in following manner.
STLINK------>STM32 Board
pin1(Reset)---(R)
pin2(3.3v)---(3.3v)
pin4(T_SWCLK)--(DCLK)
pin6(T_SWDIO)--(DIO)
pin7(GND)----(GND)
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.
Install it.
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
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
Write Main.c Code
Copy past following code into src>main.c
Download This Program And Build using build button
Debugging
For load .elf file in controller you have to configure debugger. configuration shown in image
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