Extract EESAVE fuse bit descriptor from AVR8 TDF

This commit is contained in:
Nav
2023-05-26 22:42:48 +01:00
parent f3f0b504f3
commit 6aca0731b2
2 changed files with 13 additions and 0 deletions

View File

@@ -381,6 +381,10 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
return this->getFuseBitsDescriptorByName("jtagen"); return this->getFuseBitsDescriptorByName("jtagen");
} }
std::optional<FuseBitsDescriptor> TargetDescriptionFile::getEesaveFuseBitsDescriptor() const {
return this->getFuseBitsDescriptorByName("eesave");
}
void TargetDescriptionFile::loadSupportedPhysicalInterfaces() { void TargetDescriptionFile::loadSupportedPhysicalInterfaces() {
auto interfaceNamesToInterfaces = std::map<std::string, PhysicalInterface>({ auto interfaceNamesToInterfaces = std::map<std::string, PhysicalInterface>({
{"updi", PhysicalInterface::UPDI}, {"updi", PhysicalInterface::UPDI},

View File

@@ -127,6 +127,15 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
*/ */
[[nodiscard]] std::optional<FuseBitsDescriptor> getJtagenFuseBitsDescriptor() const; [[nodiscard]] std::optional<FuseBitsDescriptor> getJtagenFuseBitsDescriptor() const;
/**
* Constructs a FuseBitDescriptor for the "Preserve EEPROM" (EESAVE) fuse bit, with information extracted from
* the TDF.
*
* @return
* std::nullopt if the EESAVE bit field could not be found in the TDF.
*/
[[nodiscard]] std::optional<FuseBitsDescriptor> getEesaveFuseBitsDescriptor() const;
/** /**
* Returns a set of all supported physical interfaces for debugging. * Returns a set of all supported physical interfaces for debugging.
* *