Removed unnecessary restriction for XMEGA and UPDI enabled targets, where the flash page size must not exceed the maximum memory access size.
This restriction is not necessary for XMEGA and UPDI targets because paged memory access is not required for those targets.
This commit is contained in:
@@ -78,17 +78,6 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
throw DeviceInitializationFailure("Failed to find status register size");
|
||||
}
|
||||
|
||||
if (config.flashPageSize.has_value() && this->maximumMemoryAccessSizePerRequest.has_value()
|
||||
&& config.flashPageSize > this->maximumMemoryAccessSizePerRequest
|
||||
) {
|
||||
throw DeviceInitializationFailure("Flash page size for target ("
|
||||
+ std::to_string(config.flashPageSize.value())
|
||||
+ " bytes) exceeds maximum memory access size for EdbgAvr8Interface ("
|
||||
+ std::to_string(this->maximumMemoryAccessSizePerRequest.value())
|
||||
+ " bytes)."
|
||||
);
|
||||
}
|
||||
|
||||
if (this->configVariant == Avr8ConfigVariant::NONE) {
|
||||
auto configVariant = this->resolveConfigVariant();
|
||||
|
||||
@@ -102,6 +91,20 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
this->configVariant = configVariant.value();
|
||||
}
|
||||
|
||||
if (
|
||||
this->configVariant != Avr8ConfigVariant::XMEGA
|
||||
&& this->configVariant != Avr8ConfigVariant::UPDI
|
||||
&& config.flashPageSize.has_value() && this->maximumMemoryAccessSizePerRequest.has_value()
|
||||
&& config.flashPageSize > this->maximumMemoryAccessSizePerRequest
|
||||
) {
|
||||
throw DeviceInitializationFailure("Flash page size for target ("
|
||||
+ std::to_string(config.flashPageSize.value())
|
||||
+ " bytes) exceeds maximum memory access size for EdbgAvr8Interface ("
|
||||
+ std::to_string(this->maximumMemoryAccessSizePerRequest.value())
|
||||
+ " bytes)."
|
||||
);
|
||||
}
|
||||
|
||||
switch (this->configVariant) {
|
||||
case Avr8ConfigVariant::DEBUG_WIRE:
|
||||
case Avr8ConfigVariant::MEGAJTAG: {
|
||||
|
||||
Reference in New Issue
Block a user