Refactoring for multiplatform support

Moved the NuttX specific board files to makefiles/nuttx and added
a makfiles/linux directory with sample config and board files.

Created a makefiles/toolchain_native.mk file for building for Linux
with the native system compiler. GCC or clang can be used by setting
a flag in the file.

The Linux build creates an archive file and will build the tasks as
threads. Other code changes are required to support both task based
and thread based builds.

The NuttX source should not be required for the Linux build. The
target OS (NuttX or Linux) is selected by commenting out the desired
line in setup.mk

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
This commit is contained in:
Mark Charlebois
2015-04-20 10:46:43 -07:00
parent 2f5239c17a
commit 838e9fc769
27 changed files with 979 additions and 319 deletions
+11
View File
@@ -0,0 +1,11 @@
#
# Board-specific definitions for the Linux port of PX4
#
#
# Configure the toolchain
#
CONFIG_ARCH = NATIVE
CONFIG_BOARD = FOO
include $(PX4_MK_DIR)/toolchain_native.mk
+64
View File
@@ -0,0 +1,64 @@
#
# Makefile for the Foo *default* configuration
#
#
# Use the configuration's ROMFS.
#
ROMFS_ROOT = $(PX4_BASE)/ROMFS/px4fmu_common
#
# Board support modules
#
#MODULES += drivers/dxl
#MODULES += drivers/i2c_pwm
#MODULES += drivers/lemonrx
#MODULES += drivers/mpu9x50
#MODULES += drivers/um7
MODULES += drivers/device
MODULES += modules/sensors
#
# System commands
#
#MODULES += systemcmds/boardinfo
#
# General system control
#
#MODULES += modules/mavlink
MODULES += modules/mavlink
#
# Estimation modules (EKF/ SO3 / other filters)
#
MODULES += modules/attitude_estimator_ekf
#
# Vehicle Control
#
MODULES += modules/mc_att_control
#
# Library modules
#
MODULES += modules/systemlib
MODULES += modules/systemlib/mixer
MODULES += modules/uORB
MODULES += modules/dataman
#
# Libraries
#
MODULES += lib/mathlib
MODULES += lib/geo
MODULES += lib/geo_lookup
MODULES += lib/conversion
#MODULES += lib/utils
#
# Linux port
#
MODULES += platforms/linux/px4_layer
MODULES += platforms/linux/publisher