Commit Graph

2103 Commits

Author SHA1 Message Date
Peter Barker 48f7aa1556 Tools: build_parameters.sh also stashes Parameters.rst 2016-03-17 18:16:10 +11:00
Peter Barker 6a44cb244d Tools: factor build_parameters.sh 2016-03-17 18:16:10 +11:00
Peter Barker a8e9fc19b0 Tools: allow param parser to emit ReStructured Text 2016-03-17 16:10:11 +11:00
Don Gagne cae7ea0d13 Add @Volatile, @ReadOnly support 2016-03-17 10:58:05 +11:00
Lucas De Marchi 36336e17b3 Tools: replace header guard with pragma once 2016-03-16 18:40:45 +11:00
Lucas De Marchi df150cd8dd ci: add missing ppa for Trusty
Thanks Francisco Ferreira.
2016-03-14 18:48:03 -03:00
Lucas De Marchi 02619b4a25 ci: install cmake >= 3.2
Also remove the -qq from the call to apt-get install so it's easier to
debug failures in future.
2016-03-14 14:55:22 -03:00
Gustavo Jose de Sousa f416f1e5a1 waf: px4: implement --upload option
We tweak the task's cmd_kw so that the user can see what is happening from the
terminal (e.g. progress bar).
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa e6fa2d54e8 waf: px4: build firmware
Copy the program library to the place where PX4Firmware CMake build will look
for and trigger the firmware build. There isn't really a real output defined
for px4_copy_lib because Waf would complain about multiple tasks having same
output when building multiple programs.

After the firmware build, copy it to the correct place (from program group and
name perspective) and add git hashes.

Since the place where the library is placed is shared by different target
programs, we need to synchronize the firmware build, that's why the use of
_firmware_semaphorish_tasks. That variable is set as a list because of the
upcoming upload task.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa bf91286ade waf: px4: prepare ROMFS
Copy necessary files to a folder in the build directory and use that folder as
the ROMFS for the external build.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa a36a766e1a waf: px4: make program as single library
Recursively collect objects from dependency libraries and create a single
library. That way we just need to pass down one single library to PX4Firmware
build system.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 79d9bf2f8a waf: px4: define dynamic environment
We get the flags used by PX4Firmware build system so that we can use foreign
headers properly. Also, we add some defines used by PX4.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 95848488e7 waf: boards: define PX4 boards 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 658bead862 waf: px4: add initial implementation
The initial implementation defines only the pre-build task generators.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 7ba3df8c80 Tools: waf: build Replay only for linux boards
Other boards (like PX4 ones) aren't supported yet.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 841771096d waf: let toolchain loading in charge of the Board class
That allows boards (i.e. subclasses of Board) to use toolchain related
information for configuration. The upcoming PX4 build is an example.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa b7e3071ba3 waf: gtest: disable for PX4 boards
Google Test code uses functions signatures not implemented by the current
toolchain for PX4.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 6753b54b52 waf: git_submodule: support recursive submodules 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa d57851e2a9 waf: git_submodule: add function git_submodule_head_hash 2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 33fce2bfe5 waf: ardupilotwaf: add option --upload
That option can (and will by PX4) be used by platforms that support uploading
programs to a connected device.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 0329cb14ed waf: ardupilotwaf: export program_name and program_group
Export those values to the task generators, so that other tools may use it.
2016-03-14 11:54:31 -03:00
Gustavo Jose de Sousa 45d1af8833 waf: ardupilotwaf: allow to build ap_program as a static library
In the upcoming build for PX4 boards, we will pass down the program a single
static library to PX4 Firmware's cmake build system. This patch is partially
providing a way to do that: the configuration for PX4 will define the
AP_PROGRAM_AS_STLIB environment variable.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 32402b93af waf: ardupilotwaf: remove SITL from common libraries
Only SITL port uses it and using it for PX4 raises compilation errors.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03c067921e waf: ardupilotwaf: allow extra features for ap_program and ap_stlib
That allows tweak programs and static libraries builds for different
configurations.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 12946db4dc waf: ardupilotwaf: remove common_features()
The function ap_program() was the only one that was using it, so let's just
inline it. Besides, the name was misleading, since the (only) feature added was
for programs instead of general task generators.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 9c5593ef09 waf: ardupilotwaf: don't use common_features() unnecessarily
That function is already used in ap_program().
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 8664c0344d waf: allow boards to tweak build
We define a function build() that can be overrode by Board subclasses.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1fe795f283 waf: boards: set Board as an abstract board
Let's have a unified way to do that - no need for checking the board name
anymore.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 93156e4325 waf: boards: allow defining abstract boards
That avoids instantiation of wrong board classes and also listing invalid board
names in the help message.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b53f38bb02 waf: boards: cache board in a variable
That allows subsequent calls to get_board() to work nicely, with no need of
instantiating a board on every single call.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 36b49debf6 waf: boards: allow defining board name
If the name is not defined, then the class name will be used.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 4f55c75767 waf: boards: pass configure context to configure_env()
There will be cases when the configuration context will be needed.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 2f324c056f waf: cmake: live output!
Waf buffers command output and spit it after the command is done. For external
builds, that might give the wrong impression that the build stalled.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 1f60e9e3e8 waf: cmake: refactor methods to accept cmake_config parameter
That makes methods more flexible for use.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b0e7fe26d5 waf: cmake: fix target processing for cmake_build
Accept passing a single Node object to target option.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 07700a821c waf: cmake: add method get_cmake_bldnode()
That allows a user to have access to the cmake build node before the configure
task generator is posted.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa b077613f28 waf: cmake: use BLUE color for cmake tasks 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 03146c5d15 waf: cmake: move cmake build task creation to a function
That enables other tools to create the task directly.
2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 049abec55b waf: cmake: add keyword parameter cmake_output_patterns 2016-03-14 11:54:30 -03:00
Gustavo Jose de Sousa 4f82120c8f waf: cmake: improve documentation regarding target option
That feature can also be used within wscripts with no problem. The code added
in the example shows that.
2016-03-14 11:54:29 -03:00
Grant Morphett 0d9a3840d8 autotest: Added submodule update and removed old modules update
Firstly build.All was failing as the submodules had not been updated
so the 'git submodule update' in this commit resovles that.
Secondly, now that the dependant projects like PX4Firmware etc are git
submodules of ardupilot we no longer need to check them out separately
and update them so I have removed all those.
I left MAVProxy as it isn't a submodule of ardupilot.
2016-03-08 11:40:48 +11:00
Gustavo Jose de Sousa 86c1c6da5c waf: fix environment boolean values
It is more natural to use `env.FOO = True` then `env.foo = [True]`.
2016-03-03 14:58:03 -03:00
Gustavo Jose de Sousa 79b724dce8 waf: ardupilotwaf: fix board env processing
Two things are fixed with this patch:
    1. We sort dictionaries' keys if they aren't OrderedDict instances. Since
    dict objects don't guarantee order, environment variables may have contents
    in wrong order, causing unnecessary rebuilds.
    2. We only use prepend_value() if there's already a value set for the key
    and that value is list. Before this change, boards couldn't set
    non-iterable values.
2016-03-03 14:58:03 -03:00
Lucas De Marchi cca8a86962 Tools: Use GCC 4.9 as an Ubuntu prereq
This should actually use the install-prereq script so we don't duplicate
effort on the maintenance of these scripts. But let's at least install
the correct version for now.
2016-02-29 17:00:27 -03:00
Fredrik Hedberg e88e8835b1 Tools: Use GCC 4.9 as an Ubuntu prereq as older version is no longer available. 2016-02-29 16:58:48 -03:00
Gustavo Jose de Sousa 1233022c78 waf: cmake: synchronize cmake build tasks of same configuration
Running cmake build tasks of the same configuration in parallel my cause race
condition.
2016-02-27 03:15:45 -03:00
Gustavo Jose de Sousa 8734432196 waf: ardupilotwaf: don't use Node object for ap_program target
That will make platform specific naming be ignored. We use a string instead, to
let Waf tweak the target name correctly for us. The '#' prefix is to tell Waf
that the path is relative to bld.bldnode (instead of bld.path, which is the
default).
2016-02-27 03:13:08 -03:00
Staroselskii Georgii 1107190656 waf: boards: add navio2 2016-02-27 03:06:50 -03:00
Andrew Tridgell 15945c50cb scripts: ensure we have clean build for px4 2016-02-24 19:33:16 +11:00
Gustavo Jose de Sousa 181b6f5c2e waf: cmake: do a clean configuration
We need to remove CMakeCache.txt, otherwise cached variables would remain the
old value when they are removed from cmake_vars parameter.

We use `os.remove()` instead of `Node.delete()` because the latter removes the
node instance from its parent's children list. That makes the node be ignored
when storing persistent information after the build, thus the node signature
wouldn't be saved with that approach, which would make waf always think that
the task should be executed.
2016-02-22 15:36:48 -03:00