Corrected flash size and start address in TDF validation script
This commit is contained in:
@@ -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)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user