Adjusted TDF validation scripts to properly handle targets that support numerous physical interfaces (for debugging)
This commit is contained in:
@@ -18,7 +18,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
const AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE = 'debugWire';
|
const AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE = 'debugWire';
|
||||||
|
|
||||||
public ?string $family = null;
|
public ?string $family = null;
|
||||||
public ?string $debugPhysicalInterface = null;
|
public array $debugPhysicalInterface = [];
|
||||||
|
|
||||||
// Target params
|
// Target params
|
||||||
public ?int $bootSectionStartAddress = null;
|
public ?int $bootSectionStartAddress = null;
|
||||||
@@ -83,16 +83,18 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($this->physicalInterfacesByName['debugwire'])) {
|
if (isset($this->physicalInterfacesByName['debugwire'])) {
|
||||||
$this->debugPhysicalInterface = self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE;
|
$this->debugPhysicalInterface[] = self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE;
|
||||||
|
}
|
||||||
|
|
||||||
} else if (isset($this->physicalInterfacesByName['jtag'])) {
|
if (isset($this->physicalInterfacesByName['updi'])) {
|
||||||
$this->debugPhysicalInterface = self::AVR8_PHYSICAL_INTERFACE_JTAG;
|
$this->debugPhysicalInterface[] = self::AVR8_PHYSICAL_INTERFACE_UPDI;
|
||||||
|
|
||||||
} else if (isset($this->physicalInterfacesByName['updi'])) {
|
|
||||||
$this->debugPhysicalInterface = self::AVR8_PHYSICAL_INTERFACE_UPDI;
|
|
||||||
|
|
||||||
} else if (isset($this->physicalInterfacesByName['pdi'])) {
|
} else if (isset($this->physicalInterfacesByName['pdi'])) {
|
||||||
$this->debugPhysicalInterface = self::AVR8_PHYSICAL_INTERFACE_PDI;
|
$this->debugPhysicalInterface[] = self::AVR8_PHYSICAL_INTERFACE_PDI;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isset($this->physicalInterfacesByName['jtag'])) {
|
||||||
|
$this->debugPhysicalInterface[] = self::AVR8_PHYSICAL_INTERFACE_JTAG;
|
||||||
}
|
}
|
||||||
|
|
||||||
$progAddressSpace = $this->addressSpacesById['prog'] ?? null;
|
$progAddressSpace = $this->addressSpacesById['prog'] ?? null;
|
||||||
@@ -371,8 +373,11 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
$failures[] = 'Missing eeprom page size.';
|
$failures[] = 'Missing eeprom page size.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->debugPhysicalInterface == self::AVR8_PHYSICAL_INTERFACE_JTAG
|
if (in_array(self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE, $this->debugPhysicalInterface)
|
||||||
|| $this->debugPhysicalInterface == self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE
|
|| (
|
||||||
|
in_array(self::AVR8_PHYSICAL_INTERFACE_JTAG, $this->debugPhysicalInterface)
|
||||||
|
&& $this->family == self::AVR8_FAMILY_MEGA
|
||||||
|
)
|
||||||
) {
|
) {
|
||||||
if (is_null($this->ocdRevision)) {
|
if (is_null($this->ocdRevision)) {
|
||||||
$failures[] = 'Missing OCD revision.';
|
$failures[] = 'Missing OCD revision.';
|
||||||
|
|||||||
Reference in New Issue
Block a user