Raed's Blog

Getting Started With STM32F429 Discovery

Just got started with the STM32F429I Discovery Board and setting up a first project was not an easy task. This tutorial will show you how to compile and upload a simple LED blinking program to your new board.

This is a tutorial for Windows users, I have tried to set up the development tools and environment on Ubuntu 15.04 but failed miserably, if you know how please don’t hesitate to leave a comment!


In order to get our first project to work we need to follow these easy steps:

I- Installing the USB driver

1- Download the driver from the ST website here (STSW-LINK009) This should work for Windows XP, Windows 7, Windows 8, Windows 8.1 and Windows 10.

2- Go to Device Manager > Other Devices > STM32 STLink and then click Update Driver Software. Select the option Browse my computer for driver software.

3- Select the folder where you have unzipped the downloaded files and install.

Check if it works:

Before installing the driver the big COM led near the USB port should be blinking red. Now it should be stable.

If this is the case, proceed to the next steps, if not check again what you did above and if it still doesn’t work, leave a comment.

II- Get the IDE and compiler

I have managed to get CooCox CoIDE to work with this board so I will continue this tutorial with it. (Initially I wanted to work with IAR Embedded Workbench but I had an old version that didn’t support the STM32F429 board and the latest version was 900MB of download)

1- Download and install CooCox CoIDE (here) while writing this the latest version is released on (05/29 2015)

2- Download and install GCC ARM Embedded Windows installer here.

2.1 You need to tell CoIDE where you installed the ARM GCC compiler.

2.2 After starting CooCox CoIDE, Click “Select Toolchain path” under the Project menu.


2.3 Click the browse button, the select the bin folder under the ARM GCC install directory (see example below)


2.4 Click OK, this should take care of the compiler and debugger setup.

III- Download and unzip this simple project from (here).

3.1 Open CoIDE, under Quickstart select Open a project.

3.2 Navigate to where you unzipped the downloaded file, and select the file xxxx.coproj (in this case FirstProject.coproj).


3.3 Build the project, you can either click F7, or click Build button on the top menu (left).

This should output:

Program Size:
      text	   data	    bss	    dec	    hex	filename
      4428	     16	   2048	   6492	   195c	FirstProject.elf

Total time: 3 seconds

If you have an issue building your project, go back to the compiler setting step above and recheck what you did, or leave a comment.

Now we have built successfully our first code, we need to send it to the STM32F4 board. Make sure your board is plugged using the Mini-USB B port and that the COM LED is not blinking then follow the rest of the instructions.

3.4 Click Download Code to Flash on the top menu, it should output something like this

Erase:	 Done
Program: Done
Verify:	 Done

Check your board, the two small LEDs (Green and Red) should be blinking. If that’s the case congratulations you have finished this tutorial you can skip to the “Side Notes” part below.

If you got an error saying:

Error: Failed to open flash driver file

You should follow these steps:

IV- Download and install CoFlash from (here)

4.1 Go to the folder where you installed CoFlash (Example: C:\Program Files (x86)\CooCox\CoFlash) and copy all the files in it.

4.2 Go to the folder where you installed CoIDE and then open the bin folder under it (Example: C:\CooCox\CoIDE_V2Beta\bin)

4.3 There you should paste all the content from the first folder, replace existing files if necessary. Then, go back to step 3.4 it should work properly now, if not leave a comment.

Side Notes

  • I’m still not sure how to properly configure a new project with this version of CoIDE, the Repository view seems messy and I’m considering switching to an older version just to fix this. If you know how to please leave a comment.
  • I really don’t like coding on Windows, if you know how to set this up on Ubuntu please share with us.
  • This tutorial should work for different STM32F4 boards.


Unable to create a project properly with CoIDE_V2Beta, I downloaded the 1.7.8 stable version (set the toolchain like mentioned above) and created a new project.

When I chose the “Chip” stm32f429II the project doesn’t seem to work. But when I chose “stm32f407vg” the repositories menu showed all the libs I needed (GPIO/I2C/SPI/…) and I was able to compile and run the project correctly.


  1. Arwinderpal Jaspal


    I am still getting the error below even after trying steps 4.1 to 4.3:

    error_msg = “Error: Failed to open flash driver file”

    Please help me.

    I recently updated to Windows 10 and this problem appeared.

    • Hi Arwinderpal,

      This tutorial is 2 years old, and might be out of date.

      I don’t run a windows machine anymore. Please find a newer guide.

  2. Hello,
    Just got an stm32 f7…plugged the USB cable and only the COM LED7 lights up. ( Read on the Getting Started that 2 LEDs were to light up; PWR LED2 and COM LED7). I really don’t know what to. It’s so depressing! I am a beginner and I really, really need help. Even a coach if possible. It’s like being thrown in the Amazon and asked to find your way out. In case this forum doesn’t send notifications to those who comment, I’ll glad to receive your email at [email protected].

Leave a Reply