mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
configs/eagle100/nxflat: Configuration converted to use the kconfig-frontends tools
This commit is contained in:
+45
-101
@@ -21,29 +21,30 @@ Development Environment
|
|||||||
GNU Toolchain Options
|
GNU Toolchain Options
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The NuttX make system has been modified to support the following different
|
The NuttX make system has been modified to support the multiple toolchain
|
||||||
toolchain options.
|
options including:
|
||||||
|
|
||||||
1. The CodeSourcery GNU toolchain,
|
1. The CodeSourcery GNU toolchain,
|
||||||
2. The devkitARM GNU toolchain, or
|
2. The devkitARM GNU toolchain,
|
||||||
3. The NuttX buildroot Toolchain (see below).
|
3. The NuttX buildroot Toolchain (see below).
|
||||||
|
|
||||||
All testing has been conducted using the NuttX buildroot toolchain. However,
|
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 make system is setup to default to use the devkitARM toolchain. To use
|
||||||
the CodeSourcery or devkitARM GNU toolchain, you simply need to build the
|
the CodeSourcery or devkitARM, you simply need to add one of the following
|
||||||
system as follows:
|
configuration options to your .config (or defconfig) file:
|
||||||
|
|
||||||
make # Will build for the devkitARM toolchain
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
|
||||||
make CROSSDEV=arm-eabi- # Will build for the devkitARM toolchain
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux
|
||||||
make CROSSDEV=arm-none-eabi- # Will build for the CodeSourcery toolchain
|
CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows
|
||||||
make CROSSDEV=arm-nuttx-elf- # Will build for the NuttX buildroot toolchain
|
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
|
||||||
|
|
||||||
Of course, hard coding this CROSS_COMPILE value in Make.defs file will save
|
If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also have to modify
|
||||||
some repetitive typing.
|
the PATH in the setenv.h file if your make cannot find the tools.
|
||||||
|
|
||||||
NOTE: the CodeSourcery and devkitARM toolchains are Windows native toolchains.
|
NOTE: the CodeSourcery (for Windows) and devkitARM are Windows native toolchains.
|
||||||
The NuttX buildroot toolchain is a Cygwin toolchain. There are several limitations
|
The CodeSourcey (for Linux) and NuttX buildroot toolchains are Cygwin and/or Linux
|
||||||
to using a Windows based toolchain in a Cygwin environment. The three biggest are:
|
native toolchains. There are several limitations to using a Windows based
|
||||||
|
toolchain in a Cygwin environment. The three biggest are:
|
||||||
|
|
||||||
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
|
1. The Windows toolchain cannot follow Cygwin paths. Path conversions are
|
||||||
performed automatically in the Cygwin makefiles using the 'cygpath' utility
|
performed automatically in the Cygwin makefiles using the 'cygpath' utility
|
||||||
@@ -58,7 +59,7 @@ GNU Toolchain Options
|
|||||||
directory. If you use a Windows toolchain, you should get in the habit of
|
directory. If you use a Windows toolchain, you should get in the habit of
|
||||||
making like this:
|
making like this:
|
||||||
|
|
||||||
make clean_context; make CROSSDEV=arm-none-eabi-
|
make clean_context all
|
||||||
|
|
||||||
An alias in your .bashrc file might make that less painful.
|
An alias in your .bashrc file might make that less painful.
|
||||||
|
|
||||||
@@ -74,33 +75,7 @@ GNU Toolchain Options
|
|||||||
|
|
||||||
NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that
|
NOTE 2: The devkitARM toolchain includes a version of MSYS make. Make sure that
|
||||||
the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM
|
the paths to Cygwin's /bin and /usr/bin directories appear BEFORE the devkitARM
|
||||||
path or will get the wrong version of make. It has been reported to me that the
|
path or will get the wrong version of make.
|
||||||
devkitARM will require an lower optimization level of -O1. Currently all of the
|
|
||||||
Make.def files have -O2 for devkitARM -- if you are using this toolchain, you may
|
|
||||||
need to review these settings.
|
|
||||||
|
|
||||||
CodeSourcery on Linux
|
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
If you select the CodeSourcery toolchain, the make system will assume that you
|
|
||||||
are running a Windows version of the toolchain. If you are running under Linux,
|
|
||||||
the make will probably fail. The fix is to edit your Make.defs file and
|
|
||||||
use something like:
|
|
||||||
|
|
||||||
CROSSDEV = arm-none-eabi-
|
|
||||||
WINTOOL = n
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
|
||||||
MAXOPTIMIZATION = -O2
|
|
||||||
|
|
||||||
The values for TOPDIR is provided by the make system; the value for CONFIG_ARCH_BOARD
|
|
||||||
is provided in your defconfig file.
|
|
||||||
|
|
||||||
For an example of a CodeSourcery-under-Linux Make.defs file, see
|
|
||||||
configs/stm3210e-eval/nsh/Make.defs.
|
|
||||||
|
|
||||||
NuttX EABI "buildroot" Toolchain
|
NuttX EABI "buildroot" Toolchain
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
@@ -151,18 +126,10 @@ NuttX OABI "buildroot" Toolchain
|
|||||||
The older, OABI buildroot toolchain is also available. To use the OABI
|
The older, OABI buildroot toolchain is also available. To use the OABI
|
||||||
toolchain:
|
toolchain:
|
||||||
|
|
||||||
1. When building the buildroot toolchain, either (1) modify the cortexm3-eabi-defconfig-4.6.3
|
When building the buildroot toolchain, either (1) modify the
|
||||||
configuration to use EABI (using 'make menuconfig'), or (2) use an exising OABI
|
cortexm3-eabi-defconfig-4.6.3 configuration to use EABI (using
|
||||||
configuration such as cortexm3-defconfig-4.3.3
|
'make menuconfig'), or (2) use an exising OABI configuration such
|
||||||
|
as cortexm3-defconfig-4.3.3
|
||||||
2. Modify the Make.defs file to use the OABI conventions:
|
|
||||||
|
|
||||||
+CROSSDEV = arm-nuttx-elf-
|
|
||||||
+ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
|
||||||
+NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections
|
|
||||||
-CROSSDEV = arm-nuttx-eabi-
|
|
||||||
-ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
|
||||||
-NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
|
||||||
|
|
||||||
NXFLAT Toolchain
|
NXFLAT Toolchain
|
||||||
^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^
|
||||||
@@ -405,17 +372,7 @@ Where <subdir> is one of the following:
|
|||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
reconfiguration process.
|
reconfiguration process.
|
||||||
|
|
||||||
2. As a consequence of (1), selection of toolchains differs from
|
2. This configuration is set to use Cygwin under Windows and the
|
||||||
the discussion above under GNU Toolchain Options. You should
|
|
||||||
*not* add the CROSSDEV setting on the make command line. Rather,
|
|
||||||
you should reconfigure and select the toolchain that you want
|
|
||||||
from the "System Type" menu.
|
|
||||||
|
|
||||||
Eventually, all of the eagle100 configurations will be changed
|
|
||||||
to use the new configuration mechanism and at that time, the
|
|
||||||
above discussion will be corrected for all configurations.
|
|
||||||
|
|
||||||
3. This configuration is set to use Cygwin under Windows and the
|
|
||||||
CodeSourcery toolchain. That, however, is easily reconfigurable:
|
CodeSourcery toolchain. That, however, is easily reconfigurable:
|
||||||
|
|
||||||
CONFIG_HOST_WINDOWS=y
|
CONFIG_HOST_WINDOWS=y
|
||||||
@@ -437,17 +394,7 @@ Where <subdir> is one of the following:
|
|||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
reconfiguration process.
|
reconfiguration process.
|
||||||
|
|
||||||
2. As a consequence of (1), selection of toolchains differs from
|
2. This configuration is set to use Cygwin under Windows and the
|
||||||
the discussion above under GNU Toolchain Options. You should
|
|
||||||
*not* add the CROSSDEV setting on the make command line. Rather,
|
|
||||||
you should reconfigure and select the toolchain that you want
|
|
||||||
from the "System Type" menu.
|
|
||||||
|
|
||||||
Eventually, all of the eagle100 configurations will be changed
|
|
||||||
to use the new configuration mechanism and at that time, the
|
|
||||||
above discussion will be corrected for all configurations.
|
|
||||||
|
|
||||||
3. This configuration is set to use Cygwin under Windows and the
|
|
||||||
CodeSourcery toolchain. That, however, is easily reconfigurable:
|
CodeSourcery toolchain. That, however, is easily reconfigurable:
|
||||||
|
|
||||||
CONFIG_HOST_WINDOWS=y
|
CONFIG_HOST_WINDOWS=y
|
||||||
@@ -474,17 +421,7 @@ Where <subdir> is one of the following:
|
|||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
reconfiguration process.
|
reconfiguration process.
|
||||||
|
|
||||||
2. As a consequence of (1), selection of toolchains differs from
|
4. This configuration is set to use Cygwin under Windows and the
|
||||||
the discussion above under GNU Toolchain Options. You should
|
|
||||||
*not* add the CROSSDEV setting on the make command line. Rather,
|
|
||||||
you should reconfigure and select the toolchain that you want
|
|
||||||
from the "System Type" menu.
|
|
||||||
|
|
||||||
Eventually, all of the eagle100 configurations will be changed
|
|
||||||
to use the new configuration mechanism and at that time, the
|
|
||||||
above discussion will be corrected for all configurations.
|
|
||||||
|
|
||||||
3. This configuration is set to use Cygwin under Windows and the
|
|
||||||
devkitARM toolchain. That, however, is easily reconfigurable:
|
devkitARM toolchain. That, however, is easily reconfigurable:
|
||||||
|
|
||||||
CONFIG_HOST_WINDOWS=y
|
CONFIG_HOST_WINDOWS=y
|
||||||
@@ -494,9 +431,26 @@ Where <subdir> is one of the following:
|
|||||||
nxflat:
|
nxflat:
|
||||||
This builds the NXFLAT example at apps/examples/nxfalt.
|
This builds the NXFLAT example at apps/examples/nxfalt.
|
||||||
|
|
||||||
NOTE: See note above with regard to the EABI/OABI buildroot
|
NOTES:
|
||||||
toolchains. This example can only be built using the older
|
|
||||||
OABI toolchain.
|
1. This configuration uses the mconf-based configuration tool. To
|
||||||
|
change this configurations using that tool, you should:
|
||||||
|
|
||||||
|
a. Build and install the kconfig-mconf tool. See nuttx/README.txt
|
||||||
|
and misc/tools/
|
||||||
|
|
||||||
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
|
reconfiguration process.
|
||||||
|
|
||||||
|
2. This example can only be built using the NuttX buildroot
|
||||||
|
toolchain with the NXFLAT tools.
|
||||||
|
|
||||||
|
3. This configuration is set to use Cygwin under Windows and the
|
||||||
|
devkitARM toolchain. That, however, is easily reconfigurable:
|
||||||
|
|
||||||
|
CONFIG_HOST_WINDOWS=y
|
||||||
|
CONFIG_WINDOWS_CYGWIN=y
|
||||||
|
CONFIG_ARM7M_TOOLCHAIN_DEVKITARM=y
|
||||||
|
|
||||||
thttpd:
|
thttpd:
|
||||||
This builds the THTTPD web server example using the THTTPD and
|
This builds the THTTPD web server example using the THTTPD and
|
||||||
@@ -513,17 +467,7 @@ Where <subdir> is one of the following:
|
|||||||
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
b. Execute 'make menuconfig' in nuttx/ in order to start the
|
||||||
reconfiguration process.
|
reconfiguration process.
|
||||||
|
|
||||||
2. As a consequence of (1), selection of toolchains differs from
|
2. This configuration is set to use Linux and the buildroot toolchain.
|
||||||
the discussion above under GNU Toolchain Options. You should
|
|
||||||
*not* add the CROSSDEV setting on the make command line. Rather,
|
|
||||||
you should reconfigure and select the toolchain that you want
|
|
||||||
from the "System Type" menu.
|
|
||||||
|
|
||||||
Eventually, all of the eagle100 configurations will be changed
|
|
||||||
to use the new configuration mechanism and at that time, the
|
|
||||||
above discussion will be corrected for all configurations.
|
|
||||||
|
|
||||||
3. This configuration is set to use Linux and the buildroot toolchain.
|
|
||||||
That, however, is easily reconfigurable:
|
That, however, is easily reconfigurable:
|
||||||
|
|
||||||
CONFIG_HOST_LINUX=y
|
CONFIG_HOST_LINUX=y
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT),y)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
|||||||
@@ -95,14 +95,13 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT),y)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
LDFLAGS += -g
|
LDFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
HOSTCC = gcc
|
HOSTCC = gcc
|
||||||
HOSTINCLUDES = -I.
|
HOSTINCLUDES = -I.
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT),y)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
|||||||
@@ -35,92 +35,74 @@
|
|||||||
|
|
||||||
include ${TOPDIR}/.config
|
include ${TOPDIR}/.config
|
||||||
include ${TOPDIR}/tools/Config.mk
|
include ${TOPDIR}/tools/Config.mk
|
||||||
|
include ${TOPDIR}/arch/arm/src/armv7-m/Toolchain.defs
|
||||||
|
|
||||||
# The default value for CROSSDEV can be overridden from the make command line:
|
ifeq ($(WINTOOL),y)
|
||||||
# make -- Will build for the devkitARM toolchain
|
# Windows-native toolchains
|
||||||
# make CROSSDEV=arm-eabi- -- Will build for the devkitARM toolchain
|
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
||||||
# make CROSSDEV=arm-none-eabi- -- Will build for the CodeSourcery toolchain
|
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
||||||
# make CROSSDEV=arm-nuttx-elf- -- Will build for the NuttX OABI buildroot toolchain
|
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
||||||
|
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}"
|
||||||
CROSSDEV = arm-eabi-
|
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}"
|
||||||
CC = $(CROSSDEV)gcc
|
ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script}"
|
||||||
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 ($(CROSSDEV),arm-nuttx-elf-)
|
|
||||||
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
|
||||||
ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft
|
|
||||||
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
|
||||||
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
|
||||||
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
|
||||||
MAXOPTIMIZATION = -Os
|
|
||||||
else
|
else
|
||||||
WINTOOL = y
|
# Linux/Cygwin-native toolchain
|
||||||
DIRLINK = $(TOPDIR)/tools/copydir.sh
|
MKDEP = $(TOPDIR)/tools/mkdeps.sh
|
||||||
DIRUNLINK = $(TOPDIR)/tools/unlink.sh
|
ARCHINCLUDES = -I. -isystem $(TOPDIR)/include
|
||||||
MKDEP = $(TOPDIR)/tools/mknulldeps.sh
|
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx
|
||||||
ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft
|
ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/scripts/ld.script
|
||||||
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)/scripts/ld.script}"
|
|
||||||
MAXOPTIMIZATION = -O2
|
|
||||||
endif
|
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
|
||||||
|
|
||||||
|
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)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
ARCHOPTIMIZATION = -g
|
ARCHOPTIMIZATION = -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
ifneq ($(CONFIG_DEBUG_NOOPT),y)
|
||||||
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
ARCHOPTIMIZATION += $(MAXOPTIMIZATION) -fno-strict-aliasing -fno-strength-reduce -fomit-frame-pointer
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ARCHCFLAGS = -fno-builtin
|
ARCHCFLAGS = -fno-builtin
|
||||||
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
ARCHCXXFLAGS = -fno-builtin -fno-exceptions
|
||||||
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow
|
||||||
ARCHWARNINGSXX = -Wall -Wshadow
|
ARCHWARNINGSXX = -Wall -Wshadow
|
||||||
ARCHDEFINES =
|
ARCHDEFINES =
|
||||||
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10
|
||||||
|
|
||||||
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \
|
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
$(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
||||||
CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
|
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
||||||
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \
|
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
||||||
$(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
|
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
||||||
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
|
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
||||||
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
|
|
||||||
AFLAGS = $(CFLAGS) -D__ASSEMBLY__
|
|
||||||
|
|
||||||
NXFLATLDFLAGS1 = -r -d -warn-common
|
NXFLATLDFLAGS1 = -r -d -warn-common
|
||||||
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \
|
NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections
|
||||||
-T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoffset.ld \
|
LDNXFLATFLAGS = -e main -s 2048
|
||||||
-no-check-sections
|
|
||||||
LDNXFLATFLAGS = -e main -s 2048
|
|
||||||
|
|
||||||
OBJEXT = .o
|
OBJEXT = .o
|
||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT),y)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
LDFLAGS += -g
|
LDFLAGS += -g
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
HOSTCC = gcc
|
||||||
HOSTCC = gcc
|
HOSTINCLUDES = -I.
|
||||||
HOSTINCLUDES = -I.
|
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
||||||
HOSTCFLAGS = -Wall -Wstrict-prototypes -Wshadow -g -pipe
|
HOSTLDFLAGS =
|
||||||
HOSTLDFLAGS =
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,39 +0,0 @@
|
|||||||
############################################################################
|
|
||||||
# configs/eagle100/nxflat/appconfig
|
|
||||||
#
|
|
||||||
# Copyright (C) 2011 Gregory Nutt. All rights reserved.
|
|
||||||
# Author: Gregory Nutt <gnutt@nuttx.org>
|
|
||||||
#
|
|
||||||
# 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. Neither the name NuttX nor the names of its contributors may be
|
|
||||||
# used to endorse or promote products derived from this software
|
|
||||||
# without specific prior written permission.
|
|
||||||
#
|
|
||||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 THE
|
|
||||||
# COPYRIGHT OWNER 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.
|
|
||||||
#
|
|
||||||
############################################################################
|
|
||||||
|
|
||||||
# Path to example in apps/examples containing the user_start entry point
|
|
||||||
|
|
||||||
CONFIGURED_APPS += examples/nxflat
|
|
||||||
|
|
||||||
+622
-287
File diff suppressed because it is too large
Load Diff
@@ -47,10 +47,24 @@ if [ -z "${PATH_ORIG}" ]; then
|
|||||||
export PATH_ORIG="${PATH}"
|
export PATH_ORIG="${PATH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# This is the Cygwin path to the location where I installed the RIDE
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the RIDE toolchain in any other location
|
||||||
|
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/Raisonance/Ride/arm-gcc/bin"
|
||||||
|
|
||||||
# This is the Cygwin path to the location where I installed the CodeSourcery
|
# This is the Cygwin path to the location where I installed the CodeSourcery
|
||||||
# toolchain under windows. You will also have to edit this if you install
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
# the CodeSourcery toolchain in any other location
|
# the CodeSourcery toolchain in any other location
|
||||||
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
#export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery G++ Lite/bin"
|
||||||
|
export TOOLCHAIN_BIN="/cygdrive/c/Program Files (x86)/CodeSourcery/Sourcery_CodeBench_Lite_for_ARM_EABI/bin"
|
||||||
|
|
||||||
|
# These are the Cygwin paths to the locations where I installed the Atollic
|
||||||
|
# toolchain under windows. You will also have to edit this if you install
|
||||||
|
# the Atollic toolchain in any other location. /usr/bin is added before
|
||||||
|
# the Atollic bin path because there is are binaries named gcc.exe and g++.exe
|
||||||
|
# at those locations as well.
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for ARM Pro 2.3.0/ARMTools/bin"
|
||||||
|
#export TOOLCHAIN_BIN="/usr/bin:/cygdrive/c/Program Files (x86)/Atollic/TrueSTUDIO for STMicroelectronics STM32 Lite 2.3.0/ARMTools/bin"
|
||||||
|
|
||||||
# This is the Cygwin path to the location where I build the buildroot
|
# This is the Cygwin path to the location where I build the buildroot
|
||||||
# toolchain.
|
# toolchain.
|
||||||
|
|||||||
@@ -95,7 +95,7 @@ OBJEXT = .o
|
|||||||
LIBEXT = .a
|
LIBEXT = .a
|
||||||
EXEEXT =
|
EXEEXT =
|
||||||
|
|
||||||
ifneq ($(CROSSDEV),arm-nuttx-elf-)
|
ifneq ($(CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT),y)
|
||||||
LDFLAGS += -nostartfiles -nodefaultlibs
|
LDFLAGS += -nostartfiles -nodefaultlibs
|
||||||
endif
|
endif
|
||||||
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
ifeq ($(CONFIG_DEBUG_SYMBOLS),y)
|
||||||
|
|||||||
@@ -114,8 +114,8 @@ Development Environment
|
|||||||
GNU Toolchain Options
|
GNU Toolchain Options
|
||||||
^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
The NuttX make system has been modified to support the following different
|
The NuttX make system has been modified to support the multiple toolchain
|
||||||
toolchain options.
|
options including:
|
||||||
|
|
||||||
1. The CodeSourcery GNU toolchain,
|
1. The CodeSourcery GNU toolchain,
|
||||||
2. The devkitARM GNU toolchain,
|
2. The devkitARM GNU toolchain,
|
||||||
@@ -126,12 +126,12 @@ GNU Toolchain Options
|
|||||||
the CodeSourcery or devkitARM, you simply need to add one of the following
|
the CodeSourcery or devkitARM, you simply need to add one of the following
|
||||||
configuration options to your .config (or defconfig) file:
|
configuration options to your .config (or defconfig) file:
|
||||||
|
|
||||||
CONFIG_LM_CODESOURCERYW=y : CodeSourcery under Windows
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYW=y : CodeSourcery under Windows
|
||||||
CONFIG_LM_CODESOURCERYL=y : CodeSourcery under Linux
|
CONFIG_ARMV7M_TOOLCHAIN_CODESOURCERYL=y : CodeSourcery under Linux
|
||||||
CONFIG_LM_DEVKITARM=y : devkitARM under Windows
|
CONFIG_ARMV7M_TOOLCHAIN_DEVKITARM=y : devkitARM under Windows
|
||||||
CONFIG_LM_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
|
CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT=y : NuttX buildroot under Linux or Cygwin (default)
|
||||||
|
|
||||||
If you are not using CONFIG_LM_BUILDROOT, then you may also have to modify
|
If you are not using CONFIG_ARMV7M_TOOLCHAIN_BUILDROOT, then you may also have to modify
|
||||||
the PATH in the setenv.h file if your make cannot find the tools.
|
the PATH in the setenv.h file if your make cannot find the tools.
|
||||||
|
|
||||||
NOTE: the CodeSourcery (for Windows) and devkitARM are Windows native toolchains.
|
NOTE: the CodeSourcery (for Windows) and devkitARM are Windows native toolchains.
|
||||||
|
|||||||
Reference in New Issue
Block a user