mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 00:28:30 -04:00
Tools: added options to board_list.py
make it easier to rebuild all bootloaders for AP_Periph with: ./Tools/scripts/board_list.py AP_Periph --per-line | xargs -i ./Tools/scripts/build_bootloaders.py '{}'
This commit is contained in:
parent
eaa62fb490
commit
51fa26c505
@ -181,9 +181,21 @@ AUTOBUILD_BOARDS = BoardList().find_autobuild_boards()
|
|||||||
AP_PERIPH_BOARDS = BoardList().find_ap_periph_boards()
|
AP_PERIPH_BOARDS = BoardList().find_ap_periph_boards()
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import sys
|
import argparse
|
||||||
if len(sys.argv) < 2:
|
parser = argparse.ArgumentParser(description='list boards to build')
|
||||||
print("Usage: board_list.py TARGET")
|
|
||||||
sys.exit(1)
|
parser.add_argument('target')
|
||||||
|
parser.add_argument('--per-line', action='store_true', default=False, help='list one per line for use with xargs')
|
||||||
|
args = parser.parse_args()
|
||||||
board_list = BoardList()
|
board_list = BoardList()
|
||||||
print(sorted(board_list.find_autobuild_boards(sys.argv[1])))
|
target = args.target
|
||||||
|
if target == "AP_Periph":
|
||||||
|
blist = board_list.find_ap_periph_boards()
|
||||||
|
else:
|
||||||
|
blist = board_list.find_autobuild_boards(target)
|
||||||
|
blist = sorted(blist)
|
||||||
|
if args.per_line:
|
||||||
|
for b in blist:
|
||||||
|
print(b)
|
||||||
|
else:
|
||||||
|
print(blist)
|
||||||
|
Loading…
Reference in New Issue
Block a user