Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: AT91SAM3U Evaluation Kit and IAR EWB
PostPosted: Fri Mar 05, 2010 3:21 am 
Offline

Joined: Thu Mar 04, 2010 4:39 am
Posts: 2
Hi,
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>
#endif
#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>
#endif
int main()
{
printf("\n\rTesting");
return 0;
}

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

please suggest me a way


Regards
Kondala


Top
 Profile  
 
 Post subject: Re: AT91SAM3U Evaluation Kit and IAR EWB
PostPosted: Fri Mar 05, 2010 7:59 am 
Offline

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

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):
$PROJ_DIR$\..\..\..\at91lib/peripherals
$PROJ_DIR$\..\..\..\at91lib/drivers
$PROJ_DIR$\..\..\..\at91lib/memories
$PROJ_DIR$\..\..\..\at91lib
$PROJ_DIR$\..\..\..\external_libs
$PROJ_DIR$\..\..\..\at91lib\boards\at91sam3u-ek

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$\..\..\..\at91lib\boards\at91sam3u-ek"

"$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.

Regards.

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: