tinygo icon indicating copy to clipboard operation
tinygo copied to clipboard

Raspberry Pi RP2040 microcontroller(s)

Open alankrantas opened this issue 5 years ago • 22 comments

Something wild just appears:

https://www.raspberrypi.org/products/raspberry-pi-pico/ https://www.raspberrypi.org/products/raspberry-pi-pico/specifications/

Dual-core Cortex-M0+ (up to 133 MHz) with UF2 bootloader for 4$. Both Adafruit and Arduino will have their own RP2040 version as well.

alankrantas avatar Jan 21 '21 07:01 alankrantas

Also see https://github.com/posborne/cmsis-svd/pull/123

deadprogram avatar Jan 21 '21 21:01 deadprogram

For anybody wanting to implement support, please take a look here: https://twitter.com/therealjpster/status/1353063981619965956?s=19 It contains important information on the reset sequence.

aykevl avatar Jan 25 '21 21:01 aykevl

Just curious to know if anyone's working on this?

rajiv-kanchan avatar Feb 09 '21 06:02 rajiv-kanchan

Just curious to know if anyone's working on this?

Also see posborne/cmsis-svd#123

utahcon avatar Feb 09 '21 17:02 utahcon

I'm happy to help out at this topic, as soon as my pi picos arrive. Ordered 4, but they are currently not deliverable.

Nerzal avatar Feb 16 '21 12:02 Nerzal

https://www.cnx-software.com/2021/01/27/a-closer-look-at-raspberry-pi-rp2040-programmable-ios-pio/ looks helpful.

deadprogram avatar Feb 16 '21 17:02 deadprogram

I've got the blinky1 example running on a raspberry pi pico. Right now the sleep timing is a bit off, and there are a number of things I still need to clean up before I would be ready to submit a PR. I hope to have one ready in the next couple of days though.

jeffmhastings avatar Feb 17 '21 02:02 jeffmhastings

any progress on this..?

rammanokar avatar Mar 06 '21 07:03 rammanokar

I just received a couple of these boards and I am keen to help out getting tinygo working. I am not really familiar with the process of adding new boards but I am happy to checkout forks and test them.

@jeffmhastings I have checked out your branch and managed to get the blinky example going, nice work!

I have noticed that putchar is not implemented yet (https://github.com/jeffmhastings/tinygo/blob/rp2040/src/runtime/runtime_rp2040.go#L144) I assume this is important for getting the println function to work. I had a quick go at implementing it but I am pretty new to micro controllers and it would probably be easier for someone who knows what they are doing :joy:

kurtmc avatar Apr 10 '21 23:04 kurtmc

I've got a couple (pico and an Adafruit RP2040 feather) - will take a look if no-one gets there first. Waiting on FedEx to deliver me a J-Link though. In my experience SWD and a logic analyzer makes this stuff so much easier.

kenbell avatar Apr 11 '21 00:04 kenbell

Is anyone actively working on this? :crossed_fingers:

deadprogram avatar Apr 22 '21 08:04 deadprogram

Ive been working on a minimal integration, just enough to run the blinky1 example, based on the Pico C SDK.

rythmkraze avatar Apr 23 '21 07:04 rythmkraze

@rythmkraze I assume you have seen the @jeffmhastings fork?

deadprogram avatar Apr 23 '21 09:04 deadprogram

@deadprogram Yes I have.

rythmkraze avatar Apr 24 '21 09:04 rythmkraze

Any news?

lexfrei avatar May 05 '21 11:05 lexfrei

I second @lexfrei, where can we expect more info?😄

bartekpacia avatar May 15 '21 18:05 bartekpacia

As far as I know there are two attempts at bringing RP2040 support to TinyGo. Both seem abandoned and have similar amount of progress

  • https://github.com/jeffmhastings/tinygo/tree/rp2040 (last commit February)
  • https://github.com/rythmkraze/tinygo/tree/pico (last commit April)

To anyone else who embarks on this apparently perilous journey, godspeed.

soypat avatar May 16 '21 13:05 soypat

branch pico has been updated. Contains minimal implementation to get blinky1 example working. Only supports the machine.Pin API and that too in PinOutput mode.

rythmkraze avatar May 16 '21 22:05 rythmkraze

@rythmkraze is there any ETA? No pressure, just an interest.

lexfrei avatar May 17 '21 16:05 lexfrei

@rythmkraze can you please make a PR with that branch? That makes it a lot easier to review the changes for eventual inclusion. On a first glance, it looks pretty good although it needs a few changes to match the style of the rest of the TinyGo targets.

aykevl avatar May 19 '21 11:05 aykevl