Commit Graph

335 Commits

Author SHA1 Message Date
Francisco Ferreira efc42edabe waf: remove URUS 2017-09-11 10:04:11 -07:00
davidaroyer bde8252359 waf: add support for Aerotenna OcPoC-Zynq hardware 2017-09-08 07:30:49 -07:00
Lucas De Marchi bfe2acac33 build: add -Wno-attributes for PX4
This will allow us to use [[fallthrough]] attribute as an
statement.
2017-08-22 23:59:13 -07:00
Lucas De Marchi 8a9a08ed9b build: generalize link fix 2017-08-16 10:51:59 -07:00
Miguel Arroyo a2f327678b waf: Fix for lttng linking 2017-08-16 10:51:59 -07:00
Francisco Ferreira d41dd7e7e7
waf: add workaround for PE linker not removing unused methods 2017-08-15 21:51:08 +01:00
Andrew Tridgell 1901cb6c7f waf: added --disable-header-checks
the headers checks are most of the re-build time when editing class
headers. Disabling them makes development much faster
2017-08-08 00:42:19 -07:00
Kevin Lopez Alvarez 34c977f046 waf: Initial waf support for ppro 2017-07-24 13:45:37 +10:00
Peter Barker 7042d3e9c9 Global: all vehicles get AP_Relay and AP_ServoRelayEvent libraries 2017-07-17 00:06:31 +01:00
Gustavo Sousa 930f3b4aca build: boards: enable --upload option for linux boards
Make it use rsync command. That's a workaround to allow user using --upload
option, which in fact appends the 'rsync' to the command chain. A bad
side-effect of this is that the build summary is output twice for a command
like 'waf copter --upload'.
2017-07-02 08:58:26 -07:00
Lucas De Marchi d02013c91b build: aerofc-v1: add default param file into ROMFS 2017-06-06 18:42:17 -07:00
Lucas De Marchi f6d43aea25 build: px4: allow to embed defaults file into ROMFS 2017-06-06 18:42:17 -07:00
Peter Barker ee16205438 Tools: ardupilotwaf: include startup tone in ROMFS 2017-05-01 13:28:27 +01:00
Francisco Ferreira 2f326fe5e0 build: remove obsolote mkblctrl from PX4 builds 2017-04-27 13:32:43 +01:00
Andrew Tridgell 385d1c1951 waf: cope with spaces in directory name in mavgen 2017-04-22 13:48:19 +10:00
Andrew Tridgell c8d6311047 waf: added -Werror=switch
match the stm32 build, so errors are found in SITL
2017-04-19 20:48:42 +10:00
Pierre Kancir b541949262 WAF: Px4.py remove unused PX4_UAVCAN_ROOT and UAVCAN_LIBUAVCAN_PATH 2017-04-17 13:32:27 -07:00
Eugene Shamaev 59ef501a19 waf: add support for building with UAVCAN 2017-04-10 22:38:13 +01:00
Lucas De Marchi fab0358a0f build: document special fields in px4 boards 2017-03-24 12:06:19 +11:00
Lucas De Marchi 05c5a2ac9b build: add adc driver for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 81a9a70910 ROMFS: use different UART for errors in aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi 3eb16fd881 build: PX4: install rc.<board-name> as init script 2017-03-24 12:06:19 +11:00
Lucas De Marchi b1b07f4e70 build: make bootloader path relative to ROMFS
Differentiating if the path should be relative to the build dir or the
ROMFS dir based purely on the type of the item is not a good approach.
This prepares the way to have more files on ROMFS with different names
on src and dst.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 8db111e0a0 build: do not add sercon for aerofc 2017-03-24 12:06:19 +11:00
Lucas De Marchi d3df9c8d39 build: use dummy tone_alarm on aerofc
This allows us to use tone_alarm in the init script besides the calls
from ArduPilot code.
2017-03-24 12:06:19 +11:00
Lucas De Marchi b17acfee12 Add aerofc support
Flight Controller board that comes on Intel Aero RTF Drone.
2017-03-24 12:06:19 +11:00
Lucas De Marchi 65f2c9eca1 build: remove batt_smbus from waf as well
It has been removed from make build system, but not from waf.
2017-02-12 01:14:04 +00:00
Lucas De Marchi 00ef0cec2e build: shut up cmake regarding deprecated macros
Yes, we know we are using them. Remove warnings like:

CMake Deprecation Warning at /usr/share/cmake/Modules/CMakeForceCompiler.cmake:93 (message):
  The CMAKE_FORCE_CXX_COMPILER macro is deprecated.  Instead just set
  CMAKE_CXX_COMPILER and allow CMake to identify the compiler.
Call Stack (most recent call first):
  cmake/toolchains/Toolchain-arm-none-eabi.cmake:37 (cmake_force_cxx_compiler)
  /home/lucas/p/dronecode/ardupilot/build/px4-v2/modules/PX4Firmware/CMakeFiles/3.6.2/CMakeSystem.cmake:6 (include)
  CMakeLists.txt:204 (project)
2017-02-06 09:27:22 -08:00
Lucas De Marchi 3d29010366 build: allow to pass flags to cmake
These are flags to cmake itself, not to the compiler and is not in the
form of -DXX=YY
2017-02-06 09:27:22 -08:00
Lucas De Marchi 1bf17fa50f build: remove version that is not required anymore
Now bootloader, board name and px4io pass the name directly to the PX4
build system so we don't need to keep the version.
2017-01-30 18:59:34 -08:00
Lucas De Marchi 1a58d3c447 build: px4: pass px4io name directly 2017-01-30 18:59:34 -08:00
Lucas De Marchi da297d2028 build: px4: pass board name directly 2017-01-30 18:59:34 -08:00
Lucas De Marchi c81d32a0b2 build: px4: pass bootloader name directly
Don't derive the bootloader name from the version. Other boards using
the PX4 layer may not necessarily have "px4fmu" name, let alone the
version.
2017-01-30 18:59:34 -08:00
Andrew Tridgell 6747f42986 waf: ensure that we can link to a package before using it
this copes with a PKG_CONFIG_PATH that points at a package for the
wrong architecture
2017-01-30 13:55:57 +11:00
Andrew Tridgell 9d592e005d waf: removed install of oreoled.bin 2017-01-29 16:31:06 +11:00
Andrew Tridgell 977cd3c486 waf: re-enable uavcan on FMUv2 2017-01-29 16:31:06 +11:00
mirkix 61a88a9b5e ardupilotwaf: Add BeagleBone Blue 2017-01-26 23:15:52 -08:00
Andrew Tridgell 1dd6d568ab waf: removed remaining PX4 rangefinder drivers 2017-01-27 18:12:05 +11:00
Andrew Tridgell 2add60bc37 waf: removed PX4 trone driver 2017-01-27 18:11:29 +11:00
Randy Mackay 99ba42c26d Build: do not build PX4Firmware rgbled driver 2017-01-27 15:24:09 +09:00
Andrew Tridgell d07d2d9a40 Tools: adapt to new RC_Channel API 2017-01-12 17:39:37 +11:00
Andrew Tridgell b7081f42cd waf: exclude some files from ROMFS
no need to include oreoled on FMUv2 as its Solo only
2016-12-19 08:07:13 +11:00
Andrew Tridgell 321cad640c waf: trim PX4 config to reduce firmware size
removed unused drivers
2016-12-19 08:07:12 +11:00
Andrew Tridgell 95b848f2b6 waf: fixes for FMUv3 2016-12-19 08:07:12 +11:00
Andrew Tridgell 74a871576c waf: added FMUv3 to build 2016-12-19 08:07:12 +11:00
Andrew Tridgell 35bed59bd4 Tools: Add EKF3 and remove EK1 2016-12-19 08:07:10 +11:00
Andrew Tridgell 7e0d904657 Tools: link in AP_FlashStorage 2016-12-02 09:49:39 +11:00
Andrew Tridgell 4ef4016e5e mk: removed PX4 irlock driver 2016-11-28 08:39:07 +11:00
Andrew Tridgell 752a5035d0 waf: remove px4flow from build 2016-11-28 08:26:57 +11:00
Julien Beraud c6107d812d waf: Don't use lttng in static builds
already done for libiio and libdl
2016-11-16 01:23:10 -02:00
Andrew Tridgell 111d8c05dc waf: link in less drivers on Pixracer 2016-11-10 12:55:48 +11:00
Andrew Tridgell dc439d281e Tools: removed PX4 airspeed drivers 2016-11-09 17:07:59 +11:00
floaledm 8d0fd7cea8 Tools: add AP_Frsky_Telem 2016-11-08 07:42:39 +11:00
Lucas De Marchi 57aec40acb build: disable O_CLOEXEC for PX4 and VRBRAIN 2016-11-07 12:37:30 -03:00
Lucas De Marchi 217da05c64 build: Add Urus board to waf 2016-10-27 11:53:26 -02:00
Martin Evans c0b913a975 build: Add Dark board to waf 2016-10-24 10:01:55 -02:00
Lucas De Marchi cc683c1db1 build: use gcc/g++ first
We currently are unable to build on MacOSX unless we give waf the
--check-cxx-compiler g++. Change the compiler order to search for
gcc/g++ first instead of clang/clang++.
2016-10-14 17:30:46 -03:00
Lucas De Marchi 95d5752011 build: fix configure check for headers
When we are checking if a header is available we can't pass -I argument
to our missing/ directory. Otherwise we would end up telling the build
that a header is available when it actually isn't.

This fixes the build of sitl in MacOS with clang.
2016-09-03 01:19:14 -03:00
José Roberto de Souza 6a9addb2a8 waf: Add Intel Aero to waf build
This will be the first board that only build with waf.
2016-09-03 01:03:17 -03:00
Gustavo Jose de Sousa 5d7ca3fd27 waf: build_summary: don't call size for empty list of nodes
Otherwise, that will cause an error.
2016-08-31 00:19:51 -03:00
Gustavo Jose de Sousa 87862a08ab waf: ap_library: make headers whitelist portable
Otherwise it won't work for platforms that don't use Unix style paths.
2016-08-26 13:13:56 -03:00
Gustavo Jose de Sousa a6b55d90a7 waf: cmake: define a dictionary of supported generators
On Windows, using MSYS Makefiles generator doesn't work very well when the
CMakeLists.txt files use custom commands with paths as arguments. Furthermore,
MinGW Makefiles generator can't be used if sh.exe is in the system's path and
some build systems rely on sh for certain tasks (which is the case of PX4
Firmware build). Because of that, the list of generators for Windows has been
narrowed to Ninja and NMake Makefiles.
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa 07592d650e waf: px4: copy with shutil module instead of cp program
In order to make it independent of host platform.
2016-08-24 12:15:42 -03:00
Lucas De Marchi e31a06cfdb waf: fix programs searches
Here we do the following:
    1) Move the pkg-config check to boards.py so we only check of it for
       linux boards
    2) Use cfg.find_toolchain_program() if possible, for example, for AR
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa f430ef3825 waf: toolchain: override find_g{xx,cc}() instead of wrapping configure()
That's more correct than setting Waf environment variables:

 (1) We don't need to worry about differences between OSes - the previous
 implementation was actually broken for Windows because the program names in
 the environment variables were missing the ".exe" extension.

 (2) That looks better than looping over possible compiler names and running
 the configuration transactionally multiple times.
2016-08-24 12:15:42 -03:00
Gustavo Jose de Sousa 31965689cb waf: persist implicit dependency information across clean
Implicit dependency scanning takes significant time and, since it doesn't
produce files, it's okay to keep the resulting information across clean
commands as long as the scanner is triggered again if there's need to. This
commit accomplishes that.

The advantage of this approach can be observed by the following timings when
building the group "bin":

 Method                                                         Time
 ------------------------------------------------------------------------
 Fully clean build                                              5m18.633s
 Clean build with scanning result persisted                     4m23.346s
 Clean build with ccache but non-persistent scan results        1m40.125s
 Clean build with scanning results persisted and with ccache      14.843s

While at it, move management of information persisted across clean commands to
a separate module.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 6abcf6150c waf: ap_library: use ap_persistent_task_sigs for header checking tasks
In order to make clean builds faster.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa ef4fd0e2d3 waf: add --clean-all-sigs option
Explanation on the option help string.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 0b7a98d40c waf: allow persisting tasks signatures across clean commands
That allows some time consuming tasks that don't really produce anything on the
file system to keep their signature after a clean command is issued.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa a98c42fef9 waf: define ap_groups in ardupilotwaf tool
That makes more sense, since that module is supposed to have basic Ardupilot
specific features. The root wscript should be a mere user of those features.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa a6ec802d28 ap_library: always check included headers when necessary
This approach is better then the previous one mainly because the latter
required creating the task generator for the checks in a separate group and
posting that target implied in posting the whole previous build groups.

Some notes:
 - This is implemented so that headers aren't checked more than once, so there
   might be some checking tasks that won't do anything because the headers are
   checked on another task. Even so, those headers are added to the result of
   scan() in order to provide a consistent output to the user.
 - It is safe manipulating the shared variable dispatched_headers because the
   scan() is called before the task is added to the execution queue.
 - Although we force ap_library_check_headers.scan() to always be called,
   that's OK, because we use the scanning result of the compilation task, which
   returns a cached value if there's no need to rescan.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 51bef96811 waf: px4: accommodate use of ap_library
- Use AP_LIBRARIES_OBJECTS_KW instead of AP_STLIB_FEATURES.
 - Change the feature name to one that makes more sense.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa b8e518a533 waf: use ap_library tool
That way we avoid recompiling source files that don't depend on vehicles.
Change notes:
- UTILITY_SOURCE_EXTS: moved to ap_library
- Task generators indexes: ap_library handles that now and in a better way
- Use of AP_STLIB_FEATURES: it doesn't make sense anymore, since the stlib
  taskgen has empty source list
- Flags and defines: passed down to ap_library through AP_LIBRARIES_OBJECTS_KW
- Set use='mavlink' in AP_LIBRARIES_OBJECTS_KW instead of calls to
  bld.ap_stlib().
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 9a6fcafade waf: ap_library: add tool
That's a tool for creating task generators for libraries object files. One of
the key objectives of this patch is to provide a way to avoid recompiling
sources that are independent of vehicles.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa b191269cc8 waf: px4: run firmware task after link task
This fix a bug introduced by 06a5156 ("waf: px4: reconfigure PX4Firmware for
each program"), with the removal of the call fw_task.set_run_after(cp_lib).
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 8fb6ccc8b7 waf: px4: use copy of "use" in px4_import_objects_from_use()
Utils.to_list() returns the argument if it is a list, which means that
px4_import_objects_from_use() cleared that attribute when processing the queue.
2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 424f6490fc waf: px4: add missing import Errors 2016-08-24 10:46:23 -03:00
Gustavo Jose de Sousa 2e1ac0de8d waf: make get_legacy_defines() "public"
That function will be used by an upcoming separate tool.
2016-08-01 22:04:16 -03:00
Gustavo Jose de Sousa f2dec971e7 waf: add "ap_" prefix to keywords "libraries" and "vehicle"
As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
2016-08-01 22:04:16 -03:00
Gustavo Jose de Sousa d1c5691501 waf: build_summary: let the user register the post build callback
That allows more control from the user's point of view.
2016-07-28 17:50:19 -03:00
Gustavo Jose de Sousa 4bd17ab90c waf: git_submodule: allow warning about skipped submodules updates
Provide a function to register a post build routine to do the warnings. Do that
way so that the user can chose when to add the callback to the build (i.e.
allow the user to assert a desired order for the post build callbacks to be
called).
2016-07-25 16:45:57 -03:00
Gustavo Jose de Sousa 4cd70842d9 waf: git_submodule: don't update submodule if non-fastforward
Don't cause trouble to developers working on submodules.
2016-07-25 16:45:57 -03:00
Andrew Tridgell db8bf48747 build: added AP_ICEngine to build 2016-07-25 10:06:03 +10:00
Andrew Tridgell 241b6edfcf Build: added AP_Button to build 2016-07-22 15:01:20 +10:00
Andrew Tridgell fd286498af PX4: added otp to the build 2016-07-21 18:05:00 +10:00
Lucas De Marchi 2b1b23cabf build: fix static linking through --static option 2016-07-20 18:03:20 -03:00
Andrew Tridgell 3769e0fc64 waf: build support for Disco 2016-07-20 13:28:28 +10:00
Gustavo Jose de Sousa 9a9b59a97f waf: boards: fix funny CXXFLAGS typo 2016-07-18 15:26:07 -03:00
Gustavo Jose de Sousa 849a83315a waf: git_submodule: fix for Waf 1.9
Tasks cwd must be Node objects in Waf 1.9
2016-07-14 14:00:07 -03:00
Andrew Tridgell d25db426a3 waf: added AP_Module to the build 2016-07-14 13:39:47 +10:00
Lucas De Marchi b375b33189 waf: allow to disable tests
This allows to completely disable the tests. Even the gtest submodule is
not checked out allowing integration on build servers without needing to
download one more submodule.

This is different from the --notests flag. The latter only disables
executing the tests, but always use the submodule.
2016-07-13 15:38:50 -03:00
Lucas De Marchi 8967220652 waf: pass uselib_store in check_package()
This guarantees waf will always add the flags with our known prefix.
2016-07-13 15:24:42 -03:00
Andrew Tridgell 1b12371e25 waf: use define_name in libdl check 2016-07-13 15:24:42 -03:00
Andrew Tridgell a5adae5fb4 waf: make linux check for libdl
needed for libiio
2016-07-13 15:24:42 -03:00
Andrew Tridgell 3322d7c321 waf: don't build bebop static
need dynamic for libiio
2016-07-13 15:24:42 -03:00
Andrew Tridgell 2980d47e23 waf: added check_package() function for pkg-config checks
this converts existing pkg-config checks to use check_package, which
sets up all the needed variables after a check.

This also disables libdl and libiio for static builds, where they make
no sense
2016-07-13 15:24:41 -03:00
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
Siddharth Bharat Purohit 71c2f69a63 waf: add support for sitl build on mac 2016-07-07 11:35:17 -03: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