Publications

Setting up IAR Workbench for ARM

Setting up IAR Workbench for ARM TI Stellaris Launchpad

By Timothy Coyle

iar embedded workbench

There are a lot of good (and bad) development tools out there for working with microcontrollers. Sometimes the microcontroller vendor provides a good IDE tool to write your code but sometimes it's also nice to be able to stay with the same IDE across different microcontroller vendors. IAR makes Embedded Workbench which is pretty popular in the embedded world for writing and maintaining your code across different microcontroller vendors. It's been a while since I've used workbench so I found this great tutorial by Quantum Leaps on setting up Embedded Workbench for an ARM Cortex microcontroller. The full tutorial is way more than setting up the tool and is actually one of the better intro to embedded design courses I've come across. Using just a simple blinking LED example Miro takes you through the assembly instructions to working with registers focusing on specifics of ARM Cortex processors. It's definitely worth the time to go through all the youtube videos (did I mention they are free?) and you wont' be disappointed.

IAR Ebmedded Workbench Setup for TI Stellaris Launchpad

I'm going to walk through some screenshots showing my local setup for IAR Embedded Workbench for ARM Cortex processors. The tutorial uses a TI Stellaris Launchpad development kit as the target system and you can get one for under twenty dollars US. You don't really need one for most of the tutorials because you can use the simulator but eventually you will want to work on real hardware.

iar embedded workbench

Go to the IAR website and click on the download section. If you don't want to purchase the tool right now you can download a free version called the kickstart version that is fully featured but the code size is limited to 32KB which should be fine for testing it out or getting a project off the ground.

iar embedded workbench

Once you download and install the tool you will need to register it in order to activate a working license.

iar embedded workbench

After you complete activation you should have a fully licensed tool!

iar embedded workbench

After you create your first project you will need to set some of the options. I did notice that in order to get the full list of options I had to right click on the 'project' name instead of using the drop down menu. You need to select your target device if you are using a hardware development kit. Since I am using the TI Launchpad I selected the appropiate TI chip.

iar embedded workbench

For the C compiler I am using C99. It's probably not a bad idea check the require prototype box as well for better compiler debugging.

iar embedded workbench

You can set the compiler optimizations based on your preferences and where you are at in your code development. If you are following the youtube tutorial you will change this setting a couple of times to see difference your code makes when using compiler.

iar embedded workbench

Finally you can set your indent size to your preferences for your code sessions.

iar embedded workbench

When you want to run your code on real hardware you need to switch from the simulator to your target platform.

iar embedded workbench

For the TI Launchpad development kit you need to check the use flash loader option to load and run your code.

iar embedded workbench

This last screenshot shows how you can setup your views in Debugger mode when using the simulator. You can look at the disassembly, the registers, memory, and variables and step through your code to see what's going on.

I think IAR has a solid IDE with Embedded Workbench and I'm going to keep using it for some development work on the TI Launchpad kit.


Newsletter

Sign up for my monthly email newsletter Signal Bytes to get the latest on embedded hardware design including:

  • Signal Integrity and High-Speed Design
  • Embedded design trends
  • Product reviews & tool tips
  • MCU dev kits and programming and more!

Dont' wait, sign up today and get the best hardware design resource in the industry for free!