Added PORT peripheral validation for AVR8 TDFs

This commit is contained in:
Nav
2021-06-08 00:31:15 +01:00
parent a42ce9e1e3
commit 23b54eb7c3
4 changed files with 38 additions and 0 deletions

View File

@@ -484,6 +484,18 @@ class Avr8TargetDescriptionFile extends TargetDescriptionFile
}
}
$portPeripheralModule = $this->peripheralModulesByName['port'] ?? null;
if (empty($portPeripheralModule)) {
$failures[] = 'PORT peripheral module not found.';
} else {
foreach ($portPeripheralModule->instancesMappedByName as $portInstance) {
if (empty($portInstance->signals)) {
$failures[] = 'No signals defined for port ' . $portInstance->name . ' in PORT peripheral module.';
}
}
}
return $failures;
}
}