Skip to content

Conversation

@rhulme
Copy link
Contributor

@rhulme rhulme commented Dec 30, 2025

The 'host' platform only really partially simulates an RP2040 environment, with no way to specify a particular board either, so attempting to build a host version of a existing code that uses an RP2350 or relies on values defined in a board file is either difficult or impossible.

Instead of setting PICO_PLATFORM to just 'host', it can now be set to 'host-rp2040' or 'host-rp2350' and PICO_BOARD can be set to any board configuration that is compatible with the given chip type. Platform definitions for the given chip will be fetched, meaning defines such as 'NUM_IRQS' will be set correctly.

Fixes #2778

Note that some changes are needed to the picotool repository when building for a genuine rp2350 target as it does not initialise the pico-sdk completely and so will fail to find platform_defs.h.

@rhulme
Copy link
Contributor Author

rhulme commented Dec 30, 2025

No changes were made to the Bazel environment as this appears to be more complicated (and a brand new area for me) and I'd rather not invest the time without knowing if this approach is going to be acceptable.

@rhulme rhulme force-pushed the host_chip_alternatives branch from aa5b26e to 61ea156 Compare December 30, 2025 19:19
@kilograham kilograham self-assigned this Jan 5, 2026
The 'host' platform only really partially simulates an RP2040
environment, with no way to specify a particular board either, so
attempting to build a host version of a existing code that uses an
RP2350 or relies on values defined in a board file is either difficult
or impossible.

Instead of setting PICO_PLATFORM to just 'host', it can now be set to
'host-rp2040' or 'host-rp2350' and PICO_BOARD can be set to any board
configuration that is compatible with the given chip type.
Platform definitions for the given chip will be fetched, meaning
defines such as 'NUM_IRQS' will be set correctly.

Fixes raspberrypi#2778
@rhulme rhulme force-pushed the host_chip_alternatives branch from 61ea156 to 754bdf1 Compare January 7, 2026 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants