Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RP2 Port Uses RP2040 Headers for RP2350 Builds #10181

Closed
eightycc opened this issue Mar 25, 2025 · 3 comments
Closed

RP2 Port Uses RP2040 Headers for RP2350 Builds #10181

eightycc opened this issue Mar 25, 2025 · 3 comments
Labels
rp2 Both RP2 microcontrollers

Comments

@eightycc
Copy link
Collaborator

The Pico SDK has headers common to the RP2040 and RP2350 as well as headers specific to these processors. In some cases, CP RP2 port code includes RP2040-specific headers unconditionally. For example, common_hal/rp2pio/StateMachine.c included src/rp2040/hardware_regs/include/hardware/platform_defs.h causing it to miss the third PIO available on the RP2350.

RP2 port code needs to be examined for other instances of this problem.

@eightycc eightycc added the rp2 Both RP2 microcontrollers label Mar 25, 2025
@eightycc eightycc changed the title RP2 Ports Use RP2040 Headers for RP2350 Builds RP2 Port Uses RP2040 Headers for RP2350 Builds Mar 26, 2025
@dhalbert
Copy link
Collaborator

Thank you for finding this!

Another related thing to watch out for:
#define PICO_RP2350A 1 means compile for the RP2350A chip.
#define PICO_RP2350A 0 means compile for the RP2350B chip. There is noPICO_RP2350B right now (!).

This might get fixed soon: raspberrypi/pico-sdk#2364 and earlephilhower/arduino-pico#2878.

@eightycc
Copy link
Collaborator Author

Thanks for pointing that out. Also related is #10141.

@eightycc
Copy link
Collaborator Author

@jepler notes: ...a comprehensive fix (would probably be to add the correct -isystem or -I compiler flags so that the header can be included as hardware/platform_defs.h etc.

Agree completely.

jepler added a commit to jepler/circuitpython that referenced this issue Mar 26, 2025
This lets each MCU type get the correct definitions. It also simplifies
paths at include sites.

Closes: adafruit#10181
jepler added a commit to jepler/circuitpython that referenced this issue Mar 26, 2025
This lets each MCU type get the correct definitions. It also simplifies
paths at include sites.

Closes: adafruit#10181
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rp2 Both RP2 microcontrollers
Projects
None yet
Development

No branches or pull requests

2 participants