diff --git a/Tools/ardupilotwaf/boards.py b/Tools/ardupilotwaf/boards.py index 06681d7b43..d35c1a7d98 100644 --- a/Tools/ardupilotwaf/boards.py +++ b/Tools/ardupilotwaf/boards.py @@ -294,6 +294,15 @@ Please use a replacement build as follows: px4-v4pro Use DrotekP3Pro build ''' % ctx.env.BOARD) + boards = _board_classes.keys() + if not ctx.env.BOARD in boards: + # try case-insensitive match + for b in boards: + if b.upper() == ctx.env.BOARD.upper(): + ctx.env.BOARD = b + break + if not ctx.env.BOARD in boards: + ctx.fatal("Invalid board '%s': choices are %s" % (ctx.env.BOARD, ', '.join(boards))) _board = _board_classes[ctx.env.BOARD]() return _board diff --git a/wscript b/wscript index ba0129b7d5..86599fadf5 100644 --- a/wscript +++ b/wscript @@ -68,7 +68,6 @@ def options(opt): removed_names = boards.get_removed_boards() g.add_option('--board', action='store', - choices=boards_names + removed_names, default=None, help='Target board to build, choices are %s.' % ', '.join(boards_names))