Renamed Avr8Interface class to Avr8DebugInterface, in preparation for an AVR8 programming interface class

This commit is contained in:
Nav
2022-02-15 13:14:03 +00:00
parent d88e545496
commit f28ec0f162
14 changed files with 64 additions and 62 deletions

View File

@@ -1,6 +1,6 @@
#pragma once
#include "TargetInterfaces/Microchip/AVR/AVR8/Avr8Interface.hpp"
#include "TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
namespace Bloom
{
@@ -10,7 +10,8 @@ namespace Bloom
*
* Each debug tool must implement this interface. Note that target specific driver code should not be placed here.
* Each target family will expect the debug tool to provide an interface for that particular group of targets.
* For an example, see the Avr8Interface class and the DebugTool::getAvr8Interface().
* For an example, see the Avr8DebugInterface class and DebugTool::getAvr8DebugInterface(), for the family of AVR
* 8-bit targets.
*/
class DebugTool
{
@@ -39,16 +40,16 @@ namespace Bloom
virtual std::string getSerialNumber() = 0;
/**
* All debug tools that support AVR8 targets must provide an implementation of the Avr8Interface
* class, via this method.
* All debug tools that support debugging operations on AVR8 targets must provide an implementation of
* the Avr8DebugInterface class, via this function.
*
* For debug tools that do not support AVR8 targets, this method should return a nullptr.
* For debug tools that do not support debugging on AVR8 targets, this function should return a nullptr.
*
* Note: the caller of this method will not manage the lifetime of the returned Avr8Interface instance.
* Note: the caller of this function will not manage the lifetime of the returned Avr8DebugInterface instance.
*
* @return
*/
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() {
virtual DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() {
return nullptr;
};

View File

@@ -54,7 +54,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -40,7 +40,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -42,7 +42,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -48,7 +48,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -41,7 +41,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -40,7 +40,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -40,7 +40,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -40,7 +40,7 @@ namespace Bloom::DebugToolDrivers
return this->edbgInterface;
}
TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface* getAvr8Interface() override {
TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface* getAvr8DebugInterface() override {
return this->edbgAvr8Interface.get();
}

View File

@@ -5,7 +5,7 @@
#include <thread>
#include <cassert>
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8Interface.hpp"
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Avr8Generic.hpp"
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp"
#include "src/Targets/Microchip/AVR/Target.hpp"
@@ -15,15 +15,15 @@
namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
{
/**
* The EdbgAvr8Interface implements the AVR8 Generic EDBG/CMSIS-DAP protocol, as an Avr8Interface.
* The EdbgAvr8Interface implements the AVR8 Generic EDBG/CMSIS-DAP protocol, as an Avr8DebugInterface.
*
* See the "AVR8 Generic Protocol" section in the DS50002630A document by Microchip, for more information on the
* protocol.
*
* This implementation should work with any Microchip EDBG based CMSIS-DAP debug tool (such as the Atmel-ICE,
* Power Debugger and the MPLAB SNAP debugger (in "AVR mode")).
* This implementation should work with any Microchip EDBG-based CMSIS-DAP debug tool (such as the Atmel-ICE,
* Power Debugger, the MPLAB SNAP debugger (in "AVR mode"), etc).
*/
class EdbgAvr8Interface: public TargetInterfaces::Microchip::Avr::Avr8::Avr8Interface
class EdbgAvr8Interface: public TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface
{
public:
explicit EdbgAvr8Interface(EdbgInterface& edbgInterface)

View File

@@ -14,26 +14,27 @@
namespace Bloom::DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8
{
/**
* Interfacing with an AVR8 target can vary significantly, depending on the debug tool being used.
* Interfacing with an AVR8 target for debugging operations can vary significantly, depending on the debug tool
* being used. Some debug tools employ different protocols.
*
* This class describes the interface required for interfacing with AVR8 targets.
* This class describes the interface required for interfacing with AVR8 targets, for debugging operations.
*
* Each debug tool that supports interfacing with AVR8 targets must provide an implementation
* of this interface class. For example, the Atmel-ICE provides the EdbgAvr8Interface implementation for
* interfacing with AVR8 targets. See Bloom::DebugToolDrivers::AtmelIce::getAvr8Interface() and
* Bloom::DebugTool::getAvr8Interface() for more on this.
* interfacing with AVR8 targets. See Bloom::DebugToolDrivers::AtmelIce::getAvr8DebugInterface() and
* Bloom::DebugTool::getAvr8DebugInterface() for more on this.
*/
class Avr8Interface
class Avr8DebugInterface
{
public:
Avr8Interface() = default;
virtual ~Avr8Interface() = default;
Avr8DebugInterface() = default;
virtual ~Avr8DebugInterface() = default;
Avr8Interface(const Avr8Interface& other) = default;
Avr8Interface(Avr8Interface&& other) = default;
Avr8DebugInterface(const Avr8DebugInterface& other) = default;
Avr8DebugInterface(Avr8DebugInterface&& other) = default;
Avr8Interface& operator = (const Avr8Interface& other) = default;
Avr8Interface& operator = (Avr8Interface&& other) = default;
Avr8DebugInterface& operator = (const Avr8DebugInterface& other) = default;
Avr8DebugInterface& operator = (Avr8DebugInterface&& other) = default;
/**
* Configures the interface. Any debug tool -> target interface specific configuration should take