Shortened DWEN fuse bit config parameter name
This commit is contained in:
@@ -65,12 +65,12 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (targetConfig.jsonObject.contains("updateDwenFuseBitOnDebugWireFailure")) {
|
if (targetConfig.jsonObject.contains("updateDwenFuseBit")) {
|
||||||
this->updateDwenFuseBitOnDebugWireFailure = targetConfig.jsonObject.value(
|
this->updateDwenFuseBit = targetConfig.jsonObject.value(
|
||||||
"updateDwenFuseBitOnDebugWireFailure"
|
"updateDwenFuseBit"
|
||||||
).toBool();
|
).toBool();
|
||||||
|
|
||||||
if (this->updateDwenFuseBitOnDebugWireFailure
|
if (this->updateDwenFuseBit
|
||||||
&& this->avrIspInterface == nullptr
|
&& this->avrIspInterface == nullptr
|
||||||
&& this->physicalInterface == PhysicalInterface::DEBUG_WIRE
|
&& this->physicalInterface == PhysicalInterface::DEBUG_WIRE
|
||||||
) {
|
) {
|
||||||
@@ -138,7 +138,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
this->avr8DebugInterface->activate();
|
this->avr8DebugInterface->activate();
|
||||||
|
|
||||||
} catch (const Exceptions::DebugWirePhysicalInterfaceError& debugWireException) {
|
} catch (const Exceptions::DebugWirePhysicalInterfaceError& debugWireException) {
|
||||||
if (!this->updateDwenFuseBitOnDebugWireFailure) {
|
if (!this->updateDwenFuseBit) {
|
||||||
throw TargetOperationFailure(
|
throw TargetOperationFailure(
|
||||||
"Failed to activate debugWire physical interface - check target connection and DWEN fuse "
|
"Failed to activate debugWire physical interface - check target connection and DWEN fuse "
|
||||||
"bit. Bloom can set the DWEN fuse bit automatically. For instructions on enabling this function,"
|
"bit. Bloom can set the DWEN fuse bit automatically. For instructions on enabling this function,"
|
||||||
@@ -151,7 +151,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
"Failed to activate the debugWire physical interface - attempting to access target via "
|
"Failed to activate the debugWire physical interface - attempting to access target via "
|
||||||
"the ISP interface, for DWEN fuse bit inspection."
|
"the ISP interface, for DWEN fuse bit inspection."
|
||||||
);
|
);
|
||||||
this->updateDwenFuseBit(true);
|
this->writeDwenFuseBit(true);
|
||||||
|
|
||||||
} catch (const Exception& exception) {
|
} catch (const Exception& exception) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
@@ -704,7 +704,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
return this->id.value();
|
return this->id.value();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Avr8::updateDwenFuseBit(bool setFuse) {
|
void Avr8::writeDwenFuseBit(bool setFuse) {
|
||||||
if (this->avrIspInterface == nullptr) {
|
if (this->avrIspInterface == nullptr) {
|
||||||
throw Exception(
|
throw Exception(
|
||||||
"Debug tool or driver does not provide access to an ISP interface - please confirm that the "
|
"Debug tool or driver does not provide access to an ISP interface - please confirm that the "
|
||||||
|
|||||||
@@ -136,7 +136,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
|
std::map<TargetRegisterType, TargetRegisterDescriptors> targetRegisterDescriptorsByType;
|
||||||
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
|
std::map<TargetMemoryType, TargetMemoryDescriptor> targetMemoryDescriptorsByType;
|
||||||
|
|
||||||
bool updateDwenFuseBitOnDebugWireFailure = false;
|
bool updateDwenFuseBit = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Users are required to set their desired physical interface in their Bloom configuration. This would take
|
* Users are required to set their desired physical interface in their Bloom configuration. This would take
|
||||||
@@ -187,6 +187,6 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
|||||||
* @param setFuse
|
* @param setFuse
|
||||||
* True to set the fuse, false to clear it.
|
* True to set the fuse, false to clear it.
|
||||||
*/
|
*/
|
||||||
void updateDwenFuseBit(bool setFuse);
|
void writeDwenFuseBit(bool setFuse);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user