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 ebay.in.
Step 2: 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 .
Download and install this drivers
Step 3: Hardware Connections
Connect board and ST link in following manner.
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.
Step 5: 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
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_18.104.22.168701261202\tools\compiler\bin;C:\Ac6\SystemWorkbench\plugins\fr.ac6.mcu.externaltools.arm-none.win32_22.214.171.124701261202\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
For load .elf file in controller you have to configure debugger. configuration shown in image
Step 9: 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
dkhairnar made it!