Moved EDBG protocol code to more appropriate directory.
Updated necessary namespaces. Other bits of tidying.
This commit is contained in:
@@ -3,6 +3,25 @@ target_sources(
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/USB/UsbDevice.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/USB/UsbDevice.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/USB/HID/HidInterface.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/USB/HID/HidInterface.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/CmsisDapInterface.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/Command.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/Response.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/AvrCommand.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/CommandFrames/AVR8Generic/ReadMemory.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/AvrResponse.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVR8Generic/GetDeviceId.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/Discovery/DiscoveryResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/HouseKeeping/HouseKeepingResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVRISP/AvrIspResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/ResponseFrames/EDBGControl/EdbgControlResponseFrame.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/AvrEvent.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/EdbgInterface.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/EdbgTargetPowerManagementInterface.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/EdbgAvr8Interface.cpp
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/Protocols/EDBG/AVR/EdbgAvrIspInterface.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/EdbgDevice.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/EdbgDevice.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/AtmelICE/AtmelIce.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/AtmelICE/AtmelIce.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/PowerDebugger/PowerDebugger.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/PowerDebugger/PowerDebugger.cpp
|
||||||
@@ -13,23 +32,4 @@ target_sources(
|
|||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/XplainedNano/XplainedNano.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/XplainedNano/XplainedNano.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/CuriosityNano/CuriosityNano.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/CuriosityNano/CuriosityNano.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/JtagIce3/JtagIce3.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/Microchip/JtagIce3/JtagIce3.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/CmsisDapInterface.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/Command.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/Response.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ReadMemory.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVR8Generic/GetDeviceId.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/Discovery/DiscoveryResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/HouseKeeping/HouseKeepingResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVRISP/AvrIspResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/EDBGControl/EdbgControlResponseFrame.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgTargetPowerManagementInterface.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvrIspInterface.cpp
|
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -1,18 +1,17 @@
|
|||||||
#include "EdbgDevice.hpp"
|
#include "EdbgDevice.hpp"
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/USB/HID/HidInterface.hpp"
|
#include "src/DebugToolDrivers/USB/HID/HidInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrames.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrames.hpp"
|
||||||
|
|
||||||
#include "src/TargetController/Exceptions/DeviceFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceFailure.hpp"
|
||||||
#include "src/TargetController/Exceptions/DeviceInitializationFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceInitializationFailure.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers
|
namespace DebugToolDrivers
|
||||||
{
|
{
|
||||||
using namespace Protocols::CmsisDap::Edbg::Avr;
|
using namespace Microchip::Protocols::Edbg::Avr;
|
||||||
using namespace Exceptions;
|
|
||||||
|
|
||||||
using Protocols::CmsisDap::Edbg::EdbgInterface;
|
using Exceptions::DeviceFailure;
|
||||||
using Protocols::CmsisDap::Edbg::EdbgTargetPowerManagementInterface;
|
using Exceptions::DeviceInitializationFailure;
|
||||||
|
|
||||||
EdbgDevice::EdbgDevice(
|
EdbgDevice::EdbgDevice(
|
||||||
std::uint16_t vendorId,
|
std::uint16_t vendorId,
|
||||||
@@ -28,6 +27,9 @@ namespace DebugToolDrivers
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
void EdbgDevice::init() {
|
void EdbgDevice::init() {
|
||||||
|
using Microchip::Protocols::Edbg::EdbgInterface;
|
||||||
|
using Microchip::Protocols::Edbg::EdbgTargetPowerManagementInterface;
|
||||||
|
|
||||||
UsbDevice::init();
|
UsbDevice::init();
|
||||||
|
|
||||||
this->detachKernelDriverFromInterface(this->cmsisHidInterfaceNumber);
|
this->detachKernelDriverFromInterface(this->cmsisHidInterfaceNumber);
|
||||||
|
|||||||
@@ -7,10 +7,10 @@
|
|||||||
#include "src/DebugToolDrivers/DebugTool.hpp"
|
#include "src/DebugToolDrivers/DebugTool.hpp"
|
||||||
#include "src/DebugToolDrivers/USB/UsbDevice.hpp"
|
#include "src/DebugToolDrivers/USB/UsbDevice.hpp"
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp"
|
#include "Protocols/EDBG/EdbgInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.hpp"
|
#include "Protocols/EDBG/AVR/EdbgAvr8Interface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvrIspInterface.hpp"
|
#include "Protocols/EDBG/AVR/EdbgAvrIspInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgTargetPowerManagementInterface.hpp"
|
#include "Protocols/EDBG/EdbgTargetPowerManagementInterface.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers
|
namespace DebugToolDrivers
|
||||||
{
|
{
|
||||||
@@ -112,7 +112,7 @@ namespace DebugToolDrivers
|
|||||||
* The EdbgInterface class provides the ability to communicate with the EDBG device, using any of the EDBG
|
* The EdbgInterface class provides the ability to communicate with the EDBG device, using any of the EDBG
|
||||||
* sub-protocols.
|
* sub-protocols.
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Protocols::CmsisDap::Edbg::EdbgInterface> edbgInterface = nullptr;
|
std::unique_ptr<Microchip::Protocols::Edbg::EdbgInterface> edbgInterface = nullptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The EdbgAvr8Interface class implements the AVR8 Generic EDBG sub-protocol. This protocol is used to perform
|
* The EdbgAvr8Interface class implements the AVR8 Generic EDBG sub-protocol. This protocol is used to perform
|
||||||
@@ -120,7 +120,7 @@ namespace DebugToolDrivers
|
|||||||
*
|
*
|
||||||
* The class implements the Avr8DebugInterface.
|
* The class implements the Avr8DebugInterface.
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Protocols::CmsisDap::Edbg::Avr::EdbgAvr8Interface> edbgAvr8Interface = nullptr;
|
std::unique_ptr<Microchip::Protocols::Edbg::Avr::EdbgAvr8Interface> edbgAvr8Interface = nullptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The EdbgAvrIspInterface class implements the AVRISP EDBG sub-protocol, for interfacing with AVR targets via
|
* The EdbgAvrIspInterface class implements the AVRISP EDBG sub-protocol, for interfacing with AVR targets via
|
||||||
@@ -133,7 +133,7 @@ namespace DebugToolDrivers
|
|||||||
* targets. We use the interface to inspect and update the "debugWire enable" (DWEN) fuse-bit, before making a
|
* targets. We use the interface to inspect and update the "debugWire enable" (DWEN) fuse-bit, before making a
|
||||||
* second connection attempt via the debugWire interface.
|
* second connection attempt via the debugWire interface.
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<Protocols::CmsisDap::Edbg::Avr::EdbgAvrIspInterface> edbgAvrIspInterface = nullptr;
|
std::unique_ptr<Microchip::Protocols::Edbg::Avr::EdbgAvrIspInterface> edbgAvrIspInterface = nullptr;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The EdbgTargetPowerManagementInterface class implements the "EDBG Control" (EDBG_CTRL) sub-protocol, to
|
* The EdbgTargetPowerManagementInterface class implements the "EDBG Control" (EDBG_CTRL) sub-protocol, to
|
||||||
@@ -143,7 +143,7 @@ namespace DebugToolDrivers
|
|||||||
* EdbgDevice::getTargetPowerManagementInterface() member function.
|
* EdbgDevice::getTargetPowerManagementInterface() member function.
|
||||||
*/
|
*/
|
||||||
std::unique_ptr<
|
std::unique_ptr<
|
||||||
Protocols::CmsisDap::Edbg::EdbgTargetPowerManagementInterface
|
Microchip::Protocols::Edbg::EdbgTargetPowerManagementInterface
|
||||||
> targetPowerManagementInterface = nullptr;
|
> targetPowerManagementInterface = nullptr;
|
||||||
|
|
||||||
bool sessionStarted = false;
|
bool sessionStarted = false;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
struct Avr8EdbgParameter
|
struct Avr8EdbgParameter
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "AvrCommand.hpp"
|
#include "AvrCommand.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
AvrCommand::AvrCommand(
|
AvrCommand::AvrCommand(
|
||||||
std::size_t fragmentCount,
|
std::size_t fragmentCount,
|
||||||
@@ -7,12 +7,12 @@
|
|||||||
|
|
||||||
#include "AvrResponse.hpp"
|
#include "AvrResponse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* AVR CMSIS-DAP vendor command.
|
* AVR CMSIS-DAP vendor command.
|
||||||
*/
|
*/
|
||||||
class AvrCommand: public Command
|
class AvrCommand: public ::DebugToolDrivers::Protocols::CmsisDap::Command
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
/*
|
/*
|
||||||
@@ -26,7 +26,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
|||||||
*
|
*
|
||||||
* For more on the purpose of this alias, see the Command class.
|
* For more on the purpose of this alias, see the Command class.
|
||||||
*/
|
*/
|
||||||
using ExpectedResponseType = Response;
|
using ExpectedResponseType = ::DebugToolDrivers::Protocols::CmsisDap::Response;
|
||||||
|
|
||||||
AvrCommand(
|
AvrCommand(
|
||||||
std::size_t fragmentCount,
|
std::size_t fragmentCount,
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -5,14 +5,14 @@
|
|||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp"
|
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
enum class AvrEventId: unsigned char
|
enum class AvrEventId: unsigned char
|
||||||
{
|
{
|
||||||
AVR8_BREAK_EVENT = 0x40,
|
AVR8_BREAK_EVENT = 0x40,
|
||||||
};
|
};
|
||||||
|
|
||||||
class AvrEvent: public Response
|
class AvrEvent: public ::DebugToolDrivers::Protocols::CmsisDap::Response
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::optional<AvrEventId> eventId = std::nullopt;
|
std::optional<AvrEventId> eventId = std::nullopt;
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
||||||
#include "AvrEvent.hpp"
|
#include "AvrEvent.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
class AvrEventCommand: public Command
|
class AvrEventCommand: public ::DebugToolDrivers::Protocols::CmsisDap::Command
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using ExpectedResponseType = AvrEvent;
|
using ExpectedResponseType = AvrEvent;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp"
|
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
class AvrResponse: public Response
|
class AvrResponse: public ::DebugToolDrivers::Protocols::CmsisDap::Response
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::uint8_t fragmentNumber = 0;
|
std::uint8_t fragmentNumber = 0;
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "AvrResponse.hpp"
|
#include "AvrResponse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* All AVR commands result in an automatic response, but that is just a response to confirm
|
* All AVR commands result in an automatic response, but that is just a response to confirm
|
||||||
@@ -23,7 +23,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
|||||||
*
|
*
|
||||||
* An AvrResponseCommand is very simple - it consists of a command ID and nothing more.
|
* An AvrResponseCommand is very simple - it consists of a command ID and nothing more.
|
||||||
*/
|
*/
|
||||||
class AvrResponseCommand: public Command
|
class AvrResponseCommand: public ::DebugToolDrivers::Protocols::CmsisDap::Command
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using ExpectedResponseType = AvrResponse;
|
using ExpectedResponseType = AvrResponse;
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ActivatePhysical: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
class ActivatePhysical: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Attach: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
class Attach: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Avr8Generic.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Avr8Generic.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
template<class PayloadContainerType>
|
template<class PayloadContainerType>
|
||||||
class Avr8GenericCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
class Avr8GenericCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ClearAllSoftwareBreakpoints: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class ClearAllSoftwareBreakpoints: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ClearHardwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
class ClearHardwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ClearSoftwareBreakpoints: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
class ClearSoftwareBreakpoints: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class DeactivatePhysical: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class DeactivatePhysical: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Detach: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class Detach: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class DisableDebugWire: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class DisableDebugWire: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class EnterProgrammingMode: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class EnterProgrammingMode: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class EraseMemory: public Avr8GenericCommandFrame<std::array<unsigned char, 7>>
|
class EraseMemory: public Avr8GenericCommandFrame<std::array<unsigned char, 7>>
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
#include "../../ResponseFrames/AVR8Generic/GetDeviceId.hpp"
|
#include "../../ResponseFrames/AVR8Generic/GetDeviceId.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class GetDeviceId: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class GetDeviceId: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class GetParameter: public Avr8GenericCommandFrame<std::array<unsigned char, 5>>
|
class GetParameter: public Avr8GenericCommandFrame<std::array<unsigned char, 5>>
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
#include "../../ResponseFrames/AVR8Generic/GetProgramCounter.hpp"
|
#include "../../ResponseFrames/AVR8Generic/GetProgramCounter.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class GetProgramCounter: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class GetProgramCounter: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class LeaveProgrammingMode: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class LeaveProgrammingMode: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include <bitset>
|
#include <bitset>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
ReadMemory::ReadMemory(
|
ReadMemory::ReadMemory(
|
||||||
const Avr8MemoryType& type,
|
const Avr8MemoryType& type,
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
#include "../../ResponseFrames/AVR8Generic/ReadMemory.hpp"
|
#include "../../ResponseFrames/AVR8Generic/ReadMemory.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ReadMemory: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
class ReadMemory: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Reset: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
class Reset: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Run: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
class Run: public Avr8GenericCommandFrame<std::array<unsigned char, 2>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class RunTo: public Avr8GenericCommandFrame<std::array<unsigned char, 6>>
|
class RunTo: public Avr8GenericCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class SetHardwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 9>>
|
class SetHardwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 9>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class SetParameter: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
class SetParameter: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class SetProgramCounter: public Avr8GenericCommandFrame<std::array<unsigned char, 6>>
|
class SetProgramCounter: public Avr8GenericCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class SetSoftwareBreakpoints: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
class SetSoftwareBreakpoints: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class SetXmegaSoftwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 15>>
|
class SetXmegaSoftwareBreakpoint: public Avr8GenericCommandFrame<std::array<unsigned char, 15>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Step: public Avr8GenericCommandFrame<std::array<unsigned char, 4>>
|
class Step: public Avr8GenericCommandFrame<std::array<unsigned char, 4>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Stop: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
class Stop: public Avr8GenericCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "Avr8GenericCommandFrame.hpp"
|
#include "Avr8GenericCommandFrame.hpp"
|
||||||
#include "src/Targets/TargetMemory.hpp"
|
#include "src/Targets/TargetMemory.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class WriteMemory: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
class WriteMemory: public Avr8GenericCommandFrame<std::vector<unsigned char>>
|
||||||
{
|
{
|
||||||
@@ -1,11 +1,11 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Avr8Generic.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Avr8Generic.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVRISP/AvrIspResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVRISP/AvrIspResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
template<class PayloadContainerType>
|
template<class PayloadContainerType>
|
||||||
class AvrIspCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
class AvrIspCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "AvrIspCommandFrame.hpp"
|
#include "AvrIspCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class EnterProgrammingMode: public AvrIspCommandFrame<std::array<unsigned char, 12>>
|
class EnterProgrammingMode: public AvrIspCommandFrame<std::array<unsigned char, 12>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "AvrIspCommandFrame.hpp"
|
#include "AvrIspCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class LeaveProgrammingMode: public AvrIspCommandFrame<std::array<unsigned char, 3>>
|
class LeaveProgrammingMode: public AvrIspCommandFrame<std::array<unsigned char, 3>>
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class ProgramFuse: public AvrIspCommandFrame<std::array<unsigned char, 5>>
|
class ProgramFuse: public AvrIspCommandFrame<std::array<unsigned char, 5>>
|
||||||
{
|
{
|
||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class ReadFuse: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
class ReadFuse: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "AvrIspCommandFrame.hpp"
|
#include "AvrIspCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class ReadLock: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
class ReadLock: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
#include "src/Targets/Microchip/AVR/Fuse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::AvrIsp
|
||||||
{
|
{
|
||||||
class ReadSignature: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
class ReadSignature: public AvrIspCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -9,11 +9,11 @@
|
|||||||
#include <array>
|
#include <array>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/Edbg.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/AvrCommand.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
static inline std::atomic<std::uint16_t> lastSequenceId = 0;
|
static inline std::atomic<std::uint16_t> lastSequenceId = 0;
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/Discovery/DiscoveryResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/Discovery/DiscoveryResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Discovery
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Discovery
|
||||||
{
|
{
|
||||||
template<class PayloadContainerType>
|
template<class PayloadContainerType>
|
||||||
class DiscoveryCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
class DiscoveryCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "DiscoveryCommandFrame.hpp"
|
#include "DiscoveryCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::Discovery
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::Discovery
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The query context is the type of query to execute.
|
* The query context is the type of query to execute.
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/EDBGControl/EdbgControlResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/EDBGControl/EdbgControlResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::EdbgControl
|
||||||
{
|
{
|
||||||
template<class PayloadContainerType>
|
template<class PayloadContainerType>
|
||||||
class EdbgControlCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
class EdbgControlCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "EdbgControlCommandFrame.hpp"
|
#include "EdbgControlCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::EdbgControl
|
||||||
{
|
{
|
||||||
class GetParameter: public EdbgControlCommandFrame<std::array<unsigned char, 5>>
|
class GetParameter: public EdbgControlCommandFrame<std::array<unsigned char, 5>>
|
||||||
{
|
{
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
#include "EdbgControlCommandFrame.hpp"
|
#include "EdbgControlCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::EdbgControl
|
||||||
{
|
{
|
||||||
class SetParameter: public EdbgControlCommandFrame<std::array<unsigned char, 6>>
|
class SetParameter: public EdbgControlCommandFrame<std::array<unsigned char, 6>>
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "HouseKeepingCommandFrame.hpp"
|
#include "HouseKeepingCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The End Session command ends the active session with the tool.
|
* The End Session command ends the active session with the tool.
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "HouseKeepingCommandFrame.hpp"
|
#include "HouseKeepingCommandFrame.hpp"
|
||||||
#include "Parameters.hpp"
|
#include "Parameters.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
class GetParameter: public HouseKeepingCommandFrame<std::array<unsigned char, 5>>
|
class GetParameter: public HouseKeepingCommandFrame<std::array<unsigned char, 5>>
|
||||||
{
|
{
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/HouseKeeping/HouseKeepingResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/HouseKeeping/HouseKeepingResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
template<class PayloadContainerType>
|
template<class PayloadContainerType>
|
||||||
class HouseKeepingCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
class HouseKeepingCommandFrame: public AvrCommandFrame<PayloadContainerType>
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "HouseKeepingCommandFrame.hpp"
|
#include "HouseKeepingCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
enum class ParameterContext: unsigned char
|
enum class ParameterContext: unsigned char
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "HouseKeepingCommandFrame.hpp"
|
#include "HouseKeepingCommandFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::CommandFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::CommandFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The Start Session command begins a session with the tool.
|
* The Start Session command begins a session with the tool.
|
||||||
@@ -8,42 +8,41 @@
|
|||||||
#include "src/Services/StringService.hpp"
|
#include "src/Services/StringService.hpp"
|
||||||
#include "src/Logger/Logger.hpp"
|
#include "src/Logger/Logger.hpp"
|
||||||
|
|
||||||
#include "src/Exceptions/InvalidConfig.hpp"
|
#include "Exceptions/Avr8CommandFailure.hpp"
|
||||||
#include "src/TargetController/Exceptions/DeviceInitializationFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceInitializationFailure.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Exceptions/Avr8CommandFailure.hpp"
|
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/Exceptions/DebugWirePhysicalInterfaceError.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/Exceptions/DebugWirePhysicalInterfaceError.hpp"
|
||||||
|
|
||||||
// Command frames
|
// Command frames
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetParameter.hpp"
|
#include "CommandFrames/AVR8Generic/SetParameter.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/GetParameter.hpp"
|
#include "CommandFrames/AVR8Generic/GetParameter.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ActivatePhysical.hpp"
|
#include "CommandFrames/AVR8Generic/ActivatePhysical.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/DeactivatePhysical.hpp"
|
#include "CommandFrames/AVR8Generic/DeactivatePhysical.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Attach.hpp"
|
#include "CommandFrames/AVR8Generic/Attach.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Detach.hpp"
|
#include "CommandFrames/AVR8Generic/Detach.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Stop.hpp"
|
#include "CommandFrames/AVR8Generic/Stop.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Step.hpp"
|
#include "CommandFrames/AVR8Generic/Step.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Run.hpp"
|
#include "CommandFrames/AVR8Generic/Run.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/RunTo.hpp"
|
#include "CommandFrames/AVR8Generic/RunTo.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/GetDeviceId.hpp"
|
#include "CommandFrames/AVR8Generic/GetDeviceId.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/Reset.hpp"
|
#include "CommandFrames/AVR8Generic/Reset.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ReadMemory.hpp"
|
#include "CommandFrames/AVR8Generic/ReadMemory.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/WriteMemory.hpp"
|
#include "CommandFrames/AVR8Generic/WriteMemory.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/GetProgramCounter.hpp"
|
#include "CommandFrames/AVR8Generic/GetProgramCounter.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetProgramCounter.hpp"
|
#include "CommandFrames/AVR8Generic/SetProgramCounter.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/DisableDebugWire.hpp"
|
#include "CommandFrames/AVR8Generic/DisableDebugWire.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetSoftwareBreakpoints.hpp"
|
#include "CommandFrames/AVR8Generic/SetSoftwareBreakpoints.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ClearAllSoftwareBreakpoints.hpp"
|
#include "CommandFrames/AVR8Generic/ClearAllSoftwareBreakpoints.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ClearSoftwareBreakpoints.hpp"
|
#include "CommandFrames/AVR8Generic/ClearSoftwareBreakpoints.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/SetHardwareBreakpoint.hpp"
|
#include "CommandFrames/AVR8Generic/SetHardwareBreakpoint.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/ClearHardwareBreakpoint.hpp"
|
#include "CommandFrames/AVR8Generic/ClearHardwareBreakpoint.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/EnterProgrammingMode.hpp"
|
#include "CommandFrames/AVR8Generic/EnterProgrammingMode.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/LeaveProgrammingMode.hpp"
|
#include "CommandFrames/AVR8Generic/LeaveProgrammingMode.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVR8Generic/EraseMemory.hpp"
|
#include "CommandFrames/AVR8Generic/EraseMemory.hpp"
|
||||||
|
|
||||||
// AVR events
|
// AVR events
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Events/AVR8Generic/BreakEvent.hpp"
|
#include "Events/AVR8Generic/BreakEvent.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Targets::Microchip::Avr;
|
using namespace Targets::Microchip::Avr;
|
||||||
using namespace Avr8Bit;
|
using namespace Avr8Bit;
|
||||||
@@ -7,15 +7,17 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
|
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AVR8/Avr8DebugInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Avr8Generic.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/EdbgInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp"
|
|
||||||
|
#include "Avr8Generic.hpp"
|
||||||
|
|
||||||
#include "src/Targets/TargetMemory.hpp"
|
#include "src/Targets/TargetMemory.hpp"
|
||||||
#include "src/Targets/TargetRegister.hpp"
|
#include "src/Targets/TargetRegister.hpp"
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/Family.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/Family.hpp"
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The EdbgAvr8Interface implements the AVR8 Generic EDBG/CMSIS-DAP protocol, as an Avr8DebugInterface.
|
* The EdbgAvr8Interface implements the AVR8 Generic EDBG/CMSIS-DAP protocol, as an Avr8DebugInterface.
|
||||||
@@ -26,7 +28,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
|||||||
* This implementation should work with any Microchip EDBG-based CMSIS-DAP debug tool (such as the Atmel-ICE,
|
* 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).
|
* Power Debugger, the MPLAB SNAP debugger (in "AVR mode"), etc).
|
||||||
*/
|
*/
|
||||||
class EdbgAvr8Interface: public TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface
|
class EdbgAvr8Interface: public ::DebugToolDrivers::TargetInterfaces::Microchip::Avr::Avr8::Avr8DebugInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit EdbgAvr8Interface(
|
explicit EdbgAvr8Interface(
|
||||||
@@ -4,14 +4,14 @@
|
|||||||
#include "src/Logger/Logger.hpp"
|
#include "src/Logger/Logger.hpp"
|
||||||
|
|
||||||
// Command frames
|
// Command frames
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/EnterProgrammingMode.hpp"
|
#include "CommandFrames/AVRISP/EnterProgrammingMode.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/LeaveProgrammingMode.hpp"
|
#include "CommandFrames/AVRISP/LeaveProgrammingMode.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadSignature.hpp"
|
#include "CommandFrames/AVRISP/ReadSignature.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadFuse.hpp"
|
#include "CommandFrames/AVRISP/ReadFuse.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ReadLock.hpp"
|
#include "CommandFrames/AVRISP/ReadLock.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AVRISP/ProgramFuse.hpp"
|
#include "CommandFrames/AVRISP/ProgramFuse.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Targets::Microchip::Avr;
|
using namespace Targets::Microchip::Avr;
|
||||||
|
|
||||||
@@ -6,9 +6,9 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp"
|
#include "src/DebugToolDrivers/TargetInterfaces/Microchip/AVR/AvrIspInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/EdbgInterface.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The EdbgAvrIspInterface implements the AVRISP EDBG/CMSIS-DAP protocol, as an AvrIspInterface.
|
* The EdbgAvrIspInterface implements the AVRISP EDBG/CMSIS-DAP protocol, as an AvrIspInterface.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/AvrEvent.hpp"
|
||||||
#include "src/Targets/TargetBreakpoint.hpp"
|
#include "src/Targets/TargetBreakpoint.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
class BreakEvent: public AvrEvent
|
class BreakEvent: public AvrEvent
|
||||||
{
|
{
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
#include <optional>
|
#include <optional>
|
||||||
|
|
||||||
#include "src/TargetController/Exceptions/TargetOperationFailure.hpp"
|
#include "src/TargetController/Exceptions/TargetOperationFailure.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AVR8Generic/Avr8GenericResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
enum class Avr8CommandFailureCode: std::uint8_t
|
enum class Avr8CommandFailureCode: std::uint8_t
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/Avr8Generic.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Avr8Generic.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class Avr8GenericResponseFrame: public AvrResponseFrame
|
class Avr8GenericResponseFrame: public AvrResponseFrame
|
||||||
{
|
{
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#include "GetDeviceId.hpp"
|
#include "GetDeviceId.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
GetDeviceId::GetDeviceId(const std::vector<AvrResponse>& AvrResponses)
|
GetDeviceId::GetDeviceId(const std::vector<AvrResponse>& AvrResponses)
|
||||||
: Avr8GenericResponseFrame(AvrResponses)
|
: Avr8GenericResponseFrame(AvrResponses)
|
||||||
@@ -5,7 +5,7 @@
|
|||||||
#include "src/Targets/Microchip/AVR/TargetSignature.hpp"
|
#include "src/Targets/Microchip/AVR/TargetSignature.hpp"
|
||||||
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
#include "src/Targets/Microchip/AVR/AVR8/PhysicalInterface.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class GetDeviceId: public Avr8GenericResponseFrame
|
class GetDeviceId: public Avr8GenericResponseFrame
|
||||||
{
|
{
|
||||||
@@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class GetProgramCounter: public Avr8GenericResponseFrame
|
class GetProgramCounter: public Avr8GenericResponseFrame
|
||||||
{
|
{
|
||||||
@@ -3,7 +3,7 @@
|
|||||||
#include "Avr8GenericResponseFrame.hpp"
|
#include "Avr8GenericResponseFrame.hpp"
|
||||||
#include "src/Targets/TargetMemory.hpp"
|
#include "src/Targets/TargetMemory.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Avr8Generic
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Avr8Generic
|
||||||
{
|
{
|
||||||
class ReadMemory: public Avr8GenericResponseFrame
|
class ReadMemory: public Avr8GenericResponseFrame
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::AvrIsp
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::AvrIsp
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::AvrIsp
|
||||||
{
|
{
|
||||||
enum class StatusCode: unsigned char
|
enum class StatusCode: unsigned char
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -5,11 +5,10 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/Edbg.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/Edbg.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/AvrResponse.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp"
|
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr
|
||||||
{
|
{
|
||||||
class AvrResponseFrame
|
class AvrResponseFrame
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Discovery
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Discovery
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::Discovery
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::Discovery
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Discovery commands can only return two responses; A LIST response and a failure.
|
* Discovery commands can only return two responses; A LIST response and a failure.
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::EdbgControl
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::EdbgControl
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::EdbgControl
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::EdbgControl
|
||||||
{
|
{
|
||||||
enum class EdbgControlResponseId: unsigned char
|
enum class EdbgControlResponseId: unsigned char
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include "src/Exceptions/Exception.hpp"
|
#include "src/Exceptions/Exception.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr::ResponseFrames::HouseKeeping
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::ResponseFrames::HouseKeeping
|
||||||
{
|
{
|
||||||
enum class ResponseId: unsigned char
|
enum class ResponseId: unsigned char
|
||||||
{
|
{
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg
|
||||||
{
|
{
|
||||||
enum class ProtocolHandlerId: unsigned char
|
enum class ProtocolHandlerId: unsigned char
|
||||||
{
|
{
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
@@ -12,7 +12,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
: CmsisDapInterface(std::move(cmsisHidInterface))
|
: CmsisDapInterface(std::move(cmsisHidInterface))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
Protocols::CmsisDap::Response EdbgInterface::sendAvrCommandsAndWaitForResponse(
|
::DebugToolDrivers::Protocols::CmsisDap::Response EdbgInterface::sendAvrCommandsAndWaitForResponse(
|
||||||
const std::vector<Avr::AvrCommand>& avrCommands
|
const std::vector<Avr::AvrCommand>& avrCommands
|
||||||
) {
|
) {
|
||||||
for (const auto& avrCommand : avrCommands) {
|
for (const auto& avrCommand : avrCommands) {
|
||||||
@@ -30,7 +30,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::optional<Protocols::CmsisDap::Edbg::Avr::AvrEvent> EdbgInterface::requestAvrEvent() {
|
std::optional<Microchip::Protocols::Edbg::Avr::AvrEvent> EdbgInterface::requestAvrEvent() {
|
||||||
auto avrEventResponse = this->sendCommandAndWaitForResponse(Avr::AvrEventCommand());
|
auto avrEventResponse = this->sendCommandAndWaitForResponse(Avr::AvrEventCommand());
|
||||||
|
|
||||||
if (avrEventResponse.id != 0x82) {
|
if (avrEventResponse.id != 0x82) {
|
||||||
@@ -40,10 +40,10 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
return !avrEventResponse.eventData.empty() ? std::optional(avrEventResponse) : std::nullopt;
|
return !avrEventResponse.eventData.empty() ? std::optional(avrEventResponse) : std::nullopt;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Protocols::CmsisDap::Edbg::Avr::AvrResponse> EdbgInterface::requestAvrResponses() {
|
std::vector<Microchip::Protocols::Edbg::Avr::AvrResponse> EdbgInterface::requestAvrResponses() {
|
||||||
using Protocols::CmsisDap::Edbg::Avr::AvrResponseCommand;
|
using Microchip::Protocols::Edbg::Avr::AvrResponseCommand;
|
||||||
|
|
||||||
std::vector<Protocols::CmsisDap::Edbg::Avr::AvrResponse> responses;
|
std::vector<Microchip::Protocols::Edbg::Avr::AvrResponse> responses;
|
||||||
AvrResponseCommand responseCommand;
|
AvrResponseCommand responseCommand;
|
||||||
|
|
||||||
auto avrResponse = this->sendCommandAndWaitForResponse(responseCommand);
|
auto avrResponse = this->sendCommandAndWaitForResponse(responseCommand);
|
||||||
@@ -5,23 +5,25 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp"
|
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/CmsisDapInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp"
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponse.hpp"
|
#include "AVR/AvrCommand.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEventCommand.hpp"
|
#include "AVR/AvrResponse.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrEvent.hpp"
|
#include "AVR/AvrEventCommand.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "AVR/AvrEvent.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrResponseCommand.hpp"
|
#include "AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/ResponseFrames/AvrResponseFrame.hpp"
|
#include "AVR/AvrResponseCommand.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/AvrCommandFrame.hpp"
|
#include "AVR/ResponseFrames/AvrResponseFrame.hpp"
|
||||||
|
#include "AVR/CommandFrames/AvrCommandFrame.hpp"
|
||||||
|
|
||||||
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* The EdbgInterface class implements the EDBG sub-protocol, which takes the form of numerous CMSIS-DAP vendor
|
* The EdbgInterface class implements the EDBG sub-protocol, which takes the form of numerous CMSIS-DAP vendor
|
||||||
* commands.
|
* commands.
|
||||||
*/
|
*/
|
||||||
class EdbgInterface: public CmsisDapInterface
|
class EdbgInterface: public ::DebugToolDrivers::Protocols::CmsisDap::CmsisDapInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit EdbgInterface(Usb::HidInterface&& cmsisHidInterface);
|
explicit EdbgInterface(Usb::HidInterface&& cmsisHidInterface);
|
||||||
@@ -37,8 +39,8 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
template <class PayloadContainerType>
|
template <class PayloadContainerType>
|
||||||
Protocols::CmsisDap::Response sendAvrCommandFrameAndWaitForResponse(
|
::DebugToolDrivers::Protocols::CmsisDap::Response sendAvrCommandFrameAndWaitForResponse(
|
||||||
const Protocols::CmsisDap::Edbg::Avr::AvrCommandFrame<PayloadContainerType>& avrCommandFrame
|
const Avr::AvrCommandFrame<PayloadContainerType>& avrCommandFrame
|
||||||
) {
|
) {
|
||||||
/*
|
/*
|
||||||
* An AVR command frame can be split into multiple CMSIS-DAP commands. Each command containing a fragment
|
* An AVR command frame can be split into multiple CMSIS-DAP commands. Each command containing a fragment
|
||||||
@@ -49,7 +51,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
));
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual Protocols::CmsisDap::Response sendAvrCommandsAndWaitForResponse(
|
virtual ::DebugToolDrivers::Protocols::CmsisDap::Response sendAvrCommandsAndWaitForResponse(
|
||||||
const std::vector<Avr::AvrCommand>& avrCommands
|
const std::vector<Avr::AvrCommand>& avrCommands
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -59,7 +61,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
) {
|
) {
|
||||||
static_assert(
|
static_assert(
|
||||||
std::is_base_of<
|
std::is_base_of<
|
||||||
Protocols::CmsisDap::Edbg::Avr::AvrResponseFrame,
|
Avr::AvrResponseFrame,
|
||||||
typename CommandFrameType::ExpectedResponseFrameType
|
typename CommandFrameType::ExpectedResponseFrameType
|
||||||
>::value,
|
>::value,
|
||||||
"AVR Command must specify a valid response frame type, derived from AvrResponseFrame."
|
"AVR Command must specify a valid response frame type, derived from AvrResponseFrame."
|
||||||
@@ -77,9 +79,9 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
|||||||
return typename CommandFrameType::ExpectedResponseFrameType(this->requestAvrResponses());
|
return typename CommandFrameType::ExpectedResponseFrameType(this->requestAvrResponses());
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual std::optional<Protocols::CmsisDap::Edbg::Avr::AvrEvent> requestAvrEvent();
|
virtual std::optional<Avr::AvrEvent> requestAvrEvent();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
virtual std::vector<Protocols::CmsisDap::Edbg::Avr::AvrResponse> requestAvrResponses();
|
virtual std::vector<Avr::AvrResponse> requestAvrResponses();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1,16 +1,16 @@
|
|||||||
#include "EdbgTargetPowerManagementInterface.hpp"
|
#include "EdbgTargetPowerManagementInterface.hpp"
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/EDBGControl/GetParameter.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/CommandFrames/EDBGControl/SetParameter.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/CommandFrames/EDBGControl/SetParameter.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
|
|
||||||
using Protocols::CmsisDap::Edbg::Avr::ResponseFrames::EdbgControl::EdbgControlResponseId;
|
using Microchip::Protocols::Edbg::Avr::ResponseFrames::EdbgControl::EdbgControlResponseId;
|
||||||
|
|
||||||
using Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl::GetParameter;
|
using Microchip::Protocols::Edbg::Avr::CommandFrames::EdbgControl::GetParameter;
|
||||||
using Protocols::CmsisDap::Edbg::Avr::CommandFrames::EdbgControl::SetParameter;
|
using Microchip::Protocols::Edbg::Avr::CommandFrames::EdbgControl::SetParameter;
|
||||||
|
|
||||||
EdbgTargetPowerManagementInterface::EdbgTargetPowerManagementInterface(EdbgInterface* edbgInterface)
|
EdbgTargetPowerManagementInterface::EdbgTargetPowerManagementInterface(EdbgInterface* edbgInterface)
|
||||||
: edbgInterface(edbgInterface)
|
: edbgInterface(edbgInterface)
|
||||||
@@ -3,9 +3,9 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/TargetInterfaces/TargetPowerManagementInterface.hpp"
|
#include "src/DebugToolDrivers/TargetInterfaces/TargetPowerManagementInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/EdbgInterface.hpp"
|
#include "src/DebugToolDrivers/Microchip/Protocols/EDBG/EdbgInterface.hpp"
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap::Edbg
|
namespace DebugToolDrivers::Microchip::Protocols::Edbg
|
||||||
{
|
{
|
||||||
class EdbgTargetPowerManagementInterface: public TargetInterfaces::TargetPowerManagementInterface
|
class EdbgTargetPowerManagementInterface: public TargetInterfaces::TargetPowerManagementInterface
|
||||||
{
|
{
|
||||||
@@ -2,8 +2,6 @@
|
|||||||
|
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
|
||||||
|
|
||||||
namespace DebugToolDrivers::Protocols::CmsisDap
|
namespace DebugToolDrivers::Protocols::CmsisDap
|
||||||
{
|
{
|
||||||
using namespace Exceptions;
|
using namespace Exceptions;
|
||||||
@@ -13,13 +11,13 @@ namespace DebugToolDrivers::Protocols::CmsisDap
|
|||||||
{}
|
{}
|
||||||
|
|
||||||
void CmsisDapInterface::sendCommand(const Command& cmsisDapCommand) {
|
void CmsisDapInterface::sendCommand(const Command& cmsisDapCommand) {
|
||||||
if (this->msSendCommandDelay.count() > 0) {
|
if (this->commandDelay.count() > 0) {
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
std::int64_t now = duration_cast<milliseconds>(high_resolution_clock::now().time_since_epoch()).count();
|
std::int64_t now = duration_cast<milliseconds>(high_resolution_clock::now().time_since_epoch()).count();
|
||||||
std::int64_t difference = (now - this->lastCommandSentTimeStamp);
|
std::int64_t difference = (now - this->lastCommandSentTimeStamp);
|
||||||
|
|
||||||
if (difference < this->msSendCommandDelay.count()) {
|
if (difference < this->commandDelay.count()) {
|
||||||
std::this_thread::sleep_for(milliseconds(this->msSendCommandDelay.count() - difference));
|
std::this_thread::sleep_for(milliseconds(this->commandDelay.count() - difference));
|
||||||
}
|
}
|
||||||
|
|
||||||
this->lastCommandSentTimeStamp = now;
|
this->lastCommandSentTimeStamp = now;
|
||||||
|
|||||||
@@ -5,9 +5,9 @@
|
|||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
#include "src/DebugToolDrivers/USB/HID/HidInterface.hpp"
|
#include "src/DebugToolDrivers/USB/HID/HidInterface.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Response.hpp"
|
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/Command.hpp"
|
#include "Response.hpp"
|
||||||
#include "src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/AvrCommand.hpp"
|
#include "Command.hpp"
|
||||||
|
|
||||||
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
#include "src/TargetController/Exceptions/DeviceCommunicationFailure.hpp"
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ namespace DebugToolDrivers::Protocols::CmsisDap
|
|||||||
}
|
}
|
||||||
|
|
||||||
void setMinimumCommandTimeGap(std::chrono::milliseconds commandTimeGap) {
|
void setMinimumCommandTimeGap(std::chrono::milliseconds commandTimeGap) {
|
||||||
this->msSendCommandDelay = commandTimeGap;
|
this->commandDelay = commandTimeGap;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,10 +120,8 @@ namespace DebugToolDrivers::Protocols::CmsisDap
|
|||||||
* received a response from every previous command.
|
* received a response from every previous command.
|
||||||
*
|
*
|
||||||
* Because of this, we may need to enforce a minimum time gap between sending CMSIS commands.
|
* Because of this, we may need to enforce a minimum time gap between sending CMSIS commands.
|
||||||
* Setting msSendCommandDelay to any value above 0 will enforce an x millisecond gap between each command
|
|
||||||
* being sent, where x is the value of msSendCommandDelay.
|
|
||||||
*/
|
*/
|
||||||
std::chrono::milliseconds msSendCommandDelay = std::chrono::milliseconds(0);
|
std::chrono::milliseconds commandDelay = std::chrono::milliseconds(0);
|
||||||
std::int64_t lastCommandSentTimeStamp = 0;
|
std::int64_t lastCommandSentTimeStamp = 0;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user