Added EEPROM start address check to TDF validation script
This commit is contained in:
@@ -40,6 +40,7 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
public ?int $ramSize = null;
|
public ?int $ramSize = null;
|
||||||
public ?int $eepromSize = null;
|
public ?int $eepromSize = null;
|
||||||
public ?int $eepromPageSize = null;
|
public ?int $eepromPageSize = null;
|
||||||
|
public ?int $eepromStartAddress = null;
|
||||||
public ?int $eepromAddressRegisterHigh = null;
|
public ?int $eepromAddressRegisterHigh = null;
|
||||||
public ?int $eepromAddressRegisterLow = null;
|
public ?int $eepromAddressRegisterLow = null;
|
||||||
public ?int $eepromDataRegisterAddress = null;
|
public ?int $eepromDataRegisterAddress = null;
|
||||||
@@ -297,16 +298,19 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
|
|
||||||
if (isset($dataAddressSpace->memorySegmentsByTypeAndName['eeprom']['eeprom'])) {
|
if (isset($dataAddressSpace->memorySegmentsByTypeAndName['eeprom']['eeprom'])) {
|
||||||
$eepromMemorySegment = $dataAddressSpace->memorySegmentsByTypeAndName['eeprom']['eeprom'];
|
$eepromMemorySegment = $dataAddressSpace->memorySegmentsByTypeAndName['eeprom']['eeprom'];
|
||||||
|
$this->eepromStartAddress = $eepromMemorySegment->startAddress;
|
||||||
$this->eepromSize = $eepromMemorySegment->size;
|
$this->eepromSize = $eepromMemorySegment->size;
|
||||||
$this->eepromPageSize = $eepromMemorySegment->pageSize;
|
$this->eepromPageSize = $eepromMemorySegment->pageSize;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((is_null($this->eepromSize) || is_null($this->eepromPageSize))
|
if (
|
||||||
|
(is_null($this->eepromSize) || is_null($this->eepromPageSize) || is_null($this->eepromStartAddress))
|
||||||
&& isset($this->addressSpacesById['eeprom'])
|
&& isset($this->addressSpacesById['eeprom'])
|
||||||
) {
|
) {
|
||||||
$eepromAddressSpace = $this->addressSpacesById['eeprom'];
|
$eepromAddressSpace = $this->addressSpacesById['eeprom'];
|
||||||
$eepromMemorySegments = $eepromAddressSpace->memorySegmentsByTypeAndName['eeprom'] ?? null;
|
$eepromMemorySegments = $eepromAddressSpace->memorySegmentsByTypeAndName['eeprom'] ?? null;
|
||||||
|
$this->eepromStartAddress = $eepromAddressSpace->startAddress;
|
||||||
|
|
||||||
if (!empty($eepromMemorySegments)) {
|
if (!empty($eepromMemorySegments)) {
|
||||||
$eepromMemorySegment = reset($eepromMemorySegments);
|
$eepromMemorySegment = reset($eepromMemorySegments);
|
||||||
@@ -688,6 +692,10 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
|
|||||||
$failures[] = 'Missing eeprom page size.';
|
$failures[] = 'Missing eeprom page size.';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (is_null($this->eepromStartAddress)) {
|
||||||
|
$failures[] = 'Missing eeprom start address.';
|
||||||
|
}
|
||||||
|
|
||||||
if (in_array(self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE, $this->debugPhysicalInterfaces)
|
if (in_array(self::AVR8_PHYSICAL_INTERFACE_DEBUG_WIRE, $this->debugPhysicalInterfaces)
|
||||||
|| (
|
|| (
|
||||||
in_array(self::AVR8_PHYSICAL_INTERFACE_JTAG, $this->debugPhysicalInterfaces)
|
in_array(self::AVR8_PHYSICAL_INTERFACE_JTAG, $this->debugPhysicalInterfaces)
|
||||||
|
|||||||
Reference in New Issue
Block a user