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;
|
this->payload[3] = 0x00;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
default: {
|
||||||
|
throw Exceptions::Exception("Unsupported fuse type");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -685,20 +685,15 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
|
|||||||
{"extended", FuseType::EXTENDED},
|
{"extended", FuseType::EXTENDED},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
for (const auto& [fuseTypeName, fuse] : fuseRegisterGroup.registersMappedByName) {
|
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);
|
const auto fuseBitFieldIt = fuse.bitFieldsMappedByName.find(fuseBitName);
|
||||||
|
|
||||||
if (fuseBitFieldIt != fuse.bitFieldsMappedByName.end()) {
|
if (fuseBitFieldIt != fuse.bitFieldsMappedByName.end()) {
|
||||||
|
const auto fuseTypeIt = fuseTypesByName.find(fuseTypeName);
|
||||||
|
|
||||||
return FuseBitsDescriptor(
|
return FuseBitsDescriptor(
|
||||||
fuseAddressOffset + fuse.offset,
|
fuseAddressOffset + fuse.offset,
|
||||||
fuseTypeIt->second,
|
fuseTypeIt != fuseTypesByName.end() ? fuseTypeIt->second : FuseType::OTHER,
|
||||||
fuseBitFieldIt->second.mask
|
fuseBitFieldIt->second.mask
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ namespace Bloom::Targets::Microchip::Avr
|
|||||||
LOW,
|
LOW,
|
||||||
HIGH,
|
HIGH,
|
||||||
EXTENDED,
|
EXTENDED,
|
||||||
|
OTHER,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class FuseEnableStrategy: std::uint8_t
|
enum class FuseEnableStrategy: std::uint8_t
|
||||||
|
|||||||
Reference in New Issue
Block a user