From 5e1d05ef7f211c5da484daa7c657d0ae33ab20ff Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 5 Mar 2022 17:57:57 +0000 Subject: [PATCH] Added EDBG AvrIspInterface implementation to AtmelIce debug tool class --- src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp | 2 ++ src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.hpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp b/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp index 9aae9eae..0a17e6e3 100644 --- a/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp +++ b/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.cpp @@ -39,6 +39,8 @@ namespace Bloom::DebugToolDrivers } this->edbgAvr8Interface = std::make_unique(this->edbgInterface); + this->edbgAvrIspInterface = std::make_unique(this->edbgInterface); + this->setInitialised(true); } diff --git a/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.hpp b/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.hpp index ffd638cc..cd43e03c 100644 --- a/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.hpp +++ b/src/DebugToolDrivers/Microchip/AtmelICE/AtmelIce.hpp @@ -10,6 +10,7 @@ #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.hpp" +#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvrIspInterface.hpp" #include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrames.hpp" namespace Bloom::DebugToolDrivers @@ -58,6 +59,10 @@ namespace Bloom::DebugToolDrivers return this->edbgAvr8Interface.get(); } + TargetInterfaces::Microchip::Avr::AvrIspInterface* getAvrIspInterface() override { + return this->edbgAvrIspInterface.get(); + } + std::string getName() override { return "Atmel-ICE"; }; @@ -96,6 +101,12 @@ namespace Bloom::DebugToolDrivers */ std::unique_ptr edbgAvr8Interface = nullptr; + /** + * The Atmel-ICE employs the EDBG AVRISP protocol, for interfacing with AVR targets via the ISP interface. + * See the EdbgAvrIspInterface class for the protocol implementation. + */ + std::unique_ptr edbgAvrIspInterface = nullptr; + bool sessionStarted = false; }; }