From 15df1338f6bbd859f4918d728a33973643592dbe Mon Sep 17 00:00:00 2001 From: patacongo Date: Wed, 10 Oct 2012 17:01:23 +0000 Subject: Rename gnu-nxflat.ld to gnu-nxflat-gotoff.ld; Add gnu-nxflat-pcrel.ld git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5225 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/shenzhou/README.txt | 60 +++++++++++++++++++++++++++++++++-- nuttx/configs/shenzhou/nsh/Make.defs | 2 +- nuttx/configs/shenzhou/nxwm/Make.defs | 2 +- 3 files changed, 59 insertions(+), 5 deletions(-) (limited to 'nuttx/configs/shenzhou') diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index c04c55ad0..ff4cf7450 100644 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -40,7 +40,9 @@ Contents - Development Environment - GNU Toolchain Options - IDEs - - NuttX buildroot Toolchain + - NuttX EABI buildroot Toolchain + - NuttX OABI buildroot Toolchain + - NXFLAT Toolchain - Shenzhou-specific Configuration Options - LEDs - Shenzhou-specific Configuration Options @@ -330,8 +332,8 @@ IDEs one time from the Cygwin command line in order to obtain the pre-built startup object needed by RIDE. -NuttX buildroot Toolchain -========================= +NuttX EABI 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 @@ -382,6 +384,58 @@ NuttX buildroot Toolchain detailed PLUS some special instructions that you will need to follow if you are building a Cortex-M3 toolchain for Cygwin under Windows. +NuttX OABI "buildroot" Toolchain +================================ + + The older, OABI buildroot toolchain is also available. To use the OABI + toolchain: + + 1. When building the buildroot toolchain, either (1) modify the cortexm3-eabi-defconfig-4.6.3 + configuration to use EABI (using '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 +================ + + If you are *not* using the NuttX buildroot toolchain and you want to use + the NXFLAT tools, then you will still have to build a portion of the buildroot + tools -- just the NXFLAT tools. The buildroot with the NXFLAT tools can + be downloaded from the NuttX SourceForge download site + (https://sourceforge.net/projects/nuttx/files/). + + This GNU toolchain builds and executes in the Linux or Cygwin environment. + + 1. You must have already configured Nuttx in /nuttx. + + cd tools + ./configure.sh lpcxpresso-lpc1768/ + + 2. Download the latest buildroot package into + + 3. unpack the buildroot tarball. The resulting directory may + have versioning information on it like buildroot-x.y.z. If so, + rename /buildroot-x.y.z to /buildroot. + + 4. cd /buildroot + + 5. cp configs/cortexm3-defconfig-nxflat .config + + 6. make oldconfig + + 7. make + + 8. Edit setenv.h, if necessary, so that the PATH variable includes + the path to the newly builtNXFLAT binaries. + LEDs ==== diff --git a/nuttx/configs/shenzhou/nsh/Make.defs b/nuttx/configs/shenzhou/nsh/Make.defs index 588bb2760..2318e6c9c 100644 --- a/nuttx/configs/shenzhou/nsh/Make.defs +++ b/nuttx/configs/shenzhou/nsh/Make.defs @@ -151,7 +151,7 @@ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections LDNXFLATFLAGS = -e main -s 2048 OBJEXT = .o diff --git a/nuttx/configs/shenzhou/nxwm/Make.defs b/nuttx/configs/shenzhou/nxwm/Make.defs index d94f0c38a..84e0df782 100644 --- a/nuttx/configs/shenzhou/nxwm/Make.defs +++ b/nuttx/configs/shenzhou/nxwm/Make.defs @@ -151,7 +151,7 @@ CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) AFLAGS = $(CFLAGS) -D__ASSEMBLY__ NXFLATLDFLAGS1 = -r -d -warn-common -NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat.ld -no-check-sections +NXFLATLDFLAGS2 = $(NXFLATLDFLAGS1) -T$(TOPDIR)/binfmt/libnxflat/gnu-nxflat-pcrel.ld -no-check-sections LDNXFLATFLAGS = -e main -s 2048 OBJEXT = .o -- cgit v1.2.3