diff -urN nut-2.5.2-troth/Makedefs.gcc nut-2.5.2-new-troth/Makedefs.gcc --- nut-2.5.2-troth/Makedefs.gcc 2002-10-22 17:22:59.000000000 -0700 +++ nut-2.5.2-new-troth/Makedefs.gcc 2002-10-23 11:08:37.000000000 -0700 @@ -78,7 +78,7 @@ MCFLAGS = -mmcu=$(MCU) -CPFLAGS = $(MCFLAGS) -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) +CPFLAGS = $(MCFLAGS) -Os -Wall -Werror -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) #CPFLAGS = -g $(MCFLAGS) -O0 -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) LDFLAGS = $(MCFLAGS) -Wl,-Map=$(PROJ).map,--cref ARFLAGS = rsv diff -urN nut-2.5.2-troth/Makefile nut-2.5.2-new-troth/Makefile --- nut-2.5.2-troth/Makefile 2002-10-22 17:26:25.000000000 -0700 +++ nut-2.5.2-new-troth/Makefile 2002-10-23 11:57:39.000000000 -0700 @@ -64,9 +64,6 @@ top_srcdir = . SUBDIRS=os fs dev net pro -APPDIRS=app/basemon app/inetq app/httpd app/uart app/simple \ - app/rs232d app/relays app/optoin \ - app/tcpc app/tcps app/threads app/timers app/portdio all: for i in $(SUBDIRS); do $(MAKE) -C $$i || exit 1; done @@ -74,13 +71,15 @@ install: for i in $(SUBDIRS); do $(MAKE) -C $$i install || exit 1; done -apps: - for i in $(APPDIRS); do $(MAKE) -C $$i install || exit 1; done - clean: for i in $(SUBDIRS); do $(MAKE) -C $$i clean || exit 1; done -cleanall: - for i in $(SUBDIRS); do $(MAKE) -C $$i clean || exit 1; done - for i in $(APPDIRS); do $(MAKE) -C $$i clean || exit 1; done +apps: + $(MAKE) -C app + +apps-install: + $(MAKE) -C app install + +cleanall: clean + $(MAKE) -C app clean diff -urN nut-2.5.2-troth/UserConf.mk nut-2.5.2-new-troth/UserConf.mk --- nut-2.5.2-troth/UserConf.mk 2002-10-23 11:31:22.000000000 -0700 +++ nut-2.5.2-new-troth/UserConf.mk 2002-10-28 11:11:46.000000000 -0800 @@ -1,2 +1,3 @@ MCU=atmega128 +UISP_PROG=stk500 CRUROM = $(top_srcdir)/tools/linux/crurom diff -urN nut-2.5.2-troth/app/Makedefs.gcc nut-2.5.2-new-troth/app/Makedefs.gcc --- nut-2.5.2-troth/app/Makedefs.gcc 2002-10-22 16:40:23.000000000 -0700 +++ nut-2.5.2-new-troth/app/Makedefs.gcc 2002-10-28 11:08:43.000000000 -0800 @@ -66,7 +66,7 @@ BINDIR = $(top_srcdir)/bin/$(MCU) -CPFLAGS = $(MCFLAGS) -Os -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) +CPFLAGS = $(MCFLAGS) -Os -Wall -Werror -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) #CPFLAGS = -g $(MCFLAGS) -O0 -Wall -Wstrict-prototypes -Wa,-ahlms=$(<:.c=.lst) $(DEFS) LDFLAGS = $(MCFLAGS) -Wl,-Map=$(PROJ).map,--cref -L$(LIBDIR) -BURNFLAGS = -dprog=stk200 --erase --upload --verify if=$(TARG) +BURNFLAGS = -dprog=$(UISP_PROG) -dpart=$(MCU) --erase --upload --verify if=$(TARG) diff -urN nut-2.5.2-troth/app/Makefile nut-2.5.2-new-troth/app/Makefile --- nut-2.5.2-troth/app/Makefile 1969-12-31 16:00:00.000000000 -0800 +++ nut-2.5.2-new-troth/app/Makefile 2002-10-23 11:57:34.000000000 -0700 @@ -0,0 +1,50 @@ +# +# Copyright (C) 2001-2002 by egnite Software GmbH. All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# 3. All advertising materials mentioning features or use of this +# software must display the following acknowledgement: +# +# This product includes software developed by egnite Software GmbH +# and its contributors. +# +# THIS SOFTWARE IS PROVIDED BY EGNITE SOFTWARE GMBH AND CONTRIBUTORS +# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS +# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL EGNITE +# SOFTWARE GMBH OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, +# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS +# OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED +# AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF +# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# For additional information see http://www.ethernut.de/ +# +# $Log$ +# + +top_srcdir = .. + +APPDIRS=basemon inetq httpd uart simple rs232d relays optoin \ + tcpc tcps threads timers portdio + +all: + for i in $(APPDIRS); do $(MAKE) -C $$i || exit 1; done + +install: + for i in $(APPDIRS); do $(MAKE) -C $$i install || exit 1; done + +clean: + for i in $(APPDIRS); do $(MAKE) -C $$i clean || exit 1; done + diff -urN nut-2.5.2-troth/app/basemon/basemon.c nut-2.5.2-new-troth/app/basemon/basemon.c --- nut-2.5.2-troth/app/basemon/basemon.c 2002-08-02 06:59:15.000000000 -0700 +++ nut-2.5.2-new-troth/app/basemon/basemon.c 2002-10-23 12:57:13.000000000 -0700 @@ -371,7 +371,7 @@ NutPrintFormat(0, "\r\n%s(%s): ", prompt, value); if(GetLine(inbuff, sizeof(inbuff)) == 0) break; - if(inet_addr(inbuff) != -1) { + if(inet_addr(inbuff) != (u_long)(-1L)) { strcpy(value, inbuff); break; } diff -urN nut-2.5.2-troth/app/relays/Makefile nut-2.5.2-new-troth/app/relays/Makefile --- nut-2.5.2-troth/app/relays/Makefile 2002-10-22 16:46:05.000000000 -0700 +++ nut-2.5.2-new-troth/app/relays/Makefile 2002-10-23 12:48:08.000000000 -0700 @@ -9,10 +9,12 @@ LIBS = $(LIBDIR)/init.o -lnutos -lnutdev -lnutos TARG = $(PROJ).hex -all: $(OBJS) $(TARG) $(PROJ).obj +all: $(OBJS) $(TARG) include $(top_srcdir)/app/Makerules +studio: $(PROJ).obj + clean: -rm -f $(OBJS) -rm -f $(TARG) diff -urN nut-2.5.2-troth/app/relays/relays.c nut-2.5.2-new-troth/app/relays/relays.c --- nut-2.5.2-troth/app/relays/relays.c 2002-08-08 09:14:14.000000000 -0700 +++ nut-2.5.2-new-troth/app/relays/relays.c 2002-10-23 12:48:18.000000000 -0700 @@ -112,7 +112,7 @@ /* * Shift around the walking bit value. */ - if((oval <<= 1) == BV(no)) + if((oval <<= 1) == (u_long)(BV(no))) oval = 1; NutSleep(500); } diff -urN nut-2.5.2-troth/app/rs232d/rs232d.c nut-2.5.2-new-troth/app/rs232d/rs232d.c --- nut-2.5.2-troth/app/rs232d/rs232d.c 2002-09-15 08:29:00.000000000 -0700 +++ nut-2.5.2-new-troth/app/rs232d/rs232d.c 2002-10-23 12:33:16.000000000 -0700 @@ -73,7 +73,7 @@ volatile u_char connected = 0; -volatile TCPSOCKET *sock; +TCPSOCKET *sock; NUTDEVICE *uart; u_char rxbuff[256]; diff -urN nut-2.5.2-troth/app/timers/timers.c nut-2.5.2-new-troth/app/timers/timers.c --- nut-2.5.2-troth/app/timers/timers.c 2002-08-11 08:50:37.000000000 -0700 +++ nut-2.5.2-new-troth/app/timers/timers.c 2002-10-23 12:49:08.000000000 -0700 @@ -78,7 +78,7 @@ /* * Temporary fix for broken routines in GCC. */ -#include +#include #define wdt_reset() __asm__ __volatile__ ("wdr") diff -urN nut-2.5.2-troth/configure nut-2.5.2-new-troth/configure --- nut-2.5.2-troth/configure 2002-10-22 17:30:56.000000000 -0700 +++ nut-2.5.2-new-troth/configure 2002-10-28 11:11:43.000000000 -0800 @@ -32,6 +32,7 @@ # Ask user which device to target +unset DEV while [ "x$DEV" = "x" ] do echo "Select a target device:" @@ -50,8 +51,32 @@ esac done +# Ask which isp programmer is being used + +unset UISP_PROG +while [ "x$UISP_PROG" = "x" ] +do + echo "Which isp programmer are you using?" + echo "" + echo " 1) stk200, stk300 or compatible" + echo " 2) skt500" + echo "" + echo -n "Selection -> " + read answ + + case "$answ" in + 1) UISP_PROG=stk200 ;; + 2) UISP_PROG=stk500 ;; + *) + echo "invalid choice" ;; + esac +done + +# Generate the config file + cat < UserConf.mk MCU=$DEV +UISP_PROG=$UISP_PROG CRUROM = \$(top_srcdir)/tools/linux/crurom EOF diff -urN nut-2.5.2-troth/dev/irqreg.c nut-2.5.2-new-troth/dev/irqreg.c --- nut-2.5.2-troth/dev/irqreg.c 2002-09-15 09:08:14.000000000 -0700 +++ nut-2.5.2-new-troth/dev/irqreg.c 2002-10-23 11:26:53.000000000 -0700 @@ -62,8 +62,8 @@ #else -#include -#include +#include +#include #endif diff -urN nut-2.5.2-troth/dev/uartspi.c nut-2.5.2-new-troth/dev/uartspi.c --- nut-2.5.2-troth/dev/uartspi.c 2002-09-15 09:07:02.000000000 -0700 +++ nut-2.5.2-new-troth/dev/uartspi.c 2002-10-23 11:25:57.000000000 -0700 @@ -55,7 +55,7 @@ #include #ifdef __GNUC__ -#include +#include #endif #include diff -urN nut-2.5.2-troth/dev/vs1001k.c nut-2.5.2-new-troth/dev/vs1001k.c --- nut-2.5.2-troth/dev/vs1001k.c 2002-09-15 09:08:05.000000000 -0700 +++ nut-2.5.2-new-troth/dev/vs1001k.c 2002-10-23 11:27:23.000000000 -0700 @@ -65,7 +65,7 @@ */ #ifdef __GNUC__ -#include +#include #endif #include diff -urN nut-2.5.2-troth/fs/uromfs.c nut-2.5.2-new-troth/fs/uromfs.c --- nut-2.5.2-troth/fs/uromfs.c 2002-06-26 10:29:14.000000000 -0700 +++ nut-2.5.2-new-troth/fs/uromfs.c 2002-10-23 11:21:30.000000000 -0700 @@ -106,7 +106,7 @@ * \return The number of bytes read from the file or -1 if * an error occured. */ -int NutRomFileRead(ROMFILE *romf, void *data, int size) +int NutRomFileRead(ROMFILE *romf, void *data, size_t size) { ROMENTRY *rome = romf->romf_entry; diff -urN nut-2.5.2-troth/include/compiler.h nut-2.5.2-new-troth/include/compiler.h --- nut-2.5.2-troth/include/compiler.h 2002-09-15 09:37:57.000000000 -0700 +++ nut-2.5.2-new-troth/include/compiler.h 2002-10-23 11:12:26.000000000 -0700 @@ -89,8 +89,8 @@ #ifdef USE_LOW_LEVEL #include -#include -#include +#include +#include #endif #ifndef __SFR_OFFSET diff -urN nut-2.5.2-troth/include/fs/uromfs.h nut-2.5.2-new-troth/include/fs/uromfs.h --- nut-2.5.2-troth/include/fs/uromfs.h 2002-07-03 09:45:40.000000000 -0700 +++ nut-2.5.2-new-troth/include/fs/uromfs.h 2002-10-23 11:21:40.000000000 -0700 @@ -44,7 +44,7 @@ * First pre-release with 2.4 stack * */ -#include +#include #include /*! @@ -98,7 +98,7 @@ extern ROMFILE *NutRomFileOpen(char *name); extern int NutRomFileClose(ROMFILE *romf); -extern int NutRomFileRead(ROMFILE *romf, void *data, int size); +extern int NutRomFileRead(ROMFILE *romf, void *data, size_t size); extern int NutRomFileSize(ROMFILE *romf); extern int NutRomFileSeek(ROMFILE *romf, int pos); diff -urN nut-2.5.2-troth/include/sys/device.h nut-2.5.2-new-troth/include/sys/device.h --- nut-2.5.2-troth/include/sys/device.h 2002-09-15 10:08:49.000000000 -0700 +++ nut-2.5.2-new-troth/include/sys/device.h 2002-10-28 10:22:05.000000000 -0800 @@ -51,7 +51,8 @@ * First pre-release with 2.4 stack * */ -#include +#include +#include #include diff -urN nut-2.5.2-troth/include/sys/kprint.h nut-2.5.2-new-troth/include/sys/kprint.h --- nut-2.5.2-troth/include/sys/kprint.h 2002-06-26 10:29:28.000000000 -0700 +++ nut-2.5.2-new-troth/include/sys/kprint.h 2002-10-23 11:14:22.000000000 -0700 @@ -44,7 +44,7 @@ */ #include -#include +#include /*! * \file sys/kprint.h diff -urN nut-2.5.2-troth/include/sys/print.h nut-2.5.2-new-troth/include/sys/print.h --- nut-2.5.2-troth/include/sys/print.h 2002-06-26 10:29:30.000000000 -0700 +++ nut-2.5.2-new-troth/include/sys/print.h 2002-10-23 11:14:06.000000000 -0700 @@ -43,7 +43,7 @@ * */ -#include +#include #include diff -urN nut-2.5.2-troth/include/sys/uart.h nut-2.5.2-new-troth/include/sys/uart.h --- nut-2.5.2-troth/include/sys/uart.h 2002-06-26 10:29:30.000000000 -0700 +++ nut-2.5.2-new-troth/include/sys/uart.h 2002-10-23 11:13:17.000000000 -0700 @@ -45,7 +45,7 @@ #include -#include +#include /*! * \file sys/uart.h diff -urN nut-2.5.2-troth/net/ifconfig.c nut-2.5.2-new-troth/net/ifconfig.c --- nut-2.5.2-troth/net/ifconfig.c 2002-09-15 07:18:25.000000000 -0700 +++ nut-2.5.2-new-troth/net/ifconfig.c 2002-10-23 11:28:38.000000000 -0700 @@ -109,7 +109,7 @@ #include -#include +#include #include #include @@ -161,7 +161,7 @@ int NutNetSaveConfig(void) { u_char *cp; - int i; + size_t i; confnet.cd_size = sizeof(CONFNET); for(cp = (u_char *)&confnet, i = 0; i < sizeof(CONFNET); i++) diff -urN nut-2.5.2-troth/os/init.c nut-2.5.2-new-troth/os/init.c --- nut-2.5.2-troth/os/init.c 2002-08-08 09:24:04.000000000 -0700 +++ nut-2.5.2-new-troth/os/init.c 2002-10-23 11:33:28.000000000 -0700 @@ -55,7 +55,7 @@ * */ -#include +#include #include #include @@ -115,7 +115,7 @@ int NutSaveConfig(void) { u_char *cp; - int i; + size_t i; confos.size = sizeof(CONFOS); confos.magic[0] = 'O'; diff -urN nut-2.5.2-troth/os/kprint.c nut-2.5.2-new-troth/os/kprint.c --- nut-2.5.2-troth/os/kprint.c 2002-06-26 10:29:44.000000000 -0700 +++ nut-2.5.2-new-troth/os/kprint.c 2002-10-28 10:22:12.000000000 -0800 @@ -263,7 +263,7 @@ va_list ap; u_char *s; u_char *cp; - int width; + size_t width; int result; u_short len; u_long val; diff -urN nut-2.5.2-troth/os/print.c nut-2.5.2-new-troth/os/print.c --- nut-2.5.2-troth/os/print.c 2002-06-26 10:29:44.000000000 -0700 +++ nut-2.5.2-new-troth/os/print.c 2002-10-23 11:34:21.000000000 -0700 @@ -330,7 +330,7 @@ va_list ap; u_char *s; u_char *cp; - int width; + size_t width; int result; u_short len; u_long val; diff -urN nut-2.5.2-troth/pro/httpd.c nut-2.5.2-new-troth/pro/httpd.c --- nut-2.5.2-troth/pro/httpd.c 2002-09-15 09:06:13.000000000 -0700 +++ nut-2.5.2-new-troth/pro/httpd.c 2002-10-23 11:29:34.000000000 -0700 @@ -199,7 +199,7 @@ */ char *NutGetMimeType(char* name) { - int i; + size_t i; int fl; if(name == 0 || (fl = strlen(name)) == 0)