Skip to content

Commit

Permalink
Tools: make include file mistakes nicer to interpret
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbarker authored and tridge committed Jul 29, 2024
1 parent f3766b8 commit 535f806
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Tools/ardupilotwaf/boards.py
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,12 @@ def get_ap_periph_boards():
hwdef = os.path.join(dirname, d, 'hwdef.dat')
if os.path.exists(hwdef):
ch = chibios_hwdef.ChibiOSHWDef(hwdef=[hwdef], quiet=True)
if ch.is_periph_fw_unprocessed():
list_ap.append(d)
try:
if ch.is_periph_fw_unprocessed():
list_ap.append(d)
except chibios_hwdef.ChibiOSHWDefIncludeNotFoundException as e:
print(f"{e.includer} includes {e.hwdef} which does not exist")
sys.exit(1)

list_ap = list(set(list_ap))
return list_ap
Expand Down

0 comments on commit 535f806

Please sign in to comment.