From 74a871576cb20d3fb1246d91d0354eec6598dc8f Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 10 Dec 2016 13:05:08 +1100 Subject: [PATCH] waf: added FMUv3 to build --- Tools/ardupilotwaf/boards.py | 6 +++++ Tools/ardupilotwaf/px4.py | 2 ++ .../cmake/configs/nuttx_px4fmu-v3_apm.cmake | 25 +++++++++++++++++++ 3 files changed, 33 insertions(+) create mode 100644 Tools/ardupilotwaf/px4/cmake/configs/nuttx_px4fmu-v3_apm.cmake diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 6d912b7477..ef2f0a8671 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -468,6 +468,12 @@ class px4_v2(px4): super(px4_v2, self).__init__() self.version = '2' +class px4_v3(px4): + name = 'px4-v3' + def __init__(self): + super(px4_v3, self).__init__() + self.version = '3' + class px4_v4(px4): name = 'px4-v4' def __init__(self): diff --git a/Tools/ardupilotwaf/px4.py b/Tools/ardupilotwaf/px4.py index 99135cc46b..3c7f94f4ed 100644 --- a/Tools/ardupilotwaf/px4.py +++ b/Tools/ardupilotwaf/px4.py @@ -230,6 +230,8 @@ def configure(cfg): if env.PX4_VERSION == '1': bootloader_name = 'px4fmu_bl.bin' + elif env.PX4_VERSION in ['2','3']: + bootloader_name = 'px4fmuv2_bl.bin' else: bootloader_name = 'px4fmuv%s_bl.bin' % env.get_flat('PX4_VERSION') diff --git a/Tools/ardupilotwaf/px4/cmake/configs/nuttx_px4fmu-v3_apm.cmake b/Tools/ardupilotwaf/px4/cmake/configs/nuttx_px4fmu-v3_apm.cmake new file mode 100644 index 0000000000..cbf2b3a5ec --- /dev/null +++ b/Tools/ardupilotwaf/px4/cmake/configs/nuttx_px4fmu-v3_apm.cmake @@ -0,0 +1,25 @@ +include(configs/nuttx_px4fmu-common_apm) + +list(APPEND config_module_list + drivers/lsm303d + drivers/l3gd20 + drivers/mpu9250 + drivers/mpu6000 + drivers/hmc5883 + drivers/ms5611 + drivers/boards/px4fmu-v2 + drivers/pwm_input + modules/uavcan + lib/mathlib + drivers/px4io + drivers/oreoled +) + +list(APPEND config_extra_libs + uavcan + uavcan_stm32_driver +) + +set(config_io_board + px4io-v2 +)