Added config struct for RISC-V debug translator implementation, and WCH debug tools.

Also some tidying in the `DebugToolConfig` struct
This commit is contained in:
Nav
2024-10-06 23:32:36 +01:00
parent a1dfa56913
commit 418db1df99
14 changed files with 142 additions and 35 deletions

View File

@@ -11,12 +11,14 @@ namespace DebugToolDrivers::Wch
using Exceptions::DeviceInitializationFailure;
WchLinkBase::WchLinkBase(
const DebugToolConfig& toolConfig,
WchLinkVariant variant,
std::uint16_t vendorId,
std::uint16_t productId,
std::uint8_t wchLinkUsbInterfaceNumber
)
: UsbDevice(vendorId, productId)
, toolConfig(WchLinkToolConfig{toolConfig})
, variant(variant)
, wchLinkUsbInterfaceNumber(wchLinkUsbInterfaceNumber)
{}
@@ -77,6 +79,7 @@ namespace DebugToolDrivers::Wch
if (!this->wchRiscVTranslator) {
this->wchRiscVTranslator = std::make_unique<DebugTranslator>(
*(this->wchLinkInterface.get()),
this->toolConfig.riscVDebugTranslatorConfig,
targetDescriptionFile,
targetConfig
);