Included target ID verification in OCDEN fuse bit management

This commit is contained in:
Nav
2023-05-08 13:04:26 +01:00
parent c397049ea8
commit c88dc35e4b

View File

@@ -1002,6 +1002,18 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
);
}
const auto targetSignature = this->avr8DebugInterface->getDeviceId();
const auto tdSignature = this->targetDescriptionFile->getTargetSignature();
if (targetSignature != tdSignature) {
throw Exception(
"Failed to validate connected target - target signature mismatch.\nThe target signature"
" (\"" + targetSignature.toHex() + "\") does not match the AVR8 target description signature (\""
+ tdSignature.toHex() + "\"). This will likely be due to an incorrect target name in the "
+ "configuration file (bloom.yaml)."
);
}
const auto ocdenFuseBitsDescriptor = this->targetDescriptionFile->getOcdenFuseBitsDescriptor();
const auto jtagenFuseBitsDescriptor = this->targetDescriptionFile->getJtagenFuseBitsDescriptor();