diff --git a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php index 4323c9ce..567f3a2f 100644 --- a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php +++ b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php @@ -61,7 +61,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile public ?int $lockRegistersPdiOffset = null; public ?int $userSignaturesPdiOffset = null; public ?int $productSignaturesPdiOffset = null; - public ?int $nvmBaseAddress = null; + public ?int $nvmModuleBaseAddress = null; // UPDI specific target params public ?int $ocdBaseAddress = null; @@ -472,7 +472,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $nvmInstance = $nvmModule->instancesMappedByName['nvm']; if (isset($nvmInstance->registerGroupsMappedByName['nvm'])) { - $this->nvmBaseAddress = $nvmInstance->registerGroupsMappedByName['nvm']->offset; + $this->nvmModuleBaseAddress = $nvmInstance->registerGroupsMappedByName['nvm']->offset; } } } @@ -486,7 +486,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $nvmInstance = $nvmModule->instancesMappedByName['nvmctrl']; if (isset($nvmInstance->registerGroupsMappedByName['nvmctrl'])) { - $this->nvmBaseAddress = $nvmInstance->registerGroupsMappedByName['nvmctrl']->offset; + $this->nvmModuleBaseAddress = $nvmInstance->registerGroupsMappedByName['nvmctrl']->offset; } } } @@ -718,13 +718,13 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile $failures[] = 'Missing lock registers PDI offset.'; } - if (is_null($this->nvmBaseAddress)) { + if (is_null($this->nvmModuleBaseAddress)) { $failures[] = 'Missing NVM start address.'; } } if (in_array(Avr8TargetDescriptionFile::AVR8_PHYSICAL_INTERFACE_UPDI, $this->debugPhysicalInterface)) { - if (is_null($this->nvmBaseAddress)) { + if (is_null($this->nvmModuleBaseAddress)) { $failures[] = 'Missing NVM base address.'; } diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp index 0b42b6c5..85ab3b3f 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp @@ -1023,7 +1023,7 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr throw DeviceInitializationFailure("Missing required parameter: EEPROM_PAGE_SIZE"); } - if (!this->targetParameters.nvmBaseAddress.has_value()) { + if (!this->targetParameters.nvmModuleBaseAddress.has_value()) { throw DeviceInitializationFailure("Missing required parameter: NVM_BASE"); } @@ -1108,7 +1108,8 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr Logger::debug("Setting NVM_BASE AVR8 parameter"); this->setParameter( Avr8EdbgParameters::DEVICE_XMEGA_NVM_BASE, - this->targetParameters.nvmBaseAddress.value() + this->targetParameters.nvmModuleBaseAddress.value() + ); ); } @@ -1172,11 +1173,11 @@ namespace Bloom::DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr ); } - if (this->targetParameters.nvmBaseAddress.has_value()) { + if (this->targetParameters.nvmModuleBaseAddress.has_value()) { Logger::debug("Setting DEVICE_UPDI_NVMCTRL_ADDR AVR8 parameter"); this->setParameter( Avr8EdbgParameters::DEVICE_UPDI_NVMCTRL_ADDR, - this->targetParameters.nvmBaseAddress.value() + this->targetParameters.nvmModuleBaseAddress.value() ); } diff --git a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp index 4af5e38a..3561975f 100644 --- a/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp +++ b/src/Targets/Microchip/AVR/AVR8/TargetDescription/TargetDescriptionFile.cpp @@ -1226,7 +1226,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription const auto& nvmInstance = nvmModule.instancesMappedByName.at("nvm"); if (nvmInstance.registerGroupsMappedByName.contains("nvm")) { - targetParameters.nvmBaseAddress = nvmInstance.registerGroupsMappedByName.at("nvm").offset; + targetParameters.nvmModuleBaseAddress = nvmInstance.registerGroupsMappedByName.at("nvm").offset; } } } @@ -1245,7 +1245,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit::TargetDescription const auto& nvmCtrlInstance = nvmCtrlModule.instancesMappedByName.at("nvmctrl"); if (nvmCtrlInstance.registerGroupsMappedByName.contains("nvmctrl")) { - targetParameters.nvmBaseAddress = nvmCtrlInstance.registerGroupsMappedByName.at( + targetParameters.nvmModuleBaseAddress = nvmCtrlInstance.registerGroupsMappedByName.at( "nvmctrl" ).offset; } diff --git a/src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp b/src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp index f2b9f75b..3c60444e 100644 --- a/src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp +++ b/src/Targets/Microchip/AVR/AVR8/TargetParameters.hpp @@ -52,7 +52,7 @@ namespace Bloom::Targets::Microchip::Avr::Avr8Bit std::optional lockRegistersPdiOffset; std::optional userSignaturesPdiOffset; std::optional productSignaturesPdiOffset; - std::optional nvmBaseAddress; + std::optional nvmModuleBaseAddress; // UPDI specific target params std::optional ocdModuleAddress;