hwdef: give a more useful error message on no bootloader

This commit is contained in:
Andrew Tridgell 2023-12-20 07:40:51 +11:00
parent ea3dc78a96
commit 46171a7c79

View File

@ -2430,8 +2430,10 @@ INCLUDE common.ld
bp = self.bootloader_path()
if not os.path.exists(bp):
self.error("Bootloader (%s) does not exist and AP_BOOTLOADER_FLASHING_ENABLED" %
(bp,))
self.error('''Bootloader (%s) does not exist and AP_BOOTLOADER_FLASHING_ENABLED
Please run: Tools/scripts/build_bootloaders.py %s
''' %
(bp,os.path.basename(os.path.dirname(args.hwdef[0]))))
bp = os.path.realpath(bp)