Skip to content

Commit c650739

Browse files
authored
Look for other possible "missing PICO_CONFIG" lines, and make message more obvious (#2477)
1 parent 58d000f commit c650739

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

tools/extract_configs.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,9 @@ def ValidateAttrs(config_name, config_attrs, file_path, linenum):
240240
chips_resolved_defines = defaultdict(dict)
241241
for applicable, all_defines in chips_all_defines.items():
242242
for d in all_defines:
243-
if d not in all_config_names and d.startswith("PICO_"):
244-
logger.warning("Potential unmarked PICO define {}".format(d))
243+
for define_prefix in ('PICO', 'PARAM', 'CYW43'):
244+
if d not in all_config_names and d.startswith(define_prefix+'_'):
245+
logger.warning("#define {} is potentially missing a {}: entry".format(d, BASE_CONFIG_NAME))
245246
resolved_defines = chips_resolved_defines[applicable]
246247
# resolve "nested defines" - this allows e.g. USB_DPRAM_MAX to resolve to USB_DPRAM_SIZE which is set to 4096 (which then matches the relevant PICO_CONFIG entry)
247248
for val in all_defines[d]:

0 commit comments

Comments
 (0)