From b9454627bc2b5ae8383cffdf5ae612e03354c2a1 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sat, 6 Oct 2012 00:20:49 +0000 Subject: More changes for buildroot EABI toolchain git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5215 42af7a65-404d-4744-a932-0658087f49c3 --- misc/buildroot/configs/README.txt | 10 +++++++--- misc/buildroot/configs/arm920t-eabi-defconfig-4.5.2 | 2 +- misc/buildroot/configs/arm926t-defconfig-4.3.3 | 2 +- misc/buildroot/configs/arm926t-defconfig-nxflat | 2 +- nuttx/configs/shenzhou/README.txt | 17 ++++++++++++++++- nuttx/configs/shenzhou/nsh/Make.defs | 3 ++- nuttx/configs/shenzhou/nxwm/Make.defs | 3 ++- 7 files changed, 30 insertions(+), 9 deletions(-) diff --git a/misc/buildroot/configs/README.txt b/misc/buildroot/configs/README.txt index f37bcf178..6b76ff80d 100644 --- a/misc/buildroot/configs/README.txt +++ b/misc/buildroot/configs/README.txt @@ -14,12 +14,12 @@ AVAILABLE CONFIGURATIONS ^^^^^^^^^^^^^^^^^^^^^^^^ arm-defconfig - Builds an ARM toolchain using gcc 3.4.6 + Builds an OABI ARM toolchain using gcc 3.4.6 arm7tdmi-defconfig-4.2.4 arm920t-defconfig-4.2.4 arm926t-defconfig-4.2.4 - Builds an ARM toolchain using gcc 4.2.4. This configuration + Builds an OABI ARM toolchain using gcc 4.2.4. This configuration builds both gcc and g++. There are three versions: one for arm7tdmi (armv4t), arm920t (armv4t) and arm926t (arv5t) because of differences in the way that soft floating is handled in between @@ -48,7 +48,7 @@ arm926t-defconfig-4.2.4 arm920t-defconfig-4.3.3 arm7tdmi-defconfig-4.3.3 - Builds an ARM toolchain using gcc 4.3.3. These configurations + Builds an OABI ARM toolchain using gcc 4.3.3. These configurations builds both gcc and g++ for the arm7tdmi (armv4t) or the arm920t (armv4t). These are udates to *-defconfig-4.2.4 (see notes above). @@ -62,6 +62,10 @@ cortexm3-defconfig-4.3.3 Builds an OABI ARM toolchain for the Cortex-M3 using gcc 4.3.3. This configuration builds gcc, g++ and the NXFLAT toolchain. +cortexm3-eabi-defconfig-4.6.3 + Builds an EABI ARM toolchain for the Cortex-M3 using gcc 4.6.3. + This configuration builds gcc, g++ and the NXFLAT toolchain. + cortexm3-defconfig-nxflat arm926t-defconfig-nxflat This configuration build an NXFLAT toolchain (only) for diff --git a/misc/buildroot/configs/arm920t-eabi-defconfig-4.5.2 b/misc/buildroot/configs/arm920t-eabi-defconfig-4.5.2 index 3586e4f33..6e55dc363 100644 --- a/misc/buildroot/configs/arm920t-eabi-defconfig-4.5.2 +++ b/misc/buildroot/configs/arm920t-eabi-defconfig-4.5.2 @@ -61,7 +61,7 @@ BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx" BR2_TOPDIR_PREFIX="" BR2_TOPDIR_SUFFIX="" BR2_GNU_BUILD_SUFFIX="pc-elf" -BR2_GNU_TARGET_SUFFIX="eabi" +BR2_GNU_TARGET_SUFFIX="nuttx-eabi" # BR2_PREFER_IMA is not set # diff --git a/misc/buildroot/configs/arm926t-defconfig-4.3.3 b/misc/buildroot/configs/arm926t-defconfig-4.3.3 index b72a12451..1d6301779 100644 --- a/misc/buildroot/configs/arm926t-defconfig-4.3.3 +++ b/misc/buildroot/configs/arm926t-defconfig-4.3.3 @@ -59,7 +59,7 @@ BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx" BR2_TOPDIR_PREFIX="" BR2_TOPDIR_SUFFIX="" -BR2_GNU_BUILD_SUFFIX="arm-elf" +BR2_GNU_BUILD_SUFFIX="pc-elf" BR2_GNU_TARGET_SUFFIX="nuttx-elf" # BR2_PREFER_IMA is not set # BR2_DEPRECATED is not set diff --git a/misc/buildroot/configs/arm926t-defconfig-nxflat b/misc/buildroot/configs/arm926t-defconfig-nxflat index d449ef4ab..4f6a669c2 100644 --- a/misc/buildroot/configs/arm926t-defconfig-nxflat +++ b/misc/buildroot/configs/arm926t-defconfig-nxflat @@ -59,7 +59,7 @@ BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir" BR2_NUTTX_DIR="$(TOPDIR)/../../nuttx" BR2_TOPDIR_PREFIX="" BR2_TOPDIR_SUFFIX="" -BR2_GNU_BUILD_SUFFIX="arm-elf" +BR2_GNU_BUILD_SUFFIX="pc-elf" BR2_GNU_TARGET_SUFFIX="nuttx-elf" # BR2_PREFER_IMA is not set # BR2_DEPRECATED is not set diff --git a/nuttx/configs/shenzhou/README.txt b/nuttx/configs/shenzhou/README.txt index cad0ad2e7..c04c55ad0 100644 --- a/nuttx/configs/shenzhou/README.txt +++ b/nuttx/configs/shenzhou/README.txt @@ -346,6 +346,9 @@ NuttX buildroot Toolchain cd tools ./configure.sh shenzhou/ + cd .. + make context + 2. Download the latest buildroot package into 3. unpack the buildroot tarball. The resulting directory may @@ -360,9 +363,21 @@ NuttX buildroot Toolchain 7. make - 8. Edit setenv.h, if necessary, so that the PATH variable includes + 8. Edit nuttx/.config to select the buildroot toolchain as described above + and below: + + -CONFIG_STM32_CODESOURCERYW=y + +CONFIG_STM32_BUILDROOT=y + + 9. Edit setenv.h, if necessary, so that the PATH variable includes the path to the newly built binaries. + -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="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + +export TOOLCHAIN_BIN="${WD}/../misc/buildroot/build_arm_nofpu/staging_dir/bin" + See the file configs/README.txt in the buildroot source tree. That has more detailed PLUS some special instructions that you will need to follow if you are building a Cortex-M3 toolchain for Cygwin under Windows. diff --git a/nuttx/configs/shenzhou/nsh/Make.defs b/nuttx/configs/shenzhou/nsh/Make.defs index 317a95cda..555b0069f 100644 --- a/nuttx/configs/shenzhou/nsh/Make.defs +++ b/nuttx/configs/shenzhou/nsh/Make.defs @@ -84,7 +84,8 @@ ifeq ($(CONFIG_STM32_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-nuttx-eabi- ARCROSSDEV = arm-nuttx-eabi- - ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft +# ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft MAXOPTIMIZATION = -Os endif diff --git a/nuttx/configs/shenzhou/nxwm/Make.defs b/nuttx/configs/shenzhou/nxwm/Make.defs index 96104d6d0..dfb0472a1 100644 --- a/nuttx/configs/shenzhou/nxwm/Make.defs +++ b/nuttx/configs/shenzhou/nxwm/Make.defs @@ -84,7 +84,8 @@ ifeq ($(CONFIG_STM32_BUILDROOT),y) # NuttX buildroot under Linux or Cygwin CROSSDEV = arm-nuttx-eabi- ARCROSSDEV = arm-nuttx-eabi- - ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft +# ARCHCPUFLAGS = -mtune=cortex-m3 -march=armv7-m -mfloat-abi=soft + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft MAXOPTIMIZATION = -Os endif -- cgit v1.2.3