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

Add support for Raspberry Pi Pico RP2040 board #12

Closed
wants to merge 3 commits into from
Closed

Add support for Raspberry Pi Pico RP2040 board #12

wants to merge 3 commits into from

Conversation

cyber-murmel
Copy link
Contributor

@cyber-murmel cyber-murmel commented Nov 30, 2022

This PR provides the files to run apollo on the Raspberry Pi Pico.

Compile with

export APOLLO_BOARD=raspberry_pi_pico
make -C firmware clean
make -C firmware

Pin Map

	TMS_GPIO = 5,
	TDI_GPIO = 3, // MOSI
	TDO_GPIO = 4, // MISO
	TCK_GPIO = 6, // SCK

I plan on also adding code for the Adafruit QT Py RP2040.

Please feel free to edit the code where you see fit.

@cyber-murmel cyber-murmel changed the title RP2040 Add support for Raspberry Pi Pico RP2040 board Nov 30, 2022
@mossmann mossmann self-assigned this Mar 31, 2023
@mossmann mossmann requested a review from mndza June 28, 2023 17:08
@mndza
Copy link
Contributor

mndza commented Jul 17, 2023

Thank you for your contribution!
We would like to merge this but I'm having some problems during the build process. This PR seems to expect a Pico SDK inside the TinyUSB repository, which I did not manage to find. I also get error messages providing an external path to it. Are you willing to take a quick look?

@cyber-murmel
Copy link
Contributor Author

RP2040 should be supported as of tinyusb 0.14.0
Maybe this PR needs to be rebased on a commit after #13
If that doesn't help, I might make some time to get another look at it.

@mossmann mossmann marked this pull request as draft November 2, 2023 16:02
@mossmann
Copy link
Member

mossmann commented Nov 2, 2023

I've marked this as a draft as it requires some rebasing.

@cyber-murmel
Copy link
Contributor Author

I got around to work on this again. The new branch is essentially the code form this branch copied over to master and adapted where required. It's at a stage where it compiles successfully for rp2040 targets and I confirmed the result by uploading blink.

Currently there is platform dependent code in button.c and usb_switch.c due to #include <hal/include/hal_gpio.h>.
I think this could be resolved by either moving both files to the boards code (like led.c) or by enabling this include with some SAMD dependent define.
I'd guess that moving it to the platform dependent code would be the preferred solution, but wanted to ask for your input.

@cyber-murmel cyber-murmel closed this by deleting the head repository Feb 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants