Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unknown type name 'eth_w5500_config_t' #1

Open
Ewoutwork opened this issue Apr 3, 2023 · 1 comment
Open

unknown type name 'eth_w5500_config_t' #1

Ewoutwork opened this issue Apr 3, 2023 · 1 comment

Comments

@Ewoutwork
Copy link

what am I doing wrong?

Error :

esp-idf/main/CMakeFiles/__idf_main.dir/main.c.obj -c C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c: In function 'ethernet_connect':
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:245:9: error: unknown type name 'eth_w5500_config_t'; did you mean 'eth_phy_config_t'?
eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle[i]);
^~~~~~~~~~~~~~~~~~
eth_phy_config_t
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:245:43: error: implicit declaration of function 'ETH_W5500_DEFAULT_CONFIG'; did you mean 'ETH_MAC_DEFAULT_CONFIG'? [-Werror=implicit-function-declaration]
eth_w5500_config_t w5500_config = ETH_W5500_DEFAULT_CONFIG(spi_handle[i]);
^~~~~~~~~~~~~~~~~~~~~~~~
ETH_MAC_DEFAULT_CONFIG
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:248:21: error: request for member 'int_gpio_num' in something not a structure or union
w5500_config.int_gpio_num = spi_eth_module_config[i].int_gpio;
^
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:257:22: error: implicit declaration of function 'esp_eth_mac_new_w5500'; did you mean 'esp_eth_mac_new_esp32'? [-Werror=implicit-function-declaration]
mac_spi[i] = esp_eth_mac_new_w5500(&w5500_config, &mac_config_spi);
^~~~~~~~~~~~~~~~~~~~~
esp_eth_mac_new_esp32
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:257:20: warning: assignment to 'esp_eth_mac_t *' {aka 'struct esp_eth_mac_s *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
mac_spi[i] = esp_eth_mac_new_w5500(&w5500_config, &mac_config_spi);
^
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:258:22: error: implicit declaration of function 'esp_eth_phy_new_w5500'; did you mean 'esp_eth_phy_new_ip101'? [-Werror=implicit-function-declaration]
phy_spi[i] = esp_eth_phy_new_w5500(&phy_config_spi);
^~~~~~~~~~~~~~~~~~~~~
esp_eth_phy_new_ip101
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:258:20: warning: assignment to 'esp_eth_phy_t *' {aka 'struct esp_eth_phy_s *'} from 'int' makes pointer from integer without a cast [-Wint-conversion]
phy_spi[i] = esp_eth_phy_new_w5500(&phy_config_spi);
^
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c: In function 'mqtt_event_handler':
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:317:9: warning: variable 'msg_id' set but not used [-Wunused-but-set-variable]
int msg_id;
^~~~~~
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c: In function 'mqtt_app_start':
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:361:17: error: 'CONFIG_USER_BROKER_HOST' undeclared (first use in this function); did you mean 'CONFIG_WS_BUFFER_SIZE'?
.host = CONFIG_USER_BROKER_HOST,
^~~~~~~~~~~~~~~~~~~~~~~
CONFIG_WS_BUFFER_SIZE
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:361:17: note: each undeclared identifier is reported only once for each function it appears in
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:362:17: error: 'CONFIG_USER_BROKER_PORT' undeclared (first use in this function); did you mean 'CONFIG_WS_TRANSPORT'?
.port = CONFIG_USER_BROKER_PORT,
^~~~~~~~~~~~~~~~~~~~~~~
CONFIG_WS_TRANSPORT
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:363:21: error: 'CONFIG_USER_BROKER_USER' undeclared (first use in this function); did you mean 'CONFIG_LWIP_SO_REUSE'?
.username = CONFIG_USER_BROKER_USER,
^~~~~~~~~~~~~~~~~~~~~~~
CONFIG_LWIP_SO_REUSE
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:364:21: error: 'CONFIG_USER_BROKER_PASS' undeclared (first use in this function); did you mean 'CONFIG_WS_BUFFER_SIZE'?
.password = CONFIG_USER_BROKER_PASS,
^~~~~~~~~~~~~~~~~~~~~~~
CONFIG_WS_BUFFER_SIZE
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c: In function 'blink_task':
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:651:41: error: 'cnt' undeclared (first use in this function); did you mean 'int'?
gpio_set_level(USER_BLINK_GPIO, cnt % 2);
^~~
int
At top level:
C:/CODE/esp32/esp32Projects/ESP32_ETH_SD/main/main.c:631:13: warning: 'blink_task' defined but not used [-Wunused-function]
static void blink_task(void *pvParameter) {
^~~~~~~~~~
cc1.exe: some warnings being treated as errors
[966/1033] Building C object esp-idf/driver/CMakeFiles/__idf_driver.dir/rtc_io.c.obj
ninja: build stopped: subcommand failed.

@Dev-91
Copy link
Owner

Dev-91 commented Apr 4, 2023

There are two parts that I think will be a problem right now.

  1. This project has been tested in ESP-IDF 4.4.3 version.
  2. The following items should be checked.
    menuconfig -> Component config -> Ethernet -> Support SPI to Ethernet Module -> Use W5500 (MAC RAW)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants