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
+23 -8
View File
@@ -7,8 +7,9 @@ with Makefile in the parent directory.
../Makefile
Top-level makefile for the PX4 build system. This makefile supports
building NuttX archives, as well as supervising the building of all
Top-level makefile for the PX4 build system.
This makefile supports building NuttX archives for the NuttX based
configurations, as well as supervising the building of all
of the defined PX4 firmware configurations.
Try 'make help' in the parent directory for documentation.
@@ -25,6 +26,14 @@ firmware.mk
source tree. When used in this mode, at least BOARD, MODULES and
CONFIG_FILE must be set.
firmware_nuttx.mk
Called by firmware.mk to build NuttX based firmware.
firmware_linux.mk
Called by firmware.mk to build Linux (non-ROS) based firmware.
module.mk
Called by firmware.mk to build individual modules.
@@ -34,22 +43,28 @@ module.mk
nuttx.mk
Called by ../Makefile to build or download the NuttX archives.
Called by ../Makefile to build or download the NuttX archives if
PX4_TARGET_OS is set to "nuttx".
linux.mk
Called by ../Makefile to set Linux specific parameters if
PX4_TARGET_OS is set to "linux".
upload.mk
Called by ../Makefile to upload files to a target board. Can be used
by external build systems as well.
by external build systems as well. (NuttX targets only)
setup.mk
Provides common path and tool definitions. Implements host system-specific
compatibility hacks.
Provides common path and tool definitions. Implements host
system-specific compatibility hacks. Sets PX4_TARGET_OS.
board_<boardname>.mk
Board-specific configuration for <boardname>. Typically sets CONFIG_ARCH
and then includes the toolchain definition for the board.
Board-specific configuration for <boardname>. Typically sets
CONFIG_ARCH and then includes the toolchain definition for the board.
config_<boardname>_<configname>.mk