mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-08 17:08:28 -04:00
waf: add option to compile with uavcan for chibios boards
This commit is contained in:
parent
a4de67098a
commit
b1499ee8f2
@ -261,6 +261,14 @@ class chibios(Board):
|
|||||||
HAVE_STD_NULLPTR_T = 0,
|
HAVE_STD_NULLPTR_T = 0,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if self.with_uavcan:
|
||||||
|
env.AP_LIBRARIES += [
|
||||||
|
'modules/uavcan/libuavcan_drivers/stm32/driver/src/*.cpp'
|
||||||
|
]
|
||||||
|
env.INCLUDES += [
|
||||||
|
cfg.srcnode.find_dir('modules/uavcan/libuavcan_drivers/stm32/driver/include').abspath()
|
||||||
|
]
|
||||||
|
|
||||||
env.AP_LIBRARIES += [
|
env.AP_LIBRARIES += [
|
||||||
'AP_HAL_ChibiOS',
|
'AP_HAL_ChibiOS',
|
||||||
]
|
]
|
||||||
@ -347,6 +355,12 @@ class chibios(Board):
|
|||||||
]
|
]
|
||||||
|
|
||||||
env.LIB += ['gcc', 'm']
|
env.LIB += ['gcc', 'm']
|
||||||
|
if self.with_uavcan:
|
||||||
|
env.CFLAGS += ['-DUAVCAN_STM32_CHIBIOS=1',
|
||||||
|
'-DUAVCAN_STM32_NUM_IFACES=2']
|
||||||
|
env.CXXFLAGS += ['-DUAVCAN_STM32_CHIBIOS=1',
|
||||||
|
'-DUAVCAN_STM32_NUM_IFACES=2']
|
||||||
|
|
||||||
env.GIT_SUBMODULES += [
|
env.GIT_SUBMODULES += [
|
||||||
'ChibiOS',
|
'ChibiOS',
|
||||||
]
|
]
|
||||||
@ -369,6 +383,10 @@ class skyviper_f412(chibios):
|
|||||||
|
|
||||||
class fmuv3(chibios):
|
class fmuv3(chibios):
|
||||||
name = 'fmuv3'
|
name = 'fmuv3'
|
||||||
|
def __init__(self):
|
||||||
|
super(fmuv3, self).__init__()
|
||||||
|
self.with_uavcan = True
|
||||||
|
|
||||||
def configure_env(self, cfg, env):
|
def configure_env(self, cfg, env):
|
||||||
super(fmuv3, self).configure_env(cfg, env)
|
super(fmuv3, self).configure_env(cfg, env)
|
||||||
env.DEFINES.update(
|
env.DEFINES.update(
|
||||||
|
Loading…
Reference in New Issue
Block a user