Allow 'host' platform to simulate either RP2040 or RP2350 #2779
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
picotoolrepository when building for a genuinerp2350target as it does not initialise the pico-sdk completely and so will fail to findplatform_defs.h.