Commit Graph

186 Commits

Author SHA1 Message Date
mcsauder
861af1dac7 Remove whitespace from the top-level CMakeLists.txt. 2018-06-02 06:22:54 +05:30
Anthony Lamping
ef5de4de87 cmake: package create tarball 2018-05-25 01:32:26 -04:00
Daniel Agar
df042ab20e cmake update option to enable doxygen generation (off by default) 2018-05-04 01:08:58 -04:00
Daniel Agar
94d1593e5b doxygen move to cmake and cleanup (#9234) 2018-05-03 22:07:24 -04:00
Daniel Agar
ea3acb7121 cmake remove circular linking and reorganize
- px4_add_module now requires MAIN
 - px4_add_library doesn't automatically link
2018-04-29 21:48:54 -04:00
Beat Küng
0e4034d01e param: add a px4_parameters_public.h.jinja template
Generates an enum with all params & additional type information for static
type checking

The generated public param header is required to build the modules using
the new BlockParam classes.
2018-03-13 17:35:15 +01:00
Daniel Agar
2ff81393bc move posix, nuttx, qurt components into platforms 2018-01-31 17:17:07 +01:00
Daniel Agar
f2cd5e3e9f move src/firmware/ to platforms 2018-01-05 14:21:31 -05:00
Daniel Agar
678e2c415d move cmake/${OS} to platforms 2018-01-05 14:21:31 -05:00
Daniel Agar
33266ef2c8 cmake use ccache if found and not disabled 2018-01-01 10:19:00 -05:00
Beat Küng
5195210893 CMakeLists.txt: add custom target uorb_graph to generate the graph JSON files
Use like this:
	  make px4fmu-v2_default uorb_graph
2017-12-18 10:19:15 +01:00
Daniel Agar
aef7a3cd9a cmake only init uavcan_board_ident if used 2017-12-10 19:24:05 -05:00
Daniel Agar
ded055f71d cmake only init cmake_hexagon if used 2017-12-10 19:24:05 -05:00
Daniel Agar
db8900fffc cmake improve git submodule dependencies 2017-12-06 21:15:32 -05:00
Daniel Agar
d1a4c2dcd0 cmake handle git submodule depdencies 2017-11-23 00:22:45 -05:00
Daniel Agar
fc80846825 simplify param scoping and centralize dependencies 2017-11-22 10:36:51 +01:00
Daniel Agar
136d259876 travis-ci fix coverity scan and px4_metadata (#8156) 2017-10-20 09:20:30 -04:00
Daniel Agar
d83073f016 move RTPS to dedicated px4fmu-v{3,4,4pro,5}, posix, sdflight builds (#8113) 2017-10-17 16:29:55 -04:00
Daniel Agar
651df03f76 RTPS and micro-CDR build system cleanup (#8084) 2017-10-11 13:05:44 -04:00
Daniel Agar
2113772443 improve nuttx verbose build 2017-09-29 10:13:51 -04:00
Daniel Agar
48f1e3ed1c uORB generation move to msg/ 2017-09-29 10:13:51 -04:00
Daniel Agar
01b3e6fd25 NuttX upgrade cmake wrapper (#7873)
* NuttX cmake

* px4_macros:Pass the stringified predicate as second arg to static assert

   CC_ASSERT mapes to the c++ static_assert or provides the same
   funtionality for c via the other macros. The c++ static assert
   takes 2 argumants the prdicate and a message. This fixes the
   lacking second argument.

* Updated nuttx and apps submodule to upstream nuttx 7.21+==master

   This is the latest uptake of upstream nuttx and apps.

* ROMFS generate with xxd instead of objcopy

* delete nuttx-patches

* NuttX update submodules to latest px4_nuttx-master

* fix nuttx apps and board dependency

* docker_run update to latest container 2017-08-29

* cmake ROMFS portable sed usage

* NuttX update submodules to latest px4_nuttx-master
2017-09-29 10:13:51 -04:00
Vicente Monge
c85039e413 Fixing rebase conflicts 2017-08-01 22:32:43 +02:00
Lorenz Meier
5a4714fef2 Track Gazebo submodules more closely 2017-07-02 17:00:08 +02:00
Daniel Agar
46101b483b QuRT follow CMAKE_BUILD_TYPE 2017-06-12 12:18:53 -04:00
Daniel Agar
4937449890 move parameter unittest into systemcmds 2017-06-12 12:18:53 -04:00
Daniel Agar
f26cd01d16 param gen reorganize and fix DISABLE_PARAMS_MODULE_SCOPING 2017-06-12 12:18:53 -04:00
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