summaryrefslogtreecommitdiff
path: root/nuttx/configs/eagle100
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-28 20:36:04 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-05-28 20:36:04 +0000
commitec35e939322aa09643fda0260ab19ac8fbfc7b16 (patch)
tree1877a1da3eea4f510ee7f6e234619ced5fd69a78 /nuttx/configs/eagle100
parentde8741ffd56f55f277b0842be8600d893ed43a18 (diff)
downloadpx4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.tar.gz
px4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.tar.bz2
px4-nuttx-ec35e939322aa09643fda0260ab19ac8fbfc7b16.zip
Add support for CodeSourcery and devkitARM toolchains
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1832 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs/eagle100')
-rw-r--r--nuttx/configs/eagle100/README.txt28
-rw-r--r--nuttx/configs/eagle100/httpd/Make.defs20
-rw-r--r--nuttx/configs/eagle100/nettest/Make.defs20
-rw-r--r--nuttx/configs/eagle100/nsh/Make.defs20
-rw-r--r--nuttx/configs/eagle100/ostest/Make.defs20
5 files changed, 93 insertions, 15 deletions
diff --git a/nuttx/configs/eagle100/README.txt b/nuttx/configs/eagle100/README.txt
index 4182582bd..36be86359 100644
--- a/nuttx/configs/eagle100/README.txt
+++ b/nuttx/configs/eagle100/README.txt
@@ -16,12 +16,34 @@ Development Environment
environment because the Luminary FLASH programming application was used for
writing to FLASH and this application works only under Windows.
-Toolchain
-^^^^^^^^^
+GNU Toolchain Options
+^^^^^^^^^^^^^^^^^^^^^
+
+ The NuttX make system has been modified to support the following different
+ toolchain options.
+
+ 1. The CodeSourcery GNU toolchain,
+ 2. The devkitARM GNU toolchain, or
+ 3. The NuttX buildroot Toolchain (see below).
+
+ All testing has been conducted using the NuttX buildroot toolchain. However,
+ the make system is setup to default to use the devkitARM toolchain. To use
+ the CodeSource GNU toolchain, you simply need to build the system as follows:
+
+ make # Will build for the devkitARM toolchain
+ make CROSSDEV=arm-eabi- # Will build for the devkitARM toolchain
+ make CROSSDEV=arm-none-eabi- # Will build for the CodeSourcery toolchain
+ make CROSSDEV=arm-elf- # Will build for the NuttX buildroot toolchain
+
+ Of course, hard coding this CROSS_COMPILE value in Make.defs file will save
+ some repetitive typing.
+
+NuttX buildroot Toolchain
+^^^^^^^^^^^^^^^^^^^^^^^^^
A GNU GCC-based toolchain is assumed. The files */setenv.sh should
be modified to point to the correct path to the Cortex-M3 GCC toolchain (if
- different from the default).
+ different from the default in your PATH variable).
If you have no Cortex-M3 toolchain, one can be downloaded from the NuttX
SourceForge download site (https://sourceforge.net/project/showfiles.php?group_id=189573).
diff --git a/nuttx/configs/eagle100/httpd/Make.defs b/nuttx/configs/eagle100/httpd/Make.defs
index 393f93687..cf8e2e98d 100644
--- a/nuttx/configs/eagle100/httpd/Make.defs
+++ b/nuttx/configs/eagle100/httpd/Make.defs
@@ -35,7 +35,13 @@
include ${TOPDIR}/.config
-CROSSDEV = arm-elf-
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-eabi-
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
@@ -59,7 +65,12 @@ else
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
-ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+ifeq ($(CROSSDEV),arm-elf-)
+ ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+endif
+
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
@@ -78,7 +89,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-ifeq ("${CONFIG_DEBUG}","y")
+ifneq ($(CROSSDEV),arm-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG),y)
LDFLAGS += -g
endif
diff --git a/nuttx/configs/eagle100/nettest/Make.defs b/nuttx/configs/eagle100/nettest/Make.defs
index c858d506a..420e639a1 100644
--- a/nuttx/configs/eagle100/nettest/Make.defs
+++ b/nuttx/configs/eagle100/nettest/Make.defs
@@ -35,7 +35,13 @@
include ${TOPDIR}/.config
-CROSSDEV = arm-elf-
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-eabi-
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
@@ -59,7 +65,12 @@ else
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
-ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+ifeq ($(CROSSDEV),arm-elf-)
+ ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+endif
+
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
@@ -78,7 +89,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-ifeq ("${CONFIG_DEBUG}","y")
+ifneq ($(CROSSDEV),arm-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG),y)
LDFLAGS += -g
endif
diff --git a/nuttx/configs/eagle100/nsh/Make.defs b/nuttx/configs/eagle100/nsh/Make.defs
index df915ca59..385694db8 100644
--- a/nuttx/configs/eagle100/nsh/Make.defs
+++ b/nuttx/configs/eagle100/nsh/Make.defs
@@ -35,7 +35,13 @@
include ${TOPDIR}/.config
-CROSSDEV = arm-elf-
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-eabi-
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
@@ -59,7 +65,12 @@ else
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
-ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+ifeq ($(CROSSDEV),arm-elf-)
+ ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+endif
+
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
@@ -78,7 +89,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-ifeq ("${CONFIG_DEBUG}","y")
+ifneq ($(CROSSDEV),arm-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG),y)
LDFLAGS += -g
endif
diff --git a/nuttx/configs/eagle100/ostest/Make.defs b/nuttx/configs/eagle100/ostest/Make.defs
index dd785a726..ee7ba8735 100644
--- a/nuttx/configs/eagle100/ostest/Make.defs
+++ b/nuttx/configs/eagle100/ostest/Make.defs
@@ -35,7 +35,13 @@
include ${TOPDIR}/.config
-CROSSDEV = arm-elf-
+# The default value for CROSSDEV can be overridden from the make command line:
+# make -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
+# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
+# make CROSSDEV=arm-elf- -- Will build for the NuttX buildroot toolchain
+
+CROSSDEV = arm-eabi-
CC = $(CROSSDEV)gcc
CXX = $(CROSSDEV)g++
CPP = $(CROSSDEV)gcc -E
@@ -59,7 +65,12 @@ else
ARCHOPTIMIZATION = -Os -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
endif
-ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+ifeq ($(CROSSDEV),arm-elf-)
+ ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
+else
+ ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
+endif
+
ARCHDEFINES =
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
@@ -78,7 +89,10 @@ OBJEXT = .o
LIBEXT = .a
EXEEXT =
-ifeq ("${CONFIG_DEBUG}","y")
+ifneq ($(CROSSDEV),arm-elf-)
+ LDFLAGS += -nostartfiles -nodefaultlibs
+endif
+ifeq ($(CONFIG_DEBUG),y)
LDFLAGS += -g
endif