Hi there,
using the ESP32 internal EMAC controller (ESP IDF 5.1) I make use of the
eth_esp32_emac_config_t esp32_emac_config = ETH_ESP32_EMAC_DEFAULT_CONFIG();
but it leads to a compiler error saying the eth_esp32_emac_config_t is undifined, which is not true, at least not as straight forward as one would now think.
Investigation eventually lead to following known status:
- Support ESP32 internal EMAC controller in the SDK Config editor is checked
-> CONFIG_ETH_USE_ESP32_EMAC=y in sdkconfig confirms
-> #define CONFIG_ETH_USE_ESP32_EMAC 1 in sdkconfig.h confirms
- opening esp_eth_mac.h though reveals the the compiler doesn't agree since typedef struct { ...} eth_esp32_emac_config_t;
is "grayed out" (text is low contrast) so I guess the #if CONFIG_ETH_USE_ESP32_EMAC is interpreted as false (which make sense, read further)
And here comes the revelation that I can't understand:
hitting right click go to Definition on #include "sdkconfig.h" in esp_eth_mac.h opens a fully different sdkconfig.h:
c:\Espressif\frameworks\esp-idf-v5.1\components\fatfs\test_fatfs_host\sdkconfig\sdkconfig.h
This explains me why the compiler says undifined for the type named above, it doesn't find the #define CONFIG_ETH_USE_ESP32_EMAC 1 there, wich is obvious, but why does the compiler get to this fatfs sdkconfig.h instead to the eth mac?
Any known issue there or did my VSC / ESP IDF got messed up at some point? Is it possible to fix, how?
Best regards
Mark
Issue on esp_eth_mac.h
-
- Posts: 21
- Joined: Wed Feb 22, 2023 4:25 pm
Re: Issue on esp_eth_mac.h
I have exactly the same problem (Exactly, the same as you described it)
Did you find a solution?
Did you find a solution?
Who is online
Users browsing this forum: Google [Bot] and 306 guests