EmbeddedRelated.com
Forums
Memfault State of IoT Report

AT91SAM7xek Eclipse & ucos

Started by boerrick March 6, 2007
Hello Hello,

I'm testing with the AT91SAM7xek evaluation kit. My final object
will be communicating via Ethernet using TCP/IP.

My first projects I made in IAR. Now I reached the 32kb compiler
code limitation. Therefore I started with Eclipse. I can compile
code, when I make the makefile myself. Now I'm trying to generate
Eclipse my makefile. Therefore I have installed the plugin ARM
Realview Compiler. When I like to make a project, I get the
following in my console:
make -k pre-build main-build
make -v
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

Building file: ../main.c
Invoking: ARM RealView Compiler
armcc --debug -c --depend=main.d --apcs=interwork -O0 --
diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
o"main.o" "../main.c" && \
echo Generated dependency file main.d
/bin/sh: armcc: command not found
make: *** [main.o] Error 127
make: Target `main-build' not remade because of errors.
Build complete for project testproject
What goes wrong? Proparably armcc is not found, how can I solve this?
Maybe there is a better plugin for generating a makefile for the
at91sam7x256?

As I told, my final result is communication over Ethernet using
TCP/IP. The TCP/IP stack I don't like to write by my own, therefore
I like to use usos with the tcp/ip. Has anybody experience with
this??

Greetz, Rick
>/bin/sh: armcc: command not found

>What goes wrong? Proparably armcc is not found, how can I solve this?

Make sure the path the the compiler is included in the PATH environment.

>Maybe there is a better plugin for generating a makefile for the
>at91sam7x256?

Notepad?

Regards,
Richard.

+ http://www.FreeRTOS.org
A free real time kernel for 8, 16 and 32bit systems.

+ http://www.SafeRTOS.com
An IEC 61508 compliant real time kernel for safety related systems.
look at your system path. be sure to have a good path to the armcc.

For tcp/ip you can use the lwip. look at the freertos, they have a sample
that work with gcc on the sam7x-ek board. this is probably a good starting
point. I will have to do it in a day or two. I will try to start from there
also.

regards

Jonathan
----- Original Message -----
From: "boerrick"
To:
Sent: Tuesday, March 06, 2007 9:46 AM
Subject: [AT91SAM] AT91SAM7xek Eclipse & ucos
> Hello Hello,
>
> I'm testing with the AT91SAM7xek evaluation kit. My final object
> will be communicating via Ethernet using TCP/IP.
>
> My first projects I made in IAR. Now I reached the 32kb compiler
> code limitation. Therefore I started with Eclipse. I can compile
> code, when I make the makefile myself. Now I'm trying to generate
> Eclipse my makefile. Therefore I have installed the plugin ARM
> Realview Compiler. When I like to make a project, I get the
> following in my console:
> make -k pre-build main-build
> make -v
> GNU Make 3.80
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> Building file: ../main.c
> Invoking: ARM RealView Compiler
> armcc --debug -c --depend=main.d --apcs=interwork -O0 --
> diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
> o"main.o" "../main.c" && \
> echo Generated dependency file main.d
> /bin/sh: armcc: command not found
> make: *** [main.o] Error 127
> make: Target `main-build' not remade because of errors.
> Build complete for project testproject
> What goes wrong? Proparably armcc is not found, how can I solve this?
> Maybe there is a better plugin for generating a makefile for the
> at91sam7x256?
>
> As I told, my final result is communication over Ethernet using
> TCP/IP. The TCP/IP stack I don't like to write by my own, therefore
> I like to use usos with the tcp/ip. Has anybody experience with
> this??
>
> Greetz, Rick
> Yahoo! Groups Links
boerrick wrote:
>
> Hello Hello,
>
> I'm testing with the AT91SAM7xek evaluation kit. My final object
> will be communicating via Ethernet using TCP/IP.
>
> My first projects I made in IAR. Now I reached the 32kb compiler
> code limitation. Therefore I started with Eclipse. I can compile
> code, when I make the makefile myself. Now I'm trying to generate
> Eclipse my makefile. Therefore I have installed the plugin ARM
> Realview Compiler. When I like to make a project, I get the
> following in my console:
>
> make -k pre-build main-build
> make -v
> GNU Make 3.80
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> Building file: ../main.c
> Invoking: ARM RealView Compiler
> armcc --debug -c --depend=main.d --apcs=interwork -O0 --
> diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
> o"main.o" "../main.c" && \
> echo Generated dependency file main.d
> /bin/sh: armcc: command not found
> make: *** [main.o] Error 127
> make: Target `main-build' not remade because of errors.
> Build complete for project testproject
>
> What goes wrong? Proparably armcc is not found, how can I solve this?
> Maybe there is a better plugin for generating a makefile for the
> at91sam7x256?
>
> As I told, my final result is communication over Ethernet using
> TCP/IP. The TCP/IP stack I don't like to write by my own, therefore
> I like to use usos with the tcp/ip. Has anybody experience with
> this??
>
> Greetz, Rick
>
> .
>

Are you sure armcc is in your path? when you invoke armcc from command
line you will get the same error
also. I suggest you using gcc with Eclipse. It can be a quite powerful
combination. If you are using Windows, you
can go for winarm or gnuarm toolchain distros.

Eclipse can generate makefile for you without using external plugin. did
you try managed C project option while creating
new project?

FreeRTOS is an excellent alternative to ecos. It is easy to get started
with. It also has a nice ready-to-use project for
SAM7X including the TCP/IP stack(i.e. using lwIP).

Regards
Çağlar AKYÜZ
Hi,

there is a big difference between arm-elf-gcc (the Gnu compiler for
ARM) and armcc, which is ARM's own compiler. Do you own a license to
Realview armcc ? Otherwise, you may need to alter the compiler setting
in eclipse.

Best regards,

Ewout Boks

--- In A..., "boerrick" wrote:
>
> Hello Hello,
>
> I'm testing with the AT91SAM7xek evaluation kit. My final object
> will be communicating via Ethernet using TCP/IP.
>
> My first projects I made in IAR. Now I reached the 32kb compiler
> code limitation. Therefore I started with Eclipse. I can compile
> code, when I make the makefile myself. Now I'm trying to generate
> Eclipse my makefile. Therefore I have installed the plugin ARM
> Realview Compiler. When I like to make a project, I get the
> following in my console:
> make -k pre-build main-build
> make -v
> GNU Make 3.80
> Copyright (C) 2002 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
>
> Building file: ../main.c
> Invoking: ARM RealView Compiler
> armcc --debug -c --depend=main.d --apcs=interwork -O0 --
> diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
> o"main.o" "../main.c" && \
> echo Generated dependency file main.d
> /bin/sh: armcc: command not found
> make: *** [main.o] Error 127
> make: Target `main-build' not remade because of errors.
> Build complete for project testproject
> What goes wrong? Proparably armcc is not found, how can I solve this?
> Maybe there is a better plugin for generating a makefile for the
> at91sam7x256?
>
> As I told, my final result is communication over Ethernet using
> TCP/IP. The TCP/IP stack I don't like to write by my own, therefore
> I like to use usos with the tcp/ip. Has anybody experience with
> this??
>
> Greetz, Rick
>
--- In A..., Çağlar AKYÜZ wrote:
boerrick wrote:
>>
>> Hello Hello,
>>
>> I'm testing with the AT91SAM7xek evaluation kit. My final object
>> will be communicating via Ethernet using TCP/IP.
>>
>> My first projects I made in IAR. Now I reached the 32kb compiler
>> code limitation. Therefore I started with Eclipse. I can compile
>> code, when I make the makefile myself. Now I'm trying to generate
>> Eclipse my makefile. Therefore I have installed the plugin ARM
>> Realview Compiler. When I like to make a project, I get the
>> following in my console:
>>
>> make -k pre-build main-build
>> make -v
>> GNU Make 3.80
>> Copyright (C) 2002 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions.
>> There is NO warranty; not even for MERCHANTABILITY or FITNESS
FOR A
>> PARTICULAR PURPOSE.
>>
>> Building file: ../main.c
>> Invoking: ARM RealView Compiler
>> armcc --debug -c --depend=main.d --apcs=interwork -O0 --
>> diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
>> o"main.o" "../main.c" && \
>> echo Generated dependency file main.d
>> /bin/sh: armcc: command not found
>> make: *** [main.o] Error 127
>> make: Target `main-build' not remade because of errors.
>> Build complete for project testproject
>>
>> What goes wrong? Proparably armcc is not found, how can I solve
this?
>> Maybe there is a better plugin for generating a makefile for the
>> at91sam7x256?
>>
>> As I told, my final result is communication over Ethernet using
>> TCP/IP. The TCP/IP stack I don't like to write by my own,
therefore
>> I like to use usos with the tcp/ip. Has anybody experience with
>> this??
>>
>> Greetz, Rick
>>
>> .
>>Are you sure armcc is in your path? when you invoke armcc from
command
>line you will get the same error
>also.

A part of my path is at the moment:
c:\cygwin\bin;C:\cygwin\usr\local\bin;c:\program
files\gnuarm\bin;C:\MinGW\bin;

What exactly must I add to my path?

>I suggest you using gcc with Eclipse. It can be a quite powerful
>combination. If you are using Windows, you
>can go for winarm or gnuarm toolchain distros.

Yes I am using Windows, and I have gnuarm, as you can see in my path
above.

>Eclipse can generate makefile for you without using external
plugin. did
>you try managed C project option while creating
>new project?

I have tried it, I can choose for Executable (GNU for Windows).
The problem is, my generated file is .exe and I like a file .bin
I can make my makefile myself, here a example:

NAME = Makefile AT91SAM7x-EK

CC = arm-elf-gcc
LD = arm-elf-ld -v
AR = arm-elf-ar
AS = arm-elf-as
CP = arm-elf-objcopy
OD = arm-elf-objdump

CFLAGS = -I./ -c -fno-common -O0 -g
AFLAGS = -ahls -mapcs-32 -o crt.o
LFLAGS = -Map main.map -TLinkerScript.cmd
CPFLAGS = --output-target=binary

ODFLAGS = -x --syms

all: test

clean:
-rm crt.lst main.lst crt.o main.o lowlevelinit.o usart.o
main.out main.bin main.hex main.map main.dmp

test: main.out
@ echo "...copying"
$(CP) $(CPFLAGS) main.out main.bin
$(OD) $(ODFLAGS) main.out > main.dmp

main.out: crt.o main.o lowlevelinit.o LinkerScript.cmd usart.o
@ echo "..linking"
$(LD) $(LFLAGS) -o main.out crt.o main.o lowlevelinit.o
usart.o

crt.o: crt.s
@ echo ".assembling"
$(AS) $(AFLAGS) crt.s > crt.lst

main.o: sources/main.c
@ echo ".compiling"
$(CC) $(CFLAGS) sources/main.c

lowlevelinit.o: sources/lowlevelinit.c
@ echo ".compiling"
$(CC) $(CFLAGS) sources/lowlevelinit.c

usart.o: sources/usart.c
@ echo ".compiling"
$(CC) $(CFLAGS) sources/usart.c
Now I like eclipse generating my makefile because of making a lot of
source files, and I don't like to make it my own. If there is no
other way, i have to do it myself.
>FreeRTOS is an excellent alternative to ecos. It is easy to get
started
>with. It also has a nice ready-to-use project for
>SAM7X including the TCP/IP stack(i.e. using lwIP).

>Regards
>Çağlar AKYÜZ
--- In A..., "boerrick" wrote:
>
> --- In A..., #65533;a#65533;lar AKY#65533;Z wrote:
> boerrick wrote:
> >>
> >> Hello Hello,
> >>
> >> I'm testing with the AT91SAM7xek evaluation kit. My final object
> >> will be communicating via Ethernet using TCP/IP.
> >>
> >> My first projects I made in IAR. Now I reached the 32kb compiler
> >> code limitation. Therefore I started with Eclipse. I can compile
> >> code, when I make the makefile myself. Now I'm trying to generate
> >> Eclipse my makefile. Therefore I have installed the plugin ARM
> >> Realview Compiler. When I like to make a project, I get the
> >> following in my console:
> >>
> >> make -k pre-build main-build
> >> make -v
> >> GNU Make 3.80
> >> Copyright (C) 2002 Free Software Foundation, Inc.
> >> This is free software; see the source for copying conditions.
> >> There is NO warranty; not even for MERCHANTABILITY or FITNESS
> FOR A
> >> PARTICULAR PURPOSE.
> >>
> >> Building file: ../main.c
> >> Invoking: ARM RealView Compiler
> >> armcc --debug -c --depend=main.d --apcs=interwork -O0 --
> >> diag_style=ide --brief_diagnostics --depend_format=unix_escaped -
> >> o"main.o" "../main.c" && \
> >> echo Generated dependency file main.d
> >> /bin/sh: armcc: command not found
> >> make: *** [main.o] Error 127
> >> make: Target `main-build' not remade because of errors.
> >> Build complete for project testproject
> >>
> >> What goes wrong? Proparably armcc is not found, how can I solve
> this?
> >> Maybe there is a better plugin for generating a makefile for the
> >> at91sam7x256?
> >>
> >> As I told, my final result is communication over Ethernet using
> >> TCP/IP. The TCP/IP stack I don't like to write by my own,
> therefore
> >> I like to use usos with the tcp/ip. Has anybody experience with
> >> this??
> >>
> >> Greetz, Rick
> >>
> >> .
> >>
> >
> >Are you sure armcc is in your path? when you invoke armcc from
> command
> >line you will get the same error
> >also.
>
> A part of my path is at the moment:
> c:\cygwin\bin;C:\cygwin\usr\local\bin;c:\program
> files\gnuarm\bin;C:\MinGW\bin;
>
> What exactly must I add to my path?

Your path is correct if your intention is to use gcc(gnu arm actually)
But what is your output says is you are trying to you use
armcc(Realview) which is not in your path. I think you should correct
the compiler option in your makefile.
>
> >I suggest you using gcc with Eclipse. It can be a quite powerful
> >combination. If you are using Windows, you
> >can go for winarm or gnuarm toolchain distros.
>
> Yes I am using Windows, and I have gnuarm, as you can see in my path
> above.

But your make calls armcc which is not definetely gnuarm!

>
> >Eclipse can generate makefile for you without using external
> plugin. did
> >you try managed C project option while creating
> >new project?
>
> I have tried it, I can choose for Executable (GNU for Windows).
> The problem is, my generated file is .exe and I like a file .bin
> I can make my makefile myself, here a example:
>
> NAME = Makefile AT91SAM7x-EK
>
> CC = arm-elf-gcc
> LD = arm-elf-ld -v
> AR = arm-elf-ar
> AS = arm-elf-as
> CP = arm-elf-objcopy
> OD = arm-elf-objdump
>
> CFLAGS = -I./ -c -fno-common -O0 -g
> AFLAGS = -ahls -mapcs-32 -o crt.o
> LFLAGS = -Map main.map -TLinkerScript.cmd
> CPFLAGS = --output-target=binary
>
> ODFLAGS = -x --syms
>
> all: test
>
> clean:
> -rm crt.lst main.lst crt.o main.o lowlevelinit.o usart.o
> main.out main.bin main.hex main.map main.dmp
>
> test: main.out
> @ echo "...copying"
> $(CP) $(CPFLAGS) main.out main.bin
> $(OD) $(ODFLAGS) main.out > main.dmp
>
> main.out: crt.o main.o lowlevelinit.o LinkerScript.cmd usart.o
> @ echo "..linking"
> $(LD) $(LFLAGS) -o main.out crt.o main.o lowlevelinit.o
> usart.o
>
> crt.o: crt.s
> @ echo ".assembling"
> $(AS) $(AFLAGS) crt.s > crt.lst
>
> main.o: sources/main.c
> @ echo ".compiling"
> $(CC) $(CFLAGS) sources/main.c
>
> lowlevelinit.o: sources/lowlevelinit.c
> @ echo ".compiling"
> $(CC) $(CFLAGS) sources/lowlevelinit.c
>
> usart.o: sources/usart.c
> @ echo ".compiling"
> $(CC) $(CFLAGS) sources/usart.c

This is not the one you are using I guess. The first post you send
references armcc compiler which is not the one in this makefile.

> Now I like eclipse generating my makefile because of making a lot of
> source files, and I don't like to make it my own. If there is no
> other way, i have to do it myself.
> >FreeRTOS is an excellent alternative to ecos. It is easy to get
> started
> >with. It also has a nice ready-to-use project for
> >SAM7X including the TCP/IP stack(i.e. using lwIP).
>
> >Regards
> >#65533;a#65533;lar AKY#65533;Z
> >
>

Memfault State of IoT Report