Included TDF validation at build time

This commit is contained in:
Nav
2021-06-20 16:10:46 +01:00
parent 46773a82b3
commit 35675041fe

View File

@@ -37,6 +37,14 @@ print "Processing " . count($avrTdfs) . " AVR8 TDFs...\n\n";
foreach ($avrTdfs as $avrTdf) {
print "Processing AVR8 TDF for target " . $avrTdf->targetName . "\n";
if (!empty(($validationFailures = $avrTdf->validate()))) {
print "\033[31m\n";
print "FATAL ERROR: AVR8 TDF failed validation - failure reasons:\n"
. implode("\n", $validationFailures) . "\n\nTDF Path: " . realpath($avrTdf->filePath);
print "\033[0m\n\n";
exit(1);
}
$destinationFilePath = AVR_TDF_DEST_FILE_PATH;
$relativeDestinationFilePath = AVR_TDF_DEST_RELATIVE_FILE_PATH;