Using embOS with Microchip's Atmel START and IAR

From SEGGER Wiki
Jump to: navigation, search

Introduction

Atmel START is a web-based software configuration tool and project generator for Microchips Atmel and AVR devices, and an IDE of your choice.

This Wiki describes how to add embOS Cortex-M IAR to an IAR EWARM project created with Atmel START.

The resulting project can still be modified with Atmel START in order to change device specific configuration.

Generate the IAR project

Go to https://start.atmel.com/ and click on CREATE NEW PROJECT.

Search for your device or board by using the "Filter on device..." input field.

embOS Atmel START 01 GenerateProject.png

Select your device or board and click on "CREATE NEW PROJECT" in the lower right corner.

embOS Atmel START 02 GenerateProject.png

Click on "EXPORT PROJECT" in the top right corner. Select IAR Embedded Workbench and then click on "DOWNLOAD PACK" in order to download the zip file.

embOS Atmel START 03 GenerateProject.png

Unzip the downloaded zip file and follow the steps in the Using Atmel START Output in IAR Embedded Workbench Guide.

Add embOS to the IAR EWARM project

Your newly created project should now look similar to this one:

embOS Atmel START 04 AddembOS.png

You can also open and use an already existing project that you have created.

Add an embOS application and exclude main.c

Choose an embOS sample application like the OS_StartLEDBlink.c and add it to the project. Furthermore, make sure there is no other C file containing the main() routine by excluding the main.c file from the project.

embOS Atmel START 05 AddembOS.png

Add an embOS library and BSP files

Add all files from the embOS BSP folder SEGGER and Setup and one embOS library. You can take these two folders from another embOS BSP within that shipment. The BSP.c might need to be updated according to your hardware.

Add Include paths and definitions

We placed all embOS related directories in the directory "embOS" within the extracted zip file. It contains the directories:

  • Application
  • Inc (Taken from the Start directory of the embOS shipment)
  • Lib (Taken from the Start directory of the embOS Shipment)
  • SEGGER
  • Setup

embOS Atmel START 07 AddembOS.png

Add the include paths "$PROJ_DIR$\embOS\Inc" and "$PROJ_DIR$\embOS\SEGGER".

Add the definition OS_LIBMODE_DP.

embOS Atmel START 08 AddembOS.png

Build the project

You should now be able to successfully build the project:

embOS Atmel START 09 AddembOS.png

Conclusion

With only a few steps it is possible to create an embOS project for Microchip devices by using Atmel START and to still be able to modify the Atmel START configuration.