Skip to content

Conversation

@lurch
Copy link
Contributor

@lurch lurch commented Feb 18, 2025

Fixes #2220

With SORT_HEADERS_BY_DIRECTORY = True it shows you which directory the include files came from (which is the same behaviour as previous versions of this script) with the #if PICO_RP2040 and #if PICO_RP2350 headers at the very end

// rp2_common/hardware_pio/include
#include "hardware/pio.h"
#include "hardware/pio_instructions.h"

// rp2_common/hardware_pll/include
#include "hardware/pll.h"

// rp2_common/hardware_powman/include
#include "hardware/powman.h"

// rp2_common/hardware_pwm/include
#include "hardware/pwm.h"

// rp2_common/hardware_rcp/include
#include "hardware/rcp.h"

// rp2_common/hardware_resets/include
#include "hardware/resets.h"
...
// rp2xxx/hardware_structs/include
...
#include "hardware/structs/io_bank0.h"
#include "hardware/structs/io_qspi.h"
#include "hardware/structs/iobank0.h"
#include "hardware/structs/ioqspi.h"
#include "hardware/structs/mpu.h"
#include "hardware/structs/nvic.h"
#include "hardware/structs/pads_bank0.h"
#include "hardware/structs/pads_qspi.h"
#include "hardware/structs/padsbank0.h"
#include "hardware/structs/pio.h"
#include "hardware/structs/pll.h"

but with SORT_HEADERS_BY_DIRECTORY = False it just outputs a "flattened" list (which more closely matches the big list of header files in https://github.com/raspberrypi/pico-sdk/blob/develop/test/kitchen_sink/kitchen_sink.c ) with the #if PICO_RP2040 and #if PICO_RP2350 headers intermingled with everything else

#include "hardware/pio.h"
#include "hardware/pio_instructions.h"
#include "hardware/platform_defs.h"
#include "hardware/pll.h"
#include "hardware/powman.h"
#include "hardware/pwm.h"
#include "hardware/rcp.h"
#include "hardware/resets.h"
...
#include "hardware/structs/io_bank0.h"
#include "hardware/structs/io_qspi.h"
#include "hardware/structs/iobank0.h"
#include "hardware/structs/ioqspi.h"
#if PICO_RP2040
#include "hardware/structs/m0plus.h"
#endif
#if PICO_RP2350
#include "hardware/structs/m33.h"
#include "hardware/structs/m33_eppb.h"
#endif
#include "hardware/structs/mpu.h"
#include "hardware/structs/nvic.h"
#if PICO_RP2350
#include "hardware/structs/otp.h"
#endif
#include "hardware/structs/pads_bank0.h"
#include "hardware/structs/pads_qspi.h"
#include "hardware/structs/padsbank0.h"
#include "hardware/structs/pio.h"
#include "hardware/structs/pll.h"

@kilograham kilograham merged commit 7d0f44b into develop Mar 18, 2025
8 checks passed
@kilograham kilograham deleted the fix_all_headers_script branch March 18, 2025 18:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants