Corrected flash size and start address in TDF validation script

This commit is contained in:
Nav
2022-07-09 14:06:03 +01:00
parent e30030c017
commit 049ccc1439

View File

@@ -251,16 +251,15 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
$progAddressSpace = $this->addressSpacesById['prog'] ?? null; $progAddressSpace = $this->addressSpacesById['prog'] ?? null;
if (!empty($progAddressSpace)) { if (!empty($progAddressSpace)) {
$flashMemorySegment = $progAddressSpace->memorySegmentsByTypeAndName['flash']['flash'] $this->flashSize = $progAddressSpace->size;
?? $progAddressSpace->memorySegmentsByTypeAndName['flash']['app_section'] $this->flashStartAddress = $progAddressSpace->startAddress;
?? $progAddressSpace->memorySegmentsByTypeAndName['flash']['progmem'] ?? null;
$firstFlashMemorySegment = reset($progAddressSpace->memorySegmentsByTypeAndName['flash']);
$bootSectionMemorySegment = $progAddressSpace->memorySegmentsByTypeAndName['flash']['boot_section_1'] $bootSectionMemorySegment = $progAddressSpace->memorySegmentsByTypeAndName['flash']['boot_section_1']
?? $progAddressSpace->memorySegmentsByTypeAndName['flash']['boot_section'] ?? null; ?? $progAddressSpace->memorySegmentsByTypeAndName['flash']['boot_section'] ?? null;
if (!empty($flashMemorySegment)) { if (!empty($firstFlashMemorySegment)) {
$this->flashSize = $flashMemorySegment->size; $this->flashPageSize = $firstFlashMemorySegment->pageSize;
$this->flashStartAddress = $flashMemorySegment->startAddress;
$this->flashPageSize = $flashMemorySegment->pageSize;
} }
if (!empty($bootSectionMemorySegment)) { if (!empty($bootSectionMemorySegment)) {