Skip to content

Issues compiling with W5500 enabled #234

@K-hastings

Description

@K-hastings

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions