micro-ROS / micro-ROS/micro_ros_espidf_component

Issues compiling with W5500 enabled

未关闭
#234 6 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

主要语言
C
星标
419
派生
124
平均合并
21 小时 35 分钟
30 天内合并 PR
3

描述

## 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.

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

调研方向

从 network_interfaces/uros_ethernet_netif.c 开始,尤其检查第 78 行和第 139 行的调用,并将这些 API 与编译器输出中显示的 ESP-IDF 5.2 头文件进行比较。重新运行配置为 W5500 的 pub/sub 示例;当组件成功编译并且 ESP32 能够运行它时,即视为完成。

由索引模型根据 Issue 内容生成。

评估

技术栈
c
领域
embedded-iot
Issue 类型
缺陷
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。