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

ports/rp2: Use MICROPY_BOARD_DIR to find pins.csv. #13766

Closed

Conversation

Gadgetoid
Copy link
Contributor

It's not valid to assume that ${MICROPY_PORT_DIR}/boards/${MICROPY_BOARD} is equal to ${MICROPY_BOARD_DIR}, because the latter could be outside of ${MICROPY_PORT_DIR}, eg: https://github.com/pimoroni/badger2040/tree/main/firmware/PIMORONI_BADGER2040W

This PR replaces this path with the canonical ${MICROPY_BOARD_DIR} so that pins.csv is correctly located when building against out-of-tree board definitions.

Additionally I've removed MICROPY_BOARDS_DIR to discourage similar mistakes.

This bug caused pins.csv in our out-of-tree board definitions for Badger 2040W to not be detected- pimoroni/badger2040#60

Assuming that ${MICROPY_PORT_DIR}/boards/${MICROPY_BOARD} is
equal to ${MICROPY_BOARD_DIR} is not valid. Replace this path
with the canonical ${MICROPY_BOARD_DIR} so that pins.csv is
correctly located when building against out-of-tree board
definitions.

Additionally remove MICROPY_BOARDS_DIR to discourage similar
mistakes.

Signed-off-by: Phil Howard <phil@gadgetoid.com>
@Gadgetoid
Copy link
Contributor Author

Is there anything I can/should test that would help move this along?

@dpgeorge
Copy link
Member

dpgeorge commented Jun 3, 2024

Sorry I didn't get to this earlier. This is indeed a proper fix for the issue, and I also like the removal of MICROPY_BOARDS_DIR, because the name of that variable is too similar to MICROPY_BOARD_DIR.

Rebased and merged in 932f76c

@dpgeorge dpgeorge closed this Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants