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