AT91SAM3U Evaluation Kit and IAR EWB

Discussion around product based on ARM Cortex M3 core.

Moderators: nferre, ncollot

Posts: 2
Joined: Thu Mar 04, 2010 4:39 am

AT91SAM3U Evaluation Kit and IAR EWB

Fri Mar 05, 2010 3:21 am

I have got to work with AT91SAM3U-EK on IAR EWB. I installed IAR EWB as per the quick start guide lines. Now I can run examples also. But If i try to create a new project to run on AT91SAM3U-EK the following errors are occuring.

Fatal Error[Pe005]: could not open source file "board.h" D:\SAM3U_TestProjects\MyTest1\main.cpp 13

searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.4 Kickstart\arm\inc\Atmel\"

searched: "C:\Program Files\IAR Systems\Embedded Workbench 5.4 Kickstart\arm\INC\"

Error while running C/C++ Compiler

The code snippet is given below. I added header files same as an example.

#include <board.h>
#include <pio/pio.h>
#include <pio/pio_it.h>
#if defined(AT91C_BASE_PITC)
#include <pit/pit.h>
#include <irq/irq.h>
#include <tc/tc.h>
#include <utility/led.h>
#include <utility/trace.h>
#include <stdio.h>
#if defined(cortexm3)
#include <systick/systick.h>
int main()
return 0;

Note: I observed a difference in example workspace tree and newly created workspace tree.

please suggest me a way

Posts: 10
Joined: Fri Feb 05, 2010 8:49 am

Re: AT91SAM3U Evaluation Kit and IAR EWB

Fri Mar 05, 2010 7:59 am


If you open an example project again, do the following:

In the workspace pane, right click on the top level object (the project name, little blue cube icon). Then click Options.

Select the "C/C++ Compiler" category on the left. Then select the "Preprocessor" tab in the right pane.

In the box called "Additional include directories", you will see a list of file paths. These tell the compiler where to search for your header files.

For example (for the mass storage project):

Each ".." means to go up a level in the folder/directory structure. The "board.h" file is located at:

"C:\Program Files\IAR Systems\Embedded Workbench 5.4 Kickstart\arm\examples\Atmel\at91lib\boards\at91sam3u-ek\"

given as:


"$PROJ_DIR$" is where the ".ewp" file lives. There are other variables as well as "$PROJ_DIR$" that can be used.

I hope this helps you get rid of some of the errors.


PS In the workspace tree you just add your C files I think.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 4 guests