diff --git a/ChangeLog b/ChangeLog index 0d3a6f3859..bf4754afb4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1190,7 +1190,7 @@ have a test to prove that the changes are correct. * configs/olimex-lpc2378 - Add support for the CodeSourcery toolchain under Linux (contributed by Alan Carvalho de Assis). - * arch/arm/src/lpc17xx/lpc17_gpio.c - Fix an imporation GPIO configuration + * arch/arm/src/lpc17xx/lpc17_gpio.c - Fix an important GPIO configuration bug: When attempting to set no pull-up or pull-down (floating), it would, instead, select pull-down. * arch/arm/src/lm3s/lm3s_gpioirq.c - Fix warning for returning a value @@ -1215,3 +1215,7 @@ enabled. This is not expected to be a functionality configuration (at least not yet); it was created in order to debug the on-demand paging feature. + * configs/ntosd-dm320/*/Make.defs - Codesourcery and devkitARM toolchains + now supported for the Neuros OSD. + * configs/ntosd-dm320 and arch/arm/src/dm320 - Add support for the + Neuros production OSD (changes contributed by bf.nuttx). diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index a6890231a3..fb06f8805e 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@

NuttX RTOS

-

Last Updated: August 21, 2010

+

Last Updated: August 24, 2010

@@ -1872,7 +1872,7 @@ nuttx-5.9 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> have a test to prove that the changes are correct. * configs/olimex-lpc2378 - Add support for the CodeSourcery toolchain under Linux (contributed by Alan Carvalho de Assis). - * arch/arm/src/lpc17xx/lpc17_gpio.c - Fix an imporation GPIO configuration + * arch/arm/src/lpc17xx/lpc17_gpio.c - Fix an important GPIO configuration bug: When attempting to set no pull-up or pull-down (floating), it would, instead, select pull-down. * arch/arm/src/lm3s/lm3s_gpioirq.c - Fix warning for returning a value @@ -1897,6 +1897,10 @@ nuttx-5.9 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> enabled. This is not expected to be a functionality configuration (at least not yet); it was created in order to debug the on-demand paging feature. + * configs/ntosd-dm320/*/Make.defs - Codesourcery and devkitARM toolchains + now supported for the Neuros OSD. + * configs/ntosd-dm320 and arch/arm/src/dm320 - Add support for the + Neuros production OSD (changes contributed by bf.nuttx). pascal-2.1 2010-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr> diff --git a/arch/arm/src/dm320/dm320_memorymap.h b/arch/arm/src/dm320/dm320_memorymap.h index 7cab28db60..47679b24db 100644 --- a/arch/arm/src/dm320/dm320_memorymap.h +++ b/arch/arm/src/dm320/dm320_memorymap.h @@ -73,10 +73,6 @@ * so that physical memory regions is in the board-specific files. */ -#if CONFIG_DRAM_START != 0x01000000 -# error "Invalid setting for CONFIG_DRAM_START" -#endif - /* Section/Region Name Phys Address Size TLB Enty CW */ #define DM320_PERIPHERALS_PSECTION 0x00000000 /* 1Mb 1 section -- */ #define DM320_IRAM_PADDR 0x00000000 /* 16Kb 1 large page CW */ diff --git a/configs/ntosd-dm320/nettest/Make.defs b/configs/ntosd-dm320/nettest/Make.defs index c96f81c58d..8b7f6eb059 100644 --- a/configs/ntosd-dm320/nettest/Make.defs +++ b/configs/ntosd-dm320/nettest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/nettest/Make.defs # -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,23 +35,64 @@ include ${TOPDIR}/.config -CROSSDEV = arm-elf- -CC = $(CROSSDEV)gcc -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump +# Setup for the selected toolchain -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ifeq ($(CONFIG_DM320_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + WINTOOL = y + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + WINTOOL = y +endif +ifeq ($(CONFIG_DM320_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + MAXOPTIMIZATION = -Os +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) @@ -60,15 +101,19 @@ else ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin endif +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/nettest/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -82,7 +127,11 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +#[blf] The `ea3131' had this, but despite using buildroot, neuros doesn't... +### ifneq ($(CONFIG_LPC313X_BUILDROOT),y) ### change to ...DM320... +### LDFLAGS += -nostartfiles -nodefaultlibs +### endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -96,6 +145,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 @@ -110,8 +164,6 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/configs/ntosd-dm320/nettest/defconfig b/configs/ntosd-dm320/nettest/defconfig index 4b8227413e..0530270ef5 100644 --- a/configs/ntosd-dm320/nettest/defconfig +++ b/configs/ntosd-dm320/nettest/defconfig @@ -86,6 +86,14 @@ CONFIG_ARCH_STACKDUMP=n CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# +# Identify toolchain and linker options +# +CONFIG_DM320_CODESOURCERYW=n +CONFIG_DM320_CODESOURCERYL=y +CONFIG_DM320_DEVKITARM=n +CONFIG_DM320_BUILDROOT=n + # # DM320 specific device driver settings # diff --git a/configs/ntosd-dm320/nsh/Make.defs b/configs/ntosd-dm320/nsh/Make.defs index 8ef6413db1..380f9d41ef 100644 --- a/configs/ntosd-dm320/nsh/Make.defs +++ b/configs/ntosd-dm320/nsh/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/nsh/Make.defs # -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -83,6 +83,8 @@ AR = $(CROSSDEV)ar rcs NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} diff --git a/configs/ntosd-dm320/ostest/Make.defs b/configs/ntosd-dm320/ostest/Make.defs index c2c5f3b3d3..622a607a95 100644 --- a/configs/ntosd-dm320/ostest/Make.defs +++ b/configs/ntosd-dm320/ostest/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/ostest/Make.defs # -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -83,6 +83,8 @@ AR = $(CROSSDEV)ar rcs NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} diff --git a/configs/ntosd-dm320/ostest/defconfig b/configs/ntosd-dm320/ostest/defconfig index cc8958d675..d6d26eb650 100644 --- a/configs/ntosd-dm320/ostest/defconfig +++ b/configs/ntosd-dm320/ostest/defconfig @@ -86,6 +86,7 @@ CONFIG_ARCH_STACKDUMP=y CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# # Identify toolchain and linker options # CONFIG_DM320_CODESOURCERYW=n diff --git a/configs/ntosd-dm320/poll/Make.defs b/configs/ntosd-dm320/poll/Make.defs index e8d4f8d4f5..276f9c6393 100644 --- a/configs/ntosd-dm320/poll/Make.defs +++ b/configs/ntosd-dm320/poll/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/poll/Make.defs # -# Copyright (C) 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,23 +35,64 @@ include ${TOPDIR}/.config -CROSSDEV = arm-elf- -CC = $(CROSSDEV)gcc -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump +# Setup for the selected toolchain -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ifeq ($(CONFIG_DM320_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + WINTOOL = y + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + WINTOOL = y +endif +ifeq ($(CONFIG_DM320_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + MAXOPTIMIZATION = -Os +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/poll/ld.script}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/poll/ld.script +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) @@ -60,15 +101,19 @@ else ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin endif +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/poll/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -82,7 +127,11 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +#[blf] The `ea3131' had this, but despite using buildroot, neuros doesn't... +### ifneq ($(CONFIG_LPC313X_BUILDROOT),y) ### change to ...DM320... +### LDFLAGS += -nostartfiles -nodefaultlibs +### endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -96,6 +145,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 @@ -110,8 +164,6 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/configs/ntosd-dm320/poll/defconfig b/configs/ntosd-dm320/poll/defconfig index ca3e162e21..d32a9d8538 100644 --- a/configs/ntosd-dm320/poll/defconfig +++ b/configs/ntosd-dm320/poll/defconfig @@ -86,6 +86,14 @@ CONFIG_ARCH_STACKDUMP=n CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# +# Identify toolchain and linker options +# +CONFIG_DM320_CODESOURCERYW=n +CONFIG_DM320_CODESOURCERYL=y +CONFIG_DM320_DEVKITARM=n +CONFIG_DM320_BUILDROOT=n + # # DM320 specific device driver settings # diff --git a/configs/ntosd-dm320/thttpd/Make.defs b/configs/ntosd-dm320/thttpd/Make.defs index e3e3859c18..12622bea39 100644 --- a/configs/ntosd-dm320/thttpd/Make.defs +++ b/configs/ntosd-dm320/thttpd/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/thttpd/Make.defs # -# Copyright (C) 2009 Gregory Nutt. All rights reserved. +# Copyright (C) 2009-2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,27 +35,64 @@ include ${TOPDIR}/.config -CROSSDEV = arm-elf- -CC = $(CROSSDEV)gcc -CXX = $(CROSSDEV)g++ -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump +# Setup for the selected toolchain -MKNXFLAT = mknxflat -LDNXFLAT = ldnxflat +ifeq ($(CONFIG_DM320_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + WINTOOL = y + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + WINTOOL = y +endif +ifeq ($(CONFIG_DM320_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + MAXOPTIMIZATION = -Os +endif -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) @@ -66,12 +103,10 @@ endif ARCHCFLAGS = -fno-builtin ARCHCXXFLAGS = -fno-builtin -fno-exceptions +ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/thttpd/ld.script -ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe @@ -92,7 +127,11 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +#[blf] The `ea3131' had this, but despite using buildroot, neuros doesn't... +### ifneq ($(CONFIG_LPC313X_BUILDROOT),y) ### change to ...DM320... +### LDFLAGS += -nostartfiles -nodefaultlibs +### endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -125,8 +164,6 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/configs/ntosd-dm320/thttpd/defconfig b/configs/ntosd-dm320/thttpd/defconfig index a727f4dfc9..9a2931cb77 100644 --- a/configs/ntosd-dm320/thttpd/defconfig +++ b/configs/ntosd-dm320/thttpd/defconfig @@ -86,6 +86,14 @@ CONFIG_ARCH_STACKDUMP=n CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# +# Identify toolchain and linker options +# +CONFIG_DM320_CODESOURCERYW=n +CONFIG_DM320_CODESOURCERYL=y +CONFIG_DM320_DEVKITARM=n +CONFIG_DM320_BUILDROOT=n + # # DM320 specific device driver settings # @@ -548,7 +556,8 @@ CONFIG_USBSTRG_REMOVABLE=y # CONFIG_THTTPD_IPADDR - Server IP address (no host name) # CONFIG_THTTPD_SERVER_ADDRESS - SERVER_ADDRESS: response # CONFIG_THTTPD_SERVER_SOFTWARE - SERVER_SOFTWARE: response -# CONFIG_THTTPD_CGI_PATH - +# CONFIG_THTTPD_PATH - Server working directory +# CONFIG_THTTPD_CGI_PATH - Path to CGI executables # CONFIG_THTTPD_CGI_PATTERN - Only CGI programs matching this # pattern will be executed. In fact, if this value is not defined # then no CGI logic will be built. @@ -601,6 +610,7 @@ CONFIG_THTTPD_PORT=80 CONFIG_THTTPD_IPADDR=(10<<24|0<<16|0<<8|2) CONFIG_THTTPD_SERVER_ADDRESS="http://www.nuttx.org" CONFIG_THTTPD_SERVER_SOFTWARE="thttpd/2.25b 29dec2003-NuttX" +CONFIG_THTTPD_PATH="/mnt/www" CONFIG_THTTPD_CGI_PATH="/mnt/www/cgi-bin" CONFIG_THTTPD_CGI_PATTERN="/mnt/www/cgi-bin/*" CONFIG_THTTPD_CGI_PRIORITY=50 diff --git a/configs/ntosd-dm320/udp/Make.defs b/configs/ntosd-dm320/udp/Make.defs index d3d8459aad..67ce4ca3c9 100644 --- a/configs/ntosd-dm320/udp/Make.defs +++ b/configs/ntosd-dm320/udp/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/udp/Make.defs # -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,23 +35,64 @@ include ${TOPDIR}/.config -CROSSDEV = arm-elf- -CC = $(CROSSDEV)gcc -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump +# Setup for the selected toolchain -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ifeq ($(CONFIG_DM320_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + WINTOOL = y + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + WINTOOL = y +endif +ifeq ($(CONFIG_DM320_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + MAXOPTIMIZATION = -Os +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/udp/ld.script}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/udp/ld.script +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) @@ -60,15 +101,19 @@ else ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin endif +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/udp/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -82,7 +127,11 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +#[blf] The `ea3131' had this, but despite using buildroot, neuros doesn't... +### ifneq ($(CONFIG_LPC313X_BUILDROOT),y) ### change to ...DM320... +### LDFLAGS += -nostartfiles -nodefaultlibs +### endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -96,6 +145,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 @@ -110,8 +164,6 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/configs/ntosd-dm320/udp/defconfig b/configs/ntosd-dm320/udp/defconfig index 9b44b850c0..bf19c08117 100644 --- a/configs/ntosd-dm320/udp/defconfig +++ b/configs/ntosd-dm320/udp/defconfig @@ -86,6 +86,14 @@ CONFIG_ARCH_STACKDUMP=n CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# +# Identify toolchain and linker options +# +CONFIG_DM320_CODESOURCERYW=n +CONFIG_DM320_CODESOURCERYL=y +CONFIG_DM320_DEVKITARM=n +CONFIG_DM320_BUILDROOT=n + # # DM320 specific device driver settings # diff --git a/configs/ntosd-dm320/uip/Make.defs b/configs/ntosd-dm320/uip/Make.defs index 358ac36688..e806c48336 100644 --- a/configs/ntosd-dm320/uip/Make.defs +++ b/configs/ntosd-dm320/uip/Make.defs @@ -1,7 +1,7 @@ ############################################################################ # configs/ntosd-dm320/uip/Make.defs # -# Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved. +# Copyright (C) 2007-2008, 2010 Gregory Nutt. All rights reserved. # Author: Gregory Nutt # # Redistribution and use in source and binary forms, with or without @@ -35,23 +35,64 @@ include ${TOPDIR}/.config -CROSSDEV = arm-elf- -CC = $(CROSSDEV)gcc -CPP = $(CROSSDEV)gcc -E -LD = $(CROSSDEV)ld -AR = $(CROSSDEV)ar rcs -NM = $(CROSSDEV)nm -OBJCOPY = $(CROSSDEV)objcopy -OBJDUMP = $(CROSSDEV)objdump +# Setup for the selected toolchain -ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} -ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} +ifeq ($(CONFIG_DM320_CODESOURCERYW),y) + # CodeSourcery under Windows + CROSSDEV = arm-none-eabi- + WINTOOL = y + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_CODESOURCERYL),y) + # CodeSourcery under Linux + CROSSDEV = arm-none-eabi- + MAXOPTIMIZATION = -O2 +endif +ifeq ($(CONFIG_DM320_DEVKITARM),y) + # devkitARM under Windows + CROSSDEV = arm-eabi- + WINTOOL = y +endif +ifeq ($(CONFIG_DM320_BUILDROOT),y) + # NuttX buildroot under Linux or Cygwin + CROSSDEV = arm-elf- + MAXOPTIMIZATION = -Os +endif + +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" + ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/uip/ld.script}" +else + # Linux/Cygwin-native toolchain + MKDEP = $(TOPDIR)/tools/mkdeps.sh + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/uip/ld.script +endif + +CC = $(CROSSDEV)gcc +CXX = $(CROSSDEV)g++ +CPP = $(CROSSDEV)gcc -E +LD = $(CROSSDEV)ld +AR = $(CROSSDEV)ar rcs +NM = $(CROSSDEV)nm +OBJCOPY = $(CROSSDEV)objcopy +OBJDUMP = $(CROSSDEV)objdump +MKNXFLAT = mknxflat +LDNXFLAT = ldnxflat + +ARCHCCVERSION = ${shell $(CC) -v 2>&1 | sed -n '/^gcc version/p' | sed -e 's/^gcc version \([0-9\.]\)/\1/g' -e 's/[-\ ].*//g' -e '1q'} +ARCHCCMAJOR = ${shell echo $(ARCHCCVERSION) | cut -d'.' -f1} ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") - ARCHOPTIMIZATION = -g + ARCHOPTIMIZATION = -g else - ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce \ - -fomit-frame-pointer + ARCHOPTIMIZATION = $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer endif ifeq ($(ARCHCCMAJOR),4) @@ -60,15 +101,19 @@ else ARCHCPUFLAGS = -mapcs-32 -mtune=arm9tdmi -march=armv5te -msoft-float -fno-builtin endif +ARCHCFLAGS = -fno-builtin +ARCHCXXFLAGS = -fno-builtin -fno-exceptions ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow +ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/uip/ld.script -CFLAGS = $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) +CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) -pipe +CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ @@ -82,7 +127,11 @@ OBJEXT = .o LIBEXT = .a EXEEXT = -ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") +#[blf] The `ea3131' had this, but despite using buildroot, neuros doesn't... +### ifneq ($(CONFIG_LPC313X_BUILDROOT),y) ### change to ...DM320... +### LDFLAGS += -nostartfiles -nodefaultlibs +### endif +ifeq ($(CONFIG_DEBUG_SYMBOLS),y) LDFLAGS += -g endif @@ -96,6 +145,11 @@ define COMPILE @$(CC) -c $(CFLAGS) $1 -o $2 endef +define COMPILEXX + @echo "CXX: $1" + @$(CXX) -c $(CXXFLAGS) $1 -o $2 +endef + define ASSEMBLE @echo "AS: $1" @$(CC) -c $(AFLAGS) $1 -o $2 @@ -110,8 +164,6 @@ define CLEAN @rm -f *.o *.a endef -MKDEP = $(TOPDIR)/tools/mkdeps.sh - HOSTCC = gcc HOSTINCLUDES = -I. HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe diff --git a/configs/ntosd-dm320/uip/defconfig b/configs/ntosd-dm320/uip/defconfig index cb52795f1c..0e9d1381c2 100644 --- a/configs/ntosd-dm320/uip/defconfig +++ b/configs/ntosd-dm320/uip/defconfig @@ -86,6 +86,14 @@ CONFIG_ARCH_STACKDUMP=n CONFIG_ARCH_LOWVECTORS=n CONFIG_ARCH_ROMPGTABLE=n +# +# Identify toolchain and linker options +# +CONFIG_DM320_CODESOURCERYW=n +CONFIG_DM320_CODESOURCERYL=y +CONFIG_DM320_DEVKITARM=n +CONFIG_DM320_BUILDROOT=n + # # DM320 specific device driver settings #