diff --git a/configs/shenzhou/README.txt b/configs/shenzhou/README.txt index cad0ad2e73..c04c55ad02 100644 --- a/configs/shenzhou/README.txt +++ b/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/configs/shenzhou/nsh/Make.defs b/configs/shenzhou/nsh/Make.defs index 317a95cda8..555b0069fb 100644 --- a/configs/shenzhou/nsh/Make.defs +++ b/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/configs/shenzhou/nxwm/Make.defs b/configs/shenzhou/nxwm/Make.defs index 96104d6d0c..dfb0472a1f 100644 --- a/configs/shenzhou/nxwm/Make.defs +++ b/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