IDF 4.2 basic example fails

Scott.Bonomi
Posts: 34
Joined: Mon Mar 09, 2020 7:36 pm

IDF 4.2 basic example fails

Postby Scott.Bonomi » Wed Jul 22, 2020 12:22 am

After Zipping my 4.0 configuration I cloned from https://github.com/espressif/esp-idf/tree/release/v4.2 as I have read in the forum it works with Eclipse and JTAG.
After getting it and running install, I copied the basic ethernet example up to the esp-idf root and told idf to build it. I even chose to flash it directly and let the new monitor feature show it executing, or NOT. It apparently died at line 125 on the call to esp_eth_driver_install().
The device is a U4WDH on a DevKitC, with single core and 4M set in the configuration.


So what did I do wrong?

========================================================================
Terminal output
========================================================================
Using Python in C:\Program Files\Python37\
Python 3.7.3
Using Git in C:\Program Files\Git\cmd\
git version 2.25.0.windows.1
Setting IDF_PATH: C:\Users\sbonomi\Desktop\esp-idf

Adding ESP-IDF tools to PATH...
C:\Users\sbonomi\.espressif\tools\xtensa-esp32-elf\esp-2020r2-8.2.0\xtensa-esp32-elf\bin
C:\Users\sbonomi\.espressif\tools\xtensa-esp32s2-elf\esp-2020r2-8.2.0\xtensa-esp32s2-elf\bin
C:\Users\sbonomi\.espressif\tools\esp32ulp-elf\2.28.51-esp-20191205\esp32ulp-elf-binutils\bin
C:\Users\sbonomi\.espressif\tools\esp32s2ulp-elf\2.28.51-esp-20191205\esp32s2ulp-elf-binutils\bin
C:\Users\sbonomi\.espressif\tools\cmake\3.16.4\bin
C:\Users\sbonomi\.espressif\tools\openocd-esp32\v0.10.0-esp32-20200420\openocd-esp32\bin
C:\Users\sbonomi\.espressif\tools\ninja\1.10.0\
C:\Users\sbonomi\.espressif\tools\idf-exe\1.0.1\
C:\Users\sbonomi\.espressif\tools\ccache\3.7\
C:\Users\sbonomi\.espressif\tools\dfu-util\0.9\dfu-util-0.9-win64
C:\Users\sbonomi\.espressif\python_env\idf4.2_py3.7_env\Scripts
C:\Users\sbonomi\Desktop\esp-idf\tools

Checking if Python packages are up to date...
Python requirements from C:\Users\sbonomi\Desktop\esp-idf\requirements.txt are satisfied.

Done! You can now compile ESP-IDF projects.
Go to the project directory and run:

idf.py build


C:\Users\sbonomi\Desktop\esp-idf>cd basic

C:\Users\sbonomi\Desktop\esp-idf\basic>idf.py build
Executing action: all (aliases: build)
Running ninja in directory c:\users\sbonomi\desktop\esp-idf\basic\build
Executing "ninja all"...
[0/1] Re-running CMake...
-- ccache will be used for faster recompilation
-- Building ESP-IDF components for target esp32
Loading defaults file C:/Users/sbonomi/Desktop/esp-idf/basic/sdkconfig.defaults...
-- Could NOT find Perl (missing: PERL_EXECUTABLE)
-- App "ethernet_basic" version: v4.2-dev-1856-g00148cd0c-dirty
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-time.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-data.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.syscalls.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/basic/build/esp-idf/esp32/esp32_out.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp32/ld/esp32.project.ld.in
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Components: app_trace app_update asio bootloader bootloader_support bt cbor coap console cxx driver efuse esp-tls esp32 esp_adc_cal esp_common esp_eth esp_event esp_gdbstub esp_hid esp_http_client esp_http_server esp_https_ota esp_https_server esp_ipc esp_local_ctrl esp_netif esp_ringbuf esp_rom esp_serial_slave_link esp_system esp_timer esp_websocket_client esp_wifi espcoredump esptool_py expat fatfs freemodbus freertos heap idf_test jsmn json libsodium log lwip main mbedtls mdns mqtt newlib nghttp nvs_flash openssl partition_table perfmon protobuf-c protocomm pthread sdmmc soc spi_flash spiffs tcp_transport tcpip_adapter tinyusb ulp unity vfs wear_levelling wifi_provisioning wpa_supplicant xtensa
-- Component paths: C:/Users/sbonomi/Desktop/esp-idf/components/app_trace C:/Users/sbonomi/Desktop/esp-idf/components/app_update C:/Users/sbonomi/Desktop/esp-idf/components/asio C:/Users/sbonomi/Desktop/esp-idf/components/bootloader C:/Users/sbonomi/Desktop/esp-idf/components/bootloader_support C:/Users/sbonomi/Desktop/esp-idf/components/bt C:/Users/sbonomi/Desktop/esp-idf/components/cbor C:/Users/sbonomi/Desktop/esp-idf/components/coap C:/Users/sbonomi/Desktop/esp-idf/components/console C:/Users/sbonomi/Desktop/esp-idf/components/cxx C:/Users/sbonomi/Desktop/esp-idf/components/driver C:/Users/sbonomi/Desktop/esp-idf/components/efuse C:/Users/sbonomi/Desktop/esp-idf/components/esp-tls C:/Users/sbonomi/Desktop/esp-idf/components/esp32 C:/Users/sbonomi/Desktop/esp-idf/components/esp_adc_cal C:/Users/sbonomi/Desktop/esp-idf/components/esp_common C:/Users/sbonomi/Desktop/esp-idf/components/esp_eth C:/Users/sbonomi/Desktop/esp-idf/components/esp_event C:/Users/sbonomi/Desktop/esp-idf/components/esp_gdbstub C:/Users/sbonomi/Desktop/esp-idf/components/esp_hid C:/Users/sbonomi/Desktop/esp-idf/components/esp_http_client C:/Users/sbonomi/Desktop/esp-idf/components/esp_http_server C:/Users/sbonomi/Desktop/esp-idf/components/esp_https_ota C:/Users/sbonomi/Desktop/esp-idf/components/esp_https_server C:/Users/sbonomi/Desktop/esp-idf/components/esp_ipc C:/Users/sbonomi/Desktop/esp-idf/components/esp_local_ctrl C:/Users/sbonomi/Desktop/esp-idf/components/esp_netif C:/Users/sbonomi/Desktop/esp-idf/components/esp_ringbuf C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom C:/Users/sbonomi/Desktop/esp-idf/components/esp_serial_slave_link C:/Users/sbonomi/Desktop/esp-idf/components/esp_system C:/Users/sbonomi/Desktop/esp-idf/components/esp_timer C:/Users/sbonomi/Desktop/esp-idf/components/esp_websocket_client C:/Users/sbonomi/Desktop/esp-idf/components/esp_wifi C:/Users/sbonomi/Desktop/esp-idf/components/espcoredump C:/Users/sbonomi/Desktop/esp-idf/components/esptool_py C:/Users/sbonomi/Desktop/esp-idf/components/expat C:/Users/sbonomi/Desktop/esp-idf/components/fatfs C:/Users/sbonomi/Desktop/esp-idf/components/freemodbus C:/Users/sbonomi/Desktop/esp-idf/components/freertos C:/Users/sbonomi/Desktop/esp-idf/components/heap C:/Users/sbonomi/Desktop/esp-idf/components/idf_test C:/Users/sbonomi/Desktop/esp-idf/components/jsmn C:/Users/sbonomi/Desktop/esp-idf/components/json C:/Users/sbonomi/Desktop/esp-idf/components/libsodium C:/Users/sbonomi/Desktop/esp-idf/components/log C:/Users/sbonomi/Desktop/esp-idf/components/lwip C:/Users/sbonomi/Desktop/esp-idf/basic/main C:/Users/sbonomi/Desktop/esp-idf/components/mbedtls C:/Users/sbonomi/Desktop/esp-idf/components/mdns C:/Users/sbonomi/Desktop/esp-idf/components/mqtt C:/Users/sbonomi/Desktop/esp-idf/components/newlib C:/Users/sbonomi/Desktop/esp-idf/components/nghttp C:/Users/sbonomi/Desktop/esp-idf/components/nvs_flash C:/Users/sbonomi/Desktop/esp-idf/components/openssl C:/Users/sbonomi/Desktop/esp-idf/components/partition_table C:/Users/sbonomi/Desktop/esp-idf/components/perfmon C:/Users/sbonomi/Desktop/esp-idf/components/protobuf-c C:/Users/sbonomi/Desktop/esp-idf/components/protocomm C:/Users/sbonomi/Desktop/esp-idf/components/pthread C:/Users/sbonomi/Desktop/esp-idf/components/sdmmc C:/Users/sbonomi/Desktop/esp-idf/components/soc C:/Users/sbonomi/Desktop/esp-idf/components/spi_flash C:/Users/sbonomi/Desktop/esp-idf/components/spiffs C:/Users/sbonomi/Desktop/esp-idf/components/tcp_transport C:/Users/sbonomi/Desktop/esp-idf/components/tcpip_adapter C:/Users/sbonomi/Desktop/esp-idf/components/tinyusb C:/Users/sbonomi/Desktop/esp-idf/components/ulp C:/Users/sbonomi/Desktop/esp-idf/components/unity C:/Users/sbonomi/Desktop/esp-idf/components/vfs C:/Users/sbonomi/Desktop/esp-idf/components/wear_levelling C:/Users/sbonomi/Desktop/esp-idf/components/wifi_provisioning C:/Users/sbonomi/Desktop/esp-idf/components/wpa_supplicant C:/Users/sbonomi/Desktop/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/sbonomi/Desktop/esp-idf/basic/build
[14/941] Generating ../../partition_table/partition-table.bin
Partition table binary generated. Contents:
*******************************************************************************
# ESP-IDF Partition Table
# Name, Type, SubType, Offset, Size, Flags
nvs,data,nvs,0x9000,24K,
phy_init,data,phy,0xf000,4K,
factory,app,factory,0x10000,1M,
*******************************************************************************
[230/941] Performing configure step for 'bootloader'
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/Users/sbonomi/Desktop/esp-idf/components/bootloader C:/Users/sbonomi/Desktop/esp-idf/components/bootloader_support C:/Users/sbonomi/Desktop/esp-idf/components/efuse C:/Users/sbonomi/Desktop/esp-idf/components/esp32 C:/Users/sbonomi/Desktop/esp-idf/components/esp_common C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom C:/Users/sbonomi/Desktop/esp-idf/components/esptool_py C:/Users/sbonomi/Desktop/esp-idf/components/log C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/components/micro-ecc C:/Users/sbonomi/Desktop/esp-idf/components/partition_table C:/Users/sbonomi/Desktop/esp-idf/components/soc C:/Users/sbonomi/Desktop/esp-idf/components/spi_flash C:/Users/sbonomi/Desktop/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/sbonomi/Desktop/esp-idf/basic/build/bootloader
[409/941] Performing build step for 'bootloader'
[0/1] Re-running CMake...
-- Building ESP-IDF components for target esp32
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp32/ld/esp32.peripherals.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.newlib-funcs.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom/esp32/ld/esp32.rom.libgcc.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.ld
-- Adding linker script C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main/ld/esp32/bootloader.rom.ld
-- Components: bootloader bootloader_support efuse esp32 esp_common esp_rom esptool_py log main micro-ecc partition_table soc spi_flash xtensa
-- Component paths: C:/Users/sbonomi/Desktop/esp-idf/components/bootloader C:/Users/sbonomi/Desktop/esp-idf/components/bootloader_support C:/Users/sbonomi/Desktop/esp-idf/components/efuse C:/Users/sbonomi/Desktop/esp-idf/components/esp32 C:/Users/sbonomi/Desktop/esp-idf/components/esp_common C:/Users/sbonomi/Desktop/esp-idf/components/esp_rom C:/Users/sbonomi/Desktop/esp-idf/components/esptool_py C:/Users/sbonomi/Desktop/esp-idf/components/log C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/main C:/Users/sbonomi/Desktop/esp-idf/components/bootloader/subproject/components/micro-ecc C:/Users/sbonomi/Desktop/esp-idf/components/partition_table C:/Users/sbonomi/Desktop/esp-idf/components/soc C:/Users/sbonomi/Desktop/esp-idf/components/spi_flash C:/Users/sbonomi/Desktop/esp-idf/components/xtensa
-- Configuring done
-- Generating done
-- Build files have been written to: C:/Users/sbonomi/Desktop/esp-idf/basic/build/bootloader
[1/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal.c.obj
[2/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/adc_hal.c.obj
[3/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/cpu_util.c.obj
[4/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/cpu_hal.c.obj
[5/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/lldesc.c.obj
[6/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal.c.obj
[7/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/dac_hal.c.obj
[8/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_hal_iram.c.obj
[9/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/memory_layout_utils.c.obj
[10/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/touch_sensor_hal.c.obj
[11/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/soc_include_legacy_warn.c.obj
[12/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/timer_hal.c.obj
[13/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_slave_hal_iram.c.obj
[14/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/gpio_hal.c.obj
[15/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/ledc_hal_iram.c.obj
[16/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/compare_set.c.obj
[17/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/can_hal.c.obj
[18/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal.c.obj
[19/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/ledc_hal.c.obj
[20/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/wdt_hal_iram.c.obj
[21/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/spi_flash_hal_iram.c.obj
[22/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/soc_hal.c.obj
[23/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/brownout_hal.c.obj
[24/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_init.c.obj
[25/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_clk.c.obj
[26/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/adc_hal.c.obj
[27/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/sdio_slave_hal.c.obj
[28/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_clk_init.c.obj
[29/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/hal/mcpwm_hal.c.obj
[30/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_time.c.obj
[31/70] Building C object esp-idf/soc/soc/esp32/CMakeFiles/soc_esp32.dir/spi_periph.c.obj
[32/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/touch_sensor_hal.c.obj
[33/70] Building C object esp-idf/soc/CMakeFiles/__idf_soc.dir/src/esp32/rtc_sleep.c.obj
[34/70] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log.c.obj
[35/70] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_buffers.c.obj
[36/70] Building C object esp-idf/log/CMakeFiles/__idf_log.dir/log_noos.c.obj
[37/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_api.c.obj
[38/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/esp32/esp_efuse_table.c.obj
[39/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_utility.c.obj
[40/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_fields.c.obj
[41/70] Building C object esp-idf/spi_flash/CMakeFiles/__idf_spi_flash.dir/esp32/spi_flash_rom_patch.c.obj
[42/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp32/esp_efuse_api.c.obj
[43/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_clock.c.obj
[44/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_fields.c.obj
[45/70] Building C object esp-idf/efuse/CMakeFiles/__idf_efuse.dir/src/esp_efuse_utility.c.obj
[46/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_mem.c.obj
[47/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash.c.obj
[48/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_random.c.obj
[49/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_common.c.obj
[50/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_encrypt.c.obj
[51/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp_image_format.c.obj
[52/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_utility.c.obj
[53/70] Linking C static library esp-idf\log\liblog.a
[54/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_efuse_esp32.c.obj
[55/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_partitions.c.obj
[56/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_flash_config_esp32.c.obj
[57/70] Building C object esp-idf/main/CMakeFiles/__idf_main.dir/bootloader_start.c.obj
[58/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/flash_qio_mode.c.obj
[59/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/bootloader_init.c.obj
[60/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_sha.c.obj
[61/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/flash_encrypt.c.obj
[62/70] Building C object esp-idf/bootloader_support/CMakeFiles/__idf_bootloader_support.dir/src/esp32/bootloader_esp32.c.obj
[63/70] Linking C static library esp-idf\soc\soc\esp32\libsoc_esp32.a
[64/70] Linking C static library esp-idf\soc\libsoc.a
[65/70] Linking C static library esp-idf\bootloader_support\libbootloader_support.a
[66/70] Linking C static library esp-idf\efuse\libefuse.a
[67/70] Linking C static library esp-idf\spi_flash\libspi_flash.a
[68/70] Linking C static library esp-idf\main\libmain.a
[69/70] Linking C executable bootloader.elf
[70/70] Generating binary image from built executable
esptool.py v3.0-dev
Generated C:/Users/sbonomi/Desktop/esp-idf/basic/build/bootloader/bootloader.bin
[941/941] Generating binary image from built executable
esptool.py v3.0-dev
Generated C:/Users/sbonomi/Desktop/esp-idf/basic/build/ethernet_basic.bin

Project build complete. To flash, run this command:
C:\Users\sbonomi\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe ..\components\esptool_py\esptool\esptool.py -p (PORT) -b 460800 --before default_reset --after hard_reset --chip esp32 write_flash --flash_mode dio --flash_size detect --flash_freq 40m 0x1000 build\bootloader\bootloader.bin 0x8000 build\partition_table\partition-table.bin 0x10000 build\ethernet_basic.bin
or run 'idf.py -p (PORT) flash'

C:\Users\sbonomi\Desktop\esp-idf\basic>idf.py flash
Executing action: flash
Choosing default port b'COM11' (use '-p PORT' option to set a specific serial port)
Running ninja in directory c:\users\sbonomi\desktop\esp-idf\basic\build
Executing "ninja flash"...
[1/2] cmd.exe /C "cd /D C:\Users\sbonomi\Desktop\esp-idf\components\esptool_p... -P C:/Users/sbonomi/Desktop/esp-idf/components/esptool_py/run_esptool.cmake"
[1/4] Performing build step for 'bootloader'
ninja: no work to do.
esptool.py --chip esp32 -p COM11 -b 460800 --before=default_reset --after=hard_reset write_flash --flash_mode dio --flash_freq 40m --flash_size 4MB 0x8000 partition_table/partition-table.bin 0x1000 bootloader/bootloader.bin 0x10000 ethernet_basic.bin
esptool.py v3.0-dev
Serial port COM11
Connecting....
Chip is unknown ESP32 (revision 3)
Features: WiFi, BT, Single Core, Embedded Flash, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: f0:08:d1:6b:36:fc
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Compressed 3072 bytes to 103...
Writing at 0x00008000... (100 %)
Wrote 3072 bytes (103 compressed) at 0x00008000 in 0.0 seconds (effective 2041.5 kbit/s)...
Hash of data verified.
Compressed 24928 bytes to 15266...
Writing at 0x00001000... (100 %)
Wrote 24928 bytes (15266 compressed) at 0x00001000 in 0.4 seconds (effective 560.0 kbit/s)...
Hash of data verified.
Compressed 294912 bytes to 169312...
Writing at 0x00010000... (9 %)
Writing at 0x00014000... (18 %)
Writing at 0x00018000... (27 %)
Writing at 0x0001c000... (36 %)
Writing at 0x00020000... (45 %)
Writing at 0x00024000... (54 %)
Writing at 0x00028000... (63 %)
Writing at 0x0002c000... (72 %)
Writing at 0x00030000... (81 %)
Writing at 0x00034000... (90 %)
Writing at 0x00038000... (100 %)
Wrote 294912 bytes (169312 compressed) at 0x00010000 in 4.0 seconds (effective 591.1 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
Done

C:\Users\sbonomi\Desktop\esp-idf\basic>idf.py monitor
Executing action: monitor
Choosing default port b'COM11' (use '-p PORT' option to set a specific serial port)
Running idf_monitor in directory c:\users\sbonomi\desktop\esp-idf\basic
Executing "C:\Users\sbonomi\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe C:\Users\sbonomi\Desktop\esp-idf\tools/idf_monitor.py -p COM11 -b 115200 --toolchain-prefix xtensa-esp32-elf- c:\users\sbonomi\desktop\esp-idf\basic\build\ethernet_basic.elf -m 'C:\Users\sbonomi\.espressif\python_env\idf4.2_py3.7_env\Scripts\python.exe' 'C:\Users\sbonomi\Desktop\esp-idf\tools\idf.py'"...
[0;33m--- WARNING: GDB cannot open serial ports accessed as COMx[0m
[0;33m--- Using \\.\COM11 instead...[0m
--- idf_monitor on \\.\COM11 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 188777542, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:2
load:0x3fff0030,len:4
load:0x3fff0034,len:7136
ho 0 tail 12 room 4
load:0x40078000,len:13696
load:0x40080400,len:4000
0x40080400: _init at ??:?

entry 0x40080688
I (32) boot: ESP-IDF v4.2-dev-1856-g00148cd0c-dirty 2nd stage bootloader
I (32) boot: compile time 16:50:32
I (33) boot: chip revision: 3
I (37) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (44) boot.esp32: SPI Speed : 40MHz
I (48) boot.esp32: SPI Mode : DIO
I (53) boot.esp32: SPI Flash Size : 4MB
I (57) boot: Enabling RNG early entropy source...
I (63) boot: Partition Table:
I (66) boot: ## Label Usage Type ST Offset Length
I (74) boot: 0 nvs WiFi data 01 02 00009000 00006000
I (81) boot: 1 phy_init RF data 01 01 0000f000 00001000
I (89) boot: 2 factory factory app 00 00 00010000 00100000
I (96) boot: End of partition table
I (100) boot_comm: chip revision: 3, min. application chip revision: 0
I (108) esp_image: segment 0: paddr=0x00010020 vaddr=0x3f400020 size=0x0d6a4 ( 54948) map
I (138) esp_image: segment 1: paddr=0x0001d6cc vaddr=0x3ffb0000 size=0x01a24 ( 6692) load
I (141) esp_image: segment 2: paddr=0x0001f0f8 vaddr=0x40080000 size=0x00404 ( 1028) load
0x40080000: _WindowOverflow4 at C:/Users/sbonomi/Desktop/esp-idf/components/freertos/xtensa/xtensa_vectors.S:1730

I (145) esp_image: segment 3: paddr=0x0001f504 vaddr=0x40080404 size=0x00b14 ( 2836) load
I (154) esp_image: segment 4: paddr=0x00020020 vaddr=0x400d0020 size=0x2f19c (192924) map
0x400d0020: _stext at ??:?

I (236) esp_image: segment 5: paddr=0x0004f1c4 vaddr=0x40080f18 size=0x08e10 ( 36368) load
0x40080f18: xt_highint4 at C:/Users/sbonomi/Desktop/esp-idf/components/esp_system/port/esp32/dport_panic_highint_hdl.S:69

I (257) boot: Loaded app from partition at offset 0x10000
I (257) boot: Disabling RNG early entropy source...
I (257) cpu_start: Pro cpu up.
I (261) cpu_start: Application information:
I (266) cpu_start: Project name: ethernet_basic
I (272) cpu_start: App version: v4.2-dev-1856-g00148cd0c-dirty
I (278) cpu_start: Compile time: Jul 21 2020 16:50:18
I (285) cpu_start: ELF file SHA256: f92418d61710af6b...
I (291) cpu_start: ESP-IDF: v4.2-dev-1856-g00148cd0c-dirty
I (297) cpu_start: Single core mode
I (302) heap_init: Initializing. RAM available for dynamic allocation:
I (309) heap_init: At 3FF80000 len 00002000 (8 KiB): RTCRAM
I (315) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (321) heap_init: At 3FFB3170 len 0002CE90 (179 KiB): DRAM
I (327) heap_init: At 3FFE0440 len 0001FBC0 (126 KiB): D/IRAM
I (334) heap_init: At 40078000 len 00008000 (32 KiB): IRAM
I (340) heap_init: At 40089D28 len 000162D8 (88 KiB): IRAM
I (346) cpu_start: Pro cpu start user code
I (364) spi_flash: detected chip: generic
I (364) spi_flash: flash io: dio
I (365) cpu_start: Starting scheduler on PRO CPU.
E (568) emac_esp32: emac_esp32_init(308): reset timeout
E (568) esp_eth: esp_eth_driver_install(198): init mac failed
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x400837e0
0x400837e0: _esp_error_check_failed at C:/Users/sbonomi/Desktop/esp-idf/components/esp_common/src/esp_err.c:45

file: "../main/ethernet_example_main.c" line 125
func: app_main
expression: esp_eth_driver_install(&config, &eth_handle)

abort() was called at PC 0x400837e3 on core 0
0x400837e3: _esp_error_check_failed at C:/Users/sbonomi/Desktop/esp-idf/components/esp_common/src/esp_err.c:46


Backtrace:0x40083c47:0x3ffaf500 0x40084259:0x3ffaf520 0x40087962:0x3ffaf540 0x400837e3:0x3ffaf5b0 0x400d4309:0x3ffaf5d0 0x400d2df3:0x3ffaf640 0x40084261:0x3ffaf670
0x40083c47: panic_abort at C:/Users/sbonomi/Desktop/esp-idf/components/esp_system/panic.c:330

0x40084259: esp_system_abort at C:/Users/sbonomi/Desktop/esp-idf/components/esp_system/system_api.c:100

0x40087962: abort at C:/Users/sbonomi/Desktop/esp-idf/components/newlib/abort.c:46

0x400837e3: _esp_error_check_failed at C:/Users/sbonomi/Desktop/esp-idf/components/esp_common/src/esp_err.c:46

0x400d4309: app_main at c:\users\sbonomi\desktop\esp-idf\basic\build/../main/ethernet_example_main.c:125 (discriminator 1)

0x400d2df3: main_task at C:/Users/sbonomi/Desktop/esp-idf/components/esp32/cpu_start.c:585

0x40084261: vPortTaskWrapper at C:/Users/sbonomi/Desktop/esp-idf/components/freertos/xtensa/port.c:143



ELF file SHA256: f92418d61710af6b

Rebooting...
ets Jul 29 2019 12:21:46

ESP_Angus
Posts: 2182
Joined: Sun May 08, 2016 4:11 am

Re: IDF 4.2 basic example fails

Postby ESP_Angus » Wed Jul 22, 2020 4:58 am

Hi Scott,

Code: Select all

E (568) emac_esp32: emac_esp32_init(308): reset timeout
E (568) esp_eth: esp_eth_driver_install(198): init mac failed
ESP_ERROR_CHECK failed: esp_err_t 0xffffffff (ESP_FAIL) at 0x400837e0
This error indicates that the ESP32 is failing to initialize the ethernet interface. Most of the examples use the ESP_ERROR_CHECK macro which will call abort() if an error is returned from a setup function.

Can you give any details about the ethernet PHY you have connected to your development board? The README has some pointers about which PHY models are supported and the pin assignments.


PS
I copied the basic ethernet example up to the esp-idf root
Just as an aside, you shouldn't have to make any changes inside the ESP-IDF directory itself in order to build an example. You can build it in-place, or you can copy it somewhere outside the ESP-IDF directory in order to use it as a basis for your own project.

ESP_morris
Posts: 103
Joined: Wed Sep 05, 2018 6:23 am

Re: IDF 4.2 basic example fails

Postby ESP_morris » Thu Jul 30, 2020 9:05 am

"emac reset timeout", seems like esp32 internal Ethernet MAC doesn't get a valid RMII clock.

Can you describe your hardware design, like what's your PHY chip, how it connects with esp32, where the RMII clock comes from, etc..

BTW, have you read our documentation about ESP32 Ethernet here: https://docs.espressif.com/projects/esp ... p_eth.html It covered some hardware design commendation there.

Who is online

Users browsing this forum: Bing [Bot] and 26 guests