Refactor extraction-scripts to reduce code-duplication #2592

Merged
lurch merged 1 commit from extract_refactor into develop 2025-07-25 09:14:31 -05:00
lurch commented 2025-07-24 19:59:43 -05:00 (Migrated from github.com)

extract_configs.py now supports reading min, max or default values from a #define value (which reduces false-positives)

This means for an entry like:

// PICO_CONFIG: PICO_NUM_VTABLE_IRQS, Number of IRQ handlers in the vector table - can be lowered to save space if you aren't using some higher IRQs, type=int, default=NUM_IRQS, group=hardware_irq

the tools/exract_configs.py script is now able to (internally) resolve the default value to 32 (because src/rp2040/hardware_regs/include/hardware/platform_defs.h says #define NUM_IRQS _u(32)), and so you no longer get a warning like:

INFO:__main__:PICO_NUM_VTABLE_IRQS at ./src/rp2_common/pico_platform_common/include/pico/platform/common.h:33 has non-integer default value "NUM_IRQS"

(the contents of the TSV files that get created are unchanged though)

extract_configs.py now supports reading min, max or default values from a #define value (which reduces false-positives) This means for an entry like: > // PICO_CONFIG: PICO_NUM_VTABLE_IRQS, Number of IRQ handlers in the vector table - can be lowered to save space if you aren't using some higher IRQs, type=int, default=NUM_IRQS, group=hardware_irq the `tools/exract_configs.py` script is now able to (internally) resolve the `default` value to `32` (because `src/rp2040/hardware_regs/include/hardware/platform_defs.h` says `#define NUM_IRQS _u(32)`), and so you no longer get a warning like: > INFO:\_\_main\_\_:PICO_NUM_VTABLE_IRQS at ./src/rp2_common/pico_platform_common/include/pico/platform/common.h:33 has non-integer default value "NUM_IRQS" (the contents of the TSV files that get created are unchanged though)
kilograham (Migrated from github.com) approved these changes 2025-07-25 09:14:25 -05:00
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
gh-raspberrypi/pico-sdk!2592
No description provided.