From 503605cfa00539f912d7b885d865ef399c143157 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 5 Mar 2022 18:00:34 +0000 Subject: [PATCH] AvrIspInterface extraction from the debug tool, via the Avr8 target class --- src/Targets/Microchip/AVR/AVR8/Avr8.cpp | 4 ++++ src/Targets/Microchip/AVR/AVR8/Avr8.hpp | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index 42af9225..a58f50a7 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -64,6 +64,10 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit } this->avr8DebugInterface->configure(targetConfig); + + if (this->avrIspInterface != nullptr) { + this->avrIspInterface->configure(targetConfig); + } } void Avr8::postActivationConfigure() { diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.hpp b/src/Targets/Microchip/AVR/AVR8/Avr8.hpp index 49e35a61..d886bd9c 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.hpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.hpp @@ -4,19 +4,21 @@ #include #include -#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp" #include "src/Targets/Microchip/AVR/Target.hpp" -#include "src/Targets/TargetRegister.hpp" #include "src/DebugToolDrivers/DebugTool.hpp" -#include "src/ProjectConfig.hpp" -#include "src/Exceptions/Exception.hpp" -#include "TargetParameters.hpp" +#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp" +#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp" + #include "Family.hpp" +#include "TargetParameters.hpp" #include "PadDescriptor.hpp" +#include "src/Targets/TargetRegister.hpp" #include "TargetDescription/TargetDescriptionFile.hpp" +#include "src/ProjectConfig.hpp" + namespace Bloom::Targets::Microchip::Avr::Avr8Bit { class Avr8: public Target @@ -55,6 +57,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit void setDebugTool(DebugTool* debugTool) override { this->avr8DebugInterface = debugTool->getAvr8DebugInterface(); + this->avrIspInterface = debugTool->getAvrIspInterface(); } /** @@ -120,6 +123,8 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit protected: DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* avr8DebugInterface = nullptr; + DebugToolDrivers::TargetInterfaces::Microchip::Avr::AvrIspInterface* avrIspInterface = nullptr; + std::string name; std::optional family; std::optional physicalInterface;