-
Notifications
You must be signed in to change notification settings - Fork 2
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 rp2040 RPi Pico W support #12
Conversation
I recently bought a few RPI Pico W's, specifically with the hopes that someone would eventually add support for it on fprime, so I'd be happy to assist with validating this PR. Are there guidelines for how one could go about doing so? |
Hello @capsulecorplab , At this moment the most useful thing you could do is try to see if you can compile a demo deployment with this platform, and comment with whatever issues you run into. At the very least, the readme is sparse and may need some hints to get someone started using it. |
@capsulecorplab @SterlingPeet |
@SterlingPeet @ethancheez Thanks for the pointers! I've gotten as far as building/running unit tests for the workshop led blinker project. I'm working on updating my development environment with the arduino-cli tools for building the arduino-led-blinker project. Will post updates as I go~ |
Got the Arduino CLI tools installed in (a branch of) my dev environment. I tried cloning the fprime-arduino-led-blinker and updating the |
@capsulecorplab arduino-cli config add board_manager.additional_urls https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json And run: arduino-cli core install rp2040:rp2040 |
Yup, installed here |
Also, I think I found the issue... I didn't reset the persistence layer in my VM, so it didn't populate the arduino workspace directory with the board packages, which explains why it didn't find it 😅 |
@capsulecorplab My workaroud was to comment out the These are deprecated functions which (should?) be removed from core F' eventually? |
That worked! |
So full disclosure, it's my first time connecting a raspberry pi pico w to my (Linux Mint) desktop via usb cable... It shows up as a media device but I'm not seeing it on my list of devices with |
If you run |
No, but I would need to bind the device from my host machine to my virtual machine in order for that to work. |
So, apparently the RP2040 doesn't ship with a serial port and only shows up as a mass storage device https://learn.adafruit.com/dude-where-s-my-com-port?view=all#rp2040-rom-bootloader-specific-3136942 |
Interesting, my Pico shows up as I can think of two ways to potentially solve this issue. Method 1I believe there should be a .UF2 file in your Edit: I just tried this and can confirm this works. Method 2Here are the steps I did to acquire the upload command for the Pico W. Maybe you can try this and see if it works for you.
Also take a note if the port name appears when you select the Pico board on your IDE. Maybe it isn't |
I think this worked for me as well, as I'm now seeing a |
Run |
Yes, I noted in this issue (and this) that we used the devel version of fprime-tools. So the |
Cool~ Opened an issue here 🙂 |
Anything else I can test while I'm here? Communicating over WLAN perhaps? |
WLAN communication was definitely in my TODOs, especially since I got F' deployed on both the Pico W and ESP32, both of which have WiFi chips. If you are willing to create a WLAN component, that would be amazing! If you take a look at my Baremetal Reference, I am currently using a radio to wirelessly command an F' deployment. Think about it like a ground station talking to a satellite. |
I probably haven't gone through enough fprime tutorials to know where to start with developing a WLAN component, so I'd need some guidance to tackle such a feature, to say the least. I recall getting the blinking led example working wirelessly with the RPI reference deployment at one point - any chance we could reuse components from there? |
The RPi Ref deployment uses TCP/IP to communicate through a socket. These are currently implemented as You would follow this structure since I believe the WiFi chip on the Pico W also uses sockets and the TCP/IP protocol. However the driver will most likely be different than the one in I would poke around some WLAN C++ libraries for the Pico W. The Arduino package might be a good start. For example, I found this after a quick Google search. |
Should the TCP/IP driver be a part of this PR or perhaps its own separate ticket+PR? |
Also, should probably add a license #13 to the repo, so that we're not in violation of any copyrights owned by @SterlingPeet 🙃 |
A separate PR would be better. |
TCP Client Driver has been made :) It is under I tested this with my Rpi Pico W and was successfully able to command it through the GDS. Here is an example of the implementation into the topology. Also, when you start up the GDS, this is going to be your new command:
You would need to start the GDS first, and then power on the Rpi Pico W. |
@ethancheez sorry for the delay. Finally got around to compiling the arduino led blinker project with the tcp client driver (I think...). Though, I'm encountering an odd behavior when I try to drag and drop the .uf2 file into my rpi pico media storage device where it disconnects before it completes copying over. Any ideas? |
It only unmounts during the upload process? If you plug in the Pico with the BOOTSEL pressed down, wait for the media device to appear, leave it for a bit without uploading the .uf2 file, does it still unmount? If so, it could be a hardware issue. From my experience, the pico automatically unmounts after the .uf2 file is copied over. Perhaps you can try the second upload method using the cli, does it succeed there? If not, try upload a simple blink program using the Arduino IDE and see if that succeeds. |
I haven't experienced it unmounting on its own; only while the .uf2 file is uploading.
If plugged back in, the .uf2 file doesn't appear alongside the other files.
I haven't tried the 2nd method via the arduino-cli. Is it as simple as running |
If I recall correctly, the .uf2 file does not reappear in the media device after the upload completes.
I have the instructions written here |
Right. I think I'd need to implement a serial bootloader on my Pico W, as it doesn't show up as a serial port https://learn.adafruit.com/dude-where-s-my-com-port?view=all#rp2040-rom-bootloader-specific-3136942; Maybe using something like https://github.com/usedbytes/rp2040-serial-bootloader |
It's possible method 1 also worked, I'm just not able to connect to it with |
If platform specific uploading tools or components need to be developed, that should probably be a separate development effort.
Sterling
Sent from my mobile.
On Aug 22, 2023, at 6:39 PM, Sean Marquez ***@***.***> wrote:
Right. I think I'd need to implement a serial bootloader on my Pico W, as it doesn't show up as a serial port https://learn.adafruit.com/dude-where-s-my-com-port?view=all#rp2040-rom-bootloader-specific-3136942; Maybe using something like https://github.com/usedbytes/rp2040-serial-bootloader
—
Reply to this email directly, view it on GitHub<#12 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AAO7KVTHAJZYLBVWGKE5SB3XWUYIXANCNFSM6AAAAAAZWJRN3M>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
No description provided.