STM32F3Discovery: Basic Project Template – Part-2

STM32F3DISCOVERY-board-imageThe Part 1 [STM32F3Discovery: ARM GCC Environment on Windows], I wrote last month and I was supposed to post this a few days after but I got mixed up in more work than I could handle, but luck favours the lazy [sometimes] and while I was stuck in work and stuff, posted about a GitHub repo which is just what is needed to compile code for the STM32F3Discovery board on windows (or on linux etc for that matter).

Supposing you followed the last post, you will get response of these commands on command line:

arm-none-eabi-gcc  [ENTER]
arm-none-eabi-gcc: fatal error: no input files
 compilation terminated.
make  [ENTER]
make: *** No targets specified and no makefile found. Stop.

Now go here and download zipped copy this repository, there is a ZIP button;

Extract the zip and open it in explorer, there is a main.c file in the src folder. This file contains the main function which will run on the STM32F3Discovery board.



The main.c file is quite well-commented and contains code to blink the on-board 8 LEDs. I am not going to provide a detailed explanation of the file here or the other files; they all have proper descriptions etc so read through them if you want to. For now, to compile the code, open Command Prompt and move to the directory of the extracted folder stm32f3-discovery-basic-template folder or if you have renamed it, I renamed it to blinky.

Type in command prompt: make and it should compile and show something like this:



Now that you have a hex file, you can transfer it to the STM32F3 board by using STM32 ST-Link Utility from ST, download from here:, under the Design Support Tab you will find the utility download and also its driver etc. BTW, you should already have it installed if you followed all steps of Part-1.

The ST-Link Utility is straightforward, you open the hex file compiled earlier and then upload it to the STM32F3 board – happy blinky..!

STM32F3Discovery: ARM GCC Environment on Windows – Part-1


After trying and trying and spending more than double the original price I finally got hold of a couple of STM32F3Discovery (Dev) Boards.

These Boards pack a bit too much power from the perspective of a hobbyist like me who has used only 8-bit stuff till now and though I don’t have any specific plans for using the extra processing power, I wanted these boards cause of the 9-Axis IMU that comes on it all ready to be used.

To avoid repetition of explaining the board and what it has and what not, am just going to put in a  couple of links.

A few links which introduce the board better:

Continue reading STM32F3Discovery: ARM GCC Environment on Windows – Part-1



Recently I have been using Arduino more and more, and since I don’t own any actual Arduino boards I had to put the hex generated by the Arduino IDE to my custom AVR Boards either manually or by using the “Upload Using Programmer” option in the IDE.

With a USBasp programmer, you can program an AVR from the Arduino IDE by pressing Ctrl+Shift+U, just need to edit the boards file and add a new board profile with parameters same as your custom board.

I stumbled across a GitHub project which employs VUSB and USBasp and AVRDude supporting bootloader and allows to turn regular ATMega8 Boards into Arduino Boards with direct USB Connection and can be programmed directly via the IDE like regular Arduino Boards, the only catch being that there is no Serial Interface via the USB Port and the boards needs to be reset every time the board needs to be flashed.

GitHub Repo Link:

Many Thanks to Stephan Baerwolf for his Git-Repo and for all his help.

Instead of making a PCB, I took the path same as the tinyUSBboard and made a vero-board circuit. I made it somewhat shield-compatible by putting in the headers in places similar to the Arduino Boards. tinyUSBboard – the diy AVR (VUSB) board


How to Breadboard

Breadboarding is the basic task of making the initial prototype of a circuit and if not given enough time the initial prototyping becomes so much pain that either much time is wasted in fixing the lose wires, or the project never gets completed and is abandoned.

Now, how to breadboard is not some exact science, it is learned by experience and practice. Today I saw quite a good breadboard circuit made by a friend of mine of a frequency to voltage converter circuit using LM331, so good that I JUST HAD TO SHARE IT, so here it is

and this is HOW YOU BREADBOARD....!!

and this is HOW YOU BREADBOARD….!!

Continue reading How to Breadboard