ardupilot/Tools/ardupilotwaf
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
..
px4/cmake/configs waf: px4: use lib/rc for v4 2016-05-18 15:36:48 -03:00
__init__.py waf: add waf support 2015-12-03 07:54:30 +11:00
ardupilotwaf.py waf: ardupilotwaf: ap_get_all_libraries: ignore non-directory files 2016-05-12 13:47:44 -03:00
boards.py waf: check for libiio for all linux boards 2016-05-23 12:06:42 -03:00
cmake.py waf: cmake: reconfigure when configuration data change 2016-05-25 11:51:40 -03:00
cxx_checks.py waf: check for libiio for all linux boards 2016-05-23 12:06:42 -03:00
gbenchmark.py waf: cmake: use CMakeConfig class instead of taskgen 2016-05-25 11:51:40 -03:00
git_submodule.py waf: define git versions in a generated ap_version.h header 2016-05-06 13:11:28 -03:00
gtest.py waf: gtest: disable for PX4 boards 2016-03-14 11:54:31 -03:00
mavgen.py waf: update for MAVLink2 build 2016-05-21 15:25:17 +10:00
px4.py waf: px4: reconfigure PX4Firmware for each program 2016-05-25 11:51:40 -03:00
static_linking.py waf: add static_linking tool 2016-01-11 16:31:59 -02:00
toolchain.py waf: add libiio support for bebop 2016-05-03 16:43:39 -03:00