From 494729a285a84c108c27e5584eba84e128ca0151 Mon Sep 17 00:00:00 2001 From: Nav Date: Sat, 5 Mar 2022 18:06:40 +0000 Subject: [PATCH] EDBG AvrIspInterface implementation added for the MPLAB Snap --- .../Microchip/MplabSnap/MplabSnap.cpp | 2 ++ .../Microchip/MplabSnap/MplabSnap.hpp | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp index d9ef9833..d4ece073 100644 --- a/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp +++ b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp @@ -31,6 +31,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/MplabSnap/MplabSnap.hpp b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.hpp index b86cdd7f..08d0970d 100644 --- a/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.hpp +++ b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.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 @@ -52,6 +53,10 @@ namespace Bloom::DebugToolDrivers return this->edbgAvr8Interface.get(); } + TargetInterfaces::Microchip::Avr::AvrIspInterface* getAvrIspInterface() override { + return this->edbgAvrIspInterface.get(); + } + std::string getName() override { return "MPLAB Snap"; }; @@ -82,6 +87,12 @@ namespace Bloom::DebugToolDrivers */ std::unique_ptr edbgAvr8Interface = nullptr; + /** + * The MPLAB Snap 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; }; }