From 264cd8304896446eda8492287dadcff25d655cb1 Mon Sep 17 00:00:00 2001 From: Nav Date: Fri, 26 May 2023 23:07:17 +0100 Subject: [PATCH] Corrected premature DWEN fuse bit management warning (regression from previous refactor) --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index c12fb8db..bf0178eb 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -94,17 +94,6 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit ); } - if ( - this->targetConfig.manageDwenFuseBit - && this->avrIspInterface == nullptr - && this->targetConfig.physicalInterface == PhysicalInterface::DEBUG_WIRE - ) { - Logger::warning( - "The connected debug tool (or associated driver) does not provide any ISP interface. " - "Bloom will be unable to manage the DWEN fuse bit." - ); - } - if ( this->targetConfig.manageOcdenFuseBit && this->targetConfig.physicalInterface != PhysicalInterface::JTAG @@ -143,6 +132,17 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit if (this->avrIspInterface != nullptr) { this->avrIspInterface->configure(this->targetConfig); } + + if ( + this->targetConfig.manageDwenFuseBit + && this->avrIspInterface == nullptr + && this->targetConfig.physicalInterface == PhysicalInterface::DEBUG_WIRE + ) { + Logger::warning( + "The connected debug tool (or associated driver) does not provide any ISP interface. " + "Bloom will be unable to manage the DWEN fuse bit." + ); + } } void Avr8::activate() {