Commit Graph

2346 Commits

Author SHA1 Message Date
Julien Beraud 5418f71aae waf: add libiio support for bebop
check for the presence of libiio to enable the compilation of
the bebop rangefinder that needs it.
If the build remains static, there needs to be a rootfs that contains
the libiio.a file because it is not included in the debian package.
A solution can be to compile libiio and copy libiio.a in /usr/lib[/arch]
2016-05-03 16:43:39 -03:00
Michael du Breuil ebe552bdc5 autotest: remove condition_change_alt
no vehicle supports the command anymore, so it should not be in the copter test mission
2016-04-30 13:54:21 +09:00
Randy Mackay 3f31a4a1ff SITL: add copter terrain missions 2016-04-30 10:33:01 +09:00
Staroselskii Georgii 2b77bc02bf build: add navio 2 target to build server 2016-04-29 16:48:36 -03:00
Staroselskii Georgii 1605e34f7d Tools: added Navio 2 build to CI
This way Navio 2 will be built on Travis.
2016-04-29 16:48:36 -03:00
Peter Barker 53940e11c4 sim_vehicle.sh: tracker needs to be armed 2016-04-29 13:41:08 -03:00
Peter Barker f4d8ddaf48 sim_vehicle.sh: remove unused variable sets 2016-04-29 13:41:08 -03:00
Peter Barker 47436b9680 sim_vehicle.sh: remove unused SIMIN variable 2016-04-29 13:41:08 -03:00
Peter Barker 4ee1e3d804 sim_vehicle.sh: remove useless variable set
Also correct initialisation of a variable
2016-04-29 13:41:08 -03:00
Peter Barker 47e037cada sim_vehicle.sh: set options properly for heli-dual and heli-compound 2016-04-29 13:41:08 -03:00
mirkix 106f26d204 Linux_HAL_Essentials: Add missing make command in README.md for aiopru 2016-04-29 11:59:21 -03:00
Peter Barker a9940a8ca5 sim_vehicle.py: create from sim_vehicle.sh 2016-04-29 10:29:43 +10:00
Andrew Tridgell e3f5d4552e autotest: added params for quadplane tricopter 2016-04-28 22:40:25 +10:00
Andrew Tridgell bec8bf8880 autotest: support multicopter frame variants 2016-04-28 10:05:18 +10:00
Peter Barker 08e5959923 autotest: correct path to mavtogpx 2016-04-27 08:20:51 +10:00
Andrew Tridgell 909a46a33b Replay: pass delta angle time if available 2016-04-26 15:50:59 +10:00
Andrew Tridgell f367180f47 Replay: support 2 IMU EKF2 2016-04-26 14:39:44 +10:00
Peter Barker c869516a0b Replay: abort if field type not known; understand double 2016-04-26 14:20:11 +10:00
Luis Vale Gonçalves 69c6cfe5b9 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:47 -07:00
Luis Vale Gonçalves a3698e7da7 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:46 -07:00
Luis Vale Gonçalves f5466992e9 Revising ardupilot.com to .org
Revising ardupilot.com to .org
2016-04-23 22:49:44 -07:00
Andrew Tridgell 05e9f360b2 autotest: fixed quadplane test with new valgrind option 2016-04-22 10:50:51 +10:00
Andrew Tridgell da548e934a autotest: control tilt with chan7 in in firefly 2016-04-22 10:29:32 +10:00
Andrew Tridgell 199d4fd6c1 autotest: added parameters for elevon plane, vtail plane and fireflyy6 2016-04-22 10:28:16 +10:00
Peter Barker 8774f15b9a Tools: add valgrind option to autotest.py 2016-04-22 09:42:33 +10:00
Andrew Tridgell bcc4a653d7 autotest: added Y6 to sim_vehicle.sh 2016-04-21 21:11:56 +10:00
Andrew Tridgell dea1fec14d autotest: support -f tri for sim_vehicle.sh 2016-04-21 20:30:15 +10:00
Randy Mackay a5de231a21 SITL: ease gps_glitch_auto_test
shortened glitch duration
extended timeout in gps_glitch_auto_test
2016-04-21 14:52:31 +09:00
Lucas De Marchi e6907a607b waf: link with winmm on cygwin
Otherwise it fails to link:

[335/335] Linking build/sitl/bin/arducopter-quad.exe
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8AircraftC2EPKcS2_+0x230): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x9f): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft16setup_frame_timeEff+0x125): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x21): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZN4SITL8Aircraft15sync_frame_timeEv+0x152): undefined reference to `_imp__timeGetTime@0'
ArduCopter/libArduCopter_libs.a(SIM_Aircraft.cpp.4.o):SIM_Aircraft.cpp:(.text$_ZNK4SITL8Aircraft16get_wall_time_usEv+0xe): more undefined references to `_imp__timeGetTime@0' follow
collect2: error: ld returned 1 exit status
2016-04-19 19:02:25 -03:00
Lucas De Marchi b8cb88092f Tools: install-prereqs-ubuntu: fix exporting PATH
Since we escape $PATH, we can't just try to export that way. Since PATH
is unset if we do this, we end up with things like :

./Tools/scripts/install-prereqs-ubuntu.sh: line 101: apt-cache: command
not found
2016-04-19 00:14:09 -03:00
Lucas De Marchi 0fae368635 Tools: install-prereqs-ubuntu: allow to run from repository
If we are running the script, we are likely inside the repository, in
which case the script would fail while searching for a directory named
ardupilot. Derive the root directory from the script location.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 757f48ff83 Tools: install-prereqs-ubuntu: fix return code checking
We are running the script with -e so we can't check the return code like
that.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 4c6dac2d5d Tools: install-prereqs-ubuntu: install python-setuptools 2016-04-19 00:14:09 -03:00
Lucas De Marchi 03f5362538 Tools: install-prereqs-ubuntu: remove 32-bit variants
These are not necessary and cause trouble in Ubuntu 16.04.
2016-04-19 00:14:09 -03:00
Lucas De Marchi 1a24a3174f Tools: install-prereqs-ubuntu: fix string concatenation
ubuntu@ubuntu-xenial:~/ardupilot$ ./Tools/scripts/install-prereqs-ubuntu.sh
./Tools/scripts/install-prereqs-ubuntu.sh: line 19:  python-wxgtk3.0: command not found

While at each, change to use lsb_release like the other scripts.
2016-04-19 00:14:09 -03:00
Andre Kjellstrup b6b593b6fb Tools: install-prereqs-ubuntu: update for Ubuntu 16.x
No older versions of Ubuntu is affected by this script.
2016-04-19 00:14:09 -03:00
Francisco Ferreira 0f69b49ff1 ci: add ccache to clang builds 2016-04-17 14:47:55 -03:00
Francisco Ferreira 95343255e1 ci: use updated version of ccache 2016-04-17 14:47:55 -03:00
Francisco Ferreira b5faf9c361 ci: allow build systems to use ccache more efficiently 2016-04-17 14:47:55 -03:00
Francisco Ferreira d3b20f9fd1 waf: px4: allow git version to be defined externally 2016-04-17 14:47:55 -03:00
Francisco Ferreira 25f9832717 ci: split configure script between installing APT packages and other configurations 2016-04-17 14:47:55 -03:00
Andrew Tridgell 8408428339 travis: disable px4 builds in waf for now
they are broken by the PX4Firmware merge
2016-04-14 08:05:06 +10:00
Andrew Tridgell 5bd0adf980 waf: mark build as ARDUPILOT_BUILD
this helps with small build differences in px4 tree
2016-04-14 08:05:05 +10:00
Peter Barker 27fadb2572 Tools: rstemit: render parameter information in h tables
Render ranges as "min - max"
2016-04-13 21:16:41 +10:00
Andrew Tridgell fa36d6cac1 Travis: added force-yes to try to fix build 2016-04-12 05:56:27 +10:00
Lucas De Marchi cc24f323d2 waf: add messages to the things we are checking for
Before:
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : yes
Checking for code snippet                : no
Checking for code snippet                : no

After:
Checking for HAVE_CMATH_ISFINITE         : yes
Checking for HAVE_CMATH_ISINF            : yes
Checking for HAVE_CMATH_ISNAN            : yes
Checking for NEED_CMATH_ISFINITE_STD_NAMESPACE : yes
Checking for NEED_CMATH_ISINF_STD_NAMESPACE    : no
Checking for NEED_CMATH_ISNAN_STD_NAMESPACE    : no
2016-04-05 21:06:25 -07:00
Lucas De Marchi 169c350e85 waf: rename AP_Config.h to ap_config.h
The usual name for this header is config.h, but that's already used by
vehicles. Using uppercase could give the impression this is a
file to be modified, but it's not. Use lowercase instead.
2016-04-05 21:06:25 -07:00
Ricardo de Almeida Gonzaga 5bd034a5a8 Global: start using cmath instead of math.h 2016-04-05 21:06:19 -07:00
Ricardo de Almeida Gonzaga 5e45c9dfb0 waf: add cxx_checks tool
In order to start generating AP_Config header and detect
parameter such as the existence of cmath functions.
2016-04-05 20:44:15 -07:00
Ricardo de Almeida Gonzaga 14dbc16d46 waf: start using 'AP_Common/missing' to all boards 2016-04-05 20:44:15 -07:00
Peter Barker 009bb7fa9c build_binaries: regenerate manifest after building binaries 2016-04-05 09:05:57 +10:00
Peter Barker d7977dfcc2 Tools/scripts/generate-manifest.py: json description of binaries directory 2016-04-05 09:05:57 +10:00
Andrew Tridgell a8ca41abf1 autotest: use 60% engine speed for stability test
can't handle 55% in SITL now in quad
2016-04-04 11:28:28 +10:00
Andrew Tridgell ae5b8849ec autotest: added CMAC VTOL mission 2016-04-02 16:44:50 +11:00
Andrew Tridgell 27934a893e autotest: raise timeout again
after trying lots of other things to speed up build_binaries.sh it
still isn't fast enough, so this just raises the timeout by 50%
2016-04-02 07:47:16 +11:00
Randy Mackay badfdcf54c Tools: autotest params renamed after copter moves PIDs to attitude controller 2016-04-01 11:59:30 +09:00
Randy Mackay 08a485eec4 AutoTest: reduce heli rate P values
Also remove explicit params to use EKF2 because it is used by default now
2016-04-01 11:59:30 +09:00
Randy Mackay 12d9ffee12 AutoTest: remove H_RSC_MIN and MAX from heli params
These parameters are not used and having them causes errors during testing if we remove the corresponding parameters from the tradheli code
2016-04-01 11:59:30 +09:00
Andrew Tridgell 72e4ed5665 autotest: no need to check other repos now
we don't need to check other repos now we use submodules for all code
2016-04-01 09:44:33 +11:00
Andrew Tridgell 36ef4d422c Revert "autotest: added a temporary web bug"
It has done its job, and we now know the IP of the old server
2016-04-01 08:10:02 +11:00
Andrew Tridgell 20cd06da09 autotest: added a temporary web bug
(we need to find IP of old autotest server)
2016-03-31 15:22:09 +11:00
Gustavo Jose de Sousa 051e8a6bda waf: px4: use explicit list for ROMFS static files
Files that are not really part of the ROMFS in the folder might cause problems.

One problem that motivated this patch was caused because the make-based build
system copies the bootloader to the ROMFS in the source tree (mk/PX4/ROMFS)
instead of the build tree. That potentially could cause race condition between
the tasks created by 'px4_romfs_static_files' and 'px4_romfs_bootloader'.

Also, now we have only one task generator for static files.
2016-03-30 18:49:11 -03:00
Gustavo Jose de Sousa 218dc3fdf2 waf: px4: fix log output for px4_copy task
It was displaying the source path as the destination!
2016-03-30 18:49:11 -03:00
Francisco Ferreira d54a22baaa waf: boards: change no-unknown-pragmas to all compilers instead of only Clang 2016-03-30 01:32:45 -03:00
Andrew Tridgell e90edd0abc autotest: build in a constant directory
this gives a much higher hit rate in ccache
2016-03-30 09:01:24 +11:00
Andrew Tridgell e0a465f8f4 autotest: added some parallelism to px4 build in build_binaries 2016-03-30 07:45:11 +11:00
Francisco Ferreira 0eaf6f17c8 waf: toolchain: fix Clang toolchain detection 2016-03-29 15:02:33 -03:00
Andrew Tridgell af68fa94c0 autotest: fixed build_binaries.sh script bug 2016-03-29 15:39:08 +11:00
Andrew Tridgell 2806171839 autotest: use recursive forced update in build_binaries.sh 2016-03-28 15:01:01 +11:00
Gustavo Jose de Sousa b251d14778 waf: ardupilotwaf: allow multiple program groups for program
The program_dir defaults to the first group's name. That feature will be useful
for "copter" build command, which will build all frame types.
2016-03-26 15:43:08 -03:00
Gustavo Jose de Sousa 22b0b7e833 waf: ardupilotwaf: add program_dir option to ap_program()
That way we don't force other programs to be built on a directory of their
program group name. The directory name defaults to the program group.

We are separating those two concepts because of the upcoming support for
multiple groups for a program.
2016-03-26 15:43:08 -03:00
Andrew Tridgell df765f0d43 autotest: raise lock timeout 2016-03-26 19:28:04 +11:00
Peter Barker 39ab0e5b7d autotest: buildand retain version files 2016-03-25 21:02:40 +11:00
Peter Barker e135659165 Tools: PrintVersion.py; print version of vehicle code 2016-03-25 21:02:40 +11:00
Andrew Tridgell fa15057792 Tools: update URLs 2016-03-25 20:47:27 +11:00
Andrew Tridgell dea708b368 Tools: switch to ardupilot.org for firmware and autotest 2016-03-25 16:46:11 +11:00
Gustavo Jose de Sousa 6e658452ec waf: toolchain: filter supported compilers for cross-compilation
We currently only support GNU and clang compilers.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 1b6a87d8b4 waf: toolchain: clang: use waf to find toolchain path
The find_realexec_path function was used for finding the toolchain path mostly
because of two reasons:

 1) We couldn't really use CXX or CC variables because the user could set those
 from the OS's environment and Waf wouldn't look for the executable file in
 that case.

 2) Our CI configuration sets up symlinks for ccache and find_realexec_path
 works around that issue.

The bad side about using find_realexec_path() is that, besides working aroung
symlinks, it does the same thing that is done by Waf. This patch removes the
dependency for such a function by addressing each of the reasons above stated:

 1) We create a local copy of os.environ and, if there's a variable with the
 same name we are using, we remove it from the local copy.

 2) As done before, we are looking for the cross ar program instead of gcc
 program, since that is not used for ccache symlinks.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 019cf3d483 waf: toolchain: clang: use configure wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 7ede9600db waf: toolchain: gcc: use cross-compilation prefix wrapper
This is a better approach than checking command line options
--check-cxx-compiler and --check-c-compiler. Those values expect a list of
compilers to try instead of the compiler to use.

The benefits of this approach are:
 - Allowing correct use of options --check-cxx-compiler and --check-c-compiler.
 - Allowing user to pass CXX and CC environment variables, which is a common
   way of selecting the compiler.
 - Configuration is done *and committed* only for the specific compiler.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 95aeb0346e waf: load compilers tools in toolchain tool
It makes more sense the toolchain Waf tool to be responsible of loading the
compilers. Furthermore, that allows toolchain tool to have control on doing
configuration before and after loading compiler tools.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa 19d6a88e84 waf: toolchain: refactor configure function
- Use early return and reduce one indentation level.
- Set AR for both GNU compilers and clang just once and reduce redundancy.
- Reduce indentation level for clang-specific setup. There's no need to nest it
  inside check if compilers are GNU or clang.
2016-03-23 17:11:02 -03:00
Gustavo Jose de Sousa ceda86bbd8 waf: toolchain: get rid of suffixes variable
The only variables used so far are CXX, CC and AR. Let's make it
simpler.
2016-03-23 17:05:33 -03:00
Peter Barker 14b51080a9 Tools: remove erroneous space in rst output 2016-03-22 18:31:05 +11:00
Peter Barker 9f9e3843e0 Tools: formatting changes for rst parameter file 2016-03-21 20:56:49 +11:00
Francisco Ferreira 4643c7bf9e travis: add Clang builds
PX4 isn't supported at the moment and sitltest always use GCC, so we include the only ones that build
Travis has old LLVM installed and old Clang in a strange path (not a package) which interfere with the use of clang-3.7
2016-03-20 00:17:02 -03:00
Francisco Ferreira dd93f62bdd ci: fix PATH export 2016-03-20 00:17:02 -03:00
Francisco Ferreira 34de26502d ci: add Clang package
Use flags to tell Waf what compiler to use
Don't use Make build system if compiler is Clang
2016-03-20 00:17:02 -03:00
Francisco Ferreira 02af9b6ab1 waf: toolchain: support Clang in toolchain for cross-compilation
Define function to help find the toolchain path
2016-03-20 00:17:02 -03:00
Francisco Ferreira a8aae048c2 waf: boards: change toolchain to a board class attribute 2016-03-20 00:17:02 -03:00
Francisco Ferreira f8727f7362 waf: boards: fix bug in boards environment merge 2016-03-20 00:17:02 -03:00
Francisco Ferreira bf3dda9156 waf: boards: support Clang by adding necessary flags
Don't add unsupported flag when compiler is Clang
2016-03-20 00:17:02 -03:00
Francisco Ferreira 3b3d59efd1 waf: boards: load toolchain and compiler before configuring env 2016-03-20 00:17:02 -03:00
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
Gustavo Jose de Sousa eacf9d8a0e waf: cmake: declare CMAKE_BLD_DIR as a value dependency
Since we set that value to the task's cwd property, we need to declare it as a
value dependency of cmake_configure_task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 6c914349d0 waf: cmake: define proper uid() functions
The default implementation takes into account the task's output and input
nodes. That isn't very well applicable for cmake tasks, so we define proper
uid() methods.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa b5f20459e7 waf: cmake: set CMakeCache.txt as output of cmake_configure task
That provides the behavior we implemented in runnable_status(). Thus, we don't
have to override that method anymore.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa ed288ed345 waf: cmake: ensure order of cmake_vars
We need to ensure the order in which the variables are defined to avoid
unnecessary execution of the configuration task.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa c609b27afc waf: gbenchmark: use cmake tool
A little addition in the root wscript was also necessary.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa e883242c31 waf: cmake: add Waf tool 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 38da32853a ci: use --enable-benchmarks in waf configure 2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 662e45fda2 waf: move --check-verbose option declaration
We move it to the correct "scope", that is, ardupilotwaf.py, where it's really
used.
2016-02-22 15:36:48 -03:00
Gustavo Jose de Sousa 8c4d4f3f2a waf: make options groups accessible for any tool
That allows options being declared where they're really used. Additionally, we
load ardupilotwaf after the other tools so that we can create our groups after
all non-ardupilot option groups are created. That makes our groups appear as
the last ones in the help message, which makes it easier to locate them.
2016-02-22 15:36:48 -03:00
Kevin Guest 17378bd42a autotest: Add Rotherham 2016-02-22 16:21:16 +11:00
Andrew Tridgell 119cf6bb13 ci: added sitltest target
this adds some basic SITL testing to our CI
2016-02-22 12:34:32 +11:00
Gustavo Jose de Sousa 898c2faaab waf: git_submodule: fix uid() method for python3
Python3's hashlib.md5() requires Unicode-objects to be encoded before hashing.
2016-02-19 20:28:03 -02:00
Lucas De Marchi 15ce176818 waf: add -Wundef to all boards 2016-02-19 12:34:24 -02:00
Lucas De Marchi f0277cecb4 waf: ignore -Wundef for gtest
The gtest header uses lots of undefined macros, showing lots of warnings
if we enable -Wundef. Ideally we could use a #pragma to ignore the
warning only from the correct header, but this currently doesn't work
with g++ - see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53431

So for now we disable the warning completely when compiling gtest or any
test that uses its header.

Thanks Gustavo Sousa
2016-02-19 12:34:24 -02:00
Gustavo Jose de Sousa 393bea8945 waf: boards: use classes for boards definition
In order to provide board-specific behavior. For example, the incoming PX4
build will require custom build behavior.
2016-02-18 14:33:46 -02:00
Lucas De Marchi a01b933cb9 waf: add missing warnings from AP_Common.h
Copy the missing warnings from AP_Common.h and reorder the warnings to
be more clear on intent. This will later let us remove the warnings from
the header.
2016-02-12 20:41:29 +11:00
Gustavo Jose de Sousa 7259ac33f0 waf: git_submodule: override uid()
By running waf with option -v, waf was complaining about the update_submodule
tasks having the same identifier. That happened because the default uid()
method depended on the class name, inputs and outputs. Since this type of task
doesn't have input nor output file, we need to override uid() so that it uses
the submodule path for the task identifier.
2016-02-11 17:08:35 -02:00
Randy Mackay 898673f5e8 web-firmware: fix link to companion computer images 2016-02-08 14:22:37 +09:00
Randy Mackay 434fe919d6 web-firmware: add link to companion computer images 2016-02-08 10:19:19 +09:00
Gustavo Jose de Sousa 8655fdfd7f waf: use git_submodule tool through GIT_SUBMODULES variable
With this change, there's no need to verify if the submodule is initialized,
because the submodules in GIT_SUBMODULES are automatically initialized and
updated if necessary before the build tasks are performed.

One downside of this change is that Google Benchmark configuration is now done
only during build. However that is minor, since now there are easy ways to
separately build different targets and program groups, so that a fail in
benchmark build doesn't really affect the other targets.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa fdc87df074 waf: create taskgen for gtest in _build_common_taskgens
So that it belongs to 'build' group.
2016-02-06 10:25:08 -02:00
Gustavo Jose de Sousa 049feb3e9e waf: git_submodule: add git_submodule tool 2016-02-06 10:25:08 -02:00
Daniel Frenzel 970b171414 waf: remove AP_Limits from ignored libraries 2016-02-04 09:50:55 +09:00
Daniel Frenzel a735db2870 Tools: remove AP_Limits unit test 2016-02-04 09:50:43 +09:00
Gustavo Jose de Sousa 05f4c8b5b1 waf: ardupilotwaf: reset LAST_IDX on every build
That is a workaround so that one can use `waf bin tests`, for example.  In our
context, the only restriction to the task generators creation is values defined
during configuration. Thus, ideally, the recursion and task generators creation
should be done only once for multiple build calls. We should do that in the
future.
2016-02-03 12:24:21 -02:00
Gustavo Jose de Sousa 7b0a6d301d ci: use command 'all' instead of 'build' for waf
The command build uses 'bin' programs group by default. By using the command
'all', we tell the build system to build all programs.
2016-02-01 14:08:39 -02:00
Gustavo Jose de Sousa 8718f5be4f waf: ardupilotwaf: rename build_shortcut() to build_command()
Rationale:
 1. That function creates a separate build context class instead of just
    creating a wrapper for calling build (previous approach).
 2. The check command isn't a build shortcut since there's no way of calling it
    without using 'check' explicitly.
2016-02-01 14:08:39 -02:00
Gustavo Jose de Sousa 8be2db4d01 waf: ardupilotwaf: add parameter doc to build_shortcut()
That makes it possible to display meaningful information on the help message.
2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa c5c129d15f waf: ardupilotwaf: add parameter program_group_list to build_shortcut() 2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa a867dcdd07 waf: ardupilotwaf: make build_shortcut create build context class
Instead of just creating a wrapper. With that, the option targets is visible
only to that command instead of all commands in Options.commands.
2016-02-01 14:08:38 -02:00
Gustavo Jose de Sousa 5699bf04d0 waf: rename parameter blddestdir to program_group
It's a good idea to consolidate the idea that all programs belong to a group
that has it's own directory.
2016-02-01 14:08:32 -02:00
Gustavo Jose de Sousa b93c3d1772 waf: add option --program-group 2016-02-01 14:08:10 -02:00
Lucas De Marchi d844b90d5e waf: remove duplicated warning flag 2016-01-30 13:47:28 -02:00
Randy Mackay e78595bf48 Frame_Params: remove defaults from Bebop2 params
Removed parameter values that should already be these values by default on a fresh install
2016-01-23 11:42:13 +09:00
Gustavo Jose de Sousa 53f22f4982 waf: fix legacy defines
The following fixes where applied:
 - Value for APM_BUILD_DIRECTORY must be prefixed with APM_BUILD_
 - Renamed parameter name to sketchname, so we differentiate the real program
   name from the legacy sketch name
 - Use directory name instead of program name as argument for
   _get_legacy_defines()
2016-01-22 20:14:57 -02:00
Gustavo Jose de Sousa c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa a2d2661765 waf: use methods from bld instead of ardupilotwaf for the remaining 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa 12cfe222eb waf: ardupilotwaf: decorate build methods with @conf
Bind functions used in wscripts to build context. Additionally, a new function
is created and also decorated with @conf, common_vehicle_libraries(), which
returns COMMON_VEHICLE_DEPENDENT_LIBRARIES.  This patch is a preparation for
making wscripts use methods bound to the build context instead of using them
directly from ardupilotwaf.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa cf432e8b3e waf: ardupilotwaf: rename vehicle_stlib to ap_stlib
That function is not only for vehicles.
2016-01-22 20:10:28 -02:00
Gustavo Jose de Sousa a35c0d48b0 waf: ardupilotwaf: rename program to ap_program
Make the rename so that there is no name clashes when defining it as a taskgen
method.
2016-01-22 20:10:28 -02:00
Julien BERAUD 90d266698d Frame_Params: Bebop 2 tuning by Leonard 2016-01-22 13:58:46 -02:00
Andrew Tridgell 417176c0b2 autotest: reduce speedup on quadplane test to 10
mavproxy wasn't keeping up on autotest server
2016-01-21 07:46:18 +11:00
Lucas De Marchi 36d669a2ab ci: switch linux/sitl compiler to 4.9 2016-01-20 14:19:08 -02:00
Lucas De Marchi 1cd20c50a6 ci: integrate ccache configuration
Also split the exportline setting to allow one PATH per line.
2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga c8d01f4bf4 ci: add configure-ci.sh
In order to use it in Travis and in Semaphore.
2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga 0db54e7b36 ci: change TRAVIS_BUILD_TARGET to CI_BUILD_TARGET on build_ci.sh 2016-01-20 14:19:07 -02:00
Ricardo de Almeida Gonzaga e816a4845a ci: rename build_all_travis.sh to build_ci.sh
Since we're going to support SemaphoreCI[1] besides Travis.

[1] - https://semaphoreci.com/
2016-01-20 14:19:07 -02:00
Andrew Tridgell 926c37a876 autotest: increase timeout in quadplane test 2016-01-20 17:23:36 +11:00
Andrew Tridgell c2a12b55a0 scripts: raise max lockage in autotest 2016-01-20 07:43:43 +11:00
Andrew Tridgell b8c6bee132 autotest: raise overall timeout 2016-01-20 07:42:29 +11:00
Andrew Tridgell 15c8a27d5e scripts: added some debug to travis script 2016-01-20 07:42:28 +11:00
Gustavo Jose de Sousa 6ca58eac78 travis: fix verification for calling waf check
The use of `[[ $t == linux ]] && $waf check` makes the script exit with
non-zero status when $t isn't linux *and* that's the last thing executed.
2016-01-19 11:56:30 -02:00
Andrew Tridgell 56f8e3d414 scripts: added runfliptest.sh example script 2016-01-19 14:30:09 +11:00
Andrew Tridgell 889da98ca6 scripts: cope with older releases that don't support FMUv4 2016-01-19 14:18:32 +11:00
Gustavo Jose de Sousa d7f50ab668 travis: call waf check for linux
That helps preventing applying code that break unit tests.
2016-01-19 00:21:15 -02:00
Gustavo Jose de Sousa 54d938e2c4 waf: fail the check if not all test programs succeed
So that integration with Travis work properly.
2016-01-19 00:21:15 -02:00