Allow 'host' platform to simulate either RP2040 or RP2350#2779
Open
rhulme wants to merge 1 commit intoraspberrypi:developfrom
Open
Allow 'host' platform to simulate either RP2040 or RP2350#2779rhulme wants to merge 1 commit intoraspberrypi:developfrom
rhulme wants to merge 1 commit intoraspberrypi:developfrom
Conversation
Contributor
Author
|
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. |
aa5b26e to
61ea156
Compare
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
61ea156 to
754bdf1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.