wscript: add support for setting number of auxiliary IMUs

This commit is contained in:
bugobliterator 2023-03-04 11:03:08 +11:00 committed by Andrew Tridgell
parent e7533c006b
commit 7d61a5df8e
1 changed files with 9 additions and 1 deletions

10
wscript
View File

@ -376,7 +376,12 @@ configuration in order to save typing.
g.add_option('--assert-cc-version',
default=None,
help='fail configure if not using the specified gcc version')
g.add_option('--num-aux-imus',
type='int',
default=0,
help='number of auxiliary IMUs')
def _collect_autoconfig_files(cfg):
for m in sys.modules.values():
paths = []
@ -444,6 +449,9 @@ def configure(cfg):
cfg.msg('Using static linking', 'yes', color='YELLOW')
cfg.env.STATIC_LINKING = True
if cfg.options.num_aux_imus > 0:
cfg.define('INS_AUX_INSTANCES', cfg.options.num_aux_imus)
cfg.load('ap_library')
cfg.msg('Setting board to', cfg.options.board)