Default mcuid without warning for parts known at compile time

This commit is contained in:
Stefan Rueger 2022-09-11 15:33:23 +01:00
parent dab99c0823
commit 168a8b92e9
No known key found for this signature in database
GPG Key ID: B0B4F1FD86B1EC55
1 changed files with 3 additions and 2 deletions

View File

@ -850,12 +850,13 @@ void cfg_update_mcuid(AVRPART *part) {
if(part->prog_modes & PM_aWire)
return;
// Find an entry that shares the same name
// Find an entry that shares the same name, overwrite mcuid with known, existing mcuid
for(int i=0; i < sizeof uP_table/sizeof *uP_table; i++) {
if(strcasecmp(part->desc, uP_table[i].name) == 0) {
if(part->mcuid != (int) uP_table[i].mcuid) {
if(part->mcuid >= 0)
yywarning("overwriting mcuid of part %s to be %d", part->desc, uP_table[i].mcuid);
part->mcuid = uP_table[i].mcuid;
yywarning("assigned mcuid = %d to part %s", part->mcuid, part->desc);
}
return;
}