RIOT icon indicating copy to clipboard operation
RIOT copied to clipboard

driver/w5500: driver for the W5500 ethernet chip

Open stemschmidt opened this issue 1 year ago • 1 comments

Contribution description

This is a driver for a WIZ5500 ethernet chip. The driver supports interrupt and polling mode. Polling mode is the default, as plugging the Adafruit Ethernet FeatherWing on the Adafruit nrf52840 Feather requires no additional wiring for the interrupt pin.

Provide a definition for W5500_PARAM_EVT to enable the interrupt mode.

Testing procedure

Build: make BOARD=feather-nrf52840 -C tests/drivers/w5500/ flash term

Ping ipv6.google.com: 2024-01-26 18:08:37,885 # : This is RIOT! (Version: a74a7-driver_w5500) 2024-01-26 18:08:37,887 # Test application for W5500 ethernet device driver 2024-01-26 18:08:37,889 # All up, running the shell now

ping 2a00:1450:4016:808::200e 2024-01-26 18:08:58,580 # ping 2a00:1450:4016:808::200e 2024-01-26 18:08:58,775 # 12 bytes from 2a00:1450:4016:808::200e: icmp_seq=0 ttl=118 time=192.157 ms 2024-01-26 18:08:59,675 # 12 bytes from 2a00:1450:4016:808::200e: icmp_seq=1 ttl=118 time=92.177 ms 2024-01-26 18:09:00,675 # 12 bytes from 2a00:1450:4016:808::200e: icmp_seq=2 ttl=118 time=92.203 ms 2024-01-26 18:09:00,676 # 2024-01-26 18:09:00,678 # --- 2a00:1450:4016:808::200e PING statistics --- 2024-01-26 18:09:00,680 # 3 packets transmitted, 3 packets received, 0% packet loss 2024-01-26 18:09:00,682 # round-trip min/avg/max = 92.177/125.512/192.157 ms

stemschmidt avatar Jan 26 '24 17:01 stemschmidt

Murdock results

:heavy_check_mark: PASSED

9d62ad4c5c0d6996cd2930a03dce4f46883b65ab driver/w5500: driver for the W5500 ethernet chip

Success Failures Total Runtime
10082 0 10083 13m:14s

Artifacts

riot-ci avatar Jan 26 '24 20:01 riot-ci

The changes to the example Makefile still apply :wink: Why not just use the example app from tests/drivers/w5100 and change w5100 -> w5500?

benpicco avatar Apr 24 '24 21:04 benpicco

Well, ok. I took the w5100 test and use it now as the w5500 test. This test has now ifconfig and txtsnd. Which is not as cool as a ping :-)

stemschmidt avatar Apr 25 '24 16:04 stemschmidt

Hi @benpicco, could you please help me with the failing release-tests? Where do I find information about the "Invalid access token passed." message?

stemschmidt avatar Apr 27 '24 14:04 stemschmidt

The issue is that the new test app fails to link on some boards. The CI stopped building on the first instance, which was the ATmega8.

This is expected, as some MCUs (like the ATmega8) just have too little RAM and/or ROM to allow running the app. We manually keep a list of boards that are expected to fail linking in the Makefile.ci. You can run make generate-Makefile.ci in the test folder to update/generate that file.

Note: You might need to run docker pull riot/riotbuild first to update the docker image with the versions used in the CI, as different compiler versions optimize the code differently, resulting in some apps that barely fit with one to overflow with the other.

maribu avatar Apr 27 '24 14:04 maribu

You can directly squash the update of the Makefile.ci into the commit that adds the app.

Note: I can also run the script tonight. Building an app 200+ times burns a few CPU cycles (we have a lot of boards supported these days 😎)

maribu avatar Apr 27 '24 15:04 maribu

Please tick the checkbox that allow maintainers to edit this PR, otherwise I'm unable to push the Makefile.ci update.

maribu avatar Apr 28 '24 07:04 maribu

Or alternatively, store this as Makefile.ci in the test app:

BOARD_INSUFFICIENT_MEMORY := \
    arduino-duemilanove \
    arduino-leonardo \
    arduino-nano \
    arduino-uno \
    atmega328p \
    atmega328p-xplained-mini \
    atmega8 \
    nucleo-f031k6 \
    nucleo-l011k4 \
    samd10-xmini \
    stk3200 \
    stm32f030f4-demo \
    #

Please also note: The commit message is syntactically incorrect. There is missing a mandatory blank line between the header and the body of the commit message.

maribu avatar Apr 28 '24 08:04 maribu

Please tick the checkbox that allow maintainers to edit this PR, otherwise I'm unable to push the Makefile.ci update.

Mmmh, I can't see the checkbox...

grafik

stemschmidt avatar Apr 30 '24 11:04 stemschmidt

I think you are looking at the right spot in the page. It looks like this for me:

20240430_14h02m17s_grim

Are you logged in?

In either case, just storing the content from two messages above in a file named Makefile.ci in the test app would get this past the CI as well ;)

Please don't forget to add a blank line after the header (the first line) in the commit message when you --amend the commit.

maribu avatar Apr 30 '24 12:04 maribu

I will update the makefile.in later or tomorrow...

stemschmidt avatar Apr 30 '24 12:04 stemschmidt

Ok, I added the Makefile.in and modified the commit message... Now fingers crossed :-)

stemschmidt avatar Apr 30 '24 21:04 stemschmidt

Mmmh, why is it still being build for the atmega8? And also for other cpus/boards in the insufficient-memory list?

stemschmidt avatar May 01 '24 09:05 stemschmidt

It finally is in :tada: Sometimes it really is a bit of a pain to get a PR past the CI :frowning:

Thanks a lot for your pull request!

maribu avatar May 03 '24 09:05 maribu

Yeah :-)

I am impressed by the RIOT CI chain, I think it is a great (or maybe the best) way to define what is expected from a piece of software before it can be merged into main.

I think it is a bit difficult to keep track of what is missing and how things are handled if you are not working 100% of your time on the Repository, but finally it is in the main!!!

stemschmidt avatar May 04 '24 13:05 stemschmidt