Commit Graph

100 Commits

Author SHA1 Message Date
Mark Charlebois 26d2589e97 makefile cleanup
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>
2015-06-16 09:58:48 -07:00
Mark Charlebois 729653ba71 SITL: changed posix_default to posix_sitl
The SITL build is now the default posix build.

The linker script for posix was moved to makefiles/posix.
The rc.S file was moved to posix-configs/SITL/init/
The POSIXTEST board definition is now SITL

To run the SITL test run:

make sitlrun

This replaces the make posixrun target.

The build directory is now Build/posix_sitl.build/

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-06-15 09:51:07 -07:00
David Sidrane 447b93c090 Add size Makefile target for elf 2015-06-13 06:07:57 -10:00
David Sidrane 17fddb1556 Back Port of Git Versioning - without side effects Part 1 2015-06-12 06:49:15 -10:00
Mark Charlebois 58e263d534 Added posix-arm target and refactored toolchain_* files
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>
2015-06-08 22:21:59 -07:00
Mark Charlebois 77cc3cdde1 Remove Build/git_version.* on each make
The Build/git_version.d and Build/git_version.o files need to be
removed on each make to prevent confusion from a previously
generated dependency file for a different target.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 19:50:39 -07:00
Mark Charlebois d4749551da git_version.* not removed on clean
The Build/git_version.* files need to be removed on make clean.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-05-27 19:30:05 -07:00
Lorenz Meier 92f67a923a Make sure the build directory exists 2015-05-27 19:54:46 +02:00
Lorenz Meier 8fd00f4d6d Merged release_v1.0.0 into master 2015-05-23 11:07:10 +02:00
Lorenz Meier ccac324f5b mavlink: Fix GIT string transmission 2015-05-23 11:04:19 +02:00
Lorenz Meier 0d134aac53 systemlib: Use build directory for git version 2015-05-23 10:18:20 +02:00
Lorenz Meier 6d7e063148 Added GIT version which recompiles on each build 2015-05-23 09:59:46 +02:00
Mark Charlebois 2d22e8325d Fix double build when using new make target syntax
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>
2015-05-21 13:45:53 -07:00
Mark Charlebois 43345e29dc Makefile multi-target support
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>
2015-05-20 19:19:08 -07:00
Mark Charlebois 9f391b1867 NuttX: fixes for NuttX build
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>
2015-05-15 12:56:18 -07:00
Mark Charlebois 6a439f7ddc QuRT: Hello world app for QuRT
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>
2015-04-22 08:48:48 -07:00
Mark Charlebois 19162ba5be Posix: Changed PreflightCheck to read Vdev
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>
2015-04-21 17:14:52 -07:00
Mark Charlebois f3b5076d70 Linux to posix conversion
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>
2015-04-21 09:53:09 -07:00
Mark Charlebois 6ce0b7b753 QuRT: added missing make pieces
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2015-04-20 11:37:51 -07:00
Mark Charlebois cf71db74d7 Support to specify build time OS target
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>
2015-04-20 11:16:26 -07:00
Mark Charlebois 2cd44a24ea Linux: Added linker script support for param and added mc_att_control
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>
2015-04-20 11:16:26 -07:00
Mark Charlebois 51a71d54c6 checksubmodules target needed for Linux build
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>
2015-04-20 10:46:44 -07:00
Mark Charlebois 838e9fc769 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>
2015-04-20 10:46:43 -07:00
Daniel Agar b1dcb10f25 add make check_format to check astyle code formatting 2015-03-02 12:48:19 -05:00
Lorenz Meier 100fb07142 Fix ordering of check submodule execution 2015-03-01 18:06:00 +01:00
Lorenz Meier 2b71bff858 Generate messages first, then check submodules 2015-03-01 11:38:53 +01:00
Andrew Tridgell 91aab00fa0 build: avoid wiping an existing PYTHONPATH variable 2015-02-16 22:54:32 +01:00
Lorenz Meier eeb192730f Revert "include default PYTHONPATH in call to uorb header generation script"
This reverts commit 7e6198b3dd.
2015-02-12 13:29:08 +01:00
Thomas Gubler 7e6198b3dd include default PYTHONPATH in call to uorb header generation script 2015-02-05 19:44:30 +01:00
Lorenz Meier 37ec1ec8de Improve submodule checking 2015-02-03 20:27:51 +01:00
Thomas Gubler 2728889f78 Merge remote-tracking branch 'upstream/master' into ros_messagelayer_merge_attctlposctl 2015-01-28 16:29:14 +01:00
James Goppert a3b2c99801 A huge developer time saver, J="" make archives
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.
2015-01-28 10:20:20 +01:00
Thomas Gubler d7e57061c9 generate message wrapper headers on ros 2015-01-23 11:58:24 +01:00
Thomas Gubler 738f65a705 generate wrapper headers for uorb 2015-01-23 10:34:04 +01:00
Thomas Gubler 143ff444e4 fix merge error of tests target change 2015-01-07 17:28:56 +01:00
Thomas Gubler 154111d4c0 move checksubmodules and generateuorbtopicheaders dependency 2015-01-07 17:01:03 +01:00
Thomas Gubler fe279d340d Merge remote-tracking branch 'upstream/master' into dev_ros
Conflicts:
	Makefile
2015-01-07 16:00:59 +01:00
Thomas Gubler 213f08ee07 generate uorb topic headers for tests make target 2015-01-06 23:52:04 +01:00
Thomas Gubler ee561947e9 makefile: fix order 2015-01-06 19:14:57 +01:00
Daniel Agar bd130ec397 move sf0x_test to cmake and remove unittests/Makefile 2015-01-05 18:55:38 -05:00
Thomas Gubler f4e0dc2857 Merge remote-tracking branch 'upstream/master' into dev_ros
Conflicts:
	.gitmodules
2014-12-29 08:00:12 +01:00
Lorenz Meier d04f1fde50 Suppress nothing to do messages from make for clean targets 2014-12-26 17:37:36 +01:00
Thomas Gubler 25af4b266c Merge remote-tracking branch 'upstream/master' into dev_ros
Conflicts:
	.gitignore
	src/lib/uavcan
2014-12-25 09:48:15 +01:00
Lorenz Meier 032b25c81b Creating Firmware ZIP file and ignoring it in GIT 2014-12-21 12:09:16 +01:00
Lorenz Meier a4606dc270 Add make tests to Makefile 2014-12-20 18:50:51 +01:00
Thomas Gubler 9520983e08 lots' of header juggling and small changes to make mc att control compile for NuttX and ROS 2014-12-16 08:24:51 +01:00
Thomas Gubler 6f9cbd9751 add genmsg and gencpp python modules, ros not required anymore for message generation 2014-12-04 16:40:46 +01:00
Thomas Gubler 8e8f84bde0 uorb topic header generator: only create new files if the file content really changed 2014-12-04 10:39:24 +01:00
Thomas Gubler 8b5bc703a1 initial version of msg to uorb script
Standard and embedded types work, may need small refinements for some
types
2014-12-01 16:39:27 +01:00
Lorenz Meier 086fc7f758 Merge pull request #1128 from PX4/uavcan
Basic UAVCAN support
2014-07-22 06:48:49 +02:00