summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-25 11:03:59 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2010-08-25 11:03:59 +0000
commit49bc0c0a16540e1b03b1dadda61cf1a2783da3fa (patch)
treefc95108860ba1273a489d84a3dbe2df1ce271e1e /nuttx
parentfb6467d5cab6df586478a588c0565a01a31468eb (diff)
downloadpx4-nuttx-49bc0c0a16540e1b03b1dadda61cf1a2783da3fa.tar.gz
px4-nuttx-49bc0c0a16540e1b03b1dadda61cf1a2783da3fa.tar.bz2
px4-nuttx-49bc0c0a16540e1b03b1dadda61cf1a2783da3fa.zip
Extend CodeSourcery & production OSD support to other configs
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2884 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog6
-rw-r--r--nuttx/Documentation/NuttX.html8
-rw-r--r--nuttx/arch/arm/src/dm320/dm320_memorymap.h4
-rw-r--r--nuttx/configs/ntosd-dm320/nettest/Make.defs92
-rw-r--r--nuttx/configs/ntosd-dm320/nettest/defconfig8
-rw-r--r--nuttx/configs/ntosd-dm320/nsh/Make.defs4
-rw-r--r--nuttx/configs/ntosd-dm320/ostest/Make.defs4
-rw-r--r--nuttx/configs/ntosd-dm320/ostest/defconfig1
-rw-r--r--nuttx/configs/ntosd-dm320/poll/Make.defs92
-rw-r--r--nuttx/configs/ntosd-dm320/poll/defconfig8
-rw-r--r--nuttx/configs/ntosd-dm320/thttpd/Make.defs83
-rw-r--r--nuttx/configs/ntosd-dm320/thttpd/defconfig12
-rw-r--r--nuttx/configs/ntosd-dm320/udp/Make.defs92
-rw-r--r--nuttx/configs/ntosd-dm320/udp/defconfig8
-rw-r--r--nuttx/configs/ntosd-dm320/uip/Make.defs92
-rw-r--r--nuttx/configs/ntosd-dm320/uip/defconfig8
16 files changed, 409 insertions, 113 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index 0d3a6f385..bf4754afb 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/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/nuttx/Documentation/NuttX.html b/nuttx/Documentation/NuttX.html
index a6890231a..fb06f8805 100644
--- a/nuttx/Documentation/NuttX.html
+++ b/nuttx/Documentation/NuttX.html
@@ -8,7 +8,7 @@
<tr align="center" bgcolor="#e4e4e4">
<td>
<h1><big><font color="#3c34ec"><i>NuttX RTOS</i></font></big></h1>
- <p>Last Updated: August 21, 2010</p>
+ <p>Last Updated: August 24, 2010</p>
</td>
</tr>
</table>
@@ -1872,7 +1872,7 @@ nuttx-5.9 2010-xx-xx Gregory Nutt &lt;spudmonkey@racsa.co.cr&gt;
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 &lt;spudmonkey@racsa.co.cr&gt;
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 &lt;spudmonkey@racsa.co.cr&gt;
diff --git a/nuttx/arch/arm/src/dm320/dm320_memorymap.h b/nuttx/arch/arm/src/dm320/dm320_memorymap.h
index 7cab28db6..47679b24d 100644
--- a/nuttx/arch/arm/src/dm320/dm320_memorymap.h
+++ b/nuttx/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/nuttx/configs/ntosd-dm320/nettest/Make.defs b/nuttx/configs/ntosd-dm320/nettest/Make.defs
index c96f81c58..8b7f6eb05 100644
--- a/nuttx/configs/ntosd-dm320/nettest/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/nettest/defconfig b/nuttx/configs/ntosd-dm320/nettest/defconfig
index 4b8227413..0530270ef 100644
--- a/nuttx/configs/ntosd-dm320/nettest/defconfig
+++ b/nuttx/configs/ntosd-dm320/nettest/defconfig
@@ -87,6 +87,14 @@ 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
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
diff --git a/nuttx/configs/ntosd-dm320/nsh/Make.defs b/nuttx/configs/ntosd-dm320/nsh/Make.defs
index 8ef6413db..380f9d41e 100644
--- a/nuttx/configs/ntosd-dm320/nsh/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/ostest/Make.defs b/nuttx/configs/ntosd-dm320/ostest/Make.defs
index c2c5f3b3d..622a607a9 100644
--- a/nuttx/configs/ntosd-dm320/ostest/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/ostest/defconfig b/nuttx/configs/ntosd-dm320/ostest/defconfig
index cc8958d67..d6d26eb65 100644
--- a/nuttx/configs/ntosd-dm320/ostest/defconfig
+++ b/nuttx/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/nuttx/configs/ntosd-dm320/poll/Make.defs b/nuttx/configs/ntosd-dm320/poll/Make.defs
index e8d4f8d4f..276f9c639 100644
--- a/nuttx/configs/ntosd-dm320/poll/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/poll/defconfig b/nuttx/configs/ntosd-dm320/poll/defconfig
index ca3e162e2..d32a9d853 100644
--- a/nuttx/configs/ntosd-dm320/poll/defconfig
+++ b/nuttx/configs/ntosd-dm320/poll/defconfig
@@ -87,6 +87,14 @@ 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
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
diff --git a/nuttx/configs/ntosd-dm320/thttpd/Make.defs b/nuttx/configs/ntosd-dm320/thttpd/Make.defs
index e3e3859c1..12622bea3 100644
--- a/nuttx/configs/ntosd-dm320/thttpd/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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
+
+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}
+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/nuttx/configs/ntosd-dm320/thttpd/defconfig b/nuttx/configs/ntosd-dm320/thttpd/defconfig
index a727f4dfc..9a2931cb7 100644
--- a/nuttx/configs/ntosd-dm320/thttpd/defconfig
+++ b/nuttx/configs/ntosd-dm320/thttpd/defconfig
@@ -87,6 +87,14 @@ 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
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
@@ -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/nuttx/configs/ntosd-dm320/udp/Make.defs b/nuttx/configs/ntosd-dm320/udp/Make.defs
index d3d8459aa..67ce4ca3c 100644
--- a/nuttx/configs/ntosd-dm320/udp/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/udp/defconfig b/nuttx/configs/ntosd-dm320/udp/defconfig
index 9b44b850c..bf19c0811 100644
--- a/nuttx/configs/ntosd-dm320/udp/defconfig
+++ b/nuttx/configs/ntosd-dm320/udp/defconfig
@@ -87,6 +87,14 @@ 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
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the
diff --git a/nuttx/configs/ntosd-dm320/uip/Make.defs b/nuttx/configs/ntosd-dm320/uip/Make.defs
index 358ac3668..e806c4833 100644
--- a/nuttx/configs/ntosd-dm320/uip/Make.defs
+++ b/nuttx/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 <spudmonkey@racsa.co.cr>
#
# 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/nuttx/configs/ntosd-dm320/uip/defconfig b/nuttx/configs/ntosd-dm320/uip/defconfig
index cb52795f1..0e9d1381c 100644
--- a/nuttx/configs/ntosd-dm320/uip/defconfig
+++ b/nuttx/configs/ntosd-dm320/uip/defconfig
@@ -87,6 +87,14 @@ 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
#
# CONFIG_UARTn_SERIAL_CONSOLE - selects the UARTn for the