New AVR8 target config parameter ("updateDwenFuseBitOnDebugWireFailure")

This commit is contained in:
Nav
2022-03-05 18:02:11 +00:00
parent 503605cfa0
commit 066c7a469f
2 changed files with 19 additions and 0 deletions

View File

@@ -63,6 +63,22 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
}
}
if (targetConfig.jsonObject.contains("updateDwenFuseBitOnDebugWireFailure")) {
this->updateDwenFuseBitOnDebugWireFailure = targetConfig.jsonObject.value(
"updateDwenFuseBitOnDebugWireFailure"
).toBool();
if (this->updateDwenFuseBitOnDebugWireFailure
&& this->avrIspInterface == nullptr
&& this->physicalInterface == PhysicalInterface::DEBUG_WIRE
) {
Logger::warning(
"The connected debug tool (or associated driver) does not provide any ISP interface. "
"Bloom will be unable to update the DWEN fuse bit in the event of a debugWire activation failure."
);
}
}
this->avr8DebugInterface->configure(targetConfig);
if (this->avrIspInterface != nullptr) {

View File

@@ -136,6 +136,8 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
bool updateDwenFuseBitOnDebugWireFailure = false;
/**
* Users are required to set their desired physical interface in their Bloom configuration. This would take
* the form of a string, so we map the available options to the appropriate enums.
@@ -151,6 +153,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
{"updi", PhysicalInterface::UPDI},
});
};
/**
* Resolves the appropriate TDF for the AVR8 target and populates this->targetDescriptionFile.
*/