tools: px_uploader.py: change RuntimeErorr to printf warning for fw_maxsize greater than fw_maxsize (#24321)

This commit is contained in:
Jacob Dahl 2025-02-12 15:28:40 -09:00 committed by GitHub
parent 195961ae83
commit b77797b490
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -708,7 +708,7 @@ class uploader:
# https://github.com/PX4/Firmware/blob/master/src/drivers/boards/common/stm32/board_mcu_version.c#L125-L144
if self.fw_maxsize > fw.property('image_maxsize') and not force:
raise RuntimeError(f"Board can accept larger flash images ({self.fw_maxsize} bytes) than board config ({fw.property('image_maxsize')} bytes). Please use the correct board configuration to avoid lacking critical functionality.")
print(f"WARNING: Board can accept larger flash images ({self.fw_maxsize} bytes) than board config ({fw.property('image_maxsize')} bytes)")
else:
# If we're still on bootloader v4 on a Pixhawk, we don't know if we
# have the silicon errata and therefore need to flash px4_fmu-v2