raiseRuntimeError("Firmware image is too large for this board")
# Prevent uploads where the maximum image size of the board config is smaller than the flash
# of the board. This is a hint the user chose the wrong config and will lack features
# for this particular board.
ifself.fw_maxsize>fw.property('image_maxsize'):
raiseRuntimeError("Board can accept larger flash images (%u bytes) than board config (%u bytes). Please use the correct board configuration to avoid lacking critical functionality."
%(self.fw_maxsize,fw.property('image_maxsize')))
# OTP added in v4:
ifself.bl_rev>3:
forbyteinrange(0,32*6,4):
...
...
@@ -533,6 +526,19 @@ class uploader(object):
print("family: %s"%des[0])
print("revision: %s"%des[1])
print("flash %d"%self.fw_maxsize)
# Prevent uploads where the maximum image size of the board config is smaller than the flash
# of the board. This is a hint the user chose the wrong config and will lack features
# for this particular board.
# This check should also check if the revision is an unaffected revision
raiseRuntimeError("Board can accept larger flash images (%u bytes) than board config (%u bytes). Please use the correct board configuration to avoid lacking critical functionality."