Commit Graph

2424 Commits

Author SHA1 Message Date
Lucas De Marchi ee62b61fc7 waf: use STDC format macros 2016-07-13 14:18:27 +10:00
Lucas De Marchi 8a27680fbb build: check for endian.h and byteswap.h 2016-07-08 19:49:32 -03:00
Andrew Tridgell 1a3b292aa3 autotest: fixed run_in_terminal_window() on Linux
try to retain MacOS functionality too
2016-07-08 08:20:20 +10:00
Lucas De Marchi e2498a1090 autotest: add function to kill tasks on MacOS
Like done on other cases, add an explicit function for that, which turns
the comment redundant.
2016-07-07 11:35:18 -03:00
Siddharth Bharat Purohit 4f0dad19ea autotest: support mac osx terminal launch 2016-07-07 11:35:17 -03:00
Siddharth Bharat Purohit 71c2f69a63 waf: add support for sitl build on mac 2016-07-07 11:35:17 -03:00
snl1101 e15b1a8f2e SITL: add Sterling to locations.txt 2016-07-01 11:21:56 +09:00
Gustavo Jose de Sousa f426e2c681 Replay: build: use separate library
There are checks for APM_BUILD_Replay in the source code, so Replay tools needs
a separate static library.
2016-06-30 12:55:18 -03:00
Andrew Tridgell d477905fbd autotest: fixed XPlane with sim_vehicle.py 2016-06-30 20:26:14 +10:00
Andrew Tridgell b1de768756 autotest: added quadplane-tilttri parameters 2016-06-30 17:00:56 +10:00
Andrew Tridgell 0f7b4a0cd1 autotest: fixed tricopter quadplane for sim_vehicle.py 2016-06-30 14:16:52 +10:00
Gustavo Jose de Sousa a748c52f06 waf: bump to version 1.9.0
Some things worth mentioning:

- That version contains commits we had cherry picked on our submodule.
- There's a patch on top with a fix for the new process spawning used on
  version 1.9.0. That has already been applied to upstream's master, but not
  released yet.
- This patch also does necessary changes on our build system in order to
  accommodate the upgrade. Basically:
  - Use full task class names when calling create_task().
  - Use always_run class attribute instead of the decorator, which is
    deprecated.
2016-06-29 11:18:22 -03:00
Paul Riseborough 094dd9d769 Replay: Fix bug preventing use of IMT data during replay 2016-06-28 14:20:13 +10:00
Peter Barker b23f983459 autotest: add --gdb option to autotest.py 2016-06-27 18:14:55 -03:00
Lucas De Marchi 3a5bc141bb build: use format macros in all linux boards
This doesn't work for px4 since it manually defines __STDC_FORMAT_MACROS
in some px4 modules, which needs to be updated.
2016-06-25 12:51:55 -03:00
Andrew Tridgell a8e5255b90 autotest: look in parent directories for vehicle type in sim_vehicle.py
this allows eeprom.bin per vehicle type without using -v
2016-06-24 11:28:18 +10:00
Lucas De Marchi a9919420c6 waf: allow to disable libiio at configuration
We default to autodetection for libiio so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:08:13 -03:00
Lucas De Marchi 348678888b waf: allow to disable lttng at configuration
We default to autodetection for LTTNG so if the libraries are available
we enable it. However this may not always be desired.
2016-06-23 19:07:26 -03:00
Peter Barker febba9112f sim_vehicle.py: simply ignore any failure to kill tasks 2016-06-23 18:39:09 -03:00
Peter Barker 2266223665 sim_vehicle.py: shell out to pkill if psutil is not available 2016-06-23 18:39:09 -03:00
Peter Barker d9ad962b33 sim_vehicle.py: allow starting mavproxy without --sitl option 2016-06-22 21:25:11 +10:00
Peter Barker 51020387c8 sim_vehicle.py: allow model to be overridden on command line 2016-06-22 21:25:11 +10:00
Randy Mackay a7422153cb SITL: disable avoidance so we can trigger fence failsafe 2016-06-22 11:38:15 +09:00
David B. Bitton f58ce71a77 Update initvagrant.sh
Made jsbsim origin URL more firewall friendly.
2016-06-21 13:03:35 -03:00
Peter Barker 6530c3bd91 autotest.py: exit with error if requested step not found 2016-06-20 11:48:07 +10:00
Andrew Tridgell d9d53c82d0 autotest: added xplane as vehicle type 2016-06-19 13:59:15 +10:00
Randy Mackay 036349cd2f SITL: set copter MOT_THST_HOVER default 2016-06-18 11:55:49 +09:00
Randy Mackay ed90d00fff SITL: throttle to 50 percent now that hover throttle automatically updates 2016-06-18 11:55:49 +09:00
Tom Pittenger ed7af8c717 scripts: Add libc6-i386 to px4 package install.
Fixes https://github.com/ArduPilot/ardupilot/issues/4316
2016-06-16 08:06:06 -07:00
Peter Barker eefdc32f51 Replay: print message when gap perceived in log 2016-06-07 14:00:14 +10:00
Peter Barker f6c7a73170 Replay: command line option to disable FP exceptions 2016-06-07 12:45:38 +10:00
Peter Barker 53df307c2d sim_vehicle.py: older python has no accessors for proc.status 2016-06-06 12:27:41 +10:00
Peter Barker 91e72de302 sim_vehicle.py: remove unused parameter 2016-06-06 12:27:29 +10:00
Peter Barker efef39732e autotest: pass any supplied -j through to waf make 2016-06-05 09:45:58 +10:00
Peter Barker eb0e3c993d Tools: build_examples.sh implemented in terms of build_examples.py 2016-06-04 12:33:15 -03:00
Peter Barker b6289af522 Tools: autotest uses waf directly for building examples 2016-06-04 12:33:14 -03:00
Peter Barker 8cf49d4e3e Tools: create build_examples.py, a replacement for build_examples.sh 2016-06-04 12:33:14 -03:00
Gustavo Jose de Sousa 6fa97c2289 waf: px4: require cmake version at least 3.2
That way we avoid build errors due to things not supported in earlier versions.
2016-06-03 09:55:17 -03:00
Gustavo Jose de Sousa 03728ac2f7 waf: cmake: enable minimum version checking
By using the environment variable CMAKE_MIN_VERSION.
2016-06-03 09:55:17 -03:00
Peter Barker 0924ae0d25 Tools: add cmake as a dep for PX4 in Vagrant 2016-06-02 13:05:25 +10:00
Francisco Ferreira 501284f65a ci: remove clang temporarily from APT packages 2016-05-31 19:25:51 +01:00
Andrew Tridgell 475579e8ff autotest: skip build of boards we don't support
this prevents us trying to build for boards like navio2 for
ArduCopter-stable which didn't support that board
2016-05-30 08:25:10 +10:00
Andrew Tridgell 168f4e52cf autotest: try to fix build of binaries 2016-05-28 07:29:23 +10:00
Andrew Tridgell 084a37d4fa autotest: enable LOG_REPLAY and LOG_DISARMED in autotest
this will give us the ability to analyse any EKF errors
2016-05-27 21:23:39 +10:00
Peter Barker 480e142cfb autotest.py: remove TARGET no longer required 2016-05-27 08:07:07 -03:00
Peter Barker 3548f90d3a autotest: create SIL object to hold valgrind logpath 2016-05-27 08:07:07 -03:00
Peter Barker ced07906ad Tools: correct valgrind run in autotest.py 2016-05-27 08:07:07 -03:00
Peter Barker 7b86a05722 Tools: convert autotest build.X and fly.X to use waf build system 2016-05-27 08:07:07 -03:00
Andrew Tridgell b76a993f7e autotest: support coaxcopter 2016-05-26 17:09:31 +10:00
Andrew Tridgell ba3703303a autotest: added SingleCopter 2016-05-26 16:37:58 +10:00
Francisco Ferreira ec0a80b6f4 ci: increase ccache size
make based builds require more space
insert exception for sitltest
2016-05-25 22:14:47 -03:00
Andrew Tridgell 1e44251d35 Replay: include a minimal set of FMT messages at start of log 2016-05-26 10:10:27 +10:00
Andrew Tridgell 366d95f45e Replay: fixed FMT messages in replay output 2016-05-26 09:40:21 +10:00
Gustavo Jose de Sousa 8e9752c3d3 waf: px4: setup build summary
- Pass the correct nodes as the binaries for the programs task generators.
- Print extra information specific to PX4 build.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa d65a7897e4 waf: px4: keep ELF files around
Including px4io. We need them for the build summary. Also, that makes it easier
to use gdb on them.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 4f3af94c57 waf: build_summary: add Waf tool 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa afcabda21c waf: use better style for add_option() calls
Setting the "help" keyword argument may not fit in one line sometimes. This
patch adds the following convention to calls to add_option() in order to
address that issue in a better way:

    1) The "help" keyword must always be the last argument to be passed.

    2) If the help string is a literal string or a literal string with some
    operation (e.g. "%" operator) and setting the "help" keyword in the code
    doesn't fit a line (considering the limit of characters in a line), then
    the help string must be a triple-quoted string. That has the advantage of
    not having to have several "+" operations for long help strings. In that
    case, the help message must start on the next line and the closing
    triple-quotes must be on a separate line together with the closing
    parenthesis.

The requirement (1) makes it easier to make the style exception in (2)
acceptable.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 64b8ec61c7 waf: set lib as output dir for static libraries 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 236a62f4b9 waf: create program_dir directory
There's an upcoming patch that moves all static libraries to
`build/<board>/lib/`. That way, the program directory won't be created
automatically by the build system and that will cause problems for PX4 builds,
since it builds ardupilot programs as static libraries and copies stuff to the
program directory.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 844222870c waf: boards: bind get_board() to configure and build contexts
A convenience, since we don't expect the board to change for a given
configuration.
2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 80f03b618b waf: toolchain: add find_toolchain_program() 2016-05-25 17:47:00 -03:00
Gustavo Jose de Sousa 06a515645e waf: px4: reconfigure PX4Firmware for each program
A (possible) bug in CMake makes it not to relink firmware_nuttx sometimes when
the following sequence of events happen with very short period of time in
between them:
    1) cmake target build_firmware_px4fmu-v2 just finishes
    2) px4-extra-files/libap_program.a is replaced with the next library
    3) cmake target build_firmware_px4fmu-v2 is run

It's unfortunate to have to reconfigure PX4Firmware with a different path
because of the overhead added.

That problem was found with CMake 3.5.2 and is reproducible with the following
bash script (with git HEAD at ae3cb05 'HAL_PX4: disable "Overtime in task"
msg'):

```
modules/waf/waf-light configure --board px4-v2
modules/waf/waf-light build --targets bin/arduplane,bin/arducopter-quad

fails=0
total=0
while true; do
    cp build/px4-v2/bin/libarducopter-quad.a \
       build/px4-v2/px4-extra-files/libap_program.a
    cmake --build build/px4-v2/modules/PX4Firmware \
          --target build_firmware_px4fmu-v2 &> /dev/null
    h1=$(sha256sum build/px4-v2/modules/PX4Firmware/src/firmware/nuttx/firmware_nuttx \
                   | cut -d" " -f1)

    cp build/px4-v2/bin/libarduplane.a build/px4-v2/px4-extra-files/libap_program.a
    cmake --build build/px4-v2/modules/PX4Firmware \
          --target build_firmware_px4fmu-v2 &> /dev/null
    h2=$(sha256sum build/px4-v2/modules/PX4Firmware/src/firmware/nuttx/firmware_nuttx \
                   | cut -d" " -f1)

    [[ $h1 == $h2 ]] && ((fails++))
    ((total++))
    printf "\r%d/%d" $fails $total
done
```
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa fee5053493 waf: cmake: reconfigure when configuration data change
Create a new configuration task a configuration in the CMakeConfig object
changes. That allows building targets for different configurations in one waf
build run.
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa ce0ae66b19 waf: cmake: add CMAKE_VARS to task uid()
To allow the correct multiple instantiations of the cmake_configuration tasks
for different states CMake variables.
2016-05-25 11:51:40 -03:00
Gustavo Jose de Sousa b6a5052a97 waf: cmake: use CMakeConfig class instead of taskgen
That will make it easier to allow reconfiguration of cmake builds on a single
waf build run.
2016-05-25 11:51:40 -03:00
Francisco Ferreira fe0c49ec54 ci: only run make builds for PX4 or when it is a scheduled job
Let waf figure out how many jobs to run
2016-05-25 11:39:07 -03:00
Francisco Ferreira 292251e2aa ci: add time to complete make builds 2016-05-25 11:38:59 -03:00
Francisco Ferreira a74a7e5dfe ci: update ccache and improve its support
Update ccache to 3.2.5
Set ccache size
Display ccache statistics for each build
Disable ccache for configure phase
Export ccache bin path
travis: remove ccache stats before saving cache
2016-05-25 11:38:51 -03:00
Andrew Tridgell 736c162d21 Replay: added --param-file option 2016-05-25 20:46:18 +10:00
Andrew Tridgell 600c23f3bf Replay: use SCHED_LOOP_RATE for loop rate if available 2016-05-25 10:45:46 +10:00
Peter Barker 0c70f0fc35 sim_vehicle.py: correct rebase 2016-05-24 21:02:36 +10:00
khancyr c9e877b3a5 sim_vehicle.py : reorder frame by type 2016-05-24 19:54:12 +10:00
khancyr 25066be990 sim_vehicle.py : add hexacopter 2016-05-24 19:53:36 +10:00
Grant Morphett 2f7a386b30 Rover: Added the new skid steering parameters file for SITL. 2016-05-24 12:24:53 +10:00
Grant Morphett d993c25cb1 Rover: Added skid steering rover as frame type for SITL. 2016-05-24 12:24:53 +10:00
Grant Morphett 6d675dfcb7 Rover: Just fixing a type in the default params.
Should of been RC1, not RC2.  I also added a couple of other default
parameters for completeness.
2016-05-24 12:24:53 +10:00
Lucas De Marchi 92411402b6 Tools: remove support for flymaple 2016-05-23 21:49:45 -03:00
Lucas De Marchi 563614e84b waf: check for libiio for all linux boards 2016-05-23 12:06:42 -03:00
Lucas De Marchi 04fc1e22da waf: check for lttng-ust for all linux boards 2016-05-23 12:06:42 -03:00
Lucas De Marchi 9ac6c399e9 waf: accept env variable to append library
Change check_librt() to do everything it needs to check for librt.
2016-05-23 12:06:42 -03:00
Andrew Tridgell a1c52415e9 waf: pass mavlink include path into cmake build 2016-05-21 15:25:18 +10:00
Andrew Tridgell 7e7c21d114 waf: update for MAVLink2 build 2016-05-21 15:25:17 +10:00
Andrew Tridgell d521852f84 autotest: make -P2 only control mavproxy mavlink protocol version 2016-05-21 15:25:15 +10:00
Andrew Tridgell 511ca6d764 autotest: support -P2 option for SITL with MAVLink2 2016-05-21 15:25:11 +10:00
Paul Riseborough b1e9207c0f Replay: extend ekf fault status reporting coverage 2016-05-21 15:13:51 +10:00
Randy Mackay 00445ce7bd SITL: parameter file to enable rangefinder in copter 2016-05-21 10:36:53 +09:00
Peter Barker a5db4194bd Tools: update PrintVersion.py for new firmware version location 2016-05-21 09:03:31 +10:00
Gustavo Jose de Sousa bc62164ac9 waf: mavgen: scan for implicit dependencies
Process the input file to catch dependencies. Otherwise, changes in included
files wouldn't trigger the code regeneration.
2016-05-19 18:47:07 -03:00
Gustavo Jose de Sousa 0f60c8ed4f waf: boards: check for librt when necessary 2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa f10c150e70 waf: cxx_checks: add check_librt()
That function verifies for the necessity of linking against librt. If so, then
it checks if it is possible to do so.
2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa e630c2b33f waf: cxx_checks: define ap_common_checks() instead of configure()
That allow loading the cxx_checks tool before the calls to configure_env().
That way, we can add check functions to be used across boards.
2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa 83244dfe10 waf: cxx_checks: add copyright notice 2016-05-19 18:15:06 -03:00
Gustavo Jose de Sousa 468e8284f0 waf: cxx_checks: use check() instead of check_cxx()
check_cxx() is deprecated.
2016-05-19 18:15:06 -03:00
Francisco Ferreira f7f90546d1 ci: build PX4 with waf again 2016-05-18 15:36:48 -03:00
Francisco Ferreira 057124bd90 waf: px4: use lib/rc for v4
Some functions from that module are necessary for px4-v4.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa 8578d7c16f waf: px4: don't add libarm_cortexM4lf_math.a to extra libs
This is following d02abf2 ("Removed CMSIS.") from PX4Firmware.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa de96ca95a6 CPUInfo: cast result of sizeof to unsigned long
That fix works when size_t is 32 or 64 bits.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa f29d8bd42c waf: px4: set ARDUPILOT_BUILD cmake variable
That allow changing PX4Firmware build system to accommodate ardupilot's build.
2016-05-18 15:36:48 -03:00
Gustavo Jose de Sousa 5b91a6e065 Tools: magcal_graph: add mavproxy module
That is added as a reference implementation on how to interpret the field
`completion_mask` from the `MAG_CAL_PROGRESS` mavlink message.
2016-05-18 13:28:52 -03:00
Gustavo Jose de Sousa 2b57c146fe Tools: sitl_calibration: add note on using calibration model
This can avoid users having problems as reported at issue #4088 ("Calibration
not working in sitl").
2016-05-18 13:28:52 -03:00