Moved nuttx specific make rules to files in makefiles/nuttx.
All target specific makefiles are in their target sub directories.
To minimize file duplication, targets that share rules include a
common file. For example the posix and posix-arm targets both use
makefiles/posix/posix_elf.mk
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Nuttx complains about an unresolved _impure_ptr at link time.
This is a known issue when using STL templates in NuttX on ARM.
Created new ORBMap and ORBSet classes for NuttX.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
The toolchain_* files are target OS specific so they were moved to
the target OS subdir.
The gcc_version.* files are only cleared once per make instantiation so
a build that creates multiple HW targets will try to link with an
incompatible .o file (i.e. x86 build linking ARM .o). I created
posix-arm as a separate target to fix this problem.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Changed "linux" target to "posix". Most of the changes are shared with
QuRT and with OSX. The Linux specific parts are in for i2c which uses
<linux/i2c.h> and <linux/i2c-dev.h>.
There is also a check for __PX4_LINUX in mavlink for a tty ioctl that is
not supported.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
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>