Skip to content

Add Raspberry Pi RP2350 Wifi#3450

Open
Ellerbach wants to merge 13 commits into
mainfrom
add-RP2350-w
Open

Add Raspberry Pi RP2350 Wifi#3450
Ellerbach wants to merge 13 commits into
mainfrom
add-RP2350-w

Conversation

@Ellerbach

@Ellerbach Ellerbach commented Jun 26, 2026

Copy link
Copy Markdown
Member

Description

Add Raspberry Pi RP2350 Wifi

Motivation and Context

  • Add Raspberry Pi RP2350 Wifi
  • wifi working
  • sntp set properly
  • ssl up to TLS2 working as well

How Has This Been Tested?

On a real device.

Screenshots

Types of changes

  • Improvement (non-breaking change that improves a feature, code or algorithm)
  • Bug fix (non-breaking change which fixes an issue with code or algorithm)
  • New feature (non-breaking change which adds functionality to code)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Config and build (change in the configuration and build system, has no impact on code or features)
  • Dev Containers (changes related with Dev Containers, has no impact on code or features)
  • Dependencies/declarations (update dependencies or assembly declarations and changes associated, has no impact on code or features)
  • Documentation (changes or updates in the documentation, has no impact on code or features)

Checklist

  • My code follows the code style of this project (only if there are changes in source code).
  • My changes require an update to the documentation (there are changes that require the docs website to be updated).
  • I have updated the documentation accordingly (the changes require an update on the docs in this repo).
  • I have read the CONTRIBUTING document.
  • I have tested everything locally and all new and existing tests passed (only if there are changes in source code).

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

This PR adds the RP_PICO2_W_RP2350 ChibiOS target, with board support, USB CDC, WiFi/TLS configuration, flash storage and LittleFS support, and nanoBooter/nanoCLR build and startup wiring for the RP2350 Pico 2 W.

Changes

RP_PICO2_W_RP2350 target support

Layer / File(s) Summary
Target registration and docs
README.md, README.zh-cn.md, azure-pipelines.yml, targets/ChibiOS/CMakePresets.json, targets/ChibiOS/RP_PICO2_W_RP2350/CMakePresets.json, targets/ChibiOS/RP_PICO2_W_RP2350/README.md, targets/ChibiOS/RP_PICO2_W_RP2350/defconfig
Adds the target to docs, CI, preset includes, and target-level docs/config.
Board setup and peripheral defaults
targets/ChibiOS/RP_PICO2_W_RP2350/board.c, board.h, target_common.*, target_stubs.*, target_core1_stubs.c, target_rng.c, target_system_device_*, target_system_io_ports_config.*, common/serialcfg.h, target_storage_config.h
Adds board init, target identity, peripheral mappings, stubs, and target-level common build/config wiring.
Flash block storage and partition layouts
targets/ChibiOS/RP_PICO2_W_RP2350/Target_BlockStorage.*, common/Device_BlockStorage*.c, RP_PICO2_RP2350/Target_BlockStorage_RP2350FlashDriver.c, target_BlockStorage.c, common/CMakeLists.txt
Adds the RP2350 flash-backed block storage implementation, partition tables, registration, and helper refactor.
USB CDC, WiFi defaults, and CYW43 wiring
targets/ChibiOS/RP_PICO2_W_RP2350/common/usbcfg.*, common/targetHAL_ConfigurationManager.cpp, target_lwipopts.h, target_lwip_sntp_opts.h, src/PAL/COM/sockets/ssl/MbedTLS/*, targets/ChibiOS/_WiFi/cyw43/*, targets/ChibiOS/_nf-overlay/os/hal/include/hal_nf_community.h
Adds USB CDC support, WiFi/network defaults, RP2350-aware CYW43 support, and RP2350 TLS/entropy gating.
LittleFS driver and config
targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.*, lfs_config.h, target_FileSystem.cpp
Adds LittleFS geometry, HAL callbacks, allocation helpers, and volume registration for internal flash storage.
nanoBooter build and startup
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/*
Adds nanoBooter build/link configuration, kernel/HAL/MCU configs, and the startup path that validates and launches the CLR image.
nanoCLR build and startup
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/*, targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp, src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp, src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp
Adds the nanoCLR target build, linker scripts, HAL/MCU configs, startup threads, TLS version selection, and RTC-less UTC handling.

Estimated code review effort: 4 (Complex) | ~75 minutes

Sequence Diagram(s)

sequenceDiagram
  participant BootROM
  participant nanoBooter
  participant USBCDC
  participant FlashStorage
  participant nanoCLR
  participant CYW43
  participant MbedTLS

  BootROM->>nanoBooter: reset entry
  nanoBooter->>nanoBooter: HAL init + CLR image validation
  nanoBooter->>USBCDC: start CDC console
  nanoBooter->>FlashStorage: initialize block storage
  nanoBooter->>nanoBooter: create ReceiverThread and start kernel
  nanoCLR->>USBCDC: start and reconnect CDC console
  nanoCLR->>CYW43: WiFi driver setup
  CYW43->>MbedTLS: provide RP2350 TLS/entropy support
Loading

Possibly related PRs

Suggested reviewers: josesimoes

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, descriptive, and matches the main change: adding Raspberry Pi RP2350 WiFi support.
Description check ✅ Passed The description is clearly related to the RP2350 WiFi support changes and is not off-topic.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a new ChibiOS target for the Raspberry Pi Pico 2 W (RP2350 + CYW43439), including WiFi networking, SNTP time handling, TLS (mbedTLS) integration, and flash-backed LittleFS storage, plus CI/preset/documentation updates so the target can be built and published like existing boards.

Changes:

  • Introduces targets/ChibiOS/RP_PICO2_W_RP2350 with board config, linker scripts, HAL/RT config, serial/I2C/SPI/ADC pin maps, storage + LittleFS glue, and default WiFi configuration blocks.
  • Updates the ChibiOS CYW43 PIO-SPI implementation and config port for RP2350 register layout and safer SPI clocking.
  • Adjusts core networking/security plumbing (SNTP time setting without RTC, PSA/TLS configuration gating, conditional psa_crypto_init()), and wires the new target into presets + Azure Pipelines + READMEs.

Reviewed changes

Copilot reviewed 72 out of 72 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_io_ports_config.h Enables System.IO.Ports UART mapping for the RP2350 target.
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_io_ports_config.cpp Defines default UART pin muxing for COM ports on Pico 2 W.
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_spi_config.cpp Provides default SPI0/SPI1 pin mapping for System.Device.Spi.
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_pwm_config.cpp Documents PWM slice-based mapping (no extra pin config).
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_i2c_config.cpp Provides default I2C0/I2C1 pin mapping for System.Device.I2c.
targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_adc_config.cpp Defines ADC channel-to-pin mapping for System.Device.Adc.
targets/ChibiOS/RP_PICO2_W_RP2350/target_stubs.cpp Target-level weak/stub linkage support (C++ TU).
targets/ChibiOS/RP_PICO2_W_RP2350/target_stubs.c Weak GPIO stubs when GPIO API is disabled.
targets/ChibiOS/RP_PICO2_W_RP2350/target_storage_config.h Declares storage capabilities for this board (no SD/MSD).
targets/ChibiOS/RP_PICO2_W_RP2350/target_rng.c Adds ROSC-based RNG hooks for entropy on RP2350.
targets/ChibiOS/RP_PICO2_W_RP2350/target_lwipopts.h Overrides lwIP options for CYW43 WiFi (checksums, stacks, DHCP).
targets/ChibiOS/RP_PICO2_W_RP2350/target_lwip_sntp_opts.h Target hook header for SNTP-specific lwIP overrides.
targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.h Declares LittleFS flash geometry/handlers for this target.
targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.c Implements LittleFS flash read/program/erase + init using EFL.
targets/ChibiOS/RP_PICO2_W_RP2350/target_FileSystem.cpp Registers LittleFS as the filesystem volume (I:).
targets/ChibiOS/RP_PICO2_W_RP2350/target_core1_stubs.c Provides no-op core1 symbols for single-core builds.
targets/ChibiOS/RP_PICO2_W_RP2350/target_common.h.in Target memory map + platform capability defines (WiFi/RNG/etc).
targets/ChibiOS/RP_PICO2_W_RP2350/target_common.c Defines HalSystemConfig and target capabilities.
targets/ChibiOS/RP_PICO2_W_RP2350/target_BlockStorage.h Declares number of block storage devices for the target.
targets/ChibiOS/RP_PICO2_W_RP2350/target_BlockStorage.c Registers the RP2350 flash block storage device.
targets/ChibiOS/RP_PICO2_W_RP2350/Target_BlockStorage_RP2350FlashDriver.h Declares RP2350 flash block storage driver API.
targets/ChibiOS/RP_PICO2_W_RP2350/Target_BlockStorage_RP2350FlashDriver.c Implements block storage ops (read/program/erase/sector checks).
targets/ChibiOS/RP_PICO2_W_RP2350/README.md Adds board/flash/WiFi documentation for Pico 2 W target.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/target_board.h.in Generated nanoCLR board header including common target defs.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/RP2350_CLR.ld nanoCLR linker script for RP2350 memory layout.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/RP2350_CLR-DEBUG.ld Debug linker script variant for nanoCLR.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/nanoHAL.cpp Target nanoHAL global(s) for nanoCLR.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h RP2350 ChibiOS HAL driver configuration for nanoCLR.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf_nf.h nanoFramework overlay for nanoCLR MCU config.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/main.c nanoCLR entry point and thread setup (larger CLR stack).
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf.h ChibiOS HAL configuration for nanoCLR build.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf_nf.h nanoFramework HAL overlay disables STM32-specific features.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/CMakeLists.txt Adds target-specific nanoCLR sources to build.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/chconf.h ChibiOS RTOS configuration for nanoCLR build.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/target_board.h.in Generated nanoBooter board header including common target defs.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/RP2350_booter.ld nanoBooter linker script for RP2350 memory layout.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/RP2350_booter-DEBUG.ld Debug linker script variant for nanoBooter.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf.h RP2350 ChibiOS HAL driver configuration for nanoBooter.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf_nf.h nanoFramework overlay for nanoBooter MCU config.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/main.c nanoBooter entry point + CLR vector-table validation and launch.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf.h ChibiOS HAL configuration for nanoBooter build.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf_nf.h nanoFramework HAL overlay disables STM32-specific features.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/CMakeLists.txt Adds target-specific nanoBooter sources to build.
targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/chconf.h ChibiOS RTOS configuration for nanoBooter build.
targets/ChibiOS/RP_PICO2_W_RP2350/mbedtls_entropy_hardware_pool.c Provides mbedtls_hardware_poll() entropy from RP2350 ROSC.
targets/ChibiOS/RP_PICO2_W_RP2350/mbedtls_config.h Target mbedTLS configuration overrides (buffers/PSA disable).
targets/ChibiOS/RP_PICO2_W_RP2350/lfs_config.h LittleFS configuration for this target build.
targets/ChibiOS/RP_PICO2_W_RP2350/defconfig Kconfig defconfig enabling WiFi, networking, FS, mbedTLS.
targets/ChibiOS/RP_PICO2_W_RP2350/common/usbcfg.h Declares USB CDC config symbols for Wire Protocol transport.
targets/ChibiOS/RP_PICO2_W_RP2350/common/usbcfg.c Implements USB CDC descriptors + endpoint configuration.
targets/ChibiOS/RP_PICO2_W_RP2350/common/targetHAL_ConfigurationManager.cpp Provides strong default network + WiFi configuration blocks.
targets/ChibiOS/RP_PICO2_W_RP2350/common/serialcfg.h Selects SIO UART for Wire Protocol serial mapping.
targets/ChibiOS/RP_PICO2_W_RP2350/common/Device_BlockStorage.c Defines RP2350 Pico 2 W flash block regions/ranges.
targets/ChibiOS/RP_PICO2_W_RP2350/common/Device_BlockStorage-DEBUG.c Debug variant of RP2350 Pico 2 W block storage map.
targets/ChibiOS/RP_PICO2_W_RP2350/common/CMakeLists.txt Adds common target sources (USB + block storage + config mgr).
targets/ChibiOS/RP_PICO2_W_RP2350/CMakePresets.json Adds CMake preset for building RP_PICO2_W_RP2350.
targets/ChibiOS/RP_PICO2_W_RP2350/CMakeLists.txt Target build integration (CYW43 FetchContent, UF2 packaging).
targets/ChibiOS/RP_PICO2_W_RP2350/board.h Adds ChibiOS board header for Pico 2 W.
targets/ChibiOS/RP_PICO2_W_RP2350/board.c Adds ChibiOS board init + early init/reset/clock setup.
targets/ChibiOS/RP_PICO2_RP2350/Target_BlockStorage_RP2350FlashDriver.c Refactors RP2350 flash driver to handle NULL context safely.
targets/ChibiOS/CMakePresets.json Registers the new target preset file.
targets/ChibiOS/_WiFi/cyw43/cyw43_configport.h Fixes SIO GPIO atomic register offsets for RP2350.
targets/ChibiOS/_WiFi/cyw43/cyw43_bus_pio_spi.c Adjusts RP2350 SIO offsets + reduces CYW43 SPI clock for RP2350.
targets/ChibiOS/_nf-overlay/os/hal/include/hal_nf_community.h Exposes RP2350 RNG stubs to ChibiOS HAL layer.
targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp Implements UTC offset tracking when no RTC (SNTP wall-clock).
targets/ChibiOS/_common/targetHAL_ConfigurationManager.cpp Adds synthetic in-RAM fallback configs when flash default write fails.
src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp Calls psa_crypto_init() only when PSA Crypto is enabled.
src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h Gates TLS1.3/PSA settings to accommodate RP2350 limitations.
src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp Uses wall-clock time for TLS date/time (cert validation).
README.zh-cn.md Documents the new target in the board list and capability matrix.
README.md Documents the new target in the board list and capability matrix.
azure-pipelines.yml Adds the new target to the Azure Pipelines build matrix.

Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/CMakeLists.txt
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.h Outdated
Comment thread README.md Outdated
Comment thread README.zh-cn.md Outdated
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/RP2350_CLR.ld Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@JohnStabler

Copy link
Copy Markdown

Great work!

Once merged, will this allow for the use of the System.Net and System.Net.Sockets namespaces? Or will more work be required?

@Ellerbach

Copy link
Copy Markdown
Member Author

Once merged, will this allow for the use of the System.Net and System.Net.Sockets namespaces? Or will more work be required?

It does allow to use them. If you go in the pipleline and download the artifact, you can flash your device with the uf2 and test! See here https://artprodsu6weu.artifacts.visualstudio.com/Af3e49312-780d-452a-9d3d-bf7cf9af8b7e/33089296-85a5-4c34-a905-cc2a75c03e36/_apis/artifact/cGlwZWxpbmVhcnRpZmFjdDovL25hbm9mcmFtZXdvcmsvcHJvamVjdElkLzMzMDg5Mjk2LTg1YTUtNGMzNC1hOTA1LWNjMmE3NWMwM2UzNi9idWlsZElkLzYzNzg2L2FydGlmYWN0TmFtZS9SUF9QSUNPMl9XX1JQMjM1MA2/content?format=zip

@JohnStabler

Copy link
Copy Markdown

Thanks. And I've got good news:

My device now connects to my WiFi AP, I'm able to use the UdpClient class and broadcast on my LAN!

This really is excellent work.

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

Actionable comments posted: 24

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp (1)

61-81: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Run clang-format on the changed no-RTC branch.

The changed block has tabbed/misaligned indentation, which violates the project formatting requirement and may fail style checks. As per coding guidelines, source files must use .clang-format with 4-space indentation and no tabs.

Also applies to: 111-115

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp` around lines 61 - 81, The no-RTC
branch in HAL_Time_CurrentTime has misaligned indentation and tabs, so reformat
that changed block to match the project’s .clang-format rules. Update the
datePartOnly conditional and the surrounding return path in targetHAL_Time.cpp
to use 4-space indentation consistently with no tabs. Ensure the edited section
follows the existing style used in HAL_Time_CurrentTime and run clang-format on
the modified branch.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@README.md`:
- Line 129: The README target lists are out of sync because RP_PICO2_W_RP2350
was added to the Raspberry Pi board table but not to the later “Target reference
for Raspberry Pi (ChibiOS)” list. Update the target reference section to include
RP_PICO2_W_RP2350 so the Raspberry Pi targets match across the README, using the
existing board table and target reference lists as the source of truth.

In `@src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h`:
- Around line 90-97: The default SSL protocol bounds in
ssl_generic_init_internal.cpp are hardcoded to TLS 1.3 even when TARGET_RP2350
compiles Mbed TLS without MBEDTLS_SSL_PROTO_TLS1_3. Update the SslProtocols_None
initialization path in ssl_generic_init_internal.cpp to derive the minimum and
maximum protocol from the enabled Mbed TLS features, so platforms like RP2350
fall back to TLS 1.2 when TLS 1.3 is unavailable.

In `@src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp`:
- Around line 302-304: The psa_crypto_init() call in ssl_generic_init_internal
should not ignore its return status, because PSA-enabled builds may continue
with crypto uninitialized. Update this initialization path to check the status
returned by psa_crypto_init(), and if it indicates failure, surface that failure
through the existing SSL/MbedTLS initialization flow instead of proceeding
silently. Use the nearby ssl_generic_init_internal logic and the
MBEDTLS_USE_PSA_CRYPTO guard to locate the change and keep the failure handling
consistent with the rest of the function.

In `@targets/ChibiOS/_common/targetHAL_ConfigurationManager.cpp`:
- Line 128: Rename the local static fallback variables in the configuration
manager to follow the repository’s static naming convention by prefixing them
with s_. Update both fallbackNetworkConfig and fallbackWirelessConfig in
targetHAL_ConfigurationManager so their declarations and all references use the
new names, keeping the behavior unchanged.
- Around line 148-167: The wireless fallback in
targetHAL_ConfigurationManager.cpp is always publishing a synthetic
Wireless80211 entry even when the platform has no real WiFi support. Update the
fallback path around networkWirelessConfigs so it only replaces the empty
enumeration when InitialiserWirelessDefaultConfig (or an equivalent wireless
default initializer) reports that a real target-backed config was created,
similar to InitialiseNetworkDefaultConfig; if initialization is a no-op, leave
the list empty instead of exposing a fake adapter.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/board.c`:
- Around line 1-15: The new C source file currently starts with the upstream
ChibiOS Apache notice instead of the repository’s required header. Update the
top of board.c to prepend the repo copyright header, then keep the existing
upstream notice immediately below it, matching the standard pattern used by
other C sources in this repository.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/board.h`:
- Around line 1-15: The new board.h file currently starts with the upstream
ChibiOS Apache notice instead of the repository-standard .NET Foundation header.
Update the file so the repo header appears first at the top of the file, and
keep the existing ChibiOS license block immediately below it; use the board.h
file’s opening comment block as the location to adjust.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/CMakeLists.txt`:
- Around line 33-37: The configure-time networking guard in the
RP_PICO2_W_RP2350 CMakeLists is evaluating TARGET_HAS_WIFI before it is set, so
CYW43 driver setup is skipped even when Wi-Fi is intended. Move or define
TARGET_HAS_WIFI earlier in the CMake flow, before the if(USE_NETWORKING_OPTION
AND TARGET_HAS_WIFI) block, so the existing CYW43_Driver find_package and the
TARGET_CHIBIOS_NANOCLR_INCLUDE_DIRS/TARGET_CHIBIOS_NANOCLR_SOURCES appends run
correctly; keep the later nf_setup_target_build() flag in sync but do not rely
on it for this guard.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/common/serialcfg.h`:
- Around line 9-12: The Wire Protocol transport is configured in two places,
with SERIAL_DRIVER set to different values in serialcfg.h and usbcfg.h, so the
active driver depends on include order. Update the target configuration to keep
SERIAL_DRIVER defined in only one location, or replace it with separate UART/USB
selection macros so the Wire Protocol path is unambiguous. Use the existing
serialcfg/usbcfg configuration symbols to consolidate the transport choice into
a single source of truth.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/common/targetHAL_ConfigurationManager.cpp`:
- Around line 41-42: The wireless configuration marker is being written via the
struct base pointer, which implicitly depends on Marker being at offset 0.
Update the wireless path in HAL_ConfigurationManager to write the marker through
pconfig->Marker, matching the network path and making the layout contract
explicit.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/mbedtls_config.h`:
- Around line 22-24: The Mbed TLS config is leaving `MBEDTLS_PADLOCK_C` defined,
so `#if defined(...)` checks will still treat Padlock support as enabled. Update
`mbedtls_config.h` to remove the `#define MBEDTLS_PADLOCK_C 0` in favor of fully
undefining the symbol, keeping the RP2350-specific disablement aligned with the
existing config style.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/chconf.h`:
- Around line 1-17: The header in chconf.h starts with the upstream ChibiOS
notice instead of the required repository copyright header; update the top of
the file to begin with the .NET Foundation copyright and license lines, then
keep the existing ChibiOS Apache notice immediately below it. Make this change
in the file header before the clang-format off block so the checked-in header
matches the project standard for all *.h files.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf.h`:
- Around line 1-17: The file header is missing the required repository copyright
notice before the imported ChibiOS Apache notice. Update the top of the header
in the affected .h file so it begins with the .NET Foundation copyright and
license lines, then keep the existing ChibiOS copyright block intact immediately
below it. Use the header placement at the start of the file (before the
clang-format off marker) as the fix point.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/main.c`:
- Around line 17-20: Rename the file-scope constants in main.c to use the
required c_ prefix, since RP2350_SRAM_START, RP2350_SRAM_END_EXCLUSIVE, and
RP2350_DEPLOYMENT_START violate the .c-file constant naming convention. Update
their definitions and every reference in the same file to the new names, keeping
the existing meanings intact; use the nearby RP2350-related symbols to locate
the declarations and usages.
- Around line 88-92: The receiver thread startup in main() is unguarded, so a
failed osThreadCreate() can still fall through to osKernelStart() without the
wire-protocol worker. Update the boot flow around
osThreadCreate(osThread(ReceiverThread), NULL) to check the returned thread
handle and branch to the existing fatal/error path if it is NULL, ensuring the
kernel is not started when thread creation fails.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf.h`:
- Around line 1-15: Add the repository’s required .NET Foundation copyright
header at the very top of this new mcuconf.h file, before the existing ChibiOS
Apache notice. Keep the ChibiOS banner below it rather than replacing it, so the
file starts with the approved repo header and still retains the upstream notice.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/target_board.h.in`:
- Line 16: The booter banner string in OEMSYSTEMINFOSTRING contains a stray @
before TARGET_NAME, so update the template text to remove that extra character
and keep the banner format as “nanoBooter running …”. Use the
OEMSYSTEMINFOSTRING definition in target_board.h.in as the fix point.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/chconf.h`:
- Around line 1-15: The target-local chconf.h header is missing the required
repository copyright notice at the very top. Add the .NET Foundation and
Contributors header before the existing ChibiOS license banner so the file
starts with the repo-standard copyright block, keeping the upstream notice below
it.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf.h`:
- Around line 1-15: The header in halconf.h is missing the repository-required
.NET Foundation copyright notice at the very top. Add the standard repo header
before the existing ChibiOS license banner so this file starts with the required
copyright lines, keeping the upstream ChibiOS block below it.
- Around line 56-58: HAL subsystems for this target are still disabled in
halconf.h even though the matching RP driver features are enabled elsewhere.
Update the HAL_USE_ADC, HAL_USE_I2C, HAL_USE_PWM, and HAL_USE_SPI definitions in
halconf.h so they are enabled for RP_PICO2_W_RP2350, matching the
RP_ADC_USE_ADC1, RP_I2C_USE_I2C0/1, RP_PWM_USE_PWM0-7, and RP_SPI_USE_SPI0/1
settings and the target_system_device_*_config.cpp registrations. This will
allow the corresponding ChibiOS drivers to be built into nanoCLR and make the
managed peripherals available.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/main.c`:
- Around line 51-66: The startup thread setup in main() does not verify whether
osThreadCreate succeeded for ReceiverThread and CLRStartupThread before
osKernelStart is called. Check both returned thread IDs, handle allocation
failure explicitly (especially for the CLR startup thread with its large stack),
and only start the kernel when both threads were created successfully; use the
existing osThreadCreate calls and osKernelStart sequence as the fix point.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h`:
- Around line 1-15: The file currently starts with the ChibiOS license banner,
but it must begin with the repository’s required .NET Foundation copyright
header. Update the top of this header file so the standard repo header appears
before the existing ChibiOS notice, keeping the upstream banner intact below it.
Make this change in the target-local mcuconf.h header so it matches the required
pattern for all *.h files.
- Around line 113-115: The RP2350 nanoCLR configuration currently defines only
the base MCU settings in mcuconf.h, but the mcuconf_nf.h overlay is never
referenced and is therefore dead/unused. Update the mcuconf.h setup to
explicitly include or otherwise wire in mcuconf_nf.h at the appropriate point in
the configuration flow, using the existing mcuconf.h/mcuconf_nf.h symbols, or
remove the unused overlay file if it is no longer needed.

In `@targets/ChibiOS/RP_PICO2_W_RP2350/README.md`:
- Around line 19-22: The pin map in README.md has a duplicated WL_CS assignment,
making the CYW43 wiring description inconsistent. Update the entries around the
GP25/GP29 mapping so WL_CS is only assigned once in the correct place, and keep
the VSYS monitor/ADC note separate from the chip-select pin. Use the existing
pin list entries for GP25 and GP29 to ensure the WiFi and VSYS monitor functions
are clearly distinguished.

---

Outside diff comments:
In `@targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp`:
- Around line 61-81: The no-RTC branch in HAL_Time_CurrentTime has misaligned
indentation and tabs, so reformat that changed block to match the project’s
.clang-format rules. Update the datePartOnly conditional and the surrounding
return path in targetHAL_Time.cpp to use 4-space indentation consistently with
no tabs. Ensure the edited section follows the existing style used in
HAL_Time_CurrentTime and run clang-format on the modified branch.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 173f7081-21de-4e71-be7a-106ef8876976

📥 Commits

Reviewing files that changed from the base of the PR and between 607da4e and 61580aa.

📒 Files selected for processing (72)
  • README.md
  • README.zh-cn.md
  • azure-pipelines.yml
  • src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp
  • src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h
  • src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp
  • targets/ChibiOS/CMakePresets.json
  • targets/ChibiOS/RP_PICO2_RP2350/Target_BlockStorage_RP2350FlashDriver.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/CMakeLists.txt
  • targets/ChibiOS/RP_PICO2_W_RP2350/CMakePresets.json
  • targets/ChibiOS/RP_PICO2_W_RP2350/README.md
  • targets/ChibiOS/RP_PICO2_W_RP2350/Target_BlockStorage_RP2350FlashDriver.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/Target_BlockStorage_RP2350FlashDriver.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/board.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/board.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/CMakeLists.txt
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/Device_BlockStorage-DEBUG.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/Device_BlockStorage.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/serialcfg.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/targetHAL_ConfigurationManager.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/usbcfg.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/usbcfg.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/defconfig
  • targets/ChibiOS/RP_PICO2_W_RP2350/lfs_config.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/mbedtls_config.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/mbedtls_entropy_hardware_pool.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/CMakeLists.txt
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/RP2350_booter-DEBUG.ld
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/RP2350_booter.ld
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/chconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf_nf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/main.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf_nf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/target_board.h.in
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/CMakeLists.txt
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/RP2350_CLR-DEBUG.ld
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/RP2350_CLR.ld
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/chconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf_nf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/main.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf_nf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/nanoHAL.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/target_board.h.in
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_BlockStorage.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_BlockStorage.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_FileSystem.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_common.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_common.h.in
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_core1_stubs.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_littlefs.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_lwip_sntp_opts.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_lwipopts.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_rng.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_storage_config.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_stubs.c
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_stubs.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_adc_config.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_i2c_config.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_pwm_config.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_device_spi_config.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_io_ports_config.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/target_system_io_ports_config.h
  • targets/ChibiOS/_WiFi/cyw43/cyw43_bus_pio_spi.c
  • targets/ChibiOS/_WiFi/cyw43/cyw43_configport.h
  • targets/ChibiOS/_common/targetHAL_ConfigurationManager.cpp
  • targets/ChibiOS/_nanoCLR/targetHAL_Time.cpp
  • targets/ChibiOS/_nf-overlay/os/hal/include/hal_nf_community.h

Comment thread README.md
Comment thread src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h
Comment thread src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp
Comment thread targets/ChibiOS/_common/targetHAL_ConfigurationManager.cpp Outdated
Comment thread targets/ChibiOS/_common/targetHAL_ConfigurationManager.cpp Outdated
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf.h
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/main.c
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h Outdated
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h
Comment thread targets/ChibiOS/RP_PICO2_W_RP2350/README.md Outdated
@Ellerbach

Copy link
Copy Markdown
Member Author

My device now connects to my WiFi AP, I'm able to use the UdpClient class and broadcast on my LAN!

Great! Thanks for the confirmation. I still have couple of things to address from coderabbit feedback. Then I think we will be good to merge. In the mean time, if anything ispoping up, let me know so I can address it before the PR is merged :-)

This really is excellent work.

Thanks! Very happy about it as well :-) It's been a journey to bring all the Pico to nanoFramework! Started long ago once the device been available, we had few tries and finally when it became available in ChibiOS, it's been much easier and still required tons of work! And some good help of Copilot as well for some of the heavy lifting.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp`:
- Around line 172-189: The preprocessor formatting in the TLS 1.3 min/max
version handling is inconsistent: the `#if defined(MBEDTLS_SSL_PROTO_TLS1_3)`
inside `ssl_generic_init_internal` is indented differently from the matching
directive in the max-version block. Update the `SslProtocols_Tls13` branches so
the `#if/#else/#endif` directives follow the same Microsoft/clang-format style
and are aligned consistently with the surrounding preprocessor directives.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 52040ce5-e80d-43d2-8dc3-898ddd375bd7

📥 Commits

Reviewing files that changed from the base of the PR and between 61580aa and 37037ed.

📒 Files selected for processing (10)
  • README.md
  • src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/CMakeLists.txt
  • targets/ChibiOS/RP_PICO2_W_RP2350/common/targetHAL_ConfigurationManager.cpp
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/chconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/halconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoBooter/mcuconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/chconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/halconf.h
  • targets/ChibiOS/RP_PICO2_W_RP2350/nanoCLR/mcuconf.h

Comment thread src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp (1)

174-188: 🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

Do not downgrade an explicit SslProtocols_Tls13 request to TLS 1.2
If MBEDTLS_SSL_PROTO_TLS1_3 is unavailable, this should fail initialization instead of negotiating TLS 1.2; only fall back when TLS 1.2 was also requested.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp` around lines
174 - 188, The TLS version selection in the MbedTLS initialization path is
downgrading an explicit SslProtocols_Tls13 request to TLS 1.2 when
MBEDTLS_SSL_PROTO_TLS1_3 is unavailable. Update ssl_generic_init_internal so the
min/max version handling in the TLS 1.3 branch fails initialization if TLS 1.3
was explicitly requested and the library lacks support, and only allow TLS 1.2
fallback when SslProtocols_Tls12 is also included.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp`:
- Around line 174-188: The TLS version selection in the MbedTLS initialization
path is downgrading an explicit SslProtocols_Tls13 request to TLS 1.2 when
MBEDTLS_SSL_PROTO_TLS1_3 is unavailable. Update ssl_generic_init_internal so the
min/max version handling in the TLS 1.3 branch fails initialization if TLS 1.3
was explicitly requested and the library lacks support, and only allow TLS 1.2
fallback when SslProtocols_Tls12 is also included.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 19835b41-4de2-4734-83fa-74110446afff

📥 Commits

Reviewing files that changed from the base of the PR and between 37037ed and b18a530.

📒 Files selected for processing (1)
  • src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp

@josesimoes josesimoes left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Great work adding this new Pico!
Only a few comments and clarifications required. 😉

Comment thread src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp Outdated
Comment thread src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h Outdated
Comment thread src/PAL/COM/sockets/ssl/MbedTLS/ssl_generic_init_internal.cpp
// TODO FIXME
// need to add implementation when RTC is not being used
// can't mess with the systicks because the scheduling can fail
// No RTC available: keep UTC as an offset over monotonic HAL ticks.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I’m concerned about the semantics introduced in HAL_Time_SetUtcTime() for HAL_USE_RTC == FALSE.

This change repurposes HAL_Time_SetUtcTime() to store a software offset (s_utcOffsetTicks) over monotonic ticks, so HAL_Time_CurrentDateTime() returns a wall-clock-like value. While useful for SNTP scenarios on RP2350, this changes the contract of the API when no RTC is present.

The current API name (and docs) suggest this function sets UTC time. In this implementation it does not. Instead it silently stores a delta and applies it at read time. That feels like a different behavior model and may surprise callers who rely on consistent semantics across targets.

Can we review this please?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Those changes are definitely needed for this board. Otherwise, it doesn't manage to get the date/time.

extern EFlashDriver EFLD1;
extern MEMORY_MAPPED_NOR_BLOCK_CONFIG g_Device_BlockStorageConfig;

static MEMORY_MAPPED_NOR_BLOCK_CONFIG *GetBlockStorageConfig(void *context)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm missing the point of this function here... If it's trying to guard the fact that context may be null to prevent dereference a null pointer in some of the calls, it will most likely happen as g_Device_BlockStorageConfig will be null too. Unless I'm missing something, let's keep with the pattern. If this needs a fix/improvement, should be done on a separate PR and changing the implementation througout the code base.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

On a second look, this file looks like doesn't even belong here... there is already a specific on in the target folder...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

this is needed and present also for the 2350 and the other 2040 and 2040W. And the pattern is for all of them. That was maybe a feedback from code rabbit. I don't remember. This file is just copy/paste/adjusted from the 2350 which is the adaptation of the 2040s.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp`:
- Around line 430-440: The RP2350 TLS gate in SslNative is using a numeric
greater-than check on SslProtocols, which incorrectly rejects valid bitwise
combinations like Tls11 | Tls12. Update the logic in
sys_net_native_System_Net_Security_SslNative.cpp inside the RP2350-specific
block to test for the disallowed TLS 1.3 bit(s) with a bitwise check instead of
comparing against a maximum threshold, and rename the local constant to follow
the c_ prefix convention (for example, c_maxTls12ProtocolValue).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository YAML (base), Central YAML (inherited)

Review profile: ASSERTIVE

Plan: Pro

Run ID: 4e05d493-1534-44f0-a7fe-a7614adb368b

📥 Commits

Reviewing files that changed from the base of the PR and between b2391f3 and 5a35bd4.

📒 Files selected for processing (2)
  • src/DeviceInterfaces/System.Net/sys_net_native_System_Net_Security_SslNative.cpp
  • src/PAL/COM/sockets/ssl/MbedTLS/nf_mbedtls_config.h

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants