Wiki

This version (10 May 2019 15:57) was approved by Micheál Lambe.The Previously approved version (28 Mar 2019 17:27) is available.Diff

How to setup and use IAR Embedded Workbench

IAR Workbench is the IDE of choice for developing firmware for the AD5940. IAR provides an evaluation licence that is free but limits the code size to 32 kB. Currently, none of the evaluation examples in the AD5940 development pack exceed this.

How to Download IAR

To download IAR Workbench click on the following link

This will begin downloading the latest IAR installer. The file is large so may take some time depending on Internet Download speed.

How to Install IAR

Once the download has complete double click on the .exe file to begin the installation procedure. Then click on Install IAR Embedded Workbench® for ARM.

Click Next. The installation procedure may take some time as it is a large program.

How to Register for IAR Evaluation License

To register for the IAR free evaluation license follow these instructions:

  1. Open IAR Workbench
  2. Navigate to Help→License Manager
  3. When the License Manager opens go to License→Get Evaluation License
  4. The user must register with IAR to get the evaluation licence. Follow online registration instructions. Select size limited licence as opposed to time limited licence. An email is sent with a link. Click this link to reveal the license number. A similar window to the one below should be displayed with the license number.
  5. Then go back to IAR license manager and go to License→Activate License
  6. Enter the new license number and click ok.

IAR Workbench is now ready to use with a 32KB code size limit.

How to edit and run example code in IAR

To edit and run example code in IAR Workbench follow these steps:

  1. Download the AD5940 SDK from the the GitHub repository:
  1. Navigate to the examples folder
  2. Double click on ADICUP3029.eww file. This opens all the example projects in the IAR Workspace
  3. On first time opening the project, the IAR CMSIS pack manager will open with a screen like this
  4. Click on Packs and expand the Device Specific option.
  5. Install the AnalogDevices.ADuCM302x_DFP as highlighted below
  6. Once installed exit the Pack Manager window and display the main IAR Workbench program.
  7. All the example projects are shown in the Workspace view
  8. To select a project to run, right click on it and select “Set as Active”
  9. Expand the project to see the structure. It is divided into 4 sub sections:
    • AD5940Lib - This conatins the AD5940.c source file which has all the AD5940 library functions. This file is common to all examples. The ADICUP3029Port.c file is located here also and contains port functions for the ADuCM3029 microcontroller.
    • Application - This sub section contains the application code and main.c file.
    • CMSIS-Pack - This pack contains the necessary files for the ADuCM3029 to function including the startup.c and system.c files
    • Output - This contains the c.out file. This file should not be changed.
  10. Double click on AD5940_ADCPolling.c to open the file in the editor.
  11. Modify code as required.
  12. To compile and build the project go to Project→Rebuild All. IT may take a couple fo seconds to fully compile all the source code.
  13. To download the code to the evaluation boards first ensure the boards are connected to the PC or laptop. Then click on the green “Play” button on the top toolbar. Note, if the “play” button is greyed out cloise IAR Workbench and re-open it.
  14. To set breakpoints click to the left of the line of code. A red dot will appear as in above screenshot.
  15. The code will be loaded onto the ADuCM3029 microcontroller. To begin executing press the blue “Go” button.
resources/eval/user-guides/eval-ad5940/tools/iar_setup_guide.txt · Last modified: 10 May 2019 15:56 by Micheál Lambe