Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 148 → Rev 149

/lpc/toolchain/build-newlib-lpc.sh
0,0 → 1,18
#!/bin/bash
 
PREFIX=/home/dhylands/lpc-4.1.1
DIR=`pwd`
 
LPC_INCLUDE=$PREFIX/arm-elf/include/arch/philips/newlib-lpc
LPC_LIB=$PREFIX/arm-elf/lib
 
export PATH=$PATH:$PREFIX/bin
 
cd $DIR/newlib-lpc
rm -f *.o *.a
make -f example.mak lib crt0.o
 
mkdir -p $LPC_INCLUDE
cp -f *.h $LPC_INCLUDE
 
cp libnewlib-lpc.a crt0.o $LPC_LIB
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: toolchain/build-toolchain.sh
===================================================================
--- toolchain/build-toolchain.sh (nonexistent)
+++ toolchain/build-toolchain.sh (revision 149)
@@ -0,0 +1,62 @@
+#!/bin/bash
+
+PREFIX=/home/dhylands/lpc-4.1.1
+DIR=`pwd`
+
+rm -rf $PREFIX
+mkdir $PREFIX
+cd $PREFIX
+mkdir $PREFIX/info
+mkdir $PREFIX/info/dir
+mkdir $PREFIX/info/dir/dir
+
+export PATH=$PATH:$PREFIX/bin
+
+rm -rf $DIR/binutils
+mkdir -p $DIR/binutils
+cd $DIR/binutils
+
+$DIR/binutils-2.17/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft --enable-languages="c,c++"
+make -j2
+make install
+
+rm -rf $DIR/gcc
+mkdir -p $DIR/gcc
+cd $DIR/gcc
+
+$DIR/gcc-4.1.1/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft --enable-languages="c,c++"
+make -j2
+make install
+
+rm -rf $DIR/newlib
+mkdir -p $DIR/newlib
+cd $DIR/newlib
+
+$DIR/newlib-1.14.0/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft
+make -j2
+make install
+
+rm -rf $DIR/gcc2
+mkdir -p $DIR/gcc2
+cd $DIR/gcc2
+
+$DIR/gcc-4.1.1/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft --enable-languages="c,c++" --with-newlib --with-headers=$PREFIX/newlib-1.14.0/newlib/libc/include
+make -j2
+make install
+
+rm-rf $DIR/gdb
+mkdir -p $DIR/gdb
+cd $DIR/gdb
+
+$DIR/gdb-6.6/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft
+make -j2
+make install
+
+rm -rf $DIR/insight
+mkdir -p $DIR/insight
+cd $DIR/insight
+
+$DIR/insight-6.6/configure --target=arm-elf --prefix=$PREFIX --enable-interwork --enable-multilib --with-float=soft
+make -j2
+make install
+
/toolchain/build-toolchain.sh
Property changes:
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
Index: toolchain/newlib-lpc.patch
===================================================================
--- toolchain/newlib-lpc.patch (nonexistent)
+++ toolchain/newlib-lpc.patch (revision 149)
@@ -0,0 +1,75 @@
+Index: newlib-lpc/uart1_int.c
+===================================================================
+--- newlib-lpc/uart1_int.c 2007-07-03 11:25:38.000000000 -0700
++++ newlib-lpc/uart1_int.c 2007-07-03 11:24:20.000000000 -0700
+@@ -221,6 +221,19 @@
+ return ret;
+ }
+
++/********************* uart0_chars_waiting *******************************/
++/* uart1_chars_waiting -- Query to see if any chars are waiting. */
++/* int *serial_waiting -- Where to place count of characters waiting. */
++/* Note that for this version the only valid */
++/* numbers here are 0 and 1. */
++/* Returns 0 if successful. */
++static int uart1_chars_waiting(
++ int *serial_waiting)
++{
++ *serial_waiting = ( receive_buffer_first != receive_buffer_last );
++ return 0;
++}
++
+ /********************* uart1_ioctl **************************************/
+ /* uart1_ioctl -- Provides ioctl functions for serial port. Really */
+ /* just sets the uarts line characteristics, baud rate, bits per */
+@@ -264,6 +277,9 @@
+ case INTERRUPT_SETUP:
+ return( uart1_interrupt_setup( r, ptr));
+
++ case UART_CHAR_WAITING:
++ return( uart1_chars_waiting( ptr));
++
+ default:
+ r->_errno = ENOSYS; /* Request not understood. */
+ return -1;
+Index: newlib-lpc/uart0_int.c
+===================================================================
+--- newlib-lpc/uart0_int.c 2007-07-03 11:25:33.000000000 -0700
++++ newlib-lpc/uart0_int.c 2007-07-03 11:24:56.000000000 -0700
+@@ -221,6 +221,19 @@
+ return ret;
+ }
+
++/********************* uart0_chars_waiting *******************************/
++/* uart0_chars_waiting -- Query to see if any chars are waiting. */
++/* int *serial_waiting -- Where to place count of characters waiting. */
++/* Note that for this version the only valid */
++/* numbers here are 0 and 1. */
++/* Returns 0 if successful. */
++static int uart0_chars_waiting(
++ int *serial_waiting)
++{
++ *serial_waiting = ( receive_buffer_first != receive_buffer_last );
++ return 0;
++}
++
+ /********************* uart0_ioctl **************************************/
+ /* uart0_ioctl -- Provides ioctl functions for serial port. Really */
+ /* just sets the uarts line characteristics, baud rate, bits per */
+@@ -264,13 +277,15 @@
+ case INTERRUPT_SETUP:
+ return( uart0_interrupt_setup( r, ptr));
+
++ case UART_CHAR_WAITING:
++ return( uart0_chars_waiting( ptr));
++
+ default:
+ r->_errno = ENOSYS; /* Request not understood. */
+ return -1;
+ }
+ }
+
+-
+ /************************** uart0_read **********************************/
+ /* Reads from uart0 (polled fashion). */
+ /* struct _reent *r -- re-entrancy structure, used by newlib to */
Index: toolchain/newlib-1.14.0.patch
===================================================================
--- toolchain/newlib-1.14.0.patch (nonexistent)
+++ toolchain/newlib-1.14.0.patch (revision 149)
@@ -0,0 +1,13 @@
+Index: newlib-1.14.0/newlib/configure.host
+===================================================================
+--- newlib-1.14.0/newlib/configure.host 2005-12-12 03:25:07.000000000 -0800
++++ newlib-1.14.0/newlib/configure.host 2007-06-12 12:26:10.000000000 -0700
+@@ -506,7 +506,7 @@
+ ;;
+ arm-*-*)
+ syscall_dir=syscalls
+- newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY"
++ newlib_cflags="${newlib_cflags} -DABORT_PROVIDED -DHAVE_GETTIMEOFDAY -DREENTRANT_SYSCALLS_PROVIDED"
+ # If newlib is supplying syscalls, select which debug protocol is being used.
+ # ARM_RDP_MONITOR selects the Demon monitor.
+ # ARM_RDI_MONITOR selects the Angel monitor.