Removed fuse type restriction when extracting fuse bit descriptors from AVR8 TDFs
This commit is contained in:
@@ -53,6 +53,9 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames
|
||||
this->payload[3] = 0x00;
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
throw Exceptions::Exception("Unsupported fuse type");
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
@@ -685,20 +685,15 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
|
||||
{"extended", FuseType::EXTENDED},
|
||||
});
|
||||
|
||||
|
||||
for (const auto& [fuseTypeName, fuse] : fuseRegisterGroup.registersMappedByName) {
|
||||
const auto fuseTypeIt = fuseTypesByName.find(fuseTypeName);
|
||||
if (fuseTypeIt == fuseTypesByName.end()) {
|
||||
// Unknown fuse type name
|
||||
continue;
|
||||
}
|
||||
|
||||
const auto fuseBitFieldIt = fuse.bitFieldsMappedByName.find(fuseBitName);
|
||||
|
||||
if (fuseBitFieldIt != fuse.bitFieldsMappedByName.end()) {
|
||||
const auto fuseTypeIt = fuseTypesByName.find(fuseTypeName);
|
||||
|
||||
return FuseBitsDescriptor(
|
||||
fuseAddressOffset + fuse.offset,
|
||||
fuseTypeIt->second,
|
||||
fuseTypeIt != fuseTypesByName.end() ? fuseTypeIt->second : FuseType::OTHER,
|
||||
fuseBitFieldIt->second.mask
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,6 +11,7 @@ namespace Bloom::Targets::Microchip::Avr
|
||||
LOW,
|
||||
HIGH,
|
||||
EXTENDED,
|
||||
OTHER,
|
||||
};
|
||||
|
||||
enum class FuseEnableStrategy: std::uint8_t
|
||||
|
||||
Reference in New Issue
Block a user