makischu / ESP_eth2wifi

Replacement for missing eth2wifi example in current (2021/09) espressif/esp-iot-solution
7 stars 3 forks source link

How to Flash? #2

Open comod opened 2 years ago

comod commented 2 years ago

include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(hello-world)


- idf.py build flash

Error:

Executing action: all (aliases: build) Running ninja in directory /mnt/data/dev/arduino/WlanEth/build Executing "ninja all"... [1/435] Building C object esp-idf/esp_netif/CMakeFiles/idf_esp_netif.dir/lwip/esp_netif_lwip.c.objFAILED: esp-idf/esp_netif/CMakeFiles/idf_esp_netif.dir/lwip/esp_netif_lwip.c.obj /home/jessy/.espressif/tools/xtensa-esp32-elf/esp-2022r1-RC1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -I/mnt/data/dev/arduino/WlanEth/build/config -I/home/jessy/esp/esp-idf/components/esp_netif/include -I/home/jessy/esp/esp-idf/components/esp_netif/lwip -I/home/jessy/esp/esp-idf/components/esp_netif/private_include -I/home/jessy/esp/esp-idf/components/newlib/platform_include -I/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/jessy/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/jessy/esp/esp-idf/components/freertos/esp_additions/include -I/home/jessy/esp/esp-idf/components/esp_hw_support/include -I/home/jessy/esp/esp-idf/components/esp_hw_support/include/soc -I/home/jessy/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/jessy/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/jessy/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -I/home/jessy/esp/esp-idf/components/heap/include -I/home/jessy/esp/esp-idf/components/log/include -I/home/jessy/esp/esp-idf/components/soc/include -I/home/jessy/esp/esp-idf/components/soc/esp32/. -I/home/jessy/esp/esp-idf/components/soc/esp32/include -I/home/jessy/esp/esp-idf/components/hal/esp32/include -I/home/jessy/esp/esp-idf/components/hal/include -I/home/jessy/esp/esp-idf/components/hal/platform_port/include -I/home/jessy/esp/esp-idf/components/esp_rom/include -I/home/jessy/esp/esp-idf/components/esp_rom/include/esp32 -I/home/jessy/esp/esp-idf/components/esp_rom/esp32 -I/home/jessy/esp/esp-idf/components/esp_common/include -I/home/jessy/esp/esp-idf/components/esp_system/include -I/home/jessy/esp/esp-idf/components/esp_system/port/soc -I/home/jessy/esp/esp-idf/components/esp_system/port/include/private -I/home/jessy/esp/esp-idf/components/xtensa/include -I/home/jessy/esp/esp-idf/components/xtensa/esp32/include -I/home/jessy/esp/esp-idf/components/lwip/include -I/home/jessy/esp/esp-idf/components/lwip/include/apps -I/home/jessy/esp/esp-idf/components/lwip/include/apps/sntp -I/home/jessy/esp/esp-idf/components/lwip/lwip/src/include -I/home/jessy/esp/esp-idf/components/lwip/port/esp32/include -I/home/jessy/esp/esp-idf/components/lwip/port/esp32/include/arch -I/home/jessy/esp/esp-idf/components/vfs/include -I/home/jessy/esp/esp-idf/components/esp_wifi/include -I/home/jessy/esp/esp-idf/components/esp_event/include -I/home/jessy/esp/esp-idf/components/esp_phy/include -I/home/jessy/esp/esp-idf/components/esp_phy/esp32/include -mlongcalls -Wno-frame-address -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-error=format= -Wno-format -Wno-enum-conversion -gdwarf-4 -ggdb -Og -fmacro-prefix-map=/mnt/data/dev/arduino/WlanEth=. -fmacro-prefix-map=/home/jessy/esp/esp-idf=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0-dev-4257-g508661b03e-dirty\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/esp_netif/CMakeFiles/idf_esp_netif.dir/lwip/esp_netif_lwip.c.obj -MF esp-idf/esp_netif/CMakeFiles/idf_esp_netif.dir/lwip/esp_netif_lwip.c.obj.d -o esp-idf/esp_netif/CMakeFiles/__idf_esp_netif.dir/lwip/esp_netif_lwip.c.obj -c /home/jessy/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c /home/jessy/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:12:1: error: unknown type name 'esp_err_t' 12 | esp_err_t esp_netif_receive_reg_rxcb(esp_netif_t esp_netif, void (fn)(void input_netif_handle, void buffer, size_t len, void eb)) | ^~~~~ /home/jessy/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:12:38: error: unknown type name 'esp_netif_t' 12 | esp_err_t esp_netif_receive_reg_rxcb(esp_netif_t esp_netif, void (fn)(void input_netif_handle, void buffer, size_t len, void eb)) | ^~~ /home/jessy/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:12:113: error: unknown type name 'size_t' 12 | esp_err_t esp_netif_receive_reg_rxcb(esp_netif_t esp_netif, void (fn)(void input_netif_handle, void buffer, size_t len, void *eb)) | ^~ /home/jessy/esp/esp-idf/components/esp_netif/lwip/esp_netif_lwip.c:1:1: note: 'size_t' is defined in header ''; did you forget to '#include '? +++ |+#include 1 | //ESP_eth2wifi [1/1] cd /mnt/data/dev/arduino/WlanEth/build/bootloader/esp-idf/e...000 /mnt/data/dev/arduino/WlanEth/build/bootloader/bootloader.binBootloader binary size 0x6680 bytes. 0x980 bytes (8%) free. [26/435] Building C object esp-idf/wpa_supplicant/CMakeFiles/__idf_wpa_supplicant.dir/src/eap_peer/eap_ttls.c.objninja: build stopped: subcommand failed. ninja failed with exit code 1, output of the command is in the /mnt/data/dev/arduino/WlanEth/build/log/idf_py_stderr_output_90501 and /mnt/data/dev/arduino/WlanEth/build/log/idf_py_stdout_output_90501

makischu commented 2 years ago

seems you replaced the whole file. please try to just add the recommended lines of code as proposed in the comments. //for proof of concept the following lines need to be added to the orginal file from esp-idf, e.g. right below esp_netif_receive

comod commented 2 years ago

Sorry i am no C-Developer. I had never before so much trouble to build something in any other language. I tried to just compile the (eth2wlan-)example from the iot-repo. I have everything installed as described there, but obviously i missed something somewhere at one of the thousand steps (sorry for the rant)

~/esp/esp-iot-solution/examples/eth2wifi$ idf.py build flash
Executing action: all (aliases: build)
Running ninja in directory /home/jessy/esp/esp-iot-solution/examples/eth2wifi/build
Executing "ninja all"...
[1/1] cd /home/jessy/esp/esp-iot-solution/examples/eth2wifi/build/bootloader/esp-idf/esptool_py && /home/jessy/.espressif/python_env/idf5.0_py3.9_env/bi...ents/partition_table/check_sizes.py --offset 0x8000 bootloader 0x1000 /home/jessy/esp/esp-iot-solution/examples/eth2wifi/build/bootloader/bootloader.binBootloader binary size 0x6680 bytes. 0x980 bytes (8%) free.
[10/16] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/ethernet2wifi_demo_main.c.objFAILED: esp-idf/main/CMakeFiles/__idf_main.dir/ethernet2wifi_demo_main.c.obj 
/home/jessy/.espressif/tools/xtensa-esp32-elf/esp-2022r1-RC1-11.2.0/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" -DUNITY_INCLUDE_CONFIG_H -I/home/jessy/esp/esp-iot-solution/examples/eth2wifi/build/config -I/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main -I/home/jessy/esp/esp-idf/components/newlib/platform_include -I/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include -I/home/jessy/esp/esp-idf/components/freertos/esp_additions/include/freertos -I/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include -I/home/jessy/esp/esp-idf/components/freertos/esp_additions/include -I/home/jessy/esp/esp-idf/components/esp_hw_support/include -I/home/jessy/esp/esp-idf/components/esp_hw_support/include/soc -I/home/jessy/esp/esp-idf/components/esp_hw_support/include/soc/esp32 -I/home/jessy/esp/esp-idf/components/esp_hw_support/port/esp32/. -I/home/jessy/esp/esp-idf/components/esp_hw_support/port/esp32/private_include -I/home/jessy/esp/esp-idf/components/heap/include -I/home/jessy/esp/esp-idf/components/log/include -I/home/jessy/esp/esp-idf/components/soc/include -I/home/jessy/esp/esp-idf/components/soc/esp32/. -I/home/jessy/esp/esp-idf/components/soc/esp32/include -I/home/jessy/esp/esp-idf/components/hal/esp32/include -I/home/jessy/esp/esp-idf/components/hal/include -I/home/jessy/esp/esp-idf/components/hal/platform_port/include -I/home/jessy/esp/esp-idf/components/esp_rom/include -I/home/jessy/esp/esp-idf/components/esp_rom/include/esp32 -I/home/jessy/esp/esp-idf/components/esp_rom/esp32 -I/home/jessy/esp/esp-idf/components/esp_common/include -I/home/jessy/esp/esp-idf/components/esp_system/include -I/home/jessy/esp/esp-idf/components/esp_system/port/soc -I/home/jessy/esp/esp-idf/components/esp_system/port/include/private -I/home/jessy/esp/esp-idf/components/xtensa/include -I/home/jessy/esp/esp-idf/components/xtensa/esp32/include -I/home/jessy/esp/esp-idf/components/lwip/include -I/home/jessy/esp/esp-idf/components/lwip/include/apps -I/home/jessy/esp/esp-idf/components/lwip/include/apps/sntp -I/home/jessy/esp/esp-idf/components/lwip/lwip/src/include -I/home/jessy/esp/esp-idf/components/lwip/port/esp32/include -I/home/jessy/esp/esp-idf/components/lwip/port/esp32/include/arch -I/home/jessy/esp/esp-idf/components/vfs/include -I/home/jessy/esp/esp-idf/components/esp_wifi/include -I/home/jessy/esp/esp-idf/components/esp_event/include -I/home/jessy/esp/esp-idf/components/esp_netif/include -I/home/jessy/esp/esp-idf/components/esp_phy/include -I/home/jessy/esp/esp-idf/components/esp_phy/esp32/include -I/home/jessy/esp/esp-idf/components/esp_ringbuf/include -I/home/jessy/esp/esp-idf/components/efuse/include -I/home/jessy/esp/esp-idf/components/efuse/esp32/include -I/home/jessy/esp/esp-idf/components/driver/include -I/home/jessy/esp/esp-idf/components/driver/deprecated -I/home/jessy/esp/esp-idf/components/driver/esp32/include -I/home/jessy/esp/esp-idf/components/esp_pm/include -I/home/jessy/esp/esp-idf/components/mbedtls/port/include -I/home/jessy/esp/esp-idf/components/mbedtls/mbedtls/include -I/home/jessy/esp/esp-idf/components/mbedtls/mbedtls/library -I/home/jessy/esp/esp-idf/components/mbedtls/esp_crt_bundle/include -I/home/jessy/esp/esp-idf/components/app_update/include -I/home/jessy/esp/esp-idf/components/spi_flash/include -I/home/jessy/esp/esp-idf/components/bootloader_support/include -I/home/jessy/esp/esp-idf/components/bootloader_support/bootloader_flash/include -I/home/jessy/esp/esp-idf/components/pthread/include -I/home/jessy/esp/esp-idf/components/esp_timer/include -I/home/jessy/esp/esp-idf/components/app_trace/include -I/home/jessy/esp/esp-idf/components/nvs_flash/include -I/home/jessy/esp/esp-idf/components/unity/include -I/home/jessy/esp/esp-idf/components/unity/unity/src -I/home/jessy/esp/esp-idf/components/cmock/CMock/src -I/home/jessy/esp/esp-idf/components/console -I/home/jessy/esp/esp-idf/components/esp_eth/include -I/home/jessy/esp/esp-idf/components/wpa_supplicant/include -I/home/jessy/esp/esp-idf/components/wpa_supplicant/port/include -I/home/jessy/esp/esp-idf/components/wpa_supplicant/esp_supplicant/include -I/home/jessy/esp/esp-idf/components/http_parser -I/home/jessy/esp/esp-idf/components/esp-tls -I/home/jessy/esp/esp-idf/components/esp-tls/esp-tls-crypto -I/home/jessy/esp/esp-idf/components/esp_adc_cal/include -I/home/jessy/esp/esp-idf/components/esp_gdbstub/include -I/home/jessy/esp/esp-idf/components/esp_gdbstub/xtensa -I/home/jessy/esp/esp-idf/components/esp_gdbstub/esp32 -I/home/jessy/esp/esp-idf/components/esp_hid/include -I/home/jessy/esp/esp-idf/components/tcp_transport/include -I/home/jessy/esp/esp-idf/components/esp_http_client/include -I/home/jessy/esp/esp-idf/components/esp_http_server/include -I/home/jessy/esp/esp-idf/components/esp_https_ota/include -I/home/jessy/esp/esp-idf/components/esp_lcd/include -I/home/jessy/esp/esp-idf/components/esp_lcd/interface -I/home/jessy/esp/esp-idf/components/protobuf-c/protobuf-c -I/home/jessy/esp/esp-idf/components/protocomm/include/common -I/home/jessy/esp/esp-idf/components/protocomm/include/security -I/home/jessy/esp/esp-idf/components/protocomm/include/transports -I/home/jessy/esp/esp-idf/components/esp_local_ctrl/include -I/home/jessy/esp/esp-idf/components/esp_psram/include -I/home/jessy/esp/esp-idf/components/sdmmc/include -I/home/jessy/esp/esp-idf/components/esp_serial_slave_link/include -I/home/jessy/esp/esp-idf/components/espcoredump/include -I/home/jessy/esp/esp-idf/components/espcoredump/include/port/xtensa -I/home/jessy/esp/esp-idf/components/wear_levelling/include -I/home/jessy/esp/esp-idf/components/fatfs/diskio -I/home/jessy/esp/esp-idf/components/fatfs/vfs -I/home/jessy/esp/esp-idf/components/fatfs/src -I/home/jessy/esp/esp-idf/components/idf_test/include -I/home/jessy/esp/esp-idf/components/idf_test/include/esp32 -I/home/jessy/esp/esp-idf/components/ieee802154/include -I/home/jessy/esp/esp-idf/components/json/cJSON -I/home/jessy/esp/esp-idf/components/mqtt/esp-mqtt/include -I/home/jessy/esp/esp-idf/components/perfmon/include -I/home/jessy/esp/esp-idf/components/spiffs/include -I/home/jessy/esp/esp-idf/components/ulp/ulp_common/include -I/home/jessy/esp/esp-idf/components/ulp/ulp_common/include/esp32 -I/home/jessy/esp/esp-idf/components/wifi_provisioning/include -mlongcalls -Wno-frame-address  -ffunction-sections -fdata-sections -Wall -Werror=all -Wno-error=unused-function -Wno-error=unused-variable -Wno-error=deprecated-declarations -Wextra -Wno-unused-parameter -Wno-sign-compare -Wno-error=format= -Wno-format -Wno-enum-conversion -gdwarf-4 -ggdb -Os -freorder-blocks -fmacro-prefix-map=/home/jessy/esp/esp-iot-solution/examples/eth2wifi=. -fmacro-prefix-map=/home/jessy/esp/esp-idf=/IDF -fstrict-volatile-bitfields -Wno-error=unused-but-set-variable -fno-jump-tables -fno-tree-switch-conversion -DconfigENABLE_FREERTOS_DEBUG_OCDAWARE=1 -std=gnu17 -Wno-old-style-declaration -D_GNU_SOURCE -DIDF_VER=\"v5.0-dev-4257-g508661b03e-dirty\" -DESP_PLATFORM -D_POSIX_READER_WRITER_LOCKS -MD -MT esp-idf/main/CMakeFiles/__idf_main.dir/ethernet2wifi_demo_main.c.obj -MF esp-idf/main/CMakeFiles/__idf_main.dir/ethernet2wifi_demo_main.c.obj.d -o esp-idf/main/CMakeFiles/__idf_main.dir/ethernet2wifi_demo_main.c.obj -c /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c
In file included from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:18:
/home/jessy/esp/esp-idf/components/esp_event/include/esp_event_loop.h:2:2: warning: #warning "esp_event_loop.h is deprecated, please include esp_event.h instead" [-Wcpp]
    2 | #warning "esp_event_loop.h is deprecated, please include esp_event.h instead"
      |  ^~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:40:8: error: unknown type name 'xQueueHandle'
   40 | static xQueueHandle eth_queue_handle;
      |        ^~~~~~~~~~~~
In file included from /home/jessy/esp/esp-idf/components/esp_event/include/esp_event.h:14,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:17:
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c: In function 'pkt_eth2wifi':
/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/queue.h:513:24: warning: passing argument 1 of 'xQueueGenericSend' makes pointer from integer without a cast [-Wint-conversion]
  513 |     xQueueGenericSend( ( xQueue ), ( pvItemToQueue ), ( xTicksToWait ), queueSEND_TO_BACK )
      |                        ^~~~~~~~~~
      |                        |
      |                        int
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:64:9: note: in expansion of macro 'xQueueSend'
   64 |     if (xQueueSend(eth_queue_handle, &msg, pdMS_TO_TICKS(FLOW_CONTROL_QUEUE_TIMEOUT_MS)) != pdTRUE) {
      |         ^~~~~~~~~~
/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/queue.h:693:45: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
  693 | BaseType_t xQueueGenericSend( QueueHandle_t xQueue,
      |                               ~~~~~~~~~~~~~~^~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c: In function 'eth_task':
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:52: error: 'portTickType' undeclared (first use in this function)
   79 |         if (xQueueReceive(eth_queue_handle, &msg, (portTickType)portMAX_DELAY) == pdTRUE) {
      |                                                    ^~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:52: note: each undeclared identifier is reported only once for each function it appears in
In file included from /home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/portable.h:58,
                 from /home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:70,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:14:
/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:125:25: error: expected expression before 'TickType_t'
  125 | #define portMAX_DELAY ( TickType_t ) 0xffffffffUL
      |                         ^~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:65: note: in expansion of macro 'portMAX_DELAY'
   79 |         if (xQueueReceive(eth_queue_handle, &msg, (portTickType)portMAX_DELAY) == pdTRUE) {
      |                                                                 ^~~~~~~~~~~~~
/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:125:38: error: expected ')' before numeric constant
  125 | #define portMAX_DELAY ( TickType_t ) 0xffffffffUL
      |                                      ^~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:65: note: in expansion of macro 'portMAX_DELAY'
   79 |         if (xQueueReceive(eth_queue_handle, &msg, (portTickType)portMAX_DELAY) == pdTRUE) {
      |                                                                 ^~~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:26: note: to match this '('
   79 |         if (xQueueReceive(eth_queue_handle, &msg, (portTickType)portMAX_DELAY) == pdTRUE) {
      |                          ^
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:79:27: warning: passing argument 1 of 'xQueueReceive' makes pointer from integer without a cast [-Wint-conversion]
   79 |         if (xQueueReceive(eth_queue_handle, &msg, (portTickType)portMAX_DELAY) == pdTRUE) {
      |                           ^~~~~~~~~~~~~~~~
      |                           |
      |                           int
In file included from /home/jessy/esp/esp-idf/components/esp_event/include/esp_event.h:14,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:17:
/home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/queue.h:932:41: note: expected 'QueueHandle_t' {aka 'struct QueueDefinition *'} but argument is of type 'int'
  932 | BaseType_t xQueueReceive( QueueHandle_t xQueue,
      |                           ~~~~~~~~~~~~~~^~~~~~
In file included from /home/jessy/esp/esp-idf/components/esp_hw_support/include/esp_cpu.h:20,
                 from /home/jessy/esp/esp-idf/components/esp_hw_support/include/hal/cpu_ll.h:18,
                 from /home/jessy/esp/esp-idf/components/esp_hw_support/include/hal/cpu_hal.h:17,
                 from /home/jessy/esp/esp-idf/components/esp_hw_support/include/spinlock.h:11,
                 from /home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h:74,
                 from /home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/portable.h:58,
                 from /home/jessy/esp/esp-idf/components/freertos/FreeRTOS-Kernel/include/freertos/FreeRTOS.h:70,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:14:
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c: In function 'initialise_wifi':
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:119:21: error: implicit declaration of function 'tcpip_adapter_clear_default_wifi_handlers' [-Werror=implicit-function-declaration]
  119 |     ESP_ERROR_CHECK(tcpip_adapter_clear_default_wifi_handlers());
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/jessy/esp/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/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c: In function 'initialise_ethernet':
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:155:15: error: 'eth_mac_config_t' has no member named 'smi_mdc_gpio_num'
  155 |     mac_config.smi_mdc_gpio_num = CONFIG_PHY_SMI_MDC_PIN;
      |               ^
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:156:15: error: 'eth_mac_config_t' has no member named 'smi_mdio_gpio_num'
  156 |     mac_config.smi_mdio_gpio_num = CONFIG_PHY_SMI_MDIO_PIN;
      |               ^
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:157:48: warning: passing argument 1 of 'esp_eth_mac_new_esp32' from incompatible pointer type [-Wincompatible-pointer-types]
  157 |     esp_eth_mac_t* mac = esp_eth_mac_new_esp32(&mac_config);
      |                                                ^~~~~~~~~~~
      |                                                |
      |                                                eth_mac_config_t *
In file included from /home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth_driver.h:9,
                 from /home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth.h:15,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:21:
/home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth_mac.h:470:69: note: expected 'const eth_esp32_emac_config_t *' but argument is of type 'eth_mac_config_t *'
  470 | esp_eth_mac_t *esp_eth_mac_new_esp32(const eth_esp32_emac_config_t *esp32_config, const eth_mac_config_t *config);
      |                                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:157:26: error: too few arguments to function 'esp_eth_mac_new_esp32'
  157 |     esp_eth_mac_t* mac = esp_eth_mac_new_esp32(&mac_config);
      |                          ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth_driver.h:9,
                 from /home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth.h:15,
                 from /home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:21:
/home/jessy/esp/esp-idf/components/esp_eth/include/esp_eth_mac.h:470:16: note: declared here
  470 | esp_eth_mac_t *esp_eth_mac_new_esp32(const eth_esp32_emac_config_t *esp32_config, const eth_mac_config_t *config);
      |                ^~~~~~~~~~~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:172:24: warning: assignment to 'esp_err_t (*)(void *, uint8_t *, uint32_t,  void *)' {aka 'int (*)(void *, unsigned char *, long unsigned int,  void *)'} from incompatible pointer type 'esp_err_t (*)(void *, uint8_t *, uint32_t)' {aka 'int (*)(void *, unsigned char *, long unsigned int)'} [-Wincompatible-pointer-types]
  172 |     config.stack_input = pkt_eth2wifi;
      |                        ^
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c: In function 'app_main':
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:282:5: error: implicit declaration of function 'tcpip_adapter_init' [-Werror=implicit-function-declaration]
  282 |     tcpip_adapter_init();
      |     ^~~~~~~~~~~~~~~~~~
/home/jessy/esp/esp-iot-solution/examples/eth2wifi/main/ethernet2wifi_demo_main.c:284:22: warning: assignment to 'int' from 'QueueHandle_t' {aka 'struct QueueDefinition *'} makes integer from pointer without a cast [-Wint-conversion]
  284 |     eth_queue_handle = xQueueCreate(FLOW_CONTROL_QUEUE_LENGTH, sizeof(flow_control_msg_t));
      |                      ^
cc1: some warnings being treated as errors
ninja: build stopped: subcommand failed.
HINT: Maybe you forgot to import tcpip_adapter_clear_default_wifi_handlers, tcpip_adapter_init library(s) in header file or add the necessary REQURIES component. Try to add missing libraries to your project header file or check idf_component_register(REQUIRES ...) section in your component CmakeList.txt file. For more information run 'idf.py docs -sp api-guides/build-system.html'.
ninja failed with exit code 1, output of the command is in the /home/jessy/esp/esp-iot-solution/examples/eth2wifi/build/log/idf_py_stderr_output_87248 and /home/jessy/esp/esp-iot-solution/examples/eth2wifi/build/log/idf_py_stdout_output_87248
makischu commented 2 years ago

I know that getting an [embedded] environment ready can be a pain. I am sorry I cannot really help with this step. There was a reason why I suggested "to first get the original example running (...) and then apply the proposed changes" in the description ;)

Have you reverted the already modified files back to their originals?