diff --git a/build/scripts/Targets/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php b/build/scripts/Targets/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php index 4f9cedf9..f9efc506 100644 --- a/build/scripts/Targets/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php +++ b/build/scripts/Targets/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php @@ -121,7 +121,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $output->ocdRevision = $this->stringService->tryStringToInt( $this->getPropertyValue('ocd', 'ocd_revision') ); - $output->ocdDataRegister = $this->stringService->tryStringToInt( + $output->ocdDataRegisterAddress = $this->stringService->tryStringToInt( $this->getPropertyValue('ocd', 'ocd_datareg') ); @@ -131,40 +131,40 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $eepromAddressRegister = $eepromPeripheral->getRegister('eeprom', 'eear'); if ($eepromAddressRegister instanceof TargetRegister) { - $output->eepromAddressRegisterLow = $eepromAddressRegister->address; - $output->eepromAddressRegisterHigh = $eepromAddressRegister->size > 1 + $output->eearAddressLow = $eepromAddressRegister->address; + $output->eearAddressHigh = $eepromAddressRegister->size > 1 ? $eepromAddressRegister->address !== null - ? $eepromAddressRegister->address >> 2 + ? $eepromAddressRegister->address >> 8 : null : $eepromAddressRegister->address ; } else { - $eepromAddressRegisterLow = $eepromPeripheral->getRegister('eeprom', 'eearl'); - $eepromAddressRegisterHigh = $eepromPeripheral->getRegister('eeprom', 'eearh'); + $eearAddressLow = $eepromPeripheral->getRegister('eeprom', 'eearl'); + $eearAddressHigh = $eepromPeripheral->getRegister('eeprom', 'eearh'); - if ($eepromAddressRegisterLow instanceof TargetRegister) { - $output->eepromAddressRegisterLow = $eepromAddressRegisterLow->address; - $output->eepromAddressRegisterHigh = $eepromAddressRegisterLow->size > 1 - ? $eepromAddressRegisterLow->address !== null - ? $eepromAddressRegisterLow->address >> 2 + if ($eearAddressLow instanceof TargetRegister) { + $output->eearAddressLow = $eearAddressLow->address; + $output->eearAddressHigh = $eearAddressLow->size > 1 + ? $eearAddressLow->address !== null + ? $eearAddressLow->address >> 8 : null - : $eepromAddressRegisterLow->address; + : $eearAddressLow->address; } - if ($eepromAddressRegisterHigh instanceof TargetRegister) { - $output->eepromAddressRegisterHigh = $eepromAddressRegisterHigh->address; + if ($eearAddressHigh instanceof TargetRegister) { + $output->eearAddressHigh = $eearAddressHigh->address; } } $eepromDataRegister = $eepromPeripheral->getRegister('eeprom', 'eedr'); if ($eepromDataRegister instanceof TargetRegister) { - $output->eepromDataRegisterAddress = $eepromDataRegister->address; + $output->eedrAddress = $eepromDataRegister->address; } $eepromControlRegister = $eepromPeripheral->getRegister('eeprom', 'eecr'); if ($eepromControlRegister instanceof TargetRegister) { - $output->eepromControlRegisterAddress = $eepromControlRegister->address; + $output->eecrAddress = $eepromControlRegister->address; } } @@ -175,7 +175,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile ?? $cpuPeripheral->getRegister('cpu', 'spmcr'); if ($spmcsRegister instanceof TargetRegister) { - $output->spmcRegisterStartAddress = $spmcsRegister->address; + $output->spmcrAddress = $spmcsRegister->address; } $osccalRegister = $cpuPeripheral->getRegister('cpu', 'osccal') @@ -189,7 +189,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile } } - if ($output->spmcRegisterStartAddress === null) { + if ($output->spmcrAddress === null) { $bootLoaderPeripheral = $this->getTargetPeripheral('boot_load'); if ($bootLoaderPeripheral instanceof TargetPeripheral) { @@ -197,7 +197,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile ?? $bootLoaderPeripheral->getRegister('boot_load', 'spmcsr'); if ($spmcsRegister instanceof TargetRegister) { - $output->spmcRegisterStartAddress = $spmcsRegister->address; + $output->spmcrAddress = $spmcsRegister->address; } } } @@ -274,7 +274,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile } $output->ocdRevision = $this->stringService->tryStringToInt($this->getPropertyValue('ocd', 'ocd_revision')); - $output->ocdDataRegister = $this->stringService->tryStringToInt($this->getPropertyValue('ocd', 'ocd_datareg')); + $output->ocdDataRegisterAddress = $this->stringService->tryStringToInt($this->getPropertyValue('ocd', 'ocd_datareg')); $eepromPeripheral = $this->getTargetPeripheral('eeprom'); @@ -282,8 +282,8 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $eepromAddressRegister = $eepromPeripheral->getRegister('eeprom', 'eear'); if ($eepromAddressRegister instanceof TargetRegister) { - $output->eepromAddressRegisterLow = $eepromAddressRegister->address; - $output->eepromAddressRegisterHigh = $eepromAddressRegister->size > 1 + $output->eearAddressLow = $eepromAddressRegister->address; + $output->eearAddressHigh = $eepromAddressRegister->size > 1 ? $eepromAddressRegister->address !== null ? $eepromAddressRegister->address >> 2 : null @@ -291,26 +291,26 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile ; } else { - $eepromAddressRegisterLow = $eepromPeripheral->getRegister('eeprom', 'eearl'); - $eepromAddressRegisterHigh = $eepromPeripheral->getRegister('eeprom', 'eearh'); + $eearAddressLow = $eepromPeripheral->getRegister('eeprom', 'eearl'); + $eearAddressHigh = $eepromPeripheral->getRegister('eeprom', 'eearh'); - if ($eepromAddressRegisterLow instanceof TargetRegister) { - $output->eepromAddressRegisterLow = $eepromAddressRegisterLow->address; + if ($eearAddressLow instanceof TargetRegister) { + $output->eearAddressLow = $eearAddressLow->address; } - if ($eepromAddressRegisterHigh instanceof TargetRegister) { - $output->eepromAddressRegisterHigh = $eepromAddressRegisterHigh->address; + if ($eearAddressHigh instanceof TargetRegister) { + $output->eearAddressHigh = $eearAddressHigh->address; } } $eepromDataRegister = $eepromPeripheral->getRegister('eeprom', 'eedr'); if ($eepromDataRegister instanceof TargetRegister) { - $output->eepromDataRegisterAddress = $eepromDataRegister->address; + $output->eedrAddress = $eepromDataRegister->address; } $eepromControlRegister = $eepromPeripheral->getRegister('eeprom', 'eecr'); if ($eepromControlRegister instanceof TargetRegister) { - $output->eepromControlRegisterAddress = $eepromControlRegister->address; + $output->eecrAddress = $eepromControlRegister->address; } } @@ -321,7 +321,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile ?? $cpuPeripheral->getRegister('cpu', 'spmcr'); if ($spmcsRegister instanceof TargetRegister) { - $output->spmcRegisterStartAddress = $spmcsRegister->address; + $output->spmcrAddress = $spmcsRegister->address; } $osccalRegister = $cpuPeripheral->getRegister('cpu', 'osccal') @@ -335,7 +335,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile } } - if ($output->spmcRegisterStartAddress === null) { + if ($output->spmcrAddress === null) { $bootLoaderPeripheral = $this->getTargetPeripheral('boot_load'); if ($bootLoaderPeripheral instanceof TargetPeripheral) { @@ -343,7 +343,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile ?? $bootLoaderPeripheral->getRegister('boot_load', 'spmcsr'); if ($spmcsRegister instanceof TargetRegister) { - $output->spmcRegisterStartAddress = $spmcsRegister->address; + $output->spmcrAddress = $spmcsRegister->address; } } } diff --git a/build/scripts/Targets/TargetDescriptionFiles/AVR8/DebugWireParameters.php b/build/scripts/Targets/TargetDescriptionFiles/AVR8/DebugWireParameters.php index f2215e77..cf7782dd 100644 --- a/build/scripts/Targets/TargetDescriptionFiles/AVR8/DebugWireParameters.php +++ b/build/scripts/Targets/TargetDescriptionFiles/AVR8/DebugWireParameters.php @@ -16,11 +16,11 @@ class DebugWireParameters public ?int $eepromSize = null; public ?int $eepromPageSize = null; public ?int $ocdRevision = null; - public ?int $ocdDataRegister = null; - public ?int $eepromAddressRegisterHigh = null; - public ?int $eepromAddressRegisterLow = null; - public ?int $eepromControlRegisterAddress = null; - public ?int $eepromDataRegisterAddress = null; - public ?int $spmcRegisterStartAddress = null; + public ?int $ocdDataRegisterAddress = null; + public ?int $eearAddressHigh = null; + public ?int $eearAddressLow = null; + public ?int $eecrAddress = null; + public ?int $eedrAddress = null; + public ?int $spmcrAddress = null; public ?int $osccalAddress = null; } diff --git a/build/scripts/Targets/TargetDescriptionFiles/AVR8/JtagParameters.php b/build/scripts/Targets/TargetDescriptionFiles/AVR8/JtagParameters.php index f4c0003e..6df84d85 100644 --- a/build/scripts/Targets/TargetDescriptionFiles/AVR8/JtagParameters.php +++ b/build/scripts/Targets/TargetDescriptionFiles/AVR8/JtagParameters.php @@ -16,11 +16,11 @@ class JtagParameters public ?int $eepromSize = null; public ?int $eepromPageSize = null; public ?int $ocdRevision = null; - public ?int $ocdDataRegister = null; - public ?int $eepromAddressRegisterHigh = null; - public ?int $eepromAddressRegisterLow = null; - public ?int $eepromControlRegisterAddress = null; - public ?int $eepromDataRegisterAddress = null; - public ?int $spmcRegisterStartAddress = null; + public ?int $ocdDataRegisterAddress = null; + public ?int $eearAddressHigh = null; + public ?int $eearAddressLow = null; + public ?int $eecrAddress = null; + public ?int $eedrAddress = null; + public ?int $spmcrAddress = null; public ?int $osccalAddress = null; } diff --git a/build/scripts/Targets/TargetDescriptionFiles/AVR8/Services/ValidationService.php b/build/scripts/Targets/TargetDescriptionFiles/AVR8/Services/ValidationService.php index 050cc89b..472c96c0 100644 --- a/build/scripts/Targets/TargetDescriptionFiles/AVR8/Services/ValidationService.php +++ b/build/scripts/Targets/TargetDescriptionFiles/AVR8/Services/ValidationService.php @@ -207,31 +207,31 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat $failures[] = 'EEPROM page size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromAddressRegisterHigh === null) { + if ($parameters->eearAddressHigh === null) { $failures[] = 'Missing EEARH address'; - } elseif ($parameters->eepromAddressRegisterHigh > 0xFF) { + } elseif ($parameters->eearAddressHigh > 0xFF) { $failures[] = 'EEARH address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromAddressRegisterLow === null) { + if ($parameters->eearAddressLow === null) { $failures[] = 'Missing EEARL address'; - } elseif ($parameters->eepromAddressRegisterLow > 0xFF) { + } elseif ($parameters->eearAddressLow > 0xFF) { $failures[] = 'EEARL address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromControlRegisterAddress === null) { + if ($parameters->eecrAddress === null) { $failures[] = 'Missing EECR address'; - } elseif ($parameters->eepromControlRegisterAddress > 0xFF) { + } elseif ($parameters->eecrAddress > 0xFF) { $failures[] = 'EECR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromDataRegisterAddress === null) { + if ($parameters->eedrAddress === null) { $failures[] = 'Missing EEDR address'; - } elseif ($parameters->eepromDataRegisterAddress > 0xFF) { + } elseif ($parameters->eedrAddress > 0xFF) { $failures[] = 'EEDR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } @@ -242,17 +242,17 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat $failures[] = 'OCD revision size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->ocdDataRegister === null) { + if ($parameters->ocdDataRegisterAddress === null) { $failures[] = 'Missing OCDR address'; - } elseif ($parameters->ocdDataRegister > 0xFF) { + } elseif ($parameters->ocdDataRegisterAddress > 0xFF) { $failures[] = 'OCDR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->spmcRegisterStartAddress === null) { + if ($parameters->spmcrAddress === null) { $failures[] = 'Missing SPMCR start address'; - } elseif ($parameters->spmcRegisterStartAddress > 0xFF) { + } elseif ($parameters->spmcrAddress > 0xFF) { $failures[] = 'SPMCR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } @@ -368,31 +368,31 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat $failures[] = 'EEPROM page size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromAddressRegisterHigh === null) { + if ($parameters->eearAddressHigh === null) { $failures[] = 'Missing EEARH address'; - } elseif ($parameters->eepromAddressRegisterHigh > 0xFF) { + } elseif ($parameters->eearAddressHigh > 0xFF) { $failures[] = 'EEARH address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromAddressRegisterLow === null) { + if ($parameters->eearAddressLow === null) { $failures[] = 'Missing EEARL address'; - } elseif ($parameters->eepromAddressRegisterLow > 0xFF) { + } elseif ($parameters->eearAddressLow > 0xFF) { $failures[] = 'EEARL address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromControlRegisterAddress === null) { + if ($parameters->eecrAddress === null) { $failures[] = 'Missing EECR address'; - } elseif ($parameters->eepromControlRegisterAddress > 0xFF) { + } elseif ($parameters->eecrAddress > 0xFF) { $failures[] = 'EECR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->eepromDataRegisterAddress === null) { + if ($parameters->eedrAddress === null) { $failures[] = 'Missing EEDR address'; - } elseif ($parameters->eepromDataRegisterAddress > 0xFF) { + } elseif ($parameters->eedrAddress > 0xFF) { $failures[] = 'EEDR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } @@ -403,17 +403,17 @@ class ValidationService extends \Targets\TargetDescriptionFiles\Services\Validat $failures[] = 'OCD revision size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->ocdDataRegister === null) { + if ($parameters->ocdDataRegisterAddress === null) { $failures[] = 'Missing OCDR address'; - } elseif ($parameters->ocdDataRegister > 0xFF) { + } elseif ($parameters->ocdDataRegisterAddress > 0xFF) { $failures[] = 'OCDR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } - if ($parameters->spmcRegisterStartAddress === null) { + if ($parameters->spmcrAddress === null) { $failures[] = 'Missing SPMCR start address'; - } elseif ($parameters->spmcRegisterStartAddress > 0xFF) { + } elseif ($parameters->spmcrAddress > 0xFF) { $failures[] = 'SPMCR address size exceeds 0xFF - corresponding EDBG device parameter size is 8 bits'; } diff --git a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/EdbgAvr8Interface.cpp b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/EdbgAvr8Interface.cpp index ca3d3625..73a080c3 100644 --- a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/EdbgAvr8Interface.cpp +++ b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/EdbgAvr8Interface.cpp @@ -990,22 +990,22 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr this->setParameter(Avr8EdbgParameters::DEVICE_OCD_REVISION, parameters.ocdRevision); Logger::debug("Setting OCD_DATA_REGISTER AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_OCD_DATA_REGISTER, parameters.ocdDataRegister); + this->setParameter(Avr8EdbgParameters::DEVICE_OCD_DATA_REGISTER, parameters.ocdDataRegisterAddress); Logger::debug("Setting EEARL_ADDR AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_EEARL_ADDR, parameters.eepromAddressRegisterLow); + this->setParameter(Avr8EdbgParameters::DEVICE_EEARL_ADDR, parameters.eearAddressLow); Logger::debug("Setting EEARH_ADDR AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_EEARH_ADDR, parameters.eepromAddressRegisterHigh); + this->setParameter(Avr8EdbgParameters::DEVICE_EEARH_ADDR, parameters.eearAddressHigh); Logger::debug("Setting EECR_ADDR AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_EECR_ADDR, parameters.eepromControlRegisterAddress); + this->setParameter(Avr8EdbgParameters::DEVICE_EECR_ADDR, parameters.eecrAddress); Logger::debug("Setting EEDR_ADDR AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_EEDR_ADDR, parameters.eepromDataRegisterAddress); + this->setParameter(Avr8EdbgParameters::DEVICE_EEDR_ADDR, parameters.eedrAddress); Logger::debug("Setting SPMCR_REGISTER AVR8 device parameter"); - this->setParameter(Avr8EdbgParameters::DEVICE_SPMCR_REGISTER, parameters.spmcRegisterStartAddress); + this->setParameter(Avr8EdbgParameters::DEVICE_SPMCR_REGISTER, parameters.spmcrAddress); Logger::debug("Setting OSCCAL_ADDR AVR8 device parameter"); this->setParameter(Avr8EdbgParameters::DEVICE_OSCCAL_ADDR, parameters.osccalAddress); diff --git a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.cpp b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.cpp index 168d1da0..f6a846d2 100644 --- a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.cpp +++ b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.cpp @@ -34,7 +34,7 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen const auto& ocdPropertyGroup = targetDescriptionFile.getPropertyGroup("ocd"); this->ocdRevision = StringService::toUint8(ocdPropertyGroup.getProperty("ocd_revision").value); - this->ocdDataRegister = StringService::toUint8(ocdPropertyGroup.getProperty("ocd_datareg").value); + this->ocdDataRegisterAddress = StringService::toUint8(ocdPropertyGroup.getProperty("ocd_datareg").value); const auto& eepromRegisterGroupDescriptor = targetDescriptionFile.getTargetPeripheralDescriptor("eeprom") .getRegisterGroupDescriptor("eeprom"); @@ -42,29 +42,38 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen const auto& eearDescriptor = eepromRegisterGroupDescriptor.tryGetRegisterDescriptor("eear"); if (eearDescriptor.has_value()) { const auto startAddress = eearDescriptor->get().startAddress; - this->eepromAddressRegisterLow = static_cast(startAddress); - this->eepromAddressRegisterHigh = static_cast( - eearDescriptor->get().size > 1 ? startAddress >> 2 : startAddress + this->eearAddressLow = static_cast(startAddress); + + /* + * If the target doesn't have a high byte in the `EEAR` address, the `eearAddressHigh` parameter should be + * equal to the `eearAddressLow` parameter, as stated in the "EDBG-based Tools Protocols" document. + */ + this->eearAddressHigh = static_cast( + eearDescriptor->get().size > 1 ? startAddress >> 8 : startAddress ); } else { const auto& eearlDescriptor = eepromRegisterGroupDescriptor.getRegisterDescriptor("eearl"); - this->eepromAddressRegisterLow = static_cast(eearlDescriptor.startAddress); - this->eepromAddressRegisterHigh = static_cast( - eearlDescriptor.size > 1 ? eearlDescriptor.startAddress >> 2 : eearlDescriptor.startAddress - ); + this->eearAddressLow = static_cast(eearlDescriptor.startAddress); + /* + * Some debugWire targets only have a single-byte `EEARL` register. In the absence of an `EEARH` register, + * and if there is no high byte in the `EEARL` register, the `eearAddressHigh` parameter should be equal + * to the `eearAddressLow` parameter, as stated in the "EDBG-based Tools Protocols" document. + */ const auto eearhDescriptor = eepromRegisterGroupDescriptor.tryGetRegisterDescriptor("eearh"); - if (eearhDescriptor.has_value()) { - this->eepromAddressRegisterHigh = static_cast(eearhDescriptor->get().startAddress); - } + this->eearAddressHigh = static_cast( + eearhDescriptor.has_value() + ? eearhDescriptor->get().startAddress + : eearlDescriptor.size > 1 ? eearlDescriptor.startAddress >> 8 : eearlDescriptor.startAddress + ); } - this->eepromDataRegisterAddress = static_cast( + this->eedrAddress = static_cast( eepromRegisterGroupDescriptor.getRegisterDescriptor("eedr").startAddress ); - this->eepromControlRegisterAddress = static_cast( + this->eecrAddress = static_cast( eepromRegisterGroupDescriptor.getRegisterDescriptor("eecr").startAddress ); @@ -75,7 +84,7 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen ?: cpuRegisterGroupDescriptor.tryGetRegisterDescriptor("spmcr"); if (spmcsrDescriptor.has_value()) { - this->spmcRegisterStartAddress = static_cast(spmcsrDescriptor->get().startAddress); + this->spmcrAddress = static_cast(spmcsrDescriptor->get().startAddress); } else { const auto& bootLoaderRegisterGroupDescriptor = targetDescriptionFile.getTargetPeripheralDescriptor( @@ -89,7 +98,7 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen throw Exceptions::InternalFatalErrorException("Could not extract SPMCS register from TDF"); } - this->spmcRegisterStartAddress = static_cast(spmcsrDescriptor->get().startAddress); + this->spmcrAddress = static_cast(spmcsrDescriptor->get().startAddress); } const auto osccalDescriptor = cpuRegisterGroupDescriptor.tryGetRegisterDescriptor("osccal") @@ -122,9 +131,9 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen const auto& ioMemorySegment = targetDescriptionFile.getIoMemorySegment(); this->osccalAddress -= ioMemorySegment.startAddress; - this->eepromAddressRegisterLow -= ioMemorySegment.startAddress; - this->eepromAddressRegisterHigh -= ioMemorySegment.startAddress; - this->eepromControlRegisterAddress -= ioMemorySegment.startAddress; - this->eepromDataRegisterAddress -= ioMemorySegment.startAddress; + this->eearAddressLow -= ioMemorySegment.startAddress; + this->eearAddressHigh -= ioMemorySegment.startAddress; + this->eecrAddress -= ioMemorySegment.startAddress; + this->eedrAddress -= ioMemorySegment.startAddress; } } diff --git a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.hpp b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.hpp index 16efa0b5..1c39239a 100644 --- a/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.hpp +++ b/src/DebugToolDrivers/Microchip/Protocols/EDBG/AVR/Parameters/AVR8Generic/DebugWireJtagParameters.hpp @@ -22,12 +22,12 @@ namespace DebugToolDrivers::Microchip::Protocols::Edbg::Avr::Parameters::Avr8Gen std::uint16_t eepromSize; std::uint8_t eepromPageSize; std::uint8_t ocdRevision; - std::uint8_t ocdDataRegister; - std::uint8_t eepromAddressRegisterHigh; - std::uint8_t eepromAddressRegisterLow; - std::uint8_t eepromDataRegisterAddress; - std::uint8_t eepromControlRegisterAddress; - std::uint8_t spmcRegisterStartAddress; + std::uint8_t ocdDataRegisterAddress; + std::uint8_t eearAddressHigh; + std::uint8_t eearAddressLow; + std::uint8_t eedrAddress; + std::uint8_t eecrAddress; + std::uint8_t spmcrAddress; std::uint8_t osccalAddress; DebugWireJtagParameters(const Targets::Microchip::Avr::Avr8Bit::TargetDescriptionFile& targetDescriptionFile);