From dc06d205d632ffb0afef27d583a61109c1ef3b27 Mon Sep 17 00:00:00 2001 From: patacongo Date: Mon, 21 Sep 2009 13:53:48 +0000 Subject: [PATCH] Add stm32 header files git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2074 42af7a65-404d-4744-a932-0658087f49c3 --- configs/stm3210e-eval/README.txt | 3 ++ configs/stm3210e-eval/ostest/Make.defs | 54 ++++++++++++++------------ 2 files changed, 32 insertions(+), 25 deletions(-) diff --git a/configs/stm3210e-eval/README.txt b/configs/stm3210e-eval/README.txt index 9cf75671fb..175209b93c 100755 --- a/configs/stm3210e-eval/README.txt +++ b/configs/stm3210e-eval/README.txt @@ -35,6 +35,9 @@ GNU Toolchain Options CONFIG_STM32_RAISONANCE=y CONFIG_STM32_BUILDROOT=y (default) + If you are not using CONFIG_STM32_BUILDROOT, then you may also have to modify + the PATH in the setenv.h file if your make cannot find the tools. + NOTE: the CodeSourcery, devkitARM, and Raisonance toolchains are Windows native toolchains. The NuttX buildroot toolchain is a Cygwin or Linux native toolchain. There are several limitations to using a Windows based toolchain in a Cygwin diff --git a/configs/stm3210e-eval/ostest/Make.defs b/configs/stm3210e-eval/ostest/Make.defs index 2d1ae9b619..f0f3e62b72 100644 --- a/configs/stm3210e-eval/ostest/Make.defs +++ b/configs/stm3210e-eval/ostest/Make.defs @@ -35,13 +35,36 @@ include ${TOPDIR}/.config -# The default value for CROSSDEV can be overridden from the make command line: -# make -- Will build for the devkitARM 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-elf- -- Will build for the NuttX buildroot toolchain +# Setup for the selected toolchain + +ifneq ($(CONFIG_STM32_BUILDROOT),y) + # Windows-native toolchains +ifeq ($(CONFIG_STM32_DEVKITARM),y) + CROSSDEV = arm-eabi- +else + CROSSDEV = arm-none-eabi- +endif + WINTOOL = y + DIRLINK = $(TOPDIR)/tools/winlink.sh + DIRUNLINK = $(TOPDIR)/tools/unlink.sh + MKDEP = $(TOPDIR)/tools/mknulldeps.sh + ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft + 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)/ostest/ld.script}" + MAXOPTIMIZATION = -O2 +# The NuttX buildroot toolchain +else + # Linux/Cygwin-native toolchain (assumed from the NuttX buildroot) + CROSSDEV = arm-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)/ostest/ld.script + MAXOPTIMIZATION = -Os +endif -CROSSDEV = arm-eabi- CC = $(CROSSDEV)gcc CXX = $(CROSSDEV)g++ CPP = $(CROSSDEV)gcc -E @@ -54,25 +77,6 @@ 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 ($(CROSSDEV),arm-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)/ostest/ld.script - MAXOPTIMIZATION = -Os -else - WINTOOL = y - DIRLINK = $(TOPDIR)/tools/winlink.sh - DIRUNLINK = $(TOPDIR)/tools/unlink.sh - MKDEP = $(TOPDIR)/tools/mknulldeps.sh - ARCHCPUFLAGS = -mcpu=cortex-m3 -mthumb -mfloat-abi=soft - 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)/ostest/ld.script}" - MAXOPTIMIZATION = -O2 -endif - ifeq ("${CONFIG_DEBUG_SYMBOLS}","y") ARCHOPTIMIZATION = -g else