Skip to content

Conversation

@pillo79
Copy link

@pillo79 pillo79 commented Oct 16, 2025

Add Wi-Fi support to the Arduino Giga loader project, enabling net-related shell commands.

};
};

qspi_flash: &n25q128a1 {

Choose a reason for hiding this comment

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

I've added those partitions in #226 because we need them in every board with a file system, so I put them in a common dtsi. I also need an mbr partition at 0. Can we align on this? I can add the missing airoc_firmware partition for you.

Copy link
Author

Choose a reason for hiding this comment

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

Sounds good, but note that Zephyr already has common QSPI partitioning upstream using qspi_flash, so we need to keep that naming to minimize changes. Will submit needed changes on your PR in a moment!

Choose a reason for hiding this comment

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

I see that someone already added something very similar upstream, good! Note that it's missing the MBR partition though, we don't have to have it I guess, but not sure. Also, this requires updating the Zephyr fork, right? If that's not going to happen very soon, we could use the local common file for now until it gets updated.

Copy link
Author

Choose a reason for hiding this comment

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

@KurtE, Zephyr will enter feature freeze for 4.3 this week, and we will definitely update soon. But please use PRs for actual code review, let's not have them turn into discussions. Feel free to open a separate topic for that 🙂

Copy link
Author

Choose a reason for hiding this comment

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

I see that someone already added something very similar upstream, good! Note that it's missing the MBR partition though, we don't have to have it I guess, but not sure.

It was me 😅 I'll add it so it's more complete (I need to fix the wifi address there anyway).

Also, this requires updating the Zephyr fork, right? If that's not going to happen very soon, we could use the local common file for now until it gets updated.

We can surely import the commit, but it wasn't a clean cherry pick due to formatting changes in recent Zephyr. I only cared about the Giga for this PR, so I copied it in without thinking about your filesystem work.

Choose a reason for hiding this comment

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

It was me 😅 I'll add it so it's more complete (I need to fix the wifi address there anyway).

We only need the MBR partition to create it if it gets erased for some reason. I just wanted to match the old cores behavior as much as possible.

We can surely import the commit, but it wasn't a clean cherry pick due to formatting changes in recent Zephyr. I only cared about the Giga for this PR, so I copied it in without thinking about your filesystem work.

That works for me. I think you also need to add/rename the qspi_flash label for all boards, right? I saw it's missing for some boards. This should work for at least all the boards we want a file system for: C33, Giga, Portenta-H7, etc...

Alternatively, we can just use this temporarily:

https://github.com/arduino/ArduinoCore-zephyr/blob/53b3947b71ead7f71a28731395d76b10131dab3d/variants/common/arduino_flash_fs.dtsi

And when Zephyr is updated, I can just remove the duplicate partitions and include the upstream file instead. Note that the file also adds common fstab entries and disks, so it's going to be needed anyway.

@pennam
Copy link

pennam commented Oct 21, 2025

This PR needs arduino/zephyr#4 to use WiFiWebClient.ino example. Otherwise WiFi.status() check will fail.

@pennam
Copy link

pennam commented Oct 21, 2025

@pillo79 Im' getting this error at boot:

Timeout while waiting for high throughput clock
SDIO firmware download error, whd_bus_sdio_init failed at 559 
Interface is not up/NULL and failed in function whd_deinit at line 203 
Interface is not up/NULL and failed in function whd_wifi_get_mac_address at line 3184

@pennam
Copy link

pennam commented Oct 28, 2025

@pillo79 Im' getting this error at boot:

Timeout while waiting for high throughput clock
SDIO firmware download error, whd_bus_sdio_init failed at 559 
Interface is not up/NULL and failed in function whd_deinit at line 203 
Interface is not up/NULL and failed in function whd_wifi_get_mac_address at line 3184

Working now, the issue was a broken firmware in the QSPI flash.

@pennam
Copy link

pennam commented Oct 28, 2025

@pillo79 can we include this commit zephyrproject-rtos/zephyr@bd01638 in our zephyr fork this is needed to make status() work

Import the same versions of the WiFi firmware blobs as used in
the mbed core, for maximum compatibility with existing boards:

    WLAN Firmware    : wl0: Jan 30 2020 21:41:53 version 7.45.98.95 (r724303 CY) FWID 01-5afc8c1e
    WLAN CLM         : API: 12.2 Data: 9.10.39 Compiler: 1.29.4 ClmImport: 1.36.3 Creation: 2020-01-30 21:30:05
    WHD VERSION      : 3.3.2.25168 : v3.3.2 : GCC 12.2 : 2024-12-06 06:53:17 +0000

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
Enable all flags to get wifi working on the Giga R1 board.
Reduces flash image size by 400kB.
@pennam pennam self-requested a review October 29, 2025 15:30
@pennam pennam merged commit b61582c into arduino:main Oct 30, 2025
24 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants