Skip to content

boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19250

Open
ricardgb wants to merge 1 commit into
apache:masterfrom
ricardgb:rp23xx-raspberrypi-pico-2-w
Open

boards/arm/rp23xx: add Raspberry Pi Pico 2 W board (CYW43439 Wi-Fi)#19250
ricardgb wants to merge 1 commit into
apache:masterfrom
ricardgb:rp23xx-raspberrypi-pico-2-w

Conversation

@ricardgb

@ricardgb ricardgb commented Jul 1, 2026

Copy link
Copy Markdown

⚠️ Disclosure: this board port and the RP2350 PIO-gSPI CYW43439 driver were developed with Claude Code (an AI coding agent) and validated on real Pico 2 W hardware. Please review accordingly.

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-2 port 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 existing bcm43xxx/bcmf FullMAC driver — the same driver the RP2040 raspberrypi-pico-w uses. The WL pins (WL_REG_ON=GPIO23, WL_DATA=GPIO24, WL_CS=GPIO25, WL_CLK=GPIO29) match the official pico-sdk pico2_w.h.

A telnet defconfig 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_PATH points at it and it is embedded at build time.

Impact

  • New: boards/arm/rp23xx/raspberrypi-pico-2-w/ and arch/arm/src/rp23xx/rp23xx_cyw43439.{c,h}.
  • No existing board/arch behaviour changes: the arch/arm/src/rp23xx/{Make.defs,CMakeLists.txt} additions compile the new driver only under CONFIG_IEEE80211_INFINEON_CYW43439; boards/Kconfig gains the new board registration.

Testing

  • Build: ./tools/configure.sh raspberrypi-pico-2-w:telnet && make (arm-none-eabi-gcc); the board + driver compile cleanly on master and nxstyle is clean on all new files.
  • Hardware: flashed to a real Pico 2 W. The CYW43439 came up over PIO-gSPI (no clock tuning needed), associated to a WPA2 AP, obtained a DHCP lease, and served an NSH shell over telnet:
    NuttX ... arm raspberrypi-pico-2-w
    wlan0  Link encap:Ethernet HWaddr 88:a2:9e:..  RUNNING
           inet addr:192.168.0.43  Mask:255.255.255.0
    

🤖 Generated with Claude Code

@github-actions github-actions Bot added Area: Build system Arch: arm Issues related to ARM (32-bit) architecture Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces. Board: arm labels Jul 1, 2026
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

MemBrowse Memory Report

No memory changes detected for:

@linguini1 linguini1 closed this Jul 1, 2026
@xiaoxiang781216

xiaoxiang781216 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@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.

@linguini1

Copy link
Copy Markdown
Contributor

@linguini1 why close this pr?

This PR, its text, and the users comments are entirely generated by Claude Code.

@xiaoxiang781216

Copy link
Copy Markdown
Contributor

@linguini1 why close this pr?

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?

@linguini1

linguini1 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@linguini1 why close this pr?

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 linguini1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include the full test logs of what you tested on the Pico.

@xiaoxiang781216

xiaoxiang781216 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@linguini1 why close this pr?

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,

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.

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.

@ricardgb please answer @linguini1's concern.

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.

We need accept the trend: all developers will utilize AI to generate material (code, commit, documentation, pr) sooner or later.

Also, there continues to be legal issues with licensing of AI-generated code.

it's new topic, we should consult Apache legal team.

@ricardgb

ricardgb commented Jul 1, 2026

Copy link
Copy Markdown
Author

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,
PICO2W_PR_TESTLOG.md

@linguini1

Copy link
Copy Markdown
Contributor

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.

@linguini1

Copy link
Copy Markdown
Contributor

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, PICO2W_PR_TESTLOG.md

Thank you for the additional information! Can you attach this in your PR description?

Did you generate the entire board port using Claude?

@ricardgb

ricardgb commented Jul 1, 2026

Copy link
Copy Markdown
Author

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, PICO2W_PR_TESTLOG.md

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,

@linguini1

Copy link
Copy Markdown
Contributor

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.

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.

@acassis

acassis commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@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:

  1. created entirely by a human developer without AI help;
  2. created by a human with help from AI, mostly used to help fixing small issues;
  3. totally generated by AI under a human request, without know exactly the generated code.

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.

@linguini1

Copy link
Copy Markdown
Contributor

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.

@ricardgb ricardgb requested a review from linguini1 July 1, 2026 17:55
@acassis

acassis commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.

@acassis

acassis commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@ricardgb please fix this error:

Configuration/Tool: raspberrypi-pico-2-w/telnet,CONFIG_ARM_TOOLCHAIN_GNU_EABI
2026-07-01 18:18:30
------------------------------------------------------------------------------------
  Cleaning...
  Configuring...
  Disabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Enabling CONFIG_ARM_TOOLCHAIN_GNU_EABI
  Building NuttX...
arm-none-eabi-ld: /github/workspace/sources/nuttx/staging/libsched.a(nx_bringup.o): in function `nx_start_application':
/github/workspace/sources/nuttx/sched/init/nx_bringup.c:322:(.text.nx_start_task+0x8): undefined reference to `board_late_initialize'
make[1]: *** [Makefile:230: nuttx] Error 1
make: *** [tools/Unix.mk:569: nuttx] Error 2
make: Target 'all' not remade because of errors.
/github/workspace/sources/nuttx/tools/testbuild.sh: line 397: /github/workspace/sources/nuttx/../nuttx/nuttx.manifest: No such file or directory

@ricardgb ricardgb force-pushed the rp23xx-raspberrypi-pico-2-w branch from 48b72b8 to 0d6a421 Compare July 1, 2026 18:51
@@ -0,0 +1,23 @@
/****************************************************************************

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a syntax of the init script right?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ricardgb please compare the files with other boards. I noticed that mostly Claude did it fine, the files are very similar to raspberry-pi-pico-w, but as @cederom there are some issues that you need to fix.

@@ -0,0 +1,24 @@
/****************************************************************************

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a syntax of the init script right?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there are other init files that use this syntax, boards/sim/sim/sim/src/etc/init.d/rcS for example

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @ricardgb :-)

@cederom

cederom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@xiaoxiang781216: @linguini1 why close this pr?

@linguini1: This PR, its text, and the users comments are entirely generated by Claude Code.

@xiaoxiang781216: ALL my pr done in this year do by AI, does this mean I can't contribute to NuttX?

@linguini1: Every one? I assume you are reviewing the output,

@xiaoxiang781216: 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.

@linguini1: 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.

@xiaoxiang781216: @ricardgb please answer @linguini1's concern.

@linguini1: 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.

@xiaoxiang781216: We need accept the trend: all developers will utilize AI to generate material (code, commit, documentation, pr) sooner or later.

@linguini1: Also, there continues to be legal issues with licensing of AI-generated code.

@xiaoxiang781216: it's new topic, we should consult Apache legal team.

@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 :-)

@ricardgb

ricardgb commented Jul 1, 2026

Copy link
Copy Markdown
Author

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?

@acassis

acassis commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

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.

@cederom

cederom commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

@ricardgb: 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?

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 :-)

Comment on lines +46 to +48
* Character array of NVRAM image
* Generated from cyw943439wlpth_rev1_0.txt
* $ Copyright Broadcom Corporation $

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acassis maybe you know more about this license issue?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@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.

Comment thread arch/arm/src/rp23xx/rp23xx_cyw43439.c Outdated
*
****************************************************************************/

static int my_init(gspi_dev_t *gspi)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also see a lot of "my_" used in the driver code. Is my_ referring to you? Or some component?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

@ricardgb ricardgb force-pushed the rp23xx-raspberrypi-pico-2-w branch 2 times, most recently from 15e4e05 to 2a1e7fd Compare July 4, 2026 19:30
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>
@ricardgb ricardgb force-pushed the rp23xx-raspberrypi-pico-2-w branch from 2a1e7fd to c6033b7 Compare July 6, 2026 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Arch: arm Issues related to ARM (32-bit) architecture Area: Build system Board: arm Size: XL The size of the change in this PR is very large. Consider breaking down the PR into smaller pieces.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants