Silence warning chipid files with STLINK_FLASH_TYPE_UNKNOWN
The chipid configuration parser currently emits a warning when it
encounters a file with the flash type set to
STLINK_FLASH_TYPE_UNKNOWN. In practice, this means that the warning
will always be printed since 'unknown_device.chip' uses this
value. Make STLINK_FLASH_TYPE_UNKNOWN a permitted value in the config
file parser.
@@ -1001,7 +1001,7 @@ void process_chipfile(char *fname) {
} else if (strcmp (word, "flash_type") == 0) {
if (sscanf(value, "%i", (int *)&ts->flash_type) < 1) {
fprintf(stderr, "Failed to parse flash type\n");
- } else if (ts->flash_type <= STLINK_FLASH_TYPE_UNKNOWN || ts->flash_type >= STLINK_FLASH_TYPE_MAX) {
+ } else if (ts->flash_type < STLINK_FLASH_TYPE_UNKNOWN || ts->flash_type >= STLINK_FLASH_TYPE_MAX) {
fprintf(stderr, "Unrecognized flash type\n");
}
} else if (strcmp (word, "flash_size_reg") == 0) {
