Refactored WCH-Link/RISC-V implementation to accommodate SW breakpoints and reduce complexity
This commit is contained in:
@@ -17,10 +17,11 @@ namespace DebugToolDrivers::TargetInterfaces::RiscV
|
||||
class RiscVDebugInterface
|
||||
{
|
||||
public:
|
||||
virtual void init() = 0;
|
||||
virtual void activate() = 0;
|
||||
virtual void deactivate() = 0;
|
||||
|
||||
virtual std::string getDeviceId() = 0;
|
||||
|
||||
virtual Targets::TargetExecutionState getExecutionState() = 0;
|
||||
|
||||
virtual void stop() = 0;
|
||||
@@ -54,5 +55,9 @@ namespace DebugToolDrivers::TargetInterfaces::RiscV
|
||||
Targets::TargetMemoryAddress startAddress,
|
||||
Targets::TargetMemoryBufferSpan buffer
|
||||
) = 0;
|
||||
virtual void eraseMemory(
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor
|
||||
) = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace DebugToolDrivers::TargetInterfaces::RiscV
|
||||
{
|
||||
class RiscVIdentificationInterface
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Should retrieve the RISC-V target ID in string form.
|
||||
*
|
||||
* @return
|
||||
* The target ID, in the form of a string.
|
||||
*/
|
||||
virtual std::string getDeviceId() = 0;
|
||||
};
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <cstdint>
|
||||
#include <optional>
|
||||
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
#include "src/Targets/TargetAddressSpaceDescriptor.hpp"
|
||||
#include "src/Targets/TargetMemorySegmentDescriptor.hpp"
|
||||
|
||||
namespace DebugToolDrivers::TargetInterfaces::RiscV
|
||||
{
|
||||
class RiscVProgramInterface
|
||||
{
|
||||
public:
|
||||
virtual std::optional<Targets::TargetMemorySize> alignmentSize(
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
||||
Targets::TargetMemoryAddress startAddress,
|
||||
Targets::TargetMemorySize bufferSize
|
||||
) = 0;
|
||||
|
||||
virtual void writeProgramMemory(
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
||||
Targets::TargetMemoryAddress startAddress,
|
||||
Targets::TargetMemoryBufferSpan buffer
|
||||
) = 0;
|
||||
|
||||
virtual void eraseProgramMemory(
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor
|
||||
) = 0;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user