micro-ROS / micro_ros_espidf_component

micro-ROS ESP32 IDF component and sample code
Apache License 2.0
229 stars 53 forks source link

ESP32 uROS ethernet netif bug #229

Closed TaVodic closed 4 months ago

TaVodic commented 4 months ago

Compilation error of the uROS component using the Ethernet interface

Steps to reproduce the issue

#
# micro-ROS Settings
#
CONFIG_MICRO_ROS_ESP_XRCE_DDS_MIDDLEWARE=y
CONFIG_MICRO_ROS_ESP_NETIF_ENET=y

#
# Ethernet Configuration
#
CONFIG_MICRO_ROS_USE_INTERNAL_ETHERNET=y
CONFIG_MICRO_ROS_ETH_PHY_IP101=y
CONFIG_MICRO_ROS_ETH_MDC_GPIO=23
CONFIG_MICRO_ROS_ETH_MDIO_GPIO=18
CONFIG_MICRO_ROS_ETH_PHY_RST_GPIO=5
CONFIG_MICRO_ROS_ETH_PHY_ADDR=1
# end of Ethernet Configuration

CONFIG_MICRO_ROS_AGENT_IP="192.168.1.50"
CONFIG_MICRO_ROS_AGENT_PORT="8888"
# end of micro-ROS Settings

Issue

During compilation there were errors in file uros_ethernet_netif.c.

Solution (based on ESP32 ethernet_example_main.c )

image

After these changes, uROS project using ethernet was working as expected with no compilation errors.