Corrected memory type used for memory writes with the JTAG config variant, in the EDBG AVR8 driver
This commit is contained in:
@@ -735,14 +735,28 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case TargetMemoryType::EEPROM: {
|
case TargetMemoryType::EEPROM: {
|
||||||
avr8MemoryType =
|
switch (this->configVariant) {
|
||||||
this->configVariant == Avr8ConfigVariant::XMEGA || this->configVariant == Avr8ConfigVariant::UPDI
|
case Avr8ConfigVariant::UPDI:
|
||||||
? Avr8MemoryType::EEPROM_ATOMIC
|
case Avr8ConfigVariant::XMEGA: {
|
||||||
: Avr8MemoryType::EEPROM;
|
avr8MemoryType = Avr8MemoryType::EEPROM_ATOMIC;
|
||||||
|
|
||||||
if (this->configVariant == Avr8ConfigVariant::XMEGA) {
|
if (this->configVariant == Avr8ConfigVariant::XMEGA) {
|
||||||
// EEPROM addresses should be in relative form, for XMEGA (PDI) targets
|
// EEPROM addresses should be in relative form, for XMEGA (PDI) targets
|
||||||
startAddress -= this->targetParameters.eepromStartAddress.value();
|
startAddress -= this->targetParameters.eepromStartAddress.value();
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case Avr8ConfigVariant::MEGAJTAG: {
|
||||||
|
avr8MemoryType = this->programmingModeEnabled
|
||||||
|
? Avr8MemoryType::EEPROM_PAGE
|
||||||
|
: Avr8MemoryType::EEPROM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
avr8MemoryType = Avr8MemoryType::EEPROM;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
|||||||
Reference in New Issue
Block a user