Reply by "Dyer, Frank" August 21, 20082008-08-21
I found the problem.

FYI...

The GNU tools can not be run from the Windows command line... need to
run the bash shell command line.

________________________________

From: l... [mailto:l...] On Behalf
Of Dyer, Frank
Sent: Wednesday, August 20, 2008 1:10 PM
To: l...
Subject: [lpc2000] GCC help with EA sample files

First - I am a complete 'newbie' with LPC24xx and GCC tools, so please
be kind ;)

I purchased the Embedded Artists LPC2478 QVGA Board Bundle
(http://www.embeddedartists.com/products/uclinux/oem_lpc2478.php
) and
am
trying to get their own sample apps compiled using GNUARM GCC 4.2.2 and
LPC2xxx-gcc-newlib:

I installed the distributions:
bu-2.18_gcc-4.2.2-c-c++_nl-1.15.0_gi-6.7.1.exe
LPC2xxx-gcc-newlib-v2_4_0_1.exe

Running MAKE, I am getting what seems to be a "SIMPLE" error in the
makefiles.

The MAKE seems to compile the files in subfolders "lcd_lpc2478" and
"startup" without issue, but when MAKE recurses to the folder "ea_lcd",
the CSRCS variable seems undefined.

Could the be something to do with running MAKE from a Windows console?
Environment variable space ?

It seems the top-level MAKEFILE is used to pass variables into the
subfolders individual MAKEfiles.

The folder structure of the sample code is shown below.

Directory of

\Root
makefile

\build_files
general.mk
toplevel.mk

\lcd_lpc2478
makefile
delay.c

\lcd_lpc2478\ea_lcd
makefile
font5x7.c
lcd_grph.c
lcd_hw.c

lcd_lpc2478\startup
makefile
consol.c
framework.c
framework.h
startup.s

I am hoping this is a simple MAKE or GCC thing that I am doing
incorrectly.

More details:

I ran MAKE without modifying any of the files, and I get an error that
seems to be coming from the statement in the general.mk file.

I get the error:

/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for f in ; do \'

In the file general.mk, it seems like CSRCS or ASRCS are undefined by
the time the makefile in the subdirectory is executed.

Offending line in general.mk is:
depend:
$(RM) .depend
@for f in $(CSRCS) ; do \
$(CC) -MM $(CC_OPTS) $$f >> .depend ; \
done
@for f in $(ASRCS) ; do \
$(AS) -MM $(CC_OPTS) $$f >> .depend ; \
done

C >make
make[1]: Entering directory `c:/_lcd/lcd_lpc2478'
make[2]: Entering directory `c:/_lcd/lcd_lpc2478/startup'
rm -f .depend
make[2]: Leaving directory `c:/_lcd/lcd_lpc2478/startup'
make[2]: Entering directory `c:/_lcd/lcd_lpc2478/ea_lcd'
rm -f .depend
/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for f in ; do \'
make[2]: *** [depend] Error 258
make[2]: Leaving directory `c:/_lcd/lcd_lpc2478/ea_lcd'
make[1]: *** [pre_all] Error 1
make[1]: Leaving directory `c:/_lcd/lcd_lpc2478'
make: *** [all] Error 1




An Engineer's Guide to the LPC2100 Series

Reply by "Dyer, Frank" August 20, 20082008-08-20
First - I am a complete 'newbie' with LPC24xx and GCC tools, so please
be kind ;)

I purchased the Embedded Artists LPC2478 QVGA Board Bundle
(http://www.embeddedartists.com/products/uclinux/oem_lpc2478.php) and am
trying to get their own sample apps compiled using GNUARM GCC 4.2.2 and
LPC2xxx-gcc-newlib:

I installed the distributions:
bu-2.18_gcc-4.2.2-c-c++_nl-1.15.0_gi-6.7.1.exe
LPC2xxx-gcc-newlib-v2_4_0_1.exe

Running MAKE, I am getting what seems to be a "SIMPLE" error in the
makefiles.

The MAKE seems to compile the files in subfolders "lcd_lpc2478" and
"startup" without issue, but when MAKE recurses to the folder "ea_lcd",
the CSRCS variable seems undefined.

Could the be something to do with running MAKE from a Windows console?
Environment variable space ?

It seems the top-level MAKEFILE is used to pass variables into the
subfolders individual MAKEfiles.

The folder structure of the sample code is shown below.

Directory of

\Root
makefile

\build_files
general.mk
toplevel.mk

\lcd_lpc2478
makefile
delay.c

\lcd_lpc2478\ea_lcd
makefile
font5x7.c
lcd_grph.c
lcd_hw.c

lcd_lpc2478\startup
makefile
consol.c
framework.c
framework.h
startup.s
I am hoping this is a simple MAKE or GCC thing that I am doing
incorrectly.
More details:

I ran MAKE without modifying any of the files, and I get an error that
seems to be coming from the statement in the general.mk file.

I get the error:

/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for f in ; do \'

In the file general.mk, it seems like CSRCS or ASRCS are undefined by
the time the makefile in the subdirectory is executed.

Offending line in general.mk is:
depend:
$(RM) .depend
@for f in $(CSRCS) ; do \
$(CC) -MM $(CC_OPTS) $$f >> .depend ; \
done
@for f in $(ASRCS) ; do \
$(AS) -MM $(CC_OPTS) $$f >> .depend ; \
done
C >make
make[1]: Entering directory `c:/_lcd/lcd_lpc2478'
make[2]: Entering directory `c:/_lcd/lcd_lpc2478/startup'
rm -f .depend
make[2]: Leaving directory `c:/_lcd/lcd_lpc2478/startup'
make[2]: Entering directory `c:/_lcd/lcd_lpc2478/ea_lcd'
rm -f .depend
/bin/sh: -c: line 1: syntax error near unexpected token `;'
/bin/sh: -c: line 1: `for f in ; do \'
make[2]: *** [depend] Error 258
make[2]: Leaving directory `c:/_lcd/lcd_lpc2478/ea_lcd'
make[1]: *** [pre_all] Error 1
make[1]: Leaving directory `c:/_lcd/lcd_lpc2478'
make: *** [all] Error 1