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 1 commit 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
| @@ -0,0 +1,23 @@ | |||
| /**************************************************************************** | |||
There was a problem hiding this comment.
This is not a syntax of the init script right?
| @@ -0,0 +1,24 @@ | |||
| /**************************************************************************** | |||
There was a problem hiding this comment.
This is not a syntax of the init script right?
There was a problem hiding this comment.
there are other init files that use this syntax, boards/sim/sim/sim/src/etc/init.d/rcS for example
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 :-) |
| * Character array of NVRAM image | ||
| * Generated from cyw943439wlpth_rev1_0.txt | ||
| * $ Copyright Broadcom Corporation $ |
There was a problem hiding this comment.
Hey, I was wondering for a while how to WiFi module works on the Raspberry pi pico. Do you have the specifications / datasheet with the instructions on how to communicate with this chip? Where is "cyw943439wlpth_rev1_0.txt"?
Also did you check the license compatibility with Broadcom? "Copyright Broadcom Corporation".
Using AI for these kind of things can be risky. Did you check the specifications or did AI find it out for you?
There was a problem hiding this comment.
Just making sure this stuff is double checked before being merged. Wi-Fi is quite important for IoT devices. It's incredibly frustrating when Wi-Fi does not work properly, especially on the field.
There was a problem hiding this comment.
The NVRAM and firmware come from the cyw43-driver (George Robotics / Broadcom); its license (non-commercial in LICENSE, RP-silicon-only in LICENSE.RP) is not Apache-2.0-compatible. I didn't fully vet that, and I've since noticed the identical NVRAM already ships in rp2040_firmware.c for the pico-w under an Apache header, so this looks like a pre-existing licensing issue affecting the RP2040 board too, not just my PR. On the protocol: there's no public CYW43439 datasheet, so the driver isn't reverse-engineered — it's a port of NuttX's existing RP2040 gSPI/bcmf implementation. And to be upfront (as I have been), this port was done with Claude Code; I'm reviewing and standing behind the portability work, but I'll defer to the maintainers on the firmware-licensing question.
There was a problem hiding this comment.
@acassis maybe you know more about this license issue?
There was a problem hiding this comment.
@ricardgb @keever50 the original cyw43 came from (Cypress, now Infineon), they ported the BCM43xxx to NuttX for some customer, but never contributed it to mainline. Since this file is responsible for loading the chip internal wifi firmware and we don't have an external firmware repository like Linux does, I think we don't have alternatives here. We just need to confirm that this file is listed correctly in the LICENSE file.
| * | ||
| ****************************************************************************/ | ||
|
|
||
| static int my_init(gspi_dev_t *gspi) |
There was a problem hiding this comment.
I also see a lot of "my_" used in the driver code. Is my_ referring to you? Or some component?
There was a problem hiding this comment.
The my_ functions are byte-identical to upstream rp2040_cyw43439.c — same six names, inherited when we ported.
I don't mind changing them if you think it can help
There was a problem hiding this comment.
Interesting how the rp2040 also has my_. It sounds like a "my first helloworld project". This does no harm functionally so i'd say change it or keep it, up to you
15e4e05 to
2a1e7fd
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>
2a1e7fd to
c6033b7
Compare
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