From 8bec04e15a1c9d84f1d2bb089e3da372f2df6c82 Mon Sep 17 00:00:00 2001 From: Nav Date: Sun, 18 Sep 2022 13:02:33 +0100 Subject: [PATCH] Renamed 'updateDwenFuseBit' AVR8 param to 'manageDwenFuseBit' --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 4 ++-- src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.cpp | 7 ++++++- src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.hpp | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 6e012e02..458ce8b5 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -92,7 +92,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit } if ( - this->targetConfig->updateDwenFuseBit && this->avrIspInterface == nullptr + this->targetConfig->manageDwenFuseBit && this->avrIspInterface == nullptr && this->targetConfig->physicalInterface == PhysicalInterface::DEBUG_WIRE ) { Logger::warning( @@ -157,7 +157,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit this->avr8DebugInterface->activate(); } catch (const Exceptions::DebugWirePhysicalInterfaceError& debugWireException) { - if (!this->targetConfig->updateDwenFuseBit) { + if (!this->targetConfig->manageDwenFuseBit) { throw TargetOperationFailure( "Failed to activate debugWire physical interface - check target connection and DWEN fuse " "bit. Bloom can manage the DWEN fuse bit automatically. For instructions on enabling this " diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.cpp index bcb62e78..1f2fa68e 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.cpp @@ -27,8 +27,13 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit this->physicalInterface = Avr8TargetConfig::debugPhysicalInterfacesByConfigName.at(physicalInterfaceName); + // The 'manageDwenFuseBit' param used to be 'updateDwenFuseBit' - we still support the old, for now. if (targetNode["updateDwenFuseBit"]) { - this->updateDwenFuseBit = targetNode["updateDwenFuseBit"].as(); + this->manageDwenFuseBit = targetNode["updateDwenFuseBit"].as(); + } + + if (targetNode["manageDwenFuseBit"]) { + this->manageDwenFuseBit = targetNode["manageDwenFuseBit"].as(); } if (targetNode["cycleTargetPowerPostDwenUpdate"]) { diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.hpp b/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.hpp index 117fb24d..913140aa 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.hpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8TargetConfig.hpp @@ -43,12 +43,12 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit bool disableDebugWireOnDeactivate = false; /** - * The updateDwenFuseBit flag determines if Bloom should manage the DWEN fuse bit, for debugWire sessions. + * The manageDwenFuseBit flag determines if Bloom should manage the DWEN fuse bit, for debugWire sessions. * * This parameter is optional, and the function is disabled by default. Users must explicitly enable it in * their target configuration. */ - bool updateDwenFuseBit = false; + bool manageDwenFuseBit = false; /** * For debug tools that provide target power management functions (such as some evaluation boards), Bloom can