diff options
author | jgoppert <james.goppert@gmail.com> | 2013-01-06 14:20:24 -0500 |
---|---|---|
committer | jgoppert <james.goppert@gmail.com> | 2013-01-06 14:20:24 -0500 |
commit | 4f3b17f53b120cd54112097f4217a90863013c1f (patch) | |
tree | 7bdd022758798363544130322b60cd4b935c4a4f /nuttx/configs/px4fmu | |
parent | db3fabc3baccdeef3108544b4e9da9c8f0895a58 (diff) | |
download | px4-firmware-4f3b17f53b120cd54112097f4217a90863013c1f.tar.gz px4-firmware-4f3b17f53b120cd54112097f4217a90863013c1f.tar.bz2 px4-firmware-4f3b17f53b120cd54112097f4217a90863013c1f.zip |
Added math library to build.
Diffstat (limited to 'nuttx/configs/px4fmu')
-rw-r--r-- | nuttx/configs/px4fmu/common/Make.defs | 21 | ||||
-rw-r--r-- | nuttx/configs/px4fmu/nsh/appconfig | 3 |
2 files changed, 16 insertions, 8 deletions
diff --git a/nuttx/configs/px4fmu/common/Make.defs b/nuttx/configs/px4fmu/common/Make.defs index ff2e4c5fa..44082f64e 100644 --- a/nuttx/configs/px4fmu/common/Make.defs +++ b/nuttx/configs/px4fmu/common/Make.defs @@ -55,7 +55,7 @@ NM = $(CROSSDEV)nm OBJCOPY = $(CROSSDEV)objcopy OBJDUMP = $(CROSSDEV)objdump -MAXOPTIMIZATION = -O3 +MAXOPTIMIZATION = -O3 # disable for debugging ARCHCPUFLAGS = -mcpu=cortex-m4 \ -mthumb \ -march=armv7e-m \ @@ -67,6 +67,11 @@ ARCHCPUFLAGS = -mcpu=cortex-m4 \ INSTRUMENTATIONDEFINES = -finstrument-functions \ -ffixed-r10 +#CMSIS +CMSIS_INCLUDE = $(TOPDIR)/../CMSIS/Include +CMSIS_LIB = $(TOPDIR)/../CMSIS/Lib/GCC/libarm_cortexM4lf_math.a +EXTRA_LIBS += $(CMSIS_LIB) + # pull in *just* libm from the toolchain ... this is grody LIBM = "${shell $(CC) $(ARCHCPUFLAGS) -print-file-name=libm.a}" EXTRA_LIBS += $(LIBM) @@ -79,8 +84,8 @@ ifeq ($(WINTOOL),y) DIRLINK = $(TOPDIR)/tools/winlink.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}" + ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(CMSIS_INCLUDE)}" + ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)/include}" -isystem "${shell cygpath -w $(TOPDIR)/include/cxx}" -isystem "${shell cygpath -w $(CMSIS_INCLUDE)}" ARCHSCRIPT = -T "${shell cygpath -w $(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/common/$(LDSCRIPT)}" else ifeq ($(PX4_WINTOOL),y) @@ -88,14 +93,14 @@ else DIRLINK = $(TOPDIR)/tools/winlink.sh DIRUNLINK = $(TOPDIR)/tools/unlink.sh MKDEP = $(TOPDIR)/tools/mknulldeps.sh - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(CMSIS_INCLUDE) + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx -isystem $(CMSIS_INCLUDE) ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/common/$(LDSCRIPT) else # Linux/Cygwin-native toolchain MKDEP = $(TOPDIR)/tools/mkdeps.sh - ARCHINCLUDES = -I. -isystem $(TOPDIR)/include - ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx + ARCHINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(CMSIS_INCLUDE) + ARCHXXINCLUDES = -I. -isystem $(TOPDIR)/include -isystem $(TOPDIR)/include/cxx -isystem $(CMSIS_INCLUDE) ARCHSCRIPT = -T$(TOPDIR)/configs/$(CONFIG_ARCH_BOARD)/common/$(LDSCRIPT) endif endif @@ -144,7 +149,7 @@ ARCHCWARNINGS = $(ARCHWARNINGS) \ -Wnested-externs \ -Wunsuffixed-float-constants ARCHWARNINGSXX = $(ARCHWARNINGS) -ARCHDEFINES = +ARCHDEFINES = -DARM_MATH_CM4 -D__FPU_PRESENT ARCHPICFLAGS = -fpic -msingle-pic-base -mpic-register=r10 # this seems to be the only way to add linker flags diff --git a/nuttx/configs/px4fmu/nsh/appconfig b/nuttx/configs/px4fmu/nsh/appconfig index 7f1a93df9..7048ef82f 100644 --- a/nuttx/configs/px4fmu/nsh/appconfig +++ b/nuttx/configs/px4fmu/nsh/appconfig @@ -65,6 +65,9 @@ CONFIGURED_APPS += systemcmds/delay_test # https://pixhawk.ethz.ch/px4/dev/deamon # CONFIGURED_APPS += examples/px4_deamon_app +# Math library +CONFIGURED_APPS += examples/math_demo + # Shared object broker; required by many parts of the system. CONFIGURED_APPS += uORB |