boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19250
boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19250ricardgb wants to merge 4 commits into
Conversation
|
@linguini1 why close this pr? All developers will do the development with AI assistant sooner or later; it isn't good to close the AI assistant pr directly without any justification. |
This PR, its text, and the users comments are entirely generated by Claude Code. |
ALL my pr done in this year do by AI, does this mean I can't contribute to NuttX? |
Every one? I assume you are reviewing the output, but this PR is highly suspicious of someone who did not properly review the output. It is an account with almost no activity and no prior contributions to NuttX. I personally don't think anything entirely AI generated should be in the NuttX kernel; it should be an assistance tool. But, that is not up to me. In this case, I closed the PR because it looks like it was generated by someone with no understanding of what they're doing. Also, there continues to be legal issues with licensing of AI-generated code. |
linguini1
left a comment
There was a problem hiding this comment.
Please include the full test logs of what you tested on the Pico.
Yes, ALL my patch include pr is generated by Claude Code, but of course I review each line change carefully and do the test before I request AI create the pr.
@ricardgb please answer @linguini1's concern.
We need accept the trend: all developers will utilize AI to generate material (code, commit, documentation, pr) sooner or later.
it's new topic, we should consult Apache legal team. |
|
Hi, I'm the developer who submitted the PR. First of all, thanks for all the work being done in this great OS. I have a degree in electonics engineering and have been developing with nuttx for several years now (as a hobby). Although I tried to run nuttx on a pi pico before, I was unable to make the wifi work. I tried with Claude Code and I managed to have a running telnet over wifi, so I thought the work may save days of work to someone else. Regards, |
|
There is actually some guidance from the Apache team here: https://www.apache.org/legal/generative-tooling.html#include-in-contributions The TLDR: It notes that a) no generated output is copyrightable at all and b) all generated output must be verified to be compatible with open source licensing, not containing any third party materials. This is quite impossible to do, and it's been shown in multiple studies that AI generated output can verbatim contain text that was in its training corpus (i.e. incompatible licensed code like GPLv2 ripped from somewhere on the internet). See this for example. The only way for us to really verify that code is compatible is if it comes from a human brain. AI assistance should be used for assistance only, not entirely generating board ports with Claude. There is no way we can ensure it's safe to release that under an Apache 2.0 license, and it's also a major time sink to review PRs where the author puts "Please review accordingly.". It is the contributor's responsibility to properly review and test their own patch before submission, not for us to review their AI output. |
Thank you for the additional information! Can you attach this in your PR description? Did you generate the entire board port using Claude? |
Hi, basically I did the entire board port using Claude, although I have some failed attempts sitting on my computer. I understand that it may be against the policy to not publish AI code, but at least the PR itself can be of use to someone. Best regards, |
Understood. NuttX currently doesn't have an official policy stance on AI (we desperately need one), so this may be up for debate, but for the aforementioned legality issues of releasing an entirely generated port under Apache 2.0 I think this needs to wait for comment. |
|
@ricardgb @xiaoxiang781216 @linguini1 I'm not against the AI usage, but I think we should have some way to let people know that the code was:
I think this case here is the item 3. And thank you @ricardgb for been honest about it. Please let me know what you guys think about it. |
That's fine, but I do not think we can accept entirely AI-generated PRs. We have no way to assuredly license it under Apache 2.0. It's more of a gray area when there is AI assistance (hence why we need a policy), but I am strongly against merging entirely AI coded or majority AI coded PRs if only for the reason that we cannot copyright it under Apache 2.0. |
Agree, it needs to be a human generated code with AI help, not the opposite! So, direct usage of AI agent to opening and submitting PR should be avoided. |
|
@ricardgb please fix this error: |
48b72b8 to
0d6a421
Compare
cederom
left a comment
There was a problem hiding this comment.
Thanks @ricardgb :-)
- Please expand PR description with build and runtime testing of the new board (see https://nuttx.apache.org/docs/latest/contributing/guide.html).
- Can you please provide documentation for the new board?
@xiaoxiang781216 I agree with @linguini1 here, and looking at the mailing list, most of the community - we want to keep NuttX a project developed by a community of passionates, professionals, and enthusiasts. "all developers will utilize AI to generate material (code, commit, documentation, pr) sooner or later" - yes we cannot avoid that, but we do NOT need to "accept the trend", we may just acknowledge the problem but not become part of the problem :-) This is similar to "rewrite everything in Rust" "trend" - we may acknowledge the problem and still not become part of the problem :-) Let people rewrite everything in Rust, but from scratch, away from here. The same with AI :-) |
|
Hi all, I can continue asking Claude to fix those issues; I don't mind. But given the concerns around the licensing, would you rather prefer that I start writing the changes myself? Or leave this PR here waiting for the licensing concerns to be resolved? |
@ricardgb I suggest you to try fixing the issues yourself. AI is like a crutch, it will help you, but sometimes you don't need it, but you keep mentally dependent on it. So, please believe you are capable and try do it. |
We would love you to write the code yourself and have fun from learning and sharing the fun with us, rather than copy-paste the results from AI. Although there is no formal policy yet here, we do not welcome pure AI slop, but we welcome individuals that want to learn and join our community even if this seems hard at first or you are about to make mistakes no worries. Try to use AI as your helper but try to do the work on your own to get the insight and understanding how things work yourself :-) |
2a1e7fd to
c6033b7
Compare
Add a board port for the Raspberry Pi Pico 2 W (RP2350 + Infineon CYW43439). The board reuses the existing raspberrypi-pico-2 port and adds support for the onboard CYW43439 Wi-Fi device, driven through a new RP2350 PIO-based gSPI transport (arch/arm/src/rp23xx/rp23xx_cyw43439.c) that plugs into NuttX's existing bcm43xxx (bcmf) FullMAC driver. A telnet defconfig is provided that associates to an AP (NETINIT WAPI), obtains a DHCP lease, and exposes an NSH shell over TCP/telnet. This board port and the RP2350 PIO-gSPI CYW43439 driver were developed with Claude Code (Anthropic's agentic coding tool) and validated on real Pico 2 W hardware: Wi-Fi association, DHCP, and a TCP/telnet session over the CYW43439. Signed-off-by: Ricard Rosson <ricard@groundbits.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Port the three RP2040 USB device fixes (PR apache#19378) to the RP2350 controller, without which CDC-NCM RX returns zero-length reads and the data-PID toggle desynchronises under load: - Clamp the bulk-OUT read length to the endpoint maxpacket size before arming the hardware buffer. The buffer-control LEN field is 10 bits; a larger request overflows it and the host sees zero-byte reads. - Track whether a request already armed the hardware buffer (new rp23xx_req_s.armed) so a request resubmitted from its own completion callback is not armed a second time. A double arm toggles the data PID and the host drops the packet. - Set the AVAILABLE bit in a separate write after the LEN/PID word, per RP2040 datasheet section 4.1.2.5.1, instead of in the same store. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ricard Rosson <ricard@groundbits.com>
Add a composite USB device that presents a CDC-ACM serial console and a CDC-NCM network interface (eth0) at once, for the Pico 2 W access device: the host gets a console and a USB NIC over a single connection. The two classes must use disjoint endpoint numbers or they collide, so board_composite_connect() assigns CDC-ACM 1/2/3 and CDC-NCM 4/5/6. Build the new rp23xx_composite.c under CONFIG_USBDEV_COMPOSITE (CMake and Make.defs). The common bringup optionally autostarts the "portalup" helper (CONFIG_EXAMPLES_PORTALUP) which connects the composite, brings up the interfaces and starts the mDNS responder. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ricard Rosson <ricard@groundbits.com>
Add an "access" board configuration for the Pico 2 W access device: a WiFi station plus a composite USB device (CDC-ACM console + CDC-NCM NIC) with a DHCP server, and an mDNS responder pinned to the USB NIC (eth0) via CONFIG_NETUTILS_MDNS_BIND_IFNAME so a host plugged into USB resolves the board by name without advertising onto the WiFi network. The portalup boot helper brings the interfaces up and starts the responder. Requires an apps tree providing EXAMPLES_PORTALUP and the mDNS single-interface bind option, e.g.: ./tools/configure.sh -a ../apps-integration raspberrypi-pico-2-w:access Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: Ricard Rosson <ricard@groundbits.com>
fe294eb to
380a2e7
Compare
|
Pushed an update addressing the review:
Disclosure: these changes were prepared with the help of an AI agent and human-reviewed before pushing. |
Summary
Adds a board port for the Raspberry Pi Pico 2 W (RP2350 + Infineon CYW43439), the Wi-Fi variant of the Pico 2. It reuses the existing
raspberrypi-pico-2port and adds support for the onboard CYW43439 Wi-Fi device.The CYW43439 is driven through a new RP2350 PIO-based gSPI transport (
arch/arm/src/rp23xx/rp23xx_cyw43439.c) that plugs into NuttX's existingbcm43xxx/bcmfFullMAC driver — the same driver the RP2040raspberrypi-pico-wuses. The WL pins (WL_REG_ON=GPIO23, WL_DATA=GPIO24, WL_CS=GPIO25, WL_CLK=GPIO29) match the official pico-sdkpico2_w.h.A
telnetdefconfig associates to an AP over WPA2 (NETINIT_WAPI), obtains a DHCP lease, and exposes an NSH shell over TCP/telnet.The CYW43439 firmware blob is not included — it is proprietary and fetched from pico-sdk / the cyw43-driver exactly as the RP2040 Pico W port does;
CONFIG_CYW43439_FIRMWARE_BIN_PATHpoints at it and it is embedded at build time.Impact
boards/arm/rp23xx/raspberrypi-pico-2-w/andarch/arm/src/rp23xx/rp23xx_cyw43439.{c,h}.arch/arm/src/rp23xx/{Make.defs,CMakeLists.txt}additions compile the new driver only underCONFIG_IEEE80211_INFINEON_CYW43439;boards/Kconfiggains the new board registration.Testing
./tools/configure.sh raspberrypi-pico-2-w:telnet && make(arm-none-eabi-gcc); the board + driver compile cleanly on master andnxstyleis clean on all new files.🤖 Generated with Claude Code