aboutsummaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpx4dev <px4@purgatory.org>2013-01-06 12:57:28 -0800
committerpx4dev <px4@purgatory.org>2013-01-06 12:57:28 -0800
commit95aa95957107ff2b5209ef814ed09149ac7c5c43 (patch)
tree771b812f6a22115602008125cf46ca471a9fc41f /nuttx
parente0cf9f943a946f655f0078943bad359197eb163f (diff)
parent4f3b17f53b120cd54112097f4217a90863013c1f (diff)
downloadpx4-firmware-95aa95957107ff2b5209ef814ed09149ac7c5c43.tar.gz
px4-firmware-95aa95957107ff2b5209ef814ed09149ac7c5c43.tar.bz2
px4-firmware-95aa95957107ff2b5209ef814ed09149ac7c5c43.zip
Merge commit '4f3b17f53b120cd54112097f4217a90863013c1f' into local/mathlib
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/px4fmu/common/Make.defs21
-rw-r--r--nuttx/configs/px4fmu/nsh/appconfig3
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 f70586c8f..afaef32f7 100644
--- a/nuttx/configs/px4fmu/nsh/appconfig
+++ b/nuttx/configs/px4fmu/nsh/appconfig
@@ -68,6 +68,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