EmbDev.net

Forum: ARM programming with GCC/GNU tools problems with the at91sam7xc getting started example


von Mark D. (Guest)


Rate this post
0 useful
not useful
Hello,

I have installed Eclipse and the yagarto toolchain and tools and SAM-BA
2.6. I already got the example running by using the batch files. So I am
a beginner with all the stuff I wanted to try to build the .bin files
and all other stuff with eclipse on my own. That means I copied the
example in a new project and deleted all files except the makefile, inc
and source files. I tried to build the project but I got several error
messages:


**** Build of configuration Release for project alife_test ****

**** Internal Builder is used for build               ****
gcc -O3 -Wall -c -fmessage-length=0 -olowlevel.o ..\lowlevel.c
..\lowlevel.c:41:21: project.h: No such file or directory
..\lowlevel.c: In function `default_spurious_handler':
..\lowlevel.c:50: warning: implicit declaration of function
`dbgu_print_ascii'
..\lowlevel.c: In function `lowlevel_init':
..\lowlevel.c:91: error: `AT91C_BASE_MC' undeclared (first use in this
function)
..\lowlevel.c:91: error: (Each undeclared identifier is reported only
once
..\lowlevel.c:91: error: for each function it appears in.)
..\lowlevel.c:91: error: `AT91C_MC_FWS_1FWS' undeclared (first use in
this function)
..\lowlevel.c:100: error: `AT91C_BASE_PMC' undeclared (first use in this
function)
..\lowlevel.c:100: error: `AT91C_CKGR_OSCOUNT' undeclared (first use in
this function)
..\lowlevel.c:100: error: `AT91C_CKGR_MOSCEN' undeclared (first use in
this function)
..\lowlevel.c:102: error: `AT91C_PMC_MOSCS' undeclared (first use in
this function)
..\lowlevel.c:111: error: `AT91C_CKGR_USBDIV_1' undeclared (first use in
this function)
..\lowlevel.c:112: error: `AT91C_CKGR_OUT_0' undeclared (first use in
this function)
..\lowlevel.c:114: error: `AT91C_CKGR_MUL' undeclared (first use in this
function)
..\lowlevel.c:115: error: `AT91C_CKGR_DIV' undeclared (first use in this
function)
..\lowlevel.c:117: error: `AT91C_PMC_LOCK' undeclared (first use in this
function)
..\lowlevel.c:120: error: `AT91C_PMC_MCKRDY' undeclared (first use in
this function)
..\lowlevel.c:128: error: `AT91C_PMC_PRES_CLK_2' undeclared (first use
in this function)
..\lowlevel.c:132: error: `AT91C_PMC_CSS_PLL_CLK' undeclared (first use
in this function)
..\lowlevel.c:139: error: `AT91C_BASE_AIC' undeclared (first use in this
function)
..\lowlevel.c:151: error: `AT91C_AIC_DCR_PROT' undeclared (first use in
this function)
..\lowlevel.c:156: error: `AT91C_BASE_WDTC' undeclared (first use in
this function)
..\lowlevel.c:156: error: `AT91C_WDTC_WDDIS' undeclared (first use in
this function)
Build error occurred, build is stopped
Time consumed: 78  ms.



Also I got the following error messages when I try to execute the
avr-elf-gcc and avr-elf-ld included in Eclipse as external tools:

arm-elf-gcc-4.2.2.exe: no input files

And when I try to start the make as external tool I receive:

make: *** No targets specified and no makefile found.  Stop.


Another question: Do I need this 3 files above as external tools or are
they already included in the build function of eclipse?

Would be very thankful for some help.

Best Regards



Mark

von Martin T. (mthomas) (Moderator)


Rate this post
0 useful
not useful
Mark D. wrote:
> ..
> ..\lowlevel.c:41:21: project.h: No such file or directory
> ..
It seems that the location of project.h is not in the search-path for
includes. If the IDE offers a GUI to set the includes path add the
directory where project.h is located, if not add it with
"custom-options" for the compiler: -I<directory_where_project_h_is_in>
I guess in project.h there are #includes for AT91*.h and maybe
libAT91*.h so once project.h is found and included most/all of the other
error-messages should disappear.

von Mark D. (Guest)


Rate this post
0 useful
not useful
Martin Thomas wrote:
> Mark D. wrote:

I use the Eclipse IDE and changed the project properties to correct the
path settings for the include files. But it does not fix the problem.
Maybe I did something wrong there. Is ther somebody who is firm with
eclipse?

Best Regards



Mark

von Carlos B. (cjb)


Rate this post
0 useful
not useful
Mark D. wrote:
> Martin Thomas wrote:
>> Mark D. wrote:
>
> I use the Eclipse IDE and changed the project properties to correct the
> path settings for the include files. But it does not fix the problem.
> Maybe I did something wrong there. Is ther somebody who is firm with
> eclipse?
>
> Best Regards
>
>
>
> Mark

If you have manually written or copied the Makefile you will have to
modify it and add an include directory to CFLAGS.. like CFLAGS +=
-I/myincludedir or wherever project.h is.
With CFLAGS I mean the compiler flags when compiling

good luck!

Carlos

von Mark D. (Guest)


Rate this post
0 useful
not useful
Hello Carlos,

thanks for your trouble. But your idea does not fix the problem. But
adding the include directory in

project-->properties-->C/C++Build-->Settings-->Directories

solved this issue. But my current problem is now that the build all tool
creates an .exe instead of a .bin file. How can I change this?

Best Regards


Mark

Reply

Entering an e-mail address is optional. If you want to receive reply notifications by e-mail, please log in.

Rules — please read before posting

  • Post long source code as attachment, not in the text
  • Posting advertisements is forbidden.

Formatting options

  • [c]C code[/c]
  • [avrasm]AVR assembler code[/avrasm]
  • [code]code in other languages, ASCII drawings[/code]
  • [math]formula (LaTeX syntax)[/math]




Bild automatisch verkleinern, falls nötig
Note: the original post is older than 6 months. Please don't ask any new questions in this thread, but start a new one.