Commit Graph

159 Commits

Author SHA1 Message Date
Daniel Agar 24b26e53b9 cmake organize code coverage handling and base 2017-06-02 19:35:18 -04:00
Beat Küng 941d17d74c cmake: make sure params defined in external modules are found 2017-03-23 08:37:48 +01:00
James Goppert 85f62f5da0 Fix param scoping to use cmake for parsing. 2017-02-17 11:26:46 +01:00
Daniel Agar 899e406005 cmake optionally find and use ccache 2017-01-30 08:57:53 +01:00
Daniel Agar dcddcdd28e cmake git ver depend on index and HEAD 2017-01-30 08:57:53 +01:00
mazahner 06d28b2635 Rework Includes during the uorb message generation
each CMakeFile that generates parameters should add its path to the msg_include_path
which will then be handled in the px_generate_uorb_topic_files.py
2017-01-14 10:07:12 -08:00
Daniel Agar 8caf6c54fa Makefile cleanup and travis-ci s3 deploy (#6329)
- pulls more of the travis-ci s3 deploy into the repo so we can potentially migrate to another CI system
 - fixed the sizes output and added verbose compiler version to cmake (#6322)
 - fixed filenames for firmware uploaded to s3 (was broken by the changes yesterday)
 - fixed some broken git version display in cmake
 - Makefile organization
 - simplified .travis.yml
 - added a print to know which config the nuttx patch was being applied to
 - docker_run.sh now respects PX4_DOCKER_REPO for setting the docker image, but defaults to the good production nuttx image
2017-01-14 09:38:28 -05:00
James Goppert b1173f1f62 Fix cmake version detection from git tag. 2017-01-13 01:11:14 -08:00
James Goppert 1877df7917 Fix Bootloader install files issue. 2017-01-13 01:11:14 -08:00
James Goppert 50159cabbe Automatically set cmake version. 2017-01-13 01:11:14 -08:00
James Goppert 73462dc5e5 Add xml to cpack packaging. 2017-01-13 01:11:14 -08:00
James Goppert 434dddedea Changes to add px4fmu-v2_lpe config. 2017-01-13 01:11:14 -08:00
mazahner 6fe9b8e543 use CmakeLists scope to generate te XML file
- the only difference really is, that scope (the configuration.cmake) is already passed
  to px_process_params via the argument --scope. The Paths in --scope are evaluated w.r.t
  the path to src provided via the -s /--src-path argument.
- if no --scope is proveided. the Old scheme by simply walking the full --src-path directory
  is applied
2017-01-04 09:29:52 +01:00
Daniel Agar 97bc0f4486 gather test results 2017-01-02 10:14:41 +01:00
Daniel Agar ac7c309925 move cmake version check into cmake 2017-01-02 10:14:41 +01:00
Lucas De Marchi 9ee478e1f7 cmake: fix update of git hashes
Since the git hashes were being generate by cmake it would only be
generated if the header file was not present. Simple test:

    $ make aerofc-v1_default
    $ touch a
    $ git add a
    $ git commit -m tmp
    $ make aerofc-v1_default

The file build_aerofc-v1_default/build_git_version.h should have the new
hashes and the correspondent .c/c.pp files should be rebuilt, but they
aren't.  The end result is that checking the version with "ver git" in
the nsh console will point to the wrong commit.

This moves the generation of the header to a separate tool and enforces
the command to be executed every time.
2016-12-21 14:09:41 +01:00
David Sidrane d09cd77777 Adding hardfault logging application 2016-12-21 08:34:20 +01:00
Julian Oes 7a698952fb cmake: use default Python version
If the Python versions are specified, this breaks the build on Ubuntu systems
where Python3 is also installed but the extensions such as python-empy
are not installed. One could, of course, install python3-empy to fix
this but that's not in the instructions or error messages and therefore
not straightforward.

It is therefore probably better to just use the system default which
ends up being 2.7 on Ubuntu.
2016-11-21 15:02:17 +01:00
Julian Oes d720cbe189 cmake: Use Python3 if available
This brings support for Distros that use Python3 by default such as
Arch Linux.
2016-11-21 08:34:12 +01:00
Beat Küng 670c93e726 cmake: add support for out-of-tree modules via EXTERNAL_MODULES_LOCATION variable 2016-09-27 15:10:23 +02:00
Carlo Wood e93324785b list_vmd_make_targets and list_cmake_targets
* This allows one to run 'make posix list_vmd_make_targets' and get output like

>make posix list_vmd_make_targets
[...]
-- Build files have been written to:
/usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default
PX4 CONFIG: /usr/src/debian/px4/Firmware/Firmware.git/build_posix_sitl_default
Scanning dependencies of target list_vmd_make_targets
[100%] List of acceptable 'posix_sitl_default' <viewer_model_debugger> targets:
none
none_iris
none_iris_opt_flow
none_tailsitter
[...]
replay_solo_valgrind
replay_typhoon_h480_valgrind
[100%] Built target list_vmd_make_targets

Or, run 'make list_vmd_make_targets' from the build_posix_* directory.

* This adds the list_cmake_targets make target to print all
cmake targets that one can match with PX4_NO_OPTIMIZATION.
PX4_NO_OPTIMIZATION is ignored (do optimization as normal)
when the CONFIG isn't posix_sitl_*.

* Add comment in Makefile on how/where to find all targets.
2016-09-13 16:31:08 +02:00
Carlo Wood 77d356d275 Target specific optimization control.
This allows one to set a semi-colon separated list of regular
expressions in the environment variable PX4_NO_OPTIMIZATION
to control which (cmake generated) targets should be compiled
without optimization.

Suppressing optimization can be necessary for debugging in
a debugger, especially when trying to step through the code
or needing to print variables that otherwise are optimized out.

EXAMPLE

export PX4_NO_OPTIMIZATION="px4;^modules__uORB;^modules__systemlib$"

will result in the following messages during cmake configuration:

[...]
-- Disabling optimization for target 'platforms__posix__px4_layer'
because it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__systemlib' because it
matches the regexp '^modules__systemlib$' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB' because it matches
the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'examples__px4_simple_app' because
it matches the regexp 'px4' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'modules__uORB__uORB_tests' because
it matches the regexp '^modules__uORB' in env var PX4_NO_OPTIMIZATION
-- Disabling optimization for target 'px4' because it matches the regexp
'px4' in env var PX4_NO_OPTIMIZATION

Note that a list of all (currently used) target names can be printed
with the following command line from within the required build directory:

find . -wholename '*/CMakeFiles/*.dir/flags.make' | xargs dirname | xargs basename -a | sort -u | sed -e 's/.dir$//'
2016-09-13 16:31:08 +02:00
Lorenz Meier 723d3c121a Find and use Python 2 (#5442)
This will make the build works in distros that have Python 3 as default
and will not break anything in distros that have Python 2 as default.
2016-09-03 12:33:48 +02:00
James Goppert 9d861f021c Use git tag in cpack package. 2016-08-29 22:17:40 -04:00
James Goppert 8707cbc315 Fix version. 2016-08-29 22:05:48 -04:00
Lorenz Meier f511d49cc2 Improvements to SITL to make paths more flexible. (#5181) (#5255)
* Path cleanup for SITL.

* Restructured sitl scripts dir.

* Set integration tests to use ekf2 for vtol.

* Fix sitl paths for mac.
2016-08-25 21:47:45 +02:00
James Goppert 818840b576 Path cleanup, low impact changes (#5340)
* Low impact changes from path_cleanup branch.

This is a step towards minimizing the diff with path_cleanup branch.

* Update ecl.

* Revert matrix update.

* Revert ecl and matrix.

* Update sitl gazebo.

* Revert sitl_gazebo and matrix changes.
2016-08-18 15:37:23 -04:00
Hidenori a8d3b15d73 RPi: add clang & clang-check support 2016-08-18 16:11:05 +02:00
Lorenz Meier 102f5b54d7 Revert "Improvements to SITL to make paths more flexible. (#5181)"
This reverts commit 699b6a2cb3.
2016-08-05 21:29:49 +02:00
James Goppert 699b6a2cb3 Improvements to SITL to make paths more flexible. (#5181) 2016-08-05 06:23:59 -04:00
Lorenz Meier 5b06b40ed9 Set SITL as default target now that Pixhawk is not necessarily the default HW 2016-08-03 23:04:35 +02:00
Lorenz Meier 6ab9dc0acf Testing cleanup from Daniel Agar 2016-07-29 13:49:14 +02:00
James Goppert 05315abc89 Optical flow simulator and install cleanup. (#5132)
sitl CI is having some issue cloning, but I have verified it locally for various configs
2016-07-24 13:07:14 -04:00
Mark Charlebois dea4c55897 Fixed incorrect variable name
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-05-28 14:05:27 +02:00
Mark Charlebois 7a44ee7429 Added support for external shared libraries
The FC_ADDON drivers are shared libraries that have PX4 wrappers.
The wrappers are built as modules which are static libraries and
cannot have shared library dependencies.

The shared libraries are required to resolve the symbols at runtime
and need to be linked with the libmainapp shared library.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-05-28 14:05:27 +02:00
Beat Küng 7f65e01d07 cmake: avoid GLOB for *.msg files and use an explicit .msg file enumeration
This makes sure that adding & removing of .msg files is handled properly
by the build system.
2016-05-17 09:08:13 +02:00
Daniel Agar 76387b1693 uorb autogeneration 2016-05-14 11:27:07 +02:00
Mark Charlebois 8cb8987bcd Use DriverFramework as a PX4 module (#4415)
* Use DriverFramework as a PX4 module

Targets wanting to use DriverFramework must add

   lib/DriverFramework/framework

to their config file.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>

* Removed spurious code

No need to add if check before for loop

Signed-off-by: Mark Charlebois <charlebm@gmail.com>

* Added DriverFramework to NuttX configs

Added lib/DriverFramework/firmware to nuttx configs

Signed-off-by: Mark Charlebois <charlebm@gmail.com>

* Updated src/lib/DriverFramework

* Removed DF_TARGET and __DF_${OS} defines

These are now handled inside DriverFramework

Signed-off-by: Mark Charlebois <charlebm@gmail.com>

* Updated DriverFramework

Signed-off-by: Mark Charlebois <charlebm@gmail.com>

* Restored __DF_${OS}

The include files in DriverFramwork need to know the target OS.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-05-03 10:03:28 +02:00
Daniel Agar 0b54bb99f9 NuttX quiet build
cmake combine NuttX copy and export

-NuttX wasn't recopying if it fails to compile
2016-04-17 16:02:28 -04:00
Mark Charlebois 98a6facd55 Fixed order of processing df libs
df libs were being defined after firmware directory was added and so
were not defined yet

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:46 +01:00
Mark Charlebois 8fb8260bd4 Added link of df driver libs
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:46 +01:00
Mark Charlebois 419f4c49ce Added new config entry for DF driver entries
DF drivers can now be added in each config file by adding

set(config_df_driver_list
	bmp280
	...
	)

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:46 +01:00
Julian Oes 5cf3215e38 cmake: try to compile and link everything for MPU
Unfortunately this still gives linking errors.
2016-02-19 16:59:46 +01:00
Mark Charlebois b24d29e1eb Made generic external module support
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:44 +01:00
Mark Charlebois ef88706fa6 Generalized use of external modules
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:44 +01:00
Mark Charlebois 014f15d8b0 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:43 +01:00
Mark Charlebois a0d91d2225 Made generic external module support
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Mark Charlebois 136c6da36d Generalized use of external modules
Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Mark Charlebois 9f3bf8e9f4 Rebase changes on upstream master
This brings in many of the changes from the PX4 fork on ATLFLight.

Signed-off-by: Mark Charlebois <charlebm@gmail.com>
2016-02-19 16:59:41 +01:00
Mark Whitehorn 5d588d98be change CMake CONFIG to fmu-v2 and THREADS to 4 2016-01-14 17:55:55 +01:00