Included MCU module base address device parameters sent to EDBG tools, for XMEGA targets
This commit is contained in:
@@ -1027,6 +1027,10 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
throw DeviceInitializationFailure("Missing required parameter: NVM_BASE");
|
||||
}
|
||||
|
||||
if (!this->targetParameters.mcuModuleBaseAddress.has_value()) {
|
||||
throw DeviceInitializationFailure("Missing required parameter: SIGNATURE_OFFSET (MCU module base address)");
|
||||
}
|
||||
|
||||
Logger::debug("Setting APPL_BASE_ADDR AVR8 parameter");
|
||||
this->setParameter(
|
||||
Avr8EdbgParameters::DEVICE_XMEGA_APPL_BASE_ADDR,
|
||||
@@ -1110,6 +1114,11 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
Avr8EdbgParameters::DEVICE_XMEGA_NVM_BASE,
|
||||
this->targetParameters.nvmModuleBaseAddress.value()
|
||||
);
|
||||
|
||||
Logger::debug("Setting SIGNATURE_OFFSET AVR8 parameter");
|
||||
this->setParameter(
|
||||
Avr8EdbgParameters::DEVICE_XMEGA_SIGNATURE_OFFSET,
|
||||
this->targetParameters.mcuModuleBaseAddress.value()
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -1230,6 +1230,18 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (peripheralModules.contains("mcu")) {
|
||||
const auto& mcuModule = peripheralModules.at("mcu");
|
||||
|
||||
if (mcuModule.instancesMappedByName.contains("mcu")) {
|
||||
const auto& mcuInstance = mcuModule.instancesMappedByName.at("mcu");
|
||||
|
||||
if (mcuInstance.registerGroupsMappedByName.contains("mcu")) {
|
||||
targetParameters.mcuModuleBaseAddress = mcuInstance.registerGroupsMappedByName.at("mcu").offset;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -53,6 +53,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit
|
||||
std::optional<std::uint32_t> userSignaturesPdiOffset;
|
||||
std::optional<std::uint32_t> productSignaturesPdiOffset;
|
||||
std::optional<std::uint16_t> nvmModuleBaseAddress;
|
||||
std::optional<std::uint16_t> mcuModuleBaseAddress;
|
||||
|
||||
// UPDI specific target params
|
||||
std::optional<std::uint16_t> ocdModuleAddress;
|
||||
|
||||
Reference in New Issue
Block a user