diff options
Diffstat (limited to 'nuttx/configs/zp214xpa/nxlines')
-rw-r--r-- | nuttx/configs/zp214xpa/nxlines/Make.defs | 58 | ||||
-rw-r--r-- | nuttx/configs/zp214xpa/nxlines/defconfig | 2 |
2 files changed, 27 insertions, 33 deletions
diff --git a/nuttx/configs/zp214xpa/nxlines/Make.defs b/nuttx/configs/zp214xpa/nxlines/Make.defs index 51c9dfbf9..dc39d35a6 100644 --- a/nuttx/configs/zp214xpa/nxlines/Make.defs +++ b/nuttx/configs/zp214xpa/nxlines/Make.defs @@ -1,7 +1,7 @@ ############################################################################## # configs/zp214xpa/nxlines/Make.defs # -# Copyright (C) 2012 Gregory Nutt. All rights reserved. +# Copyright (C) 2012, 2014 Gregory Nutt. All rights reserved. # Author: Gregory Nutt <gnutt@nuttx.org> # # Redistribution and use in source and binary forms, with or without @@ -35,14 +35,24 @@ include ${TOPDIR}/.config include ${TOPDIR}/tools/Config.mk +include ${TOPDIR}/arch/arm/src/arm/Toolchain.defs -# The default value for CROSSDEV can be overridden from the make command line: -# make -- Will build for the NuttX buildroot 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-nuttx-elf- -- Will build for the NuttX buildroot toolchain +ifeq ($(WINTOOL),y) + # Windows-native toolchains + DIRLINK = $(TOPDIR)/tools/copydir.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)/scripts/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)/scripts/ld.script +endif -CROSSDEV = arm-nuttx-elf- CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E @@ -52,35 +62,16 @@ NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump -HOSTOS = ${shell uname -o 2>/dev/null || echo "Other"} - 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 ($(ARCHCCMAJOR),4) ifneq ($(HOSTOS),Cygwin) -OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment + OBJCOPYARGS = -R .note -R .note.gnu.build-id -R .comment endif endif -ifeq ($(CROSSDEV),arm-nuttx-elf-) - 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)/scripts/ld.script - MAXOPTIMIZATION = -Os -else - WINTOOL = y - DIRLINK = $(TOPDIR)/tools/copydir.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)/scripts/ld.script}" - MAXOPTIMIZATION = -O2 -endif - -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) +ifeq ("${CONFIG_DEBUG}","y") ARCHOPTIMIZATION = -g endif @@ -101,16 +92,19 @@ ARCHWARNINGS = -Wall -Wstrict-prototypes -Wshadow ARCHWARNINGSXX = -Wall -Wshadow ARCHDEFINES = -CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe +CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) \ + $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS) CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) \ - $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe + $(ARCHCPUFLAGS) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS) CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld -no-check-sections +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) \ + -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-gotoff.ld \ + -no-check-sections LDNXFLATFLAGS = -e main -s 2048 OBJEXT = .o @@ -120,7 +114,7 @@ EXEEXT = ifneq ($(CROSSDEV),arm-nuttx-elf-) LDFLAGS += -nostartfiles -nodefaultlibs endif -ifeq ($(CONFIG_DEBUG_SYMBOLS),y) +ifeq ($(CONFIG_DEBUG),y) LDFLAGS += -g endif diff --git a/nuttx/configs/zp214xpa/nxlines/defconfig b/nuttx/configs/zp214xpa/nxlines/defconfig index fba89c7c0..df15c79e1 100644 --- a/nuttx/configs/zp214xpa/nxlines/defconfig +++ b/nuttx/configs/zp214xpa/nxlines/defconfig @@ -92,7 +92,7 @@ CONFIG_ARM_TOOLCHAIN_GNU_EABIL=y # # LPC214x Configuration Options # -CONFIG_ARCH_CHIP_LPC2148=y +CONFIG_ARCH_CHIP_LPC214X=y # # LPC214x Initialization Options |