Electronics - STM32 - Setting up the Nucleo board with IAR

The Nucleo wants to be a concurrent of Arduino. You had probably tested the mbed.org compiler. But you would like to program a firmware without any online IDE (that comes with some advantages and drawbacks).

In this tutorial, we'll use the IAR Embedded Workbench for ARM, well known as EWARM, in order to program the STM32 microcontroller (in our case the STM32-L053R8).
So let's get started.

IAR installation


First of all we need to download the new IAR ARM version (7.30.1) because older versions are missing some functionalities to use projects provided by STMicroelectronics.

Select the download evaluation license v7.30.

A new page has appeared, click Download software at the bottom.
Then install it.
Once done, you'll have to activate the IAR licence.

Drivers and packages directly from IAR folders

It seems that you can skip the installation from the STMicroelectronics website because all drivers and packages are available directly after the IAR installation.
Indeed, assuming your IAR directory path is:
  • C:\soft\mcu\iar\embedded-workbench\7.30.1
Then all those stuff are available from this folder:
  • C:\soft\mcu\iar\embedded-workbench\7.30.1\arm\drivers\ST-Link
But of course if you prefer to download drivers and packages from the official website, you'll have to do it with the following explanation.


For more informations about the board, the microcontroller, datasheets, etc, follow this link:
Two things at this point.
We need to install first the STM32 drivers and after that the CubeL0 package.

STM32 drivers

Download and install the stsw-link008 or stsw-link009, depending on your OS, respectively Windows Vista, 7 and 8 or XP.
They're drivers in order your board be recognized by Windows.
Then let's download the stsw-link007 that is the firmware upgrade (useful if you have an old version of the firmware).

STM32 package

We now have to download and install the STM32CubeL0 package.
Inside you'll find drivers and others examples such as: "Embedded software for STM32 L0 series (HAL low level drivers, USB, File system, RTOS, Touch Sensing - coming with examples running on ST boards)".

Linking IAR with the Nucleo board

Let's assume that you installed the STM package there into the following path folder:
  • C:\soft\mcu\st\software\sm32-cube-l0
Open IAR then > Project > Add Existing Project.
A popup is now asking you which project you want to import.
Select the following file: 
  • C:\soft\mcu\st\software\sm32-cube-l0\Projects\STM32L053R8-Nucleo\Examples\GPIO\GPIO_IOToggle\EWARM\Project.eww
IAR has imported the project into the navigator.
Le'ts build the project by clicking the green triangle in the IAR menu bar.
It'll compile, link and download the firmware onto the microcontroller.
IAR is now ready to debug your code. On the menu bar there're now blue arrows.
Click the Go button (three blue arrows going to right) to have your firmware running like a charm.


Not so difficult steps to set up the Nucleo board but requiring right explanation.
Well done, you've made it. laugh

Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Refresh Type the characters you see in this picture. Type the characters you see in the picture; if you can't read them, submit the form and a new image will be generated. Not case sensitive.  Switch to audio verification.