When make is invoked as "make posix posix_default"
it will build the posix_default target twice. The Makefile was
fixed to correct this.
If "make posix" is run, the Makefile still calls "make PX4_TARGET_OS=posix".
If "make posix posix_default" is run, the posix target just exports
PX4_TARGET_OS=posix and then make evaluates the next goal (posix_default).
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
NuttX is still the default target and all NuttX configs can still
be built with:
make
Individual NuttX, POSIX, and QuRT configs can now be built more
easily by specifying the target and configs:
make posix posix_default
make qurt qurt_hello
make nuttx aerocore_default
Running make with just the target will make all the configs for
that target:
make nuttx
make qurt
make posix
The help is also target specific:
make nuttx help
make qurt help
make posix help
"make help" will still assume you want help for the NuttX target
Added a new QuRT config called qurt_hello as a sample config to
test buiding in different commands for separate configs.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
In the upstream tree ringbuffer.h includes the method implementations
in the header file which causes multiple definitions in the link for
other targets. Changed so ringbuffer.cpp is build separately for other
platforms and is included by ringbuffer.h on NuttX.
uORB changes do not link without uORBTest_UnitTest.cpp enabled for
the NuttX build.
px4_getopt was not exported and wasn't visible in NuttX build.
The makefiles were restored to be as close as possible to upstream
so the NuttX build builtin's work again. The code will have to be
refactored after the merge.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
DSPAL for QuRT is still missing the pthreads exports and there is no
exported sleep function. These functions are stubbed out for the time being.
This is based on the 6.4.05 version of the Hexagon tools.
The Hexagon tools and DSPAL are needed to build the qurt target.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
PreflightCheck was failing because it was trying to read actual
devices instad of virtual devices.
ADCSIM had a LINUXTEST ifdef that was removed.
posix_run.sh was using the wrong path
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>
Now run:
make PX4_TARGET_OS=nuttx
or
make PX4_TARGET_OS=linux
To test the linux build and make sure that the required directories
exist, run:
make linuxrun
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Added linker script to resolve __param_start and __param_end.
Added mc_att_control to list of supported builtins.
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
Moved checksubmodules target back to Makefile.
NuttX download still done for Linux as it would require
too much surgery to remove it.
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>
This gives warnings about -j1 being forced some places, but
it still successfully builds all archvies in parallel. The
resulting archives have been tested on the board. It is
disabled by default so no functional change unless someone
adds J="" or J=8 in front of the make archvies.
If there is an IO firmware image already built when we build the corresponding FMU ROMFS, copy it into the ROMFS. Note - due to there being no fixed build ordering, to be certain that you have the most current IO firmware, you must build the IO firmware explicitly first.