Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Shell command problems with Makefile
Shell command problems with Makefile [message #187022] Fri, 05 January 2007 16:11 Go to next message
Eclipse UserFriend
Originally posted by: rost.stargen.com

Total newbie just getting started with Eclipse here. Two of us have
installed Eclipse along with some GNU tools to develop code for the
Philips LPC2103 ARM controller.

On my PC I have issues with a simple Makefile:

NAME = SG_Blinky

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 SG_Startup.o
LFLAGS = -Map SG_Blinky.map -TSG_Blinky.cmd
CPFLAGS = -O ihex
ODFLAGS = -x --syms

all: test

clean:
-rm SG_Startup.lst SG_Blinky.lst SG_Startup.o SG_Blinky.o SG_Blinky.out
SG_Blinky.hex SG_Blinky.map SG_Blinky.dmp

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

SG_Blinky.out: SG_Startup.o SG_Blinky.o SG_Blinky.cmd
@ echo "..linking"
$(LD) $(LFLAGS) -o SG_Blinky.out SG_Startup.o SG_Blinky.o

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

SG_Blinky.o: SG_Blinky.c
@ echo ".compiling"
$(CC) $(CFLAGS) SG_Blinky.c

The other guy has no trouble running this Makefile. I have issues with
these:

@echo
>

which cause make to give me this rather typical error:

make: /bin/sh: Command not found

If I comment out the "@echo" lines and remove the rediect (">") then it
runs OK.

We both followed the same instructions doing the install.

I have checked the path variables on my PC and the other guy...looks the
same. I have done a dump of the Configuration Details from Eclipse...looks
the same.

Two other data points:
--> the other guy did a second install on his son's PC at home and that
machine acts like mine, it gets make errors.
--> if I run make from a DOS shell directly instead of from Eclipse I get the
same error

Being a UNIX person I'm very unfamiliar with how PCs running WinXP deal
with shells. What other things should I be looking at? I'm stumped.

Brian
Re: Shell command problems with Makefile [message #187053 is a reply to message #187022] Fri, 05 January 2007 17:57 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: dmsubs.NOSPAM.consertum.com

Where did you get your make.exe from? It looks like it needs sh.exe (a dos
version of the unix shell) - which should be located on your PATH. You probably
need rm.exe too.

There are a number of ways of getting a unix dev environment on PC's:
Cygwin (probably the most popular)
Mingw (also popular)
Unxutils (one of the simplest)

You can find all these via google.

hth
--
Derek


Brian Rost wrote:
> Total newbie just getting started with Eclipse here. Two of us have
> installed Eclipse along with some GNU tools to develop code for the
> Philips LPC2103 ARM controller.
>
> On my PC I have issues with a simple Makefile:
>
> NAME = SG_Blinky
>
> 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 SG_Startup.o
> LFLAGS = -Map SG_Blinky.map -TSG_Blinky.cmd
> CPFLAGS = -O ihex
> ODFLAGS = -x --syms
>
> all: test
>
> clean:
> -rm SG_Startup.lst SG_Blinky.lst SG_Startup.o SG_Blinky.o
> SG_Blinky.out SG_Blinky.hex SG_Blinky.map SG_Blinky.dmp
>
> test: SG_Blinky.out
> @ echo "...copying"
> $(CP) $(CPFLAGS) SG_Blinky.out SG_Blinky.hex
> $(OD) $(ODFLAGS) SG_Blinky.out > SG_Blinky.dmp
>
> SG_Blinky.out: SG_Startup.o SG_Blinky.o SG_Blinky.cmd @ echo
> "..linking"
> $(LD) $(LFLAGS) -o SG_Blinky.out SG_Startup.o SG_Blinky.o
>
> SG_Startup.o: SG_Startup.s
> @ echo ".assembling"
> $(AS) $(AFLAGS) SG_Startup.s > SG_Startup.lst
>
> SG_Blinky.o: SG_Blinky.c
> @ echo ".compiling"
> $(CC) $(CFLAGS) SG_Blinky.c
>
> The other guy has no trouble running this Makefile. I have issues with
> these:
>
> @echo
>>
>
> which cause make to give me this rather typical error:
>
> make: /bin/sh: Command not found
>
> If I comment out the "@echo" lines and remove the rediect (">") then it
> runs OK.
>
> We both followed the same instructions doing the install.
>
> I have checked the path variables on my PC and the other guy...looks the
> same. I have done a dump of the Configuration Details from
> Eclipse...looks the same.
>
> Two other data points: --> the other guy did a second install on his
> son's PC at home and that machine acts like mine, it gets make errors.
> --> if I run make from a DOS shell directly instead of from Eclipse I
> get the same error
>
> Being a UNIX person I'm very unfamiliar with how PCs running WinXP deal
> with shells. What other things should I be looking at? I'm stumped.
> Brian
>
>
Re: Shell command problems with Makefile [message #187083 is a reply to message #187053] Fri, 05 January 2007 20:10 Go to previous message
Eclipse UserFriend
Originally posted by: rost.stargen.com

Hi Derek,

We have cygwin installed on both machines. We have bash, sh and make in
the path at c:\cygwin\bin (first entry in the path in fact).

That's why we're confused...the makefile only runs OK on the other machine.
Previous Topic:data encryption
Next Topic:Help menu connect to local web server
Goto Forum:
  


Current Time: Thu Apr 25 20:11:18 GMT 2024

Powered by FUDForum. Page generated in 0.07752 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top