diff --git a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp index 1dd0dbf2..863a2eaf 100644 --- a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp +++ b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp @@ -381,6 +381,10 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription return this->getFuseBitsDescriptorByName("jtagen"); } + std::optional TargetDescriptionFile::getEesaveFuseBitsDescriptor() const { + return this->getFuseBitsDescriptorByName("eesave"); + } + void TargetDescriptionFile::loadSupportedPhysicalInterfaces() { auto interfaceNamesToInterfaces = std::map({ {"updi", PhysicalInterface::UPDI}, diff --git a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.hpp b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.hpp index 4d1f3463..ef4769a0 100644 --- a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.hpp +++ b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.hpp @@ -127,6 +127,15 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription */ [[nodiscard]] std::optional 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 getEesaveFuseBitsDescriptor() const; + /** * Returns a set of all supported physical interfaces for debugging. *