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 RP2040 MCU and the Pico board #16613

Closed
wants to merge 1 commit into from

Conversation

iia
Copy link

@iia iia commented Jul 5, 2021

Contribution description

Initial support for Raspberry Pi Pico and RP2040 MCU. The board is configured to operate using the on-board XTAL at 12MHz.

Currently using the picotool to flash the board (by pressing the BOOTSEL button).

Implemented drivers:

  • UART.
  • GPIO (no GPIO IRQs yet).
  • Timer.

Testing procedure

Tested by compiling and flashing:

  • test/periph_stdin
  • test/periph_gpio
  • test/periph_timer

Issues/PRs references

I just saw another PR #16609 was submitted just an hour before I was about to submit this one. Don't know what to do about it.

@github-actions github-actions bot added Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration labels Jul 5, 2021
@benpicco
Copy link
Contributor

benpicco commented Jul 5, 2021

Now this is a single commit adding 165118 lines and touching 478 files, it's very hard to review that.
Generally adding a new CPU should be split into

  • adding vendor files
  • adding core CPU support
  • one commit for each driver
  • a commit adding board support

The duplicate effort is unfortunate, but then again this makes you the ideal person to take a look at #16609 and chip in what you learned from the process of porting RIOT to the rp2040.
Seeing that the other PR still lacks a timer driver, you might be a able to contribute yours 😉

And there are still plenty of other peripheral drivers that need to be implemented.

@benpicco benpicco requested a review from maribu July 5, 2021 10:41
@iia
Copy link
Author

iia commented Jul 5, 2021

@benpicco Thanks for the comment.

There are too many new files because for adding the vendor files I added the complete Pico SDK. I guess that was not a very good idea.

For future, it would be preferable in such cases to only add what is required from the vendor SDK?

Cheers.

@kaspar030
Copy link
Contributor

Hm, these clashes are most unfortunate. :(
This PR seems to have a timer driver!

@iia
Copy link
Author

iia commented Jul 5, 2021

@benpicco @kaspar030 So what do you guys suggest? The only feasible option is to wait until the other PR is upstreamed and then contribute, for example the timer driver?

@benpicco
Copy link
Contributor

The USB peripheral would be anther big and important feature, I'm not sure if anyone is working on that yet.
Not sure what's the status of SPI and I2C, those are comparably low hanging fruits but I could imagine someone is already working on that.

@maribu
Copy link
Member

maribu commented Jul 14, 2021

Maybe it is best to use #15822 to sync efforts? @fabian18 is also working on peripheral drivers, but will be busy writing exams in the next weeks.

@benpicco
Copy link
Contributor

benpicco commented Aug 9, 2021

superseded by #16609 and #16627, sorry for the duplicate effort.

@benpicco benpicco closed this Aug 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: boards Area: Board ports Area: cpu Area: CPU/MCU ports Area: doc Area: Documentation Area: Kconfig Area: Kconfig integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants