mirror of https://github.com/ArduPilot/ardupilot
waf: allow for 64 bit CAN builds
This commit is contained in:
parent
1b88f4e185
commit
85d4024e64
|
@ -429,11 +429,6 @@ class Board:
|
|||
]
|
||||
|
||||
if self.with_can and not cfg.env.AP_PERIPH:
|
||||
if not cfg.env.FORCE32BIT and (cfg.env.BOARD == 'sitl' or cfg.env.BOARD == 'linux'):
|
||||
env.DEFINES.update(
|
||||
HAL_ENABLE_LIBUAVCAN_DRIVERS = 0
|
||||
)
|
||||
else:
|
||||
env.AP_LIBRARIES += [
|
||||
'AP_DroneCAN',
|
||||
'modules/DroneCAN/libcanard/*.c',
|
||||
|
@ -1142,7 +1137,7 @@ class linux(Board):
|
|||
self.with_can = False
|
||||
|
||||
def configure_env(self, cfg, env):
|
||||
if cfg.options.board == 'linux' and cfg.options.force_32bit:
|
||||
if cfg.options.board == 'linux':
|
||||
self.with_can = True
|
||||
super(linux, self).configure_env(cfg, env)
|
||||
|
||||
|
@ -1189,7 +1184,7 @@ class linux(Board):
|
|||
env.DEFINES.update(
|
||||
HAL_FORCE_32BIT = 0,
|
||||
)
|
||||
if self.with_can and cfg.options.board == 'linux' and cfg.options.force_32bit:
|
||||
if self.with_can and cfg.options.board == 'linux':
|
||||
cfg.env.HAL_NUM_CAN_IFACES = 2
|
||||
cfg.define('HAL_NUM_CAN_IFACES', 2)
|
||||
cfg.define('UAVCAN_EXCEPTIONS', 0)
|
||||
|
|
11
wscript
11
wscript
|
@ -478,10 +478,6 @@ def configure(cfg):
|
|||
cfg.load('clang_compilation_database')
|
||||
cfg.load('waf_unit_test')
|
||||
cfg.load('mavgen')
|
||||
if cfg.options.board in cfg.ap_periph_boards():
|
||||
cfg.load('dronecangen')
|
||||
else:
|
||||
if cfg.options.force_32bit or (cfg.options.board != 'sitl' and cfg.options.board != 'linux'):
|
||||
cfg.load('dronecangen')
|
||||
|
||||
cfg.env.SUBMODULE_UPDATE = cfg.options.submodule_update
|
||||
|
@ -669,13 +665,6 @@ def _build_dynamic_sources(bld):
|
|||
)
|
||||
|
||||
if (bld.get_board().with_can or bld.env.HAL_NUM_CAN_IFACES) and not bld.env.AP_PERIPH:
|
||||
if (not bld.env.FORCE32BIT) and (bld.env.BOARD == 'sitl' or bld.env.BOARD == 'linux'):
|
||||
# remove generated files
|
||||
dronecan_dir = bld.bldnode.make_node('modules/DroneCAN/libcanard/dsdlc_generated/').abspath()
|
||||
if os.path.exists(dronecan_dir):
|
||||
print("Removing DroneCAN generated files")
|
||||
shutil.rmtree(dronecan_dir)
|
||||
else:
|
||||
bld(
|
||||
features='dronecangen',
|
||||
source=bld.srcnode.ant_glob('modules/DroneCAN/DSDL/* libraries/AP_DroneCAN/dsdl/*', dir=True, src=False),
|
||||
|
|
Loading…
Reference in New Issue