Open danbim opened 12 years ago
Current code:
byte[] deviceFlashHeader = readDeviceFlashHeader(chipType.getHeaderStart(), chipType.getHeaderLength());
if (MacAddress.HIGHEST_MAC_ADDRESS.equals(new MacAddress(deviceFlashHeader))) {
throw new FlashProgramFailedException("Device MAC address (0xFF...FF) seems broken!");
}
binaryImage.insertHeader(deviceFlashHeader);
It reads the current MAC address from the device and checks if its not equal to 0xFF...FF.
Looking at the code there could be a more clever way to validate (and potentially repair) a flash operation:
While this won't guarantee failure-freedom it would certainly result in less occasions on which the MAC address of the node is damaged.