EESAVE fuse bit TDF validation
This commit is contained in:
@@ -95,6 +95,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
||||
public ?FuseBitDescriptor $dwenFuseBitDescriptor = null;
|
||||
public ?FuseBitDescriptor $ocdenFuseBitDescriptor = null;
|
||||
public ?FuseBitDescriptor $jtagenFuseBitDescriptor = null;
|
||||
public ?FuseBitDescriptor $eesaveFuseBitDescriptor = null;
|
||||
|
||||
protected function init()
|
||||
{
|
||||
@@ -272,6 +273,11 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
||||
$this->jtagenFuseBitDescriptor = new FuseBitDescriptor();
|
||||
$this->jtagenFuseBitDescriptor->fuseType = $fuseType;
|
||||
}
|
||||
|
||||
if (isset($fuseRegister->bitFieldsByName['eesave'])) {
|
||||
$this->eesaveFuseBitDescriptor = new FuseBitDescriptor();
|
||||
$this->eesaveFuseBitDescriptor->fuseType = $fuseType;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -862,6 +868,15 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
in_array(Avr8TargetDescriptionFile::AVR8_PHYSICAL_INTERFACE_JTAG, $this->debugPhysicalInterfaces)
|
||||
|| in_array(Avr8TargetDescriptionFile::AVR8_PHYSICAL_INTERFACE_UPDI, $this->debugPhysicalInterfaces)
|
||||
) {
|
||||
if (empty($this->eesaveFuseBitDescriptor)) {
|
||||
$failures[] = 'Could not find EESAVE fuse bit field for JTAG/UPDI target.';
|
||||
}
|
||||
}
|
||||
|
||||
$portPeripheralModule = $this->peripheralModulesByName['port'] ?? null;
|
||||
if (empty($portPeripheralModule)) {
|
||||
$failures[] = 'PORT peripheral module not found.';
|
||||
|
||||
Reference in New Issue
Block a user