-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
RP2: Add support for Arduino Nano RP2040 #7669
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
Conversation
813628e
to
f24de36
Compare
ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/modules/lsm6dsox.py
Outdated
Show resolved
Hide resolved
fca4e52
to
4aee33b
Compare
670095a
to
22aa55e
Compare
I found this set of PR's a little bit confusing and hard for maintainers to deal with it. I wanted to test WiFi support only for the Nano and abandoned it given the set of PRs I found. What I had expected was: |
Hi, you can just test our OpenMV firmware it's based on MicroPython 1.15 but it has all of these features enabled for the Nano (and some examples)
I think multiple smaller independent PRs are much easier to process, but I also don't like to cascade PRs like that because most tend to change a lot and some might get dropped...In this case I thought about moving modnetwork/modusocket to extmod only after this PR, so I sent another PR to move these modules, which I don't know yet if it's going to be merged or not, so I'm also leaving the duplicate files in the networking PR as is until it gets decided. |
@robert-hh I updated the list of linked PRs, you can see that most of them were independent of each other, if they were cascaded on top of each other (or combined) they would most likely still be unmerged, and none of these smaller fixes would have made it to 1.17 release (for example the flash fix and MSC support) |
fdeb249
to
8c1c590
Compare
I tried to build this PR: and build fails.. I tried some of the other boards and they build just fine including PICO
|
Great, please note some boards have different flash chips, if after copying the firmware the board doesn't work you need to apply this small patch to the pico-sdk: raspberrypi/pico-sdk#537 |
I was a little too quick earlier, I accidentally compiled pyb which worked on master. now I made my own branch, and merged the #7668 and #7669 and NIC works like a charm: print("active:", nic.active()) nic.ifconfig(('192.168.2.2', '255.255.255.0', '192.168.2.1', '8.8.8.8')) result: |
@dpgeorge Hi, can we get this back on track ? I'm 3 PRs away (including this one) from fully supporting this board in upstream, and the 3 remaining PRs have been ready for too long without any review or feedback. |
Yes! I reviewed the main WiFi driver #7668. As for this PR, I'd really prefer if it did not include the audio driver because it makes it much harder to review, and the discussion will be longer (eg it includes an ST driver that needs to go elsewhere). Please make this PR just about adding a board definition for the RP2040, then audio can be discussed separately. |
8c1c590
to
5378ea7
Compare
|
1c6821b
to
6429061
Compare
ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/modules/ble_advertising.py
Outdated
Show resolved
Hide resolved
ports/rp2/boards/ARDUINO_NANO_RP2040_CONNECT/modules/lsm6dsox.py
Outdated
Show resolved
Hide resolved
Can you please add a |
6429061
to
87666c0
Compare
done. |
f971c01
to
40ff4f7
Compare
Thanks for taking into account the feedback so far. It would be great if you could also please split the single commit here into two commits (in this same PR):
(I know I always go on about separating commits, but it really does help!) |
40ff4f7
to
3c87bbe
Compare
Done. |
3c87bbe
to
094b6c8
Compare
There's 1 PR left (the MSC support) it would be nice if it's merged first, note it's not enabled for the port just for the Nano. It's currently needed for the IMU MLC example and later for Audio, which I will send in a following PR after everything is merged and after some refactoring. |
But if MSC is enabled for the Nano then this board is now different to all other rp2 boards. And that may lead to confusion, and questions about why it's enabled on Nano only, and the only way to solve that would be to enable MSC on all rp2 boards. It's a bit of a slippery slope.
It's possible to use From the discussion in #7402 there are good points for and against MSC, but it's still not clear whether MSC should be supported on rp2. And as I say above I think it'll be confusing if some rp2 boards support it and some don't. I would rather merge this PR now, so it's not blocked by the MSC discussion, and continue the MSC discussion in #7402. |
I agree on that let's revisit later. |
Great thanks!
I will check this and send a PR. |
This should be closed #7634 |
Question, does it have to match the data types too ? because I return a nicely formatted mac address (vs just bytes). |
Yes. Otherwise code will not be compatible across devices. Eg I have a script that does wifi scanning and prints out a nice result where the MAC is formatted, and if the MAC is already formatted then it will get double formatted. |
It's now the same order/data type as other NICs, plus small fix to netinfo command #8004 |
OnDiskGif delay was being chopped to 8 bits
Requires and depends on the following for (WiFi/BT, MSC support and misc fixes.):
Closes #7634
NOTE: Until this patch raspberrypi/pico-sdk#537 gets merged and makes it to a stable release, Arduino Nano RP2040 boards with the newer flash part will Not work.