micro-ROS / micro-ROS/micro_ros_espidf_component

Issues compiling with W5500 enabled

Open
#234 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
419
Forks
124
Avg merge
21h 35m
Merged PRs (30d)
3

Description

Issue template

  • Hardware description: ESP32 with W5500
  • RTOS: freeRTOS
  • Installation type: idf 5.2 in vscode
  • Version or commit hash: ROS Iron, Micro-ROS commit 2b541f8
Steps to reproduce the issue

Create a new project using the pub/sub example.
Configure project to use W5500

Expected behavior

Code compiles and is able to run on the ESP32

Actual behavior

I instead get the following when compling:

/home/kevin/projects/esp32/hello_world/components/micro_ros_espidf_component/network_interfaces/uros_ethernet_netif.c: In function 'uros_network_interface_initialize':
/home/kevin/projects/esp32/hello_world/components/micro_ros_espidf_component/network_interfaces/uros_ethernet_netif.c:78:21: error: implicit declaration of function 'esp_eth_set_default_handlers' [-Werror=implicit-function-declaration]
   78 |     ESP_ERROR_CHECK(esp_eth_set_default_handlers(eth_netif));
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kevin/esp/v5.2/esp-idf/components/esp_common/include/esp_err.h:117:30: note: in definition of macro 'ESP_ERROR_CHECK'
  117 |         esp_err_t err_rc_ = (x);                                        \
      |                              ^
/home/kevin/projects/esp32/hello_world/components/micro_ros_espidf_component/network_interfaces/uros_ethernet_netif.c:139:74: error: macro "ETH_W5500_DEFAULT_CONFIG" requires 2 arguments, but only 1 given
  139 |     eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle);
      |                                                                          ^
In file included from /home/kevin/esp/v5.2/esp-idf/components/esp_eth/include/esp_eth_driver.h:9,
                 from /home/kevin/esp/v5.2/esp-idf/components/esp_eth/include/esp_eth.h:15,
                 from /home/kevin/projects/esp32/hello_world/components/micro_ros_espidf_component/network_interfaces/uros_ethernet_netif.c:6:
/home/kevin/esp/v5.2/esp-idf/components/esp_eth/include/esp_eth_mac.h:623: note: macro "ETH_W5500_DEFAULT_CONFIG" defined here
  623 | #define ETH_W5500_DEFAULT_CONFIG(spi_host, spi_devcfg_p) \
      | 
/home/kevin/projects/esp32/hello_world/components/micro_ros_espidf_component/network_interfaces/uros_ethernet_netif.c:139:39: error: 'ETH_W5500_DEFAULT_CONFIG' undeclared (first use in this function)
  139 |     eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle);
      |                                       ^~~~~~~~~~~~~~~~~~~~~~~~`
Additional information

Only change to the basic component it to allow pin 35 to be selected for MISO.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with network_interfaces/uros_ethernet_netif.c, especially the calls at lines 78 and 139, and compare those APIs with the ESP-IDF 5.2 headers shown in the compiler output. Re-run the pub/sub example configured for W5500; done means the component compiles successfully and the ESP32 can run it.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.