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.
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.
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:
Then all those stuff are available from this folder:
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.
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).
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:
Open IAR then > Project > Add Existing Project.
A popup is now asking you which project you want to import.
Select the following file:
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.