Linker generation script for most of the supported chips

This commit is contained in:
BuFran
2013-06-29 09:19:30 +02:00
committed by Piotr Esden-Tempski
parent beeb9c3f65
commit c2f7128459
3 changed files with 560 additions and 0 deletions

28
scripts/genlink.awk Normal file
View File

@@ -0,0 +1,28 @@
# This program converts chip name to the series of definitions for make of
# automatic linker script.
#
# Copyright (C) 2013 Frantisek Burian <Bufran@seznam.cz>
# Copyright (C) 2013 Werner Almesberger <wpwrak>
#
BEGIN {
PAT = tolower(PAT);
}
!/^#/{
tmp = "^"$1"$";
gsub(/?/, ".", tmp);
gsub(/*/, ".*", tmp);
gsub(/+/, ".+", tmp);
tolower(tmp);
if (PAT ~ tmp) {
if ($2 != "+")
PAT=$2;
$1="";
$2="";
for (i = 3; i <= NF; i = i + 1)
$i = "-D"$i;
print;
if (PAT=="END") exit;
}
}