- Refactored AVR8 constructor, moving TDF construction to the TargetControllerComponent

- The `TargetControllerComponent` now resolves the target via the new generated mapping approach
- Added `TargetDescriptionFile` derived class
- Removed obsolete JSON map processing code
- Other bits of refactoring and tidying
This commit is contained in:
Nav
2023-12-17 18:12:53 +00:00
parent 866cdbdcc5
commit 66cbd89051
14 changed files with 161 additions and 119 deletions

View File

@@ -27,8 +27,11 @@ namespace Targets::RiscV
using DebugModule::Registers::AbstractControlStatusRegister;
using DebugModule::Registers::AbstractCommandRegister;
RiscV::RiscV(const TargetConfig& targetConfig)
: name("CH32X035C8T6") // TODO: TDF
RiscV::RiscV(
const TargetConfig& targetConfig,
TargetDescription::TargetDescriptionFile&& targetDescriptionFile
)
: targetDescriptionFile(targetDescriptionFile)
, stackPointerRegisterDescriptor(
RiscVRegisterDescriptor(
TargetRegisterType::STACK_POINTER,
@@ -107,10 +110,10 @@ namespace Targets::RiscV
TargetDescriptor RiscV::getDescriptor() {
return TargetDescriptor(
"TDF ID",
this->targetDescriptionFile.getTargetId(),
TargetFamily::RISC_V,
this->name,
"TDF VENDOR NAME",
this->targetDescriptionFile.getTargetName(),
this->targetDescriptionFile.getVendorName(),
{
{
Targets::TargetMemoryType::FLASH,