Massive refactor to accommodate RISC-V targets
- Refactored entire codebase (excluding the Insight component) to accommodate multiple target architectures (no longer specific to AVR) - Deleted 'generate SVD' GDB monitor command - I will eventually move this functionality to the Bloom website - Added unit size property to address spaces - Many other changes which I couldn't be bothered to describe here
This commit is contained in:
@@ -6,6 +6,9 @@
|
||||
#include "Command.hpp"
|
||||
#include "src/TargetController/Responses/TargetMemoryRead.hpp"
|
||||
|
||||
#include "src/Targets/TargetAddressSpaceDescriptor.hpp"
|
||||
#include "src/Targets/TargetMemorySegmentDescriptor.hpp"
|
||||
#include "src/Targets/TargetMemorySegmentType.hpp"
|
||||
#include "src/Targets/TargetMemory.hpp"
|
||||
|
||||
namespace TargetController::Commands
|
||||
@@ -18,7 +21,8 @@ namespace TargetController::Commands
|
||||
static constexpr CommandType type = CommandType::READ_TARGET_MEMORY;
|
||||
static const inline std::string name = "ReadTargetMemory";
|
||||
|
||||
Targets::TargetMemoryType memoryType;
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor;
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor;
|
||||
Targets::TargetMemoryAddress startAddress;
|
||||
Targets::TargetMemorySize bytes;
|
||||
|
||||
@@ -30,13 +34,15 @@ namespace TargetController::Commands
|
||||
std::set<Targets::TargetMemoryAddressRange> excludedAddressRanges;
|
||||
|
||||
ReadTargetMemory(
|
||||
Targets::TargetMemoryType memoryType,
|
||||
const Targets::TargetAddressSpaceDescriptor& addressSpaceDescriptor,
|
||||
const Targets::TargetMemorySegmentDescriptor& memorySegmentDescriptor,
|
||||
Targets::TargetMemoryAddress startAddress,
|
||||
Targets::TargetMemorySize bytes,
|
||||
bool bypassCache = false,
|
||||
const std::set<Targets::TargetMemoryAddressRange>& excludedAddressRanges = {}
|
||||
)
|
||||
: memoryType(memoryType)
|
||||
: addressSpaceDescriptor(addressSpaceDescriptor)
|
||||
, memorySegmentDescriptor(memorySegmentDescriptor)
|
||||
, startAddress(startAddress)
|
||||
, bytes(bytes)
|
||||
, bypassCache(bypassCache)
|
||||
@@ -52,7 +58,7 @@ namespace TargetController::Commands
|
||||
}
|
||||
|
||||
[[nodiscard]] bool requiresDebugMode() const override {
|
||||
return this->memoryType == Targets::TargetMemoryType::RAM;
|
||||
return this->memorySegmentDescriptor.type == Targets::TargetMemorySegmentType::RAM;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user