From 884f2ea57f308984a58d6455df5c581c75ddbb8f Mon Sep 17 00:00:00 2001 From: Nav Date: Thu, 2 Jun 2022 23:06:18 +0100 Subject: [PATCH] Included new XMEGA MCU module base address device parameter in AVR8 TDF validation script --- .../AVR8/Avr8TargetDescriptionFile.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php index 567f3a2f..bc24bf1a 100644 --- a/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php +++ b/build/scripts/TargetDescriptionFiles/AVR8/Avr8TargetDescriptionFile.php @@ -62,6 +62,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile public ?int $userSignaturesPdiOffset = null; public ?int $productSignaturesPdiOffset = null; public ?int $nvmModuleBaseAddress = null; + public ?int $mcuModuleBaseAddress = null; // UPDI specific target params public ?int $ocdBaseAddress = null; @@ -476,6 +477,18 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile } } } + + if (isset($this->peripheralModulesByName['mcu'])) { + $mcuModule = $this->peripheralModulesByName['mcu']; + + if (isset($mcuModule->instancesMappedByName['mcu'])) { + $mcuInstance = $mcuModule->instancesMappedByName['mcu']; + + if (isset($mcuInstance->registerGroupsMappedByName['mcu'])) { + $this->mcuModuleBaseAddress = $mcuInstance->registerGroupsMappedByName['mcu']->offset; + } + } + } } if (in_array(Avr8TargetDescriptionFile::AVR8_PHYSICAL_INTERFACE_UPDI, $this->debugPhysicalInterface)) { @@ -720,6 +733,9 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile if (is_null($this->nvmModuleBaseAddress)) { $failures[] = 'Missing NVM start address.'; + + if (is_null($this->mcuModuleBaseAddress)) { + $failures[] = 'Missing MCU module base address.'; } }