Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

Patch for compile newlib-lpc

Patch for compile newlib-lpc

2004-06-28 by Ben Lau

hi all,

    I downloaded newlib-lpc(rel 2) from Aeolous Development(thx!) but
fail to compile in Windows & Linux(with gnuarm's toolchain). I changed
the example.mak to make it happy to compile in my environment. Here is
the patch.

Changes:
- Library path autodetection (without specific the path of libgcc.a)
- dep/clean target added.
- s/newlib-lpc/libnewlib-lpc/g

[lpc2100] Hi!!

2004-06-28 by Lopamudra Sinha

Hi everyone I am new member of this group, I just started my career in Embedded System, here I want to know if their any good website where I will get to learn Embedded C/C++ or I will get to learn howto program the LPC 210X family of microcontrollers. Looking forward for anyones reply....
Bye
Lopamudra
diff -urN newlib-lpc_rel_2.orig/example.mak newlib-lpc_rel_2/example.mak
--- newlib-lpc_rel_2.orig/example.mak 2004-01-30 14:04:34.000000000 +0800
+++ newlib-lpc_rel_2/example.mak 2004-06-28 12:31:08.000000000 +0800
@@ -6,8 +6,11 @@
#-v means verbose output
#-o $@ means use $@ as output filename
#$+ copies dependancies to link line
-cfgl_arm = -v -o$@ e:/cygwin/home/radsett/arm/crt0.o $+ -Te:/cygwin/home/radsett/arm/lpc210x.ld
-cfg_arm_gc = -c -Os -nostdinc -isystem /home/radsett/install/arm-elf/include/ -isystem /home/radsett/install/lib/gcc-lib/arm-elf/3.3.2/include/ -o $@
+#cfgl_arm = -v -o$@ e:/cygwin/home/radsett/arm/crt0.o $+ -Te:/cygwin/home/radsett/arm/lpc210x.ld
+SYS_LDFLAGS = ${shell arm-elf-gcc -print-search-dirs | grep ^libraries | sed -e "s/^libraries:.*=/:/g" -e "s/ /\\\\ /g" -e "s/:/ -L /g"}
+cfgl_arm = -v -o$@ -L. ${SYS_LDFLAGS} crt0.o $+ -Tlpc210x.ld
+#cfg_arm_gc = -c -Os -nostdinc -isystem /home/radsett/install/arm-elf/include/ -isystem /home/radsett/install/lib/gcc-lib/arm-elf/3.3.2/include/ -o $@
+cfg_arm_gc = -c -Os -o $@

#
# GNU Compiler ARM
@@ -43,7 +46,7 @@
endif


-all: crt0.o test2.hex test3.hex test6.hex test7.hex lib
+all: dep lib crt0.o test2.hex test3.hex test6.hex test7.hex

testsource = test2.c test3.c test6.c test7.c testdiv.c
sources = _close_r.c _fstat_r.c _ioctl_r.c _lseek_r.c _open_r.c \
@@ -64,10 +67,27 @@
test7.prg: test7.o testdiv.o $(sources:.c=.o)
$(cl)

-lib: newlib-lpc.a($(sources:.c=.o))
+lib: libnewlib-lpc.a($(sources:.c=.o))

-newlib-lpc.a($(sources:.c=.o)): $(sources:.c=.o)
+libnewlib-lpc.a($(sources:.c=.o)): $(sources:.c=.o)

archive: $(sources:%=$(ARCPATH)/%) $(ARCPATH)/makefile $(ARCPATH)/setupnew.mak $(testsource:%=$(ARCPATH)/%) $(headers:%=$(ARCPATH)/%) $(ARCPATH)/crt0.s

+
+dep : $(sources:.c=.d) $(testsource:.c=.d) testdiv.d
+ @touch .depend
+
+clean:
+ rm -f *.o
+ rm -f *.a
+ rm -f *.hex
+ rm -f *.prg
+ rm -f *.d
+ rm -f *.d.[0-9]*
+ rm -f .depend
+
+ifneq ($(wildward .depend),)
include $(sources:.c=.d) $(testsource:.c=.d) testdiv.d
+endif
+
+

Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!

Re: [lpc2000] Patch for compile newlib-lpc

2004-06-28 by Robert Adsett

At 02:03 PM 6/28/04 +0800, you wrote:
>hi all,
>
>     I downloaded newlib-lpc(rel 2) from Aeolous Development(thx!)

You're welcome.  Thanks for the diff, I'm working on a small update.  I'll 
see if I can include this in it.

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Re: [lpc2000] Patch for compile newlib-lpc

2004-08-08 by Robert Adsett

At 02:03 PM 6/28/04 +0800, you wrote:
>     I downloaded newlib-lpc(rel 2) from Aeolous Development(thx!) but
>fail to compile in Windows & Linux(with gnuarm's toolchain). I changed
>the example.mak to make it happy to compile in my environment. Here is
>the patch.
>
>Changes:
>- Library path autodetection (without specific the path of libgcc.a)
>- dep/clean target added.
>- s/newlib-lpc/libnewlib-lpc/g


I've added this to the new release.  Along with interrupt support, 
decoupling chip control from I/O support , additional documentation and 
support for the LPC2119/LPC2129/LPC2194/LPC2292/LPC2294 sub-family of variants.

See http://www.aeolusdevelopment.com/Articles/download.html

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,
be they legal, genetic, or physical.  If you don't believe me, try to
chew a radio signal. "

                         Kelvin Throop, III

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.