espressif / esp-hosted

Hosted Solution (Linux/MCU) with ESP32 (Wi-Fi + BT + BLE)
Other
715 stars 170 forks source link

ESP32 Unable to detect Flash Size #161

Open wildbiotiger opened 2 years ago

wildbiotiger commented 2 years ago

I'm using a AT25SF321B as the SPI flash for an ESP32-D0WD-V3 IC. I can successfully detect the flash chip, but the size isn't able to be detected. Is there a way to ignore the flash size during runtime? Before we had manually commented out the do_core_init check in the last firmware version (v0.4). Is there something incompatible with the SPI Flash we are using? It seems to correctly flash the chip using the write_flash command, but booting fails.

Output of flash_id command

Detecting chip type... ESP32
Chip is ESP32-D0WD-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: f0:08:d1:4c:fb:48
Uploading stub...
Running stub...
Stub running...
Manufacturer: 1f
Device: 8701
Detected flash size: Unknown
Hard resetting via RTS pin...

Output once it tries to boot

I (13) boot: ESP-IDF v4.4.1-472-gc9140caf8c-dirty 2nd stage bootloader
I (13) boot: compile time 21:33:21
I (13) boot: chip revision: 3
I (16) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (23) boot.esp32: SPI Speed      : 40MHz
I (28) boot.esp32: SPI Mode       : DIO
I (32) boot.esp32: SPI Flash Size : 4MB
I (37) boot: Enabling RNG early entropy source...
I (42) boot: Partition Table:
I (46) boot: ## Label            Usage          Type ST Offset   Length
I (53) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (61) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (68) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (76) boot:  3 factory          factory app      00 00 00010000 00100000
I (83) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (91) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (98) boot: End of partition table
I (102) boot: Defaulting to factory image
I (107) boot_comm: chip revision: 3, min. application chip revision: 0
I (114) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15e00h ( 89600) map
I (155) esp_image: segment 1: paddr=00025e28 vaddr=3ffbdb60 size=0553ch ( 21820) load
I (164) esp_image: segment 2: paddr=0002b36c vaddr=40080000 size=04cach ( 19628) load
I (172) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=769dch (485852) map
I (348) esp_image: segment 4: paddr=000a6a04 vaddr=40084cac size=181d4h ( 98772) load
I (389) esp_image: segment 5: paddr=000bebe0 vaddr=50000000 size=00010h (    16) load
I (404) boot: Loaded app from partition at offset 0x10000
I (404) boot: Disabling RNG early entropy source...
I (415) cpu_start: Pro cpu up.
I (416) cpu_start: Starting app cpu, entry point is 0x4008121c
I (410) cpu_start: App cpu up.
I (432) cpu_start: Pro cpu start user code
I (432) cpu_start: cpu freq: 240000000
I (432) cpu_start: Application information:
I (437) cpu_start: Project name:     network_adapter
I (442) cpu_start: App version:      293978e
I (447) cpu_start: Compile time:     Jul 20 2022 21:33:02
I (453) cpu_start: ELF file SHA256:  573ea08fdc881889...
I (459) cpu_start: ESP-IDF:          v4.4.1-472-gc9140caf8c-dirty
I (466) heap_init: Initializing. RAM available for dynamic allocation:
I (473) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (479) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (485) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (492) heap_init: At 3FFD1498 len 0000EB68 (58 KiB): DRAM
I (498) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (504) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (510) heap_init: At 4009CE80 len 00003180 (12 KiB): IRAM
I (518) spi_flash: detected chip: generic
I (521) spi_flash: flash io: dio
E (525) spi_flash: Detected size(0k) smaller than the size in the binary image header(4096k). Probe failed.

assert failed: do_core_init startup.c:298 (flash_ret == ESP_OK)

Backtrace:0x40081b3e:0x3ffe3a800x400907fd:0x3ffe3aa0 0x4009739d:0x3ffe3ac0 0x400d25ea:0x3ffe3be0 0x400d2746:0x3ffe3c00 0x40081445:0x3ffe3c40 0x400794e0:0x3ffe3c80  |<-CORRUPTED

ELF file SHA256: 573ea08fdc881889

Rebooting...

Any ideas on what we can try to fix this issue?

mantriyogesh commented 2 years ago

Hello @wildbiotiger,

Thank you for trying the ESP-Hosted solution. This issue could be better answered with ESP-IDF team.

Suggestion: If any GPIOs attached, Can you remove all of them, try to erase flash and re-try flashing?

Can you please check this issue with https://github.com/espressif/esp-idf/issues?

wildbiotiger commented 2 years ago

I can post the issue there, but the issue is with the SDIO firmware provided in the latest release (v1.0.1). So, I am not able to modify any of the underlying code here. Would you be able to provide the source code that's trying to detect the SPI memory size in the current build? That would help me to frame the question better for the ESP-IDF team.

Other notes:

mantriyogesh commented 2 years ago

Can you try to flash ESP-Hosted-FG solution, which is available to flash. There is not much difference other than Wi-Fi related handling. Basically, no change in SDIO or any other functionality.

You can build and flash ESP32 chipset using ESP-IDF release/v4.0 with steps

  1. https://github.com/espressif/esp-hosted/blob/ESP-Hosted_MCU_Host/docs/Linux_based_host/Linux_based_readme.md#22-esp-idf-setup
  2. https://github.com/espressif/esp-hosted/blob/ESP-Hosted_MCU_Host/docs/Linux_based_host/SDIO_setup.md#222-source-compilation using SDIO

For flashing in fact you can use even IDF examples for SDIO slave driver. If it fails, ESP-IDF would be in better position to understand and resolve these issues quickly. Anyway, Please let us know if any of the above code flashes correctly.

wildbiotiger commented 2 years ago

Can you publish a build that would disable asserts in the code? That would help get me past THIS particular issue.

mantriyogesh commented 2 years ago

Forget about ESP-Hosted,

I want to understand why are you getting, Detected size(0k) smaller than the size in the binary image header(4096k). Probe failed.

Can you try if SDIO slave example from ESP-IDF from branch, release/v4.0 is getting flashed without these kind of errors.

mantriyogesh commented 2 years ago

What my point is, if you have something non working at the ESP-IDF level itself, flashing ESP-Hosted would not be much useful and will complicate to understand what is exactly the problem.

Also do you have another chipset, where you can flash the firmware you had flashed? Possibly, It will help to differentiate the behaviour between working and non working things.

mantriyogesh commented 2 years ago

Can you please attach sdkconfig ? Also please check if this issue is related for you: https://github.com/espressif/esp-idf/issues/4829

wildbiotiger commented 2 years ago

@mantriyogesh Yes, I understand the issue lies primarily with ESP-IDF not ESP-Hosted. I have not tried the SDIO slave example yet, but I can pretty well trace the calls for the latest version of the ESP-IDF:

  1. esp_flash_spi_init.c:esp_flash_init_main:313
  2. esp_flash_api.c:esp_flash_get_size:294
  3. esp_flash_api.c:chip->chip_drv->detect_size:499
  4. spi_flash_chip_generic.c:spi_flash_chip_generic_detect_size:129

I would think the ID calculation for the SPI flash ID I see in the logs (0x1F8701) would spit out at least 2, but this doesn't seem to be the case. UNLESS the function errors out beforehand and NO size is returned.

0x1F8701 & 0xff  // = 0x01
1 << 1 // = 2
//Why is chip_size still 0?

Based on the datasheet, it should be the following:

0x1F8701 & 0x1f00 // = 0x700
0x700 >> 8 // = 0x7
1 << 0x7 // = 128, which is not 32 Mbit, so not sure where to go here. Is this a JEDEC lookup table value?

SO, something in either case seems off.

wildbiotiger commented 2 years ago

Here's the current sdkconfig from the project.

I think I only had to edit the partition table to expand it for the debug statements and changed DIO to QIO (but I've tried it with DIO with no change in result).

#
# Automatically generated file. DO NOT EDIT.
# Espressif IoT Development Framework (ESP-IDF) Project Configuration
#
CONFIG_IDF_TARGET_ESP32=y
CONFIG_IDF_TARGET="esp32"
CONFIG_IDF_FIRMWARE_CHIP_ID=0x0000

#
# SDK tool configuration
#
CONFIG_SDK_TOOLPREFIX="xtensa-esp32-elf-"
CONFIG_APP_COMPILE_TIME_DATE=y
# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set
# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set
CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16
# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set
# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set
# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set
# CONFIG_BOOTLOADER_LOG_LEVEL_INFO is not set
# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set
CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE=y
CONFIG_BOOTLOADER_LOG_LEVEL=5
CONFIG_BOOTLOADER_SPI_WP_PIN=7
CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y
# CONFIG_BOOTLOADER_FACTORY_RESET is not set
# CONFIG_BOOTLOADER_APP_TEST is not set
CONFIG_BOOTLOADER_WDT_ENABLE=y
# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set
CONFIG_BOOTLOADER_WDT_TIME_MS=9000
# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set
CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y
# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set
# CONFIG_SECURE_BOOT_ENABLED is not set
# CONFIG_SECURE_FLASH_ENC_ENABLED is not set
CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_FLASHMODE_QIO=y
# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DIO is not set
# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set
CONFIG_ESPTOOLPY_FLASHMODE="dio"
CONFIG_ESPTOOLPY_FLASHFREQ_80M=y
# CONFIG_ESPTOOLPY_FLASHFREQ_40M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_26M is not set
# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set
CONFIG_ESPTOOLPY_FLASHFREQ="80m"
# CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
# CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set
# CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set
CONFIG_ESPTOOLPY_FLASHSIZE="4MB"
CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y
CONFIG_ESPTOOLPY_BEFORE_RESET=y
# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set
CONFIG_ESPTOOLPY_BEFORE="default_reset"
CONFIG_ESPTOOLPY_AFTER_RESET=y
# CONFIG_ESPTOOLPY_AFTER_NORESET is not set
CONFIG_ESPTOOLPY_AFTER="hard_reset"
# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y
# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set
# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set
CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_ESPTOOLPY_MONITOR_BAUD=115200
# CONFIG_PARTITION_TABLE_SINGLE_APP is not set
CONFIG_PARTITION_TABLE_TWO_OTA=y
# CONFIG_PARTITION_TABLE_CUSTOM is not set
CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv"
CONFIG_PARTITION_TABLE_FILENAME="partitions_two_ota.csv"
CONFIG_PARTITION_TABLE_OFFSET=0x10000
CONFIG_PARTITION_TABLE_MD5=y
CONFIG_ESP_SDIO_HOST_INTERFACE=y
# CONFIG_ESP_SPI_HOST_INTERFACE is not set
CONFIG_ESP_OTA_WORKAROUND=y
# CONFIG_ESP_SERIAL_DEBUG is not set
# CONFIG_ESP_WLAN_DEBUG is not set
# CONFIG_ESP_BT_DEBUG is not set
CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y
# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set
CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set
# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set
# CONFIG_COMPILER_CXX_EXCEPTIONS is not set
CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set
# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
# CONFIG_COMPILER_STACK_CHECK is not set
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set
CONFIG_ESP32_APPTRACE_DEST_NONE=y
# CONFIG_ESP32_APPTRACE_ENABLE is not set
CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y
CONFIG_BT_ENABLED=y
# CONFIG_BTDM_CTRL_MODE_BLE_ONLY is not set
# CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY is not set
CONFIG_BTDM_CTRL_MODE_BTDM=y
CONFIG_BTDM_CTRL_BLE_MAX_CONN=3
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN=2
CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN=0
# CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_HCI is not set
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_PCM=y
CONFIG_BTDM_CTRL_BR_EDR_SCO_DATA_PATH_EFF=1
CONFIG_BTDM_CTRL_PCM_ROLE_EDGE_CONFIG=y
CONFIG_BTDM_CTRL_PCM_ROLE_MASTER=y
# CONFIG_BTDM_CTRL_PCM_ROLE_SLAVE is not set
CONFIG_BTDM_CTRL_PCM_POLAR_FALLING_EDGE=y
# CONFIG_BTDM_CTRL_PCM_POLAR_RISING_EDGE is not set
CONFIG_BTDM_CTRL_PCM_ROLE_EFF=0
CONFIG_BTDM_CTRL_PCM_POLAR_EFF=0
CONFIG_BTDM_CTRL_AUTO_LATENCY=y
CONFIG_BTDM_CTRL_AUTO_LATENCY_EFF=y
CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT=y
CONFIG_BTDM_CTRL_LEGACY_AUTH_VENDOR_EVT_EFF=y
CONFIG_BTDM_CTRL_BLE_MAX_CONN_EFF=3
CONFIG_BTDM_CTRL_BR_EDR_MAX_ACL_CONN_EFF=2
CONFIG_BTDM_CTRL_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CTRL_PINNED_TO_CORE_0=y
# CONFIG_BTDM_CTRL_PINNED_TO_CORE_1 is not set
CONFIG_BTDM_CTRL_PINNED_TO_CORE=0
CONFIG_BTDM_CTRL_HCI_MODE_VHCI=y
# CONFIG_BTDM_CTRL_HCI_MODE_UART_H4 is not set
CONFIG_BTDM_MODEM_SLEEP=y
CONFIG_BTDM_MODEM_SLEEP_MODE_ORIG=y
# CONFIG_BTDM_MODEM_SLEEP_MODE_EVED is not set
CONFIG_BTDM_LPCLK_SEL_MAIN_XTAL=y
CONFIG_BTDM_BLE_DEFAULT_SCA_250PPM=y
CONFIG_BTDM_BLE_SLEEP_CLOCK_ACCURACY_INDEX_EFF=1
CONFIG_BTDM_BLE_SCAN_DUPL=y
CONFIG_BTDM_SCAN_DUPL_TYPE_DEVICE=y
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA is not set
# CONFIG_BTDM_SCAN_DUPL_TYPE_DATA_DEVICE is not set
CONFIG_BTDM_SCAN_DUPL_TYPE=0
CONFIG_BTDM_SCAN_DUPL_CACHE_SIZE=200
# CONFIG_BTDM_BLE_MESH_SCAN_DUPL_EN is not set
CONFIG_BTDM_CTRL_FULL_SCAN_SUPPORTED=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_SUPP=y
CONFIG_BTDM_BLE_ADV_REPORT_FLOW_CTRL_NUM=100
CONFIG_BTDM_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BT_BLUEDROID_ENABLED is not set
# CONFIG_BT_NIMBLE_ENABLED is not set
CONFIG_BT_CONTROLLER_ONLY=y
CONFIG_BT_RESERVE_DRAM=0xdb5c
# CONFIG_BLE_MESH is not set
# CONFIG_ADC_FORCE_XPD_FSM is not set
CONFIG_ADC_DISABLE_DAC=y
# CONFIG_SPI_MASTER_IN_IRAM is not set
CONFIG_SPI_MASTER_ISR_IN_IRAM=y
# CONFIG_SPI_SLAVE_IN_IRAM is not set
CONFIG_SPI_SLAVE_ISR_IN_IRAM=y
# CONFIG_CAN_ISR_IN_IRAM is not set
# CONFIG_UART_ISR_IN_IRAM is not set
# CONFIG_EFUSE_CUSTOM_TABLE is not set
# CONFIG_EFUSE_VIRTUAL is not set
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_NONE is not set
CONFIG_EFUSE_CODE_SCHEME_COMPAT_3_4=y
# CONFIG_EFUSE_CODE_SCHEME_COMPAT_REPEAT is not set
CONFIG_EFUSE_MAX_BLK_LEN=192
# CONFIG_ESP_TLS_SERVER is not set
CONFIG_ESP32_REV_MIN_0=y
# CONFIG_ESP32_REV_MIN_1 is not set
# CONFIG_ESP32_REV_MIN_2 is not set
# CONFIG_ESP32_REV_MIN_3 is not set
CONFIG_ESP32_REV_MIN=0
CONFIG_ESP32_DPORT_WORKAROUND=y
# CONFIG_ESP32_DEFAULT_CPU_FREQ_80 is not set
# CONFIG_ESP32_DEFAULT_CPU_FREQ_160 is not set
CONFIG_ESP32_DEFAULT_CPU_FREQ_240=y
CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ=240
# CONFIG_ESP32_SPIRAM_SUPPORT is not set
# CONFIG_ESP32_MEMMAP_TRACEMEM is not set
# CONFIG_ESP32_MEMMAP_TRACEMEM_TWOBANKS is not set
# CONFIG_ESP32_TRAX is not set
CONFIG_ESP32_TRACEMEM_RESERVE_DRAM=0x0
# CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_TWO is not set
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES_FOUR=y
CONFIG_ESP32_UNIVERSAL_MAC_ADDRESSES=4
# CONFIG_ESP32_ULP_COPROC_ENABLED is not set
CONFIG_ESP32_ULP_COPROC_RESERVE_MEM=0
# CONFIG_ESP32_PANIC_PRINT_HALT is not set
CONFIG_ESP32_PANIC_PRINT_REBOOT=y
# CONFIG_ESP32_PANIC_SILENT_REBOOT is not set
# CONFIG_ESP32_PANIC_GDBSTUB is not set
CONFIG_ESP32_DEBUG_OCDAWARE=y
CONFIG_ESP32_DEBUG_STUBS_ENABLE=y
CONFIG_ESP32_BROWNOUT_DET=y
CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_0=y
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_1 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_2 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_3 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_4 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_5 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_6 is not set
# CONFIG_ESP32_BROWNOUT_DET_LVL_SEL_7 is not set
CONFIG_ESP32_BROWNOUT_DET_LVL=0
CONFIG_ESP32_REDUCE_PHY_TX_POWER=y
CONFIG_ESP32_TIME_SYSCALL_USE_RTC_FRC1=y
# CONFIG_ESP32_TIME_SYSCALL_USE_RTC is not set
# CONFIG_ESP32_TIME_SYSCALL_USE_FRC1 is not set
# CONFIG_ESP32_TIME_SYSCALL_USE_NONE is not set
CONFIG_ESP32_RTC_CLK_SRC_INT_RC=y
# CONFIG_ESP32_RTC_CLK_SRC_EXT_CRYS is not set
# CONFIG_ESP32_RTC_CLK_SRC_EXT_OSC is not set
# CONFIG_ESP32_RTC_CLK_SRC_INT_8MD256 is not set
CONFIG_ESP32_RTC_CLK_CAL_CYCLES=1024
CONFIG_ESP32_RTC_XTAL_CAL_RETRY=1
CONFIG_ESP32_DEEP_SLEEP_WAKEUP_DELAY=2000
CONFIG_ESP32_XTAL_FREQ_40=y
# CONFIG_ESP32_XTAL_FREQ_26 is not set
# CONFIG_ESP32_XTAL_FREQ_AUTO is not set
CONFIG_ESP32_XTAL_FREQ=40
# CONFIG_ESP32_DISABLE_BASIC_ROM_CONSOLE is not set
# CONFIG_ESP32_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
# CONFIG_ESP32_COMPATIBLE_PRE_V3_1_BOOTLOADERS is not set
# CONFIG_ESP32_USE_FIXED_STATIC_RAM_SIZE is not set
CONFIG_ESP32_DPORT_DIS_INTERRUPT_LVL=5
# CONFIG_PM_ENABLE is not set
CONFIG_ADC_CAL_EFUSE_TP_ENABLE=y
CONFIG_ADC_CAL_EFUSE_VREF_ENABLE=y
CONFIG_ADC_CAL_LUT_ENABLE=y
# CONFIG_ESP_TIMER_PROFILING is not set
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304
CONFIG_ESP_MAIN_TASK_STACK_SIZE=3584
CONFIG_ESP_IPC_TASK_STACK_SIZE=1024
CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584
CONFIG_ESP_CONSOLE_UART_DEFAULT=y
# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set
# CONFIG_ESP_CONSOLE_UART_NONE is not set
CONFIG_ESP_CONSOLE_UART_NUM=0
CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200
CONFIG_ESP_INT_WDT=y
CONFIG_ESP_INT_WDT_TIMEOUT_MS=600
CONFIG_ESP_INT_WDT_CHECK_CPU1=y
CONFIG_ESP_TASK_WDT=y
# CONFIG_ESP_TASK_WDT_PANIC is not set
CONFIG_ESP_TASK_WDT_TIMEOUT_S=5
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_ESP_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
CONFIG_ETH_USE_ESP32_EMAC=y
CONFIG_ETH_PHY_INTERFACE_RMII=y
# CONFIG_ETH_PHY_INTERFACE_MII is not set
CONFIG_ETH_RMII_CLK_INPUT=y
# CONFIG_ETH_RMII_CLK_OUTPUT is not set
CONFIG_ETH_RMII_CLK_IN_GPIO=0
CONFIG_ETH_DMA_BUFFER_SIZE=512
CONFIG_ETH_DMA_RX_BUFFER_NUM=10
CONFIG_ETH_DMA_TX_BUFFER_NUM=10
CONFIG_ETH_USE_SPI_ETHERNET=y
CONFIG_ETH_SPI_ETHERNET_DM9051=y
# CONFIG_ESP_EVENT_LOOP_PROFILING is not set
CONFIG_ESP_EVENT_POST_FROM_ISR=y
CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y
CONFIG_ESP_HTTP_CLIENT_ENABLE_HTTPS=y
# CONFIG_ESP_HTTP_CLIENT_ENABLE_BASIC_AUTH is not set
CONFIG_HTTPD_MAX_REQ_HDR_LEN=512
CONFIG_HTTPD_MAX_URI_LEN=512
CONFIG_HTTPD_ERR_RESP_NO_DELAY=y
CONFIG_HTTPD_PURGE_BUF_LEN=32
# CONFIG_HTTPD_LOG_PURGE_DATA is not set
# CONFIG_OTA_ALLOW_HTTP is not set
# CONFIG_ESP_HTTPS_SERVER_ENABLE is not set
CONFIG_ESP32_WIFI_SW_COEXIST_ENABLE=y
CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=16
CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=64
# CONFIG_ESP32_WIFI_CSI_ENABLED is not set
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y
CONFIG_ESP32_WIFI_RX_BA_WIN=6
# CONFIG_ESP32_WIFI_NVS_ENABLED is not set
# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0 is not set
CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1=y
CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752
CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32
# CONFIG_ESP32_WIFI_DEBUG_LOG_ENABLE is not set
CONFIG_ESP32_WIFI_IRAM_OPT=y
CONFIG_ESP32_WIFI_RX_IRAM_OPT=y
CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE=y
CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y
# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set
CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20
CONFIG_ESP32_PHY_MAX_TX_POWER=20
# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set
# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set
CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y
# CONFIG_ESP32_ENABLE_COREDUMP is not set
# CONFIG_FATFS_CODEPAGE_DYNAMIC is not set
CONFIG_FATFS_CODEPAGE_437=y
# CONFIG_FATFS_CODEPAGE_720 is not set
# CONFIG_FATFS_CODEPAGE_737 is not set
# CONFIG_FATFS_CODEPAGE_771 is not set
# CONFIG_FATFS_CODEPAGE_775 is not set
# CONFIG_FATFS_CODEPAGE_850 is not set
# CONFIG_FATFS_CODEPAGE_852 is not set
# CONFIG_FATFS_CODEPAGE_855 is not set
# CONFIG_FATFS_CODEPAGE_857 is not set
# CONFIG_FATFS_CODEPAGE_860 is not set
# CONFIG_FATFS_CODEPAGE_861 is not set
# CONFIG_FATFS_CODEPAGE_862 is not set
# CONFIG_FATFS_CODEPAGE_863 is not set
# CONFIG_FATFS_CODEPAGE_864 is not set
# CONFIG_FATFS_CODEPAGE_865 is not set
# CONFIG_FATFS_CODEPAGE_866 is not set
# CONFIG_FATFS_CODEPAGE_869 is not set
# CONFIG_FATFS_CODEPAGE_932 is not set
# CONFIG_FATFS_CODEPAGE_936 is not set
# CONFIG_FATFS_CODEPAGE_949 is not set
# CONFIG_FATFS_CODEPAGE_950 is not set
CONFIG_FATFS_CODEPAGE=437
CONFIG_FATFS_LFN_NONE=y
# CONFIG_FATFS_LFN_HEAP is not set
# CONFIG_FATFS_LFN_STACK is not set
CONFIG_FATFS_FS_LOCK=0
CONFIG_FATFS_TIMEOUT_MS=10000
CONFIG_FATFS_PER_FILE_CACHE=y
CONFIG_FMB_MASTER_TIMEOUT_MS_RESPOND=150
CONFIG_FMB_MASTER_DELAY_MS_CONVERT=200
CONFIG_FMB_QUEUE_LENGTH=20
CONFIG_FMB_SERIAL_TASK_STACK_SIZE=2048
CONFIG_FMB_SERIAL_BUF_SIZE=256
CONFIG_FMB_SERIAL_TASK_PRIO=10
# CONFIG_FMB_PORT_TASK_AFFINITY_NO_AFFINITY is not set
CONFIG_FMB_PORT_TASK_AFFINITY_CPU0=y
# CONFIG_FMB_PORT_TASK_AFFINITY_CPU1 is not set
CONFIG_FMB_PORT_TASK_AFFINITY=0x0
# CONFIG_FMB_CONTROLLER_SLAVE_ID_SUPPORT is not set
CONFIG_FMB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_FMB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_FMB_CONTROLLER_STACK_SIZE=4096
CONFIG_FMB_EVENT_QUEUE_TIMEOUT=20
CONFIG_FMB_TIMER_PORT_ENABLED=y
CONFIG_FMB_TIMER_GROUP=0
CONFIG_FMB_TIMER_INDEX=0
CONFIG_FMB_MASTER_TIMER_GROUP=0
CONFIG_FMB_MASTER_TIMER_INDEX=0
# CONFIG_FREERTOS_UNICORE is not set
CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF
CONFIG_FREERTOS_CORETIMER_0=y
# CONFIG_FREERTOS_CORETIMER_1 is not set
CONFIG_FREERTOS_HZ=400
CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set
# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set
CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y
# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set
CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y
CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1
CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y
# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set
# CONFIG_FREERTOS_ASSERT_DISABLE is not set
CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536
CONFIG_FREERTOS_ISR_STACKSIZE=1536
# CONFIG_FREERTOS_LEGACY_HOOKS is not set
CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16
# CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION is not set
CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1
CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048
CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10
CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
# CONFIG_FREERTOS_DEBUG_INTERNALS is not set
CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
CONFIG_HEAP_POISONING_DISABLED=y
# CONFIG_HEAP_POISONING_LIGHT is not set
# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set
CONFIG_HEAP_TRACING_OFF=y
# CONFIG_HEAP_TRACING_STANDALONE is not set
# CONFIG_HEAP_TRACING_TOHOST is not set
# CONFIG_HEAP_TRACING is not set
# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set
# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set
# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set
# CONFIG_LOG_DEFAULT_LEVEL_INFO is not set
# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set
CONFIG_LOG_DEFAULT_LEVEL_VERBOSE=y
CONFIG_LOG_DEFAULT_LEVEL=5
CONFIG_LOG_COLORS=y
CONFIG_LWIP_LOCAL_HOSTNAME="espressif"
# CONFIG_LWIP_L2_TO_L3_COPY is not set
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
CONFIG_LWIP_TIMERS_ONDEMAND=y
CONFIG_LWIP_MAX_SOCKETS=10
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
# CONFIG_LWIP_SO_LINGER is not set
CONFIG_LWIP_SO_REUSE=y
CONFIG_LWIP_SO_REUSE_RXTOALL=y
# CONFIG_LWIP_SO_RCVBUF is not set
CONFIG_LWIP_IP4_FRAG=y
CONFIG_LWIP_IP6_FRAG=y
# CONFIG_LWIP_IP4_REASSEMBLY is not set
# CONFIG_LWIP_IP6_REASSEMBLY is not set
# CONFIG_LWIP_STATS is not set
# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set
CONFIG_LWIP_ESP_GRATUITOUS_ARP=y
CONFIG_LWIP_GARP_TMR_INTERVAL=60
CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32
CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8
# CONFIG_LWIP_AUTOIP is not set
# CONFIG_LWIP_IPV6_AUTOCONFIG is not set
CONFIG_LWIP_NETIF_LOOPBACK=y
CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
CONFIG_LWIP_TCP_ISN_HOOK=y
CONFIG_LWIP_MAX_ACTIVE_TCP=16
CONFIG_LWIP_MAX_LISTENING_TCP=16
CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=12
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_MSL=60000
CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
CONFIG_LWIP_TCP_WND_DEFAULT=5744
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
CONFIG_LWIP_TCP_OVERSIZE_MSS=y
# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set
CONFIG_LWIP_TCP_RTO_TIME=1500
CONFIG_LWIP_MAX_UDP_PCBS=16
CONFIG_LWIP_UDP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072
CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_LWIP_PPP_SUPPORT is not set
CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3
CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5
# CONFIG_LWIP_MULTICAST_PING is not set
# CONFIG_LWIP_BROADCAST_PING is not set
CONFIG_LWIP_MAX_RAW_PCBS=16
CONFIG_LWIP_DHCP_MAX_NTP_SERVERS=1
CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000
CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384
CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
# CONFIG_MBEDTLS_DEBUG is not set
# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set
# CONFIG_MBEDTLS_CMAC_C is not set
CONFIG_MBEDTLS_HARDWARE_AES=y
# CONFIG_MBEDTLS_HARDWARE_MPI is not set
CONFIG_MBEDTLS_HARDWARE_SHA=y
CONFIG_MBEDTLS_HAVE_TIME=y
# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set
CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y
# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set
# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set
# CONFIG_MBEDTLS_TLS_DISABLED is not set
CONFIG_MBEDTLS_TLS_SERVER=y
CONFIG_MBEDTLS_TLS_CLIENT=y
CONFIG_MBEDTLS_TLS_ENABLED=y
# CONFIG_MBEDTLS_PSK_MODES is not set
CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y
CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y
CONFIG_MBEDTLS_SSL_RENEGOTIATION=y
# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set
CONFIG_MBEDTLS_SSL_PROTO_TLS1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_1=y
CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y
# CONFIG_MBEDTLS_SSL_PROTO_DTLS is not set
CONFIG_MBEDTLS_SSL_ALPN=y
CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y
CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y
CONFIG_MBEDTLS_AES_C=y
# CONFIG_MBEDTLS_CAMELLIA_C is not set
# CONFIG_MBEDTLS_DES_C is not set
CONFIG_MBEDTLS_RC4_DISABLED=y
# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set
# CONFIG_MBEDTLS_RC4_ENABLED is not set
# CONFIG_MBEDTLS_BLOWFISH_C is not set
# CONFIG_MBEDTLS_XTEA_C is not set
CONFIG_MBEDTLS_CCM_C=y
CONFIG_MBEDTLS_GCM_C=y
# CONFIG_MBEDTLS_RIPEMD160_C is not set
CONFIG_MBEDTLS_PEM_PARSE_C=y
CONFIG_MBEDTLS_PEM_WRITE_C=y
CONFIG_MBEDTLS_X509_CRL_PARSE_C=y
CONFIG_MBEDTLS_X509_CSR_PARSE_C=y
CONFIG_MBEDTLS_ECP_C=y
CONFIG_MBEDTLS_ECDH_C=y
CONFIG_MBEDTLS_ECDSA_C=y
CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y
CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y
CONFIG_MBEDTLS_ECP_NIST_OPTIM=y
CONFIG_MDNS_MAX_SERVICES=10
CONFIG_MQTT_PROTOCOL_311=y
CONFIG_MQTT_TRANSPORT_SSL=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET=y
CONFIG_MQTT_TRANSPORT_WEBSOCKET_SECURE=y
# CONFIG_MQTT_USE_CUSTOM_CONFIG is not set
# CONFIG_MQTT_TASK_CORE_SELECTION_ENABLED is not set
# CONFIG_MQTT_CUSTOM_OUTBOX is not set
CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set
# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set
# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set
# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set
CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y
# CONFIG_NEWLIB_NANO_FORMAT is not set
# CONFIG_OPENSSL_DEBUG is not set
# CONFIG_OPENSSL_ASSERT_DO_NOTHING is not set
CONFIG_OPENSSL_ASSERT_EXIT=y
CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
CONFIG_PTHREAD_STACK_MIN=768
CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y
# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set
# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set
CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1
CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread"
# CONFIG_SPI_FLASH_VERIFY_WRITE is not set
# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set
CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y
CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set
# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set
# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set
# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set
CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set
CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y
CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y
CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y
CONFIG_SPIFFS_MAX_PARTITIONS=3
CONFIG_SPIFFS_CACHE=y
CONFIG_SPIFFS_CACHE_WR=y
# CONFIG_SPIFFS_CACHE_STATS is not set
CONFIG_SPIFFS_PAGE_CHECK=y
CONFIG_SPIFFS_GC_MAX_RUNS=10
# CONFIG_SPIFFS_GC_STATS is not set
CONFIG_SPIFFS_PAGE_SIZE=256
CONFIG_SPIFFS_OBJ_NAME_LEN=32
CONFIG_SPIFFS_USE_MAGIC=y
CONFIG_SPIFFS_USE_MAGIC_LENGTH=y
CONFIG_SPIFFS_META_LENGTH=4
CONFIG_SPIFFS_USE_MTIME=y
# CONFIG_SPIFFS_DBG is not set
# CONFIG_SPIFFS_API_DBG is not set
# CONFIG_SPIFFS_GC_DBG is not set
# CONFIG_SPIFFS_CACHE_DBG is not set
# CONFIG_SPIFFS_CHECK_DBG is not set
# CONFIG_SPIFFS_TEST_VISUALISATION is not set
CONFIG_NETIF_IP_LOST_TIMER_INTERVAL=120
CONFIG_TCPIP_LWIP=y
CONFIG_UNITY_ENABLE_FLOAT=y
CONFIG_UNITY_ENABLE_DOUBLE=y
# CONFIG_UNITY_ENABLE_COLOR is not set
CONFIG_UNITY_ENABLE_IDF_TEST_RUNNER=y
# CONFIG_UNITY_ENABLE_FIXTURE is not set
# CONFIG_UNITY_ENABLE_BACKTRACE_ON_FAIL is not set
CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_VFS_SUPPORT_TERMIOS=y
CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1
CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128
# CONFIG_WL_SECTOR_SIZE_512 is not set
CONFIG_WL_SECTOR_SIZE_4096=y
CONFIG_WL_SECTOR_SIZE=4096
CONFIG_WIFI_PROV_SCAN_MAX_ENTRIES=16
CONFIG_WIFI_PROV_AUTOSTOP_TIMEOUT=30
CONFIG_WPA_MBEDTLS_CRYPTO=y
# CONFIG_WPA_WPS_STRICT is not set
# CONFIG_WPA_DEBUG_PRINT is not set
# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set

# Deprecated options for backward compatibility
CONFIG_TOOLPREFIX="xtensa-esp32-elf-"
# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_INFO is not set
# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set
CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE=y
CONFIG_LOG_BOOTLOADER_LEVEL=5
# CONFIG_APP_ROLLBACK_ENABLE is not set
# CONFIG_FLASH_ENCRYPTION_ENABLED is not set
CONFIG_FLASHMODE_QIO=y
# CONFIG_FLASHMODE_QOUT is not set
# CONFIG_FLASHMODE_DIO is not set
# CONFIG_FLASHMODE_DOUT is not set
# CONFIG_MONITOR_BAUD_9600B is not set
# CONFIG_MONITOR_BAUD_57600B is not set
CONFIG_MONITOR_BAUD_115200B=y
# CONFIG_MONITOR_BAUD_230400B is not set
# CONFIG_MONITOR_BAUD_921600B is not set
# CONFIG_MONITOR_BAUD_2MB is not set
# CONFIG_MONITOR_BAUD_OTHER is not set
CONFIG_MONITOR_BAUD_OTHER_VAL=115200
CONFIG_MONITOR_BAUD=115200
CONFIG_OPTIMIZATION_LEVEL_DEBUG=y
# CONFIG_OPTIMIZATION_LEVEL_RELEASE is not set
CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y
# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set
# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set
# CONFIG_CXX_EXCEPTIONS is not set
CONFIG_STACK_CHECK_NONE=y
# CONFIG_STACK_CHECK_NORM is not set
# CONFIG_STACK_CHECK_STRONG is not set
# CONFIG_STACK_CHECK_ALL is not set
# CONFIG_STACK_CHECK is not set
# CONFIG_WARN_WRITE_STRINGS is not set
# CONFIG_DISABLE_GCC8_WARNINGS is not set
# CONFIG_BTDM_CONTROLLER_MODE_BLE_ONLY is not set
# CONFIG_BTDM_CONTROLLER_MODE_BR_EDR_ONLY is not set
CONFIG_BTDM_CONTROLLER_MODE_BTDM=y
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN=3
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN=2
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN=0
CONFIG_BTDM_CONTROLLER_BLE_MAX_CONN_EFF=3
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_ACL_CONN_EFF=2
CONFIG_BTDM_CONTROLLER_BR_EDR_MAX_SYNC_CONN_EFF=0
CONFIG_BTDM_CONTROLLER_PINNED_TO_CORE=0
CONFIG_BTDM_CONTROLLER_HCI_MODE_VHCI=y
# CONFIG_BTDM_CONTROLLER_HCI_MODE_UART_H4 is not set
CONFIG_BTDM_CONTROLLER_MODEM_SLEEP=y
CONFIG_BLE_SCAN_DUPLICATE=y
CONFIG_SCAN_DUPLICATE_BY_DEVICE_ADDR=y
# CONFIG_SCAN_DUPLICATE_BY_ADV_DATA is not set
# CONFIG_SCAN_DUPLICATE_BY_ADV_DATA_AND_DEVICE_ADDR is not set
CONFIG_SCAN_DUPLICATE_TYPE=0
CONFIG_DUPLICATE_SCAN_CACHE_SIZE=200
# CONFIG_BLE_MESH_SCAN_DUPLICATE_EN is not set
CONFIG_BTDM_CONTROLLER_FULL_SCAN_SUPPORTED=y
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_SUPPORTED=y
CONFIG_BLE_ADV_REPORT_FLOW_CONTROL_NUM=100
CONFIG_BLE_ADV_REPORT_DISCARD_THRSHOLD=20
# CONFIG_BLUEDROID_ENABLED is not set
# CONFIG_NIMBLE_ENABLED is not set
CONFIG_ADC2_DISABLE_DAC=y
# CONFIG_SPIRAM_SUPPORT is not set
# CONFIG_MEMMAP_TRACEMEM is not set
# CONFIG_MEMMAP_TRACEMEM_TWOBANKS is not set
CONFIG_TRACEMEM_RESERVE_DRAM=0x0
# CONFIG_TWO_UNIVERSAL_MAC_ADDRESS is not set
CONFIG_FOUR_UNIVERSAL_MAC_ADDRESS=y
CONFIG_NUMBER_OF_UNIVERSAL_MAC_ADDRESS=4
# CONFIG_ULP_COPROC_ENABLED is not set
CONFIG_ULP_COPROC_RESERVE_MEM=0
CONFIG_BROWNOUT_DET=y
CONFIG_BROWNOUT_DET_LVL_SEL_0=y
# CONFIG_BROWNOUT_DET_LVL_SEL_1 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_2 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_3 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_4 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_5 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_6 is not set
# CONFIG_BROWNOUT_DET_LVL_SEL_7 is not set
CONFIG_BROWNOUT_DET_LVL=0
CONFIG_REDUCE_PHY_TX_POWER=y
CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_RC=y
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_CRYSTAL is not set
# CONFIG_ESP32_RTC_CLOCK_SOURCE_EXTERNAL_OSC is not set
# CONFIG_ESP32_RTC_CLOCK_SOURCE_INTERNAL_8MD256 is not set
# CONFIG_DISABLE_BASIC_ROM_CONSOLE is not set
# CONFIG_COMPATIBLE_PRE_V2_1_BOOTLOADERS is not set
CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32
CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304
CONFIG_MAIN_TASK_STACK_SIZE=3584
CONFIG_IPC_TASK_STACK_SIZE=1024
CONFIG_TIMER_TASK_STACK_SIZE=3584
CONFIG_CONSOLE_UART_DEFAULT=y
# CONFIG_CONSOLE_UART_CUSTOM is not set
# CONFIG_CONSOLE_UART_NONE is not set
CONFIG_CONSOLE_UART_NUM=0
CONFIG_CONSOLE_UART_BAUDRATE=115200
CONFIG_INT_WDT=y
CONFIG_INT_WDT_TIMEOUT_MS=600
CONFIG_INT_WDT_CHECK_CPU1=y
CONFIG_TASK_WDT=y
# CONFIG_TASK_WDT_PANIC is not set
CONFIG_TASK_WDT_TIMEOUT_S=5
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU0=y
CONFIG_TASK_WDT_CHECK_IDLE_TASK_CPU1=y
# CONFIG_EVENT_LOOP_PROFILING is not set
CONFIG_POST_EVENTS_FROM_ISR=y
CONFIG_POST_EVENTS_FROM_IRAM_ISR=y
CONFIG_SW_COEXIST_ENABLE=y
CONFIG_MB_MASTER_TIMEOUT_MS_RESPOND=150
CONFIG_MB_MASTER_DELAY_MS_CONVERT=200
CONFIG_MB_QUEUE_LENGTH=20
CONFIG_MB_SERIAL_TASK_STACK_SIZE=2048
CONFIG_MB_SERIAL_BUF_SIZE=256
CONFIG_MB_SERIAL_TASK_PRIO=10
# CONFIG_MB_CONTROLLER_SLAVE_ID_SUPPORT is not set
CONFIG_MB_CONTROLLER_NOTIFY_TIMEOUT=20
CONFIG_MB_CONTROLLER_NOTIFY_QUEUE_SIZE=20
CONFIG_MB_CONTROLLER_STACK_SIZE=4096
CONFIG_MB_EVENT_QUEUE_TIMEOUT=20
CONFIG_MB_TIMER_PORT_ENABLED=y
CONFIG_MB_TIMER_GROUP=0
CONFIG_MB_TIMER_INDEX=0
# CONFIG_SUPPORT_STATIC_ALLOCATION is not set
CONFIG_TIMER_TASK_PRIORITY=1
CONFIG_TIMER_TASK_STACK_DEPTH=2048
CONFIG_TIMER_QUEUE_LENGTH=10
# CONFIG_L2_TO_L3_COPY is not set
# CONFIG_USE_ONLY_LWIP_SELECT is not set
CONFIG_ESP_GRATUITOUS_ARP=y
CONFIG_GARP_TMR_INTERVAL=60
CONFIG_TCPIP_RECVMBOX_SIZE=32
CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=12
CONFIG_TCP_MSS=1440
CONFIG_TCP_MSL=60000
CONFIG_TCP_SND_BUF_DEFAULT=5744
CONFIG_TCP_WND_DEFAULT=5744
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
CONFIG_TCP_OVERSIZE_MSS=y
# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set
# CONFIG_TCP_OVERSIZE_DISABLE is not set
CONFIG_UDP_RECVMBOX_SIZE=6
CONFIG_TCPIP_TASK_STACK_SIZE=3072
CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set
# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set
CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_PPP_SUPPORT is not set
CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5
CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072
CONFIG_ESP32_PTHREAD_STACK_MIN=768
CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set
# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set
CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1
CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread"
CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set
# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set
CONFIG_IP_LOST_TIMER_INTERVAL=120
CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y
CONFIG_SUPPORT_TERMIOS=y
# End of deprecated options
wildbiotiger commented 2 years ago

@mantriyogesh any update on your side? Just to recap:

Please let me know if there's anything that needs to happen on my side.

mantriyogesh commented 2 years ago

Hello @wildbiotiger ,

Sorry for the late response. I have asked the ESP-IDF team, if such changes could be published. They might take some time to respond.

In case of urgency, please use the ESP-IDF issue tracker.

mantriyogesh commented 2 years ago

Is this custom hardware? If yes, what is flash part used on the device?

mantriyogesh commented 2 years ago

Can you flash 'hello world' example without any changes in menuconfig and get us output?

mantriyogesh commented 2 years ago

Are you using own flash chip or have you done any changes?

wildbiotiger commented 2 years ago

@mantriyogesh it is on a custom board. I linked the datasheet for the SPI flash we are using in the first post: https://www.mouser.com/datasheet/2/698/adet_s_a0010543939_1-2956529.pdf I’ll have to run the hello world tomorrow.

mantriyogesh commented 2 years ago

Actually, you can use esp-idf with all your own expected changes, using ESP-Hosted-FG, as the firmware code is available to you and you can do any changes you need in ESP-IDF.

I understand you are running into external flash issues, but getting these up & working is kind of expected before using ESP-Hosted.

Instead of using direct binaries, you can build them in directory https://github.com/espressif/esp-hosted/tree/ESP-Hosted_MCU_Host/esp/esp_driver/network_adapter.

  1. setup IDF, https://github.com/espressif/esp-hosted/blob/ESP-Hosted_MCU_Host/docs/Linux_based_host/Linux_based_readme.md#22-esp-idf-setup -> Change what you need here in IDF
  2. Clone ESP-Hosted, https://github.com/espressif/esp-hosted/blob/ESP-Hosted_MCU_Host/docs/Linux_based_host/Linux_based_readme.md#23-esp-hosted-code-repository
  3. build & flash the ESP, https://github.com/espressif/esp-hosted/blob/ESP-Hosted_MCU_Host/docs/Linux_based_host/SPI_setup.md#222-source-compilation

Anyway, I have flagged the flash issue to internal SPI flash team, it might take some time to get response.

wildbiotiger commented 2 years ago

@mantriyogesh yes, that's what we were doing, and that was build of the MCU firmware was what we were using when I posted the logs originally. We have made the changes there, but we are very interested in getting a version that works with the native Linux Wi-Fi utilities (which is the version that is closed source at the moment).

mantriyogesh commented 2 years ago

Understood. I can make the changes and give you. I suppose that's the only change you are looking for. If not, can you please send the IDF patch and base commit you are using?

mantriyogesh commented 2 years ago

Hello @wildbiotiger ,

As I get input from the SPI flash team,

For this flash, its problem is that, its ID format is not recognized,
and the ID is where the size is usually get from.

image

What I see is that the flash driver used by the app is not compatible with it in the get_size.
Customer need to customize their driver for this point, see: 
https://gitlab.espressif.cn:6688/espressif/esp-idf/-/blob/master/examples/storage/custom_flash_driver/components/custom_chip_driver/spi_flash_chip_eon.c

But TBH, This flash will have a lot of places that are not compatible with the default flash driver.

Considering the above context, is there any plan B for the SPI flash you can use? As I understand, you might end up in a lot of changes to make it supported. In case this is expected for mass production, you can get in touch with our business team, where they would fasten the support to this problem.

BTW, It is tricky to remember the names, so just explaining the variant/flavours ESP-Hosted supports.

Now, In case you want to continue ahead, you have complete source code in above links I had shared previously for FG. You can make the changes in ESP-IDF and get the flashing working on FG first. Then let me know the changes in a patch with base commit of ESP-IDF. I will apply that patch to IDF and get you NG binary.

Hope this helps.

wildbiotiger commented 2 years ago

Thanks @mantriyogesh, we will take a look and get back to you on the implementation.

wildbiotiger commented 2 years ago

@mantriyogesh I've updated a fork of ESP-ID with the AT25 driver here: https://github.com/espressif/esp-idf/pull/9842. Would you please publish a build with this code? Other notes on the driver bringup:

I also found another strange issue somewhat unrelated:

Backtrace dump from GDB:

Reading symbols from build/network_adapter.elf...
(gdb) list *0x40083373
0x40083373 is in lock_acquire_generic (esp32/esp-idf/components/newlib/locks.c:139).
134     }
135     BaseType_t success;
136     if (!xPortCanYield()) {
137         /* In ISR Context */
138         if (mutex_type == queueQUEUE_TYPE_RECURSIVE_MUTEX) {
139             abort(); /* recursive mutexes make no sense in ISR context */
140         }
141         BaseType_t higher_task_woken = false;
142         success = xSemaphoreTakeFromISR(h, &higher_task_woken);
143         if (!success && delay > 0) {
(gdb) list *0x40081d1a
0x40081d1a is in panic_abort (esp32/esp-idf/components/esp_system/panic.c:402).
397     esp_apptrace_flush_nolock(ESP_APPTRACE_DEST_TRAX, CONFIG_APPTRACE_POSTMORTEM_FLUSH_THRESH,
398                               APPTRACE_ONPANIC_HOST_FLUSH_TMO);
399 #endif
400 #endif
401 
402     *((volatile int *) 0) = 0; // NOLINT(clang-analyzer-core.NullDereference) should be an invalid operation on targets
403     while (1);
404 }
405 
406 /* Weak versions of reset reason hint functions.
(gdb) list *0x40090de1
0x40090de1 is in esp_system_abort (esp32/esp-idf/components/esp_system/esp_system.c:128).
123     return IDF_VER;
124 }
125 
126 void __attribute__((noreturn)) esp_system_abort(const char *details)
127 {
128     panic_abort(details);
129 }
(gdb) list *0x4009804a
0x4009804a is in abort (esp32/esp-idf/components/newlib/abort.c:46).
41  
42      for (size_t i = 0; i < sizeof(str) / sizeof(str[0]); i++) {
43          strcat(dest, str[i]);
44      }
45  
46      esp_system_abort(buf);
47  }
(gdb) 0x40083373
Undefined command: "0x40083373".  Try "help".
(gdb) list *0x40083373
0x40083373 is in lock_acquire_generic (esp32/esp-idf/components/newlib/locks.c:139).
134     }
135     BaseType_t success;
136     if (!xPortCanYield()) {
137         /* In ISR Context */
138         if (mutex_type == queueQUEUE_TYPE_RECURSIVE_MUTEX) {
139             abort(); /* recursive mutexes make no sense in ISR context */
140         }
141         BaseType_t higher_task_woken = false;
142         success = xSemaphoreTakeFromISR(h, &higher_task_woken);
143         if (!success && delay > 0) {
(gdb) list *0x400834bd
0x400834bd is in _lock_acquire_recursive (esp32/esp-idf/components/newlib/locks.c:167).
162 void IRAM_ATTR _lock_acquire(_lock_t *lock) {
163     lock_acquire_generic(lock, portMAX_DELAY, queueQUEUE_TYPE_MUTEX);
164 }
165 
166 void IRAM_ATTR _lock_acquire_recursive(_lock_t *lock) {
167     lock_acquire_generic(lock, portMAX_DELAY, queueQUEUE_TYPE_RECURSIVE_MUTEX);
168 }
169 
170 int IRAM_ATTR _lock_try_acquire(_lock_t *lock) {
171     return lock_acquire_generic(lock, 0, queueQUEUE_TYPE_MUTEX);
(gdb) list *0x40083536
0x40083536 is in __retarget_lock_acquire_recursive (esp32/esp-idf/components/newlib/locks.c:323).
318 
319 void IRAM_ATTR __retarget_lock_acquire_recursive(_LOCK_T lock)
320 {
321     check_lock_nonzero(lock);
322     MAYBE_OVERRIDE_LOCK(lock, &s_common_recursive_mutex);
323     _lock_acquire_recursive(&lock);
324 }
325 
326 int IRAM_ATTR __retarget_lock_try_acquire(_LOCK_T lock)
327 {
(gdb) list *0x4015370e
0x4015370e is in _vfprintf_r (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c:853).
848 /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vfprintf.c: No such file or directory.
(gdb) list *0x40156741
0x40156741 is in vprintf (/builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vprintf.c:34).
29  /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/stdio/vprintf.c: No such file or directory.
(gdb) list *0x4016466d
0x4016466d is in esp_log_writev (esp32/esp-idf/components/log/log.c:200).
195     esp_log_level_t level_for_tag = s_log_level_get_and_unlock(tag);
196     if (!should_output(level, level_for_tag)) {
197         return;
198     }
199 
200     (*s_log_print_func)(format, args);
201 
202 }
203 
204 void esp_log_write(esp_log_level_t level,
(gdb) list *0x40096add
0x40096add is in esp_log_write (esp32/esp-idf/components/log/log.c:210).
205                    const char *tag,
206                    const char *format, ...)
207 {
208     va_list list;
209     va_start(list, format);
210     esp_log_writev(level, tag, format, list);
211     va_end(list);
212 }
213 
214 static inline bool get_cached_log_level(const char *tag, esp_log_level_t *level)
(gdb) list *0x400fb4e1
0x400fb4e1 is in sdio_slave_hal_load_buf (esp32/esp-idf/components/hal/sdio_slave_hal.c:667).
662 
663     if (tail == NULL) {
664         //no one in the ll, start new ll operation.
665         sdio_slave_ll_recv_start(hal->slc, desc);
666         sdio_slave_ll_recv_intr_ena(hal->slc, true);
667         HAL_LOGV(TAG, "recv_load_buf: start new");
668     } else {
669         //restart former ll operation
670         sdio_slave_ll_recv_restart(hal->slc);
671         HAL_LOGV(TAG, "recv_load_buf: restart");
(gdb) q
wildbiotiger commented 2 years ago

Hey @mantriyogesh, any chance on getting the pull request integrated and publishing a new build?

mantriyogesh commented 2 years ago

Sorry for the delayed response.

  1. Can you please provide IDF branch used and git commit, over which you need the MR/patch to be applied?
  2. For the recent issue of logging, you can raise the issue in ESP-IDF.
mantriyogesh commented 2 years ago

For ESP-Hosted-NG, we are right now limited with IDF branch release/4.4, git commit, 6d85d53c. If you have time, you can give me a patch over the same commit. Otherwise, I will have to port and then get you the ESP binary (might take a day or two , as I am on some other issue)

Also, I see from prior logs, you are using ESP32 with SDIO transport option. Considering ESP binary creation, would that transport be sufficient for you?

wildbiotiger commented 2 years ago

@mantriyogesh, I had put that in my last post. Here’s the pull request: https://github.com/espressif/esp-idf/pull/9842 And the commit eec8e298d979cd743cff80ebc5495e26ef624406

wildbiotiger commented 2 years ago

and yes, SDIO transport should be fine. I think the patch I created with the pull request uses v4.4. If it doesn’t just let me know.

wildbiotiger commented 2 years ago

@mantriyogesh I've added a new pull request targeting just v4.4 here:

https://github.com/espressif/esp-idf/pull/9884

Let me know if you need anything else.

mantriyogesh commented 2 years ago

Hello Nicholas,

Apologies for delay. I hope this would be useful for you. GH_161_29sep22.tgz is only ESP firmware with your code over ESP-IDF release/v4.4 6d85d53c The supported commit at Host is f1d32ab

Please note,

  1. This is not tested build. Just compiled.
  2. You might face issues if you use different host code other than above commit
  3. ESP side code is also going to be published in upcoming releases. At that point, you can even sync to master at both side, ESP & Host.
mantriyogesh commented 2 years ago

Hello @wildbiotiger ,

Are you unblocked now?

wildbiotiger commented 2 years ago

@mantriyogesh, haven't gotten a chance to test it yet. Work stuff cropping up.

mantriyogesh commented 2 years ago

No problem. Thanks for the heads up!

wildbiotiger commented 2 years ago

@mantriyogesh looks like it boots up with the new firmware and correctly detects the AT25 chip. I'm getting some weird errors with the driver insertion though. Seems a bit odd.

So, it doesn't LOOK like it's bailing out anywhere, but the driver still isn't getting events or something. Any suggestions on how to proceed?

mantriyogesh commented 2 years ago

Some suggestions:

  1. Please check pull up requirements https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/sd_pullup_requirements.html
  2. Please use minimal & good length & equal length jumpers (preferably use PCB like design)
  3. Adding host side debug traces in SDIO source files to understand which register is getting success and which is timed out, will be much helpful, in case analyzer is not available
  4. Proper logic analyzer dump for example, saleae capture will clear some dust.
  5. Any log in dmesg / kern.log?
mantriyogesh commented 2 years ago

Please do connect, if any updates/issues.

wildbiotiger commented 2 years ago

@mantriyogesh I'll try and get you some logs. We are using a custom PCB with length and impedance matched traces and the proper pull-ups in the device tree. I'll post that when I can as well.

mantriyogesh commented 2 years ago

Please do connect once you have any update.

blakecantwalk commented 2 years ago

TSP file is too large to flash like to not have terabytes

blakecantwalk commented 2 years ago
mantriyogesh commented 2 years ago

Hello @blakecantwalk

We did not understand the comments and their relevancy to the original issue. Can you please explain the comments a bit?

wildbiotiger commented 1 year ago

@mantriyogesh FINALLY got around to testing this and noticed in the README that it's compiled for Wi-Fi and BT over SPI (not SDIO as my board is configured for...). Would you please check that this is the correct configuration with just a typo?

Also, dump of logs from ESP32:

rst:0x1 (POWERON_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:6680
load:0x40078000,len:14848
load:0x40080400,len:3792
entry 0x40080694
I (27) boot: ESP-IDF v4.4.1-593-g6d85d53cee-dirty 2nd stage bootloader
I (27) boot: compile time 20:34:40
I (28) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (77) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (84) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (91) boot:  3 factory          factory app      00 00 00010000 00100000
I (99) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (106) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (114) boot: End of partition table
I (118) boot: Defaulting to factory image
I (123) boot_comm: chip revision: 3, min. application chip revision: 0
I (130) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15dc0h ( 89536) map
I (171) esp_image: segment 1: paddr=00025de8 vaddr=3ffbdb60 size=055c8h ( 21960) load
I (180) esp_image: segment 2: paddr=0002b3b8 vaddr=40080000 size=04c60h ( 19552) load
I (188) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=76b44h (486212) map
I (364) esp_image: segment 4: paddr=000a6b6c vaddr=40084c60 size=18384h ( 99204) load
I (405) esp_image: segment 5: paddr=000beef8 vaddr=50000000 size=00010h (    16) load
I (420) boot: Loaded app from partition at offset 0x10000
I (420) boot: Disabling RNG early entropy source...
I (432) cpu_start: Pro cpu up.
I (432) cpu_start: Starting app cpu, entry point is 0x4008121c
I (0) cpu_start: App cpu up.
I (448) cpu_start: Pro cpu start user code
I (448) cpu_start: cpu freq: 240000000
I (448) cpu_start: Application information:
I (453) cpu_start: Project name:     network_adapter
I (458) cpu_start: App version:      df0fe64
I (463) cpu_start: Compile time:     Sep 29 2022 20:34:30
I (469) cpu_start: ELF file SHA256:  b139a553462c5d1e...
I (475) cpu_start: ESP-IDF:          v4.4.1-593-g6d85d53cee-dirty
I (482) heap_init: Initializing. RAM available for dynamic allocation:
I (489) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (495) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (501) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (508) heap_init: At 3FFD1520 len 0000EAE0 (58 KiB): DRAM
I (514) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (520) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (527) heap_init: At 4009CFE4 len 0000301C (12 KiB): IRAM
I (534) spi_flash: detected chip: at25
I (537) spi_flash: flash io: dio
I (542) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (556) FW_MAIN: *********************************************************************
I (562) FW_MAIN:                 ESP-Hosted Firmware version :: 1.0.1
I (570) FW_MAIN:                 Transport used :: SDIO
I (576) FW_MAIN: *********************************************************************
I (582) FW_MAIN: Supported features are:
I (586) FW_MAIN: - WLAN over SDIO
I (590) FW_BT: - BT/BLE
I (592) FW_BT:    - HCI Over SDIO
I (596) FW_BT:    - BT/BLE dual mode
I (598) FW_MAIN: Capabilities: 0x1d
I (612) system_api: Base MAC address is not set
I (612) system_api: read default base MAC address from EFUSE
I (616) BTDM_INIT: BT controller compile version [bf9c077]
I (620) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (942) FW_MAIN: ESP Bluetooth MAC addr: 78-e3-6d-78-59-8a

I (942) FW_SDIO_SLAVE: Using SDIO interface
I (1944) FW_SDIO_SLAVE: last reset cause: 1x
Guru Meditation Error: Core  0 panic'ed (StoreProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400ee45c  PS      : 0x00060c33  A0      : 0x800d868b  A1      : 0x3ffbe870
A2      : 0x20b95e52  A3      : 0x08110111  A4      : 0x3ffbf114  A5      : 0x3ffbe880
A6      : 0x3ff60000  A7      : 0xb83fc000  A8      : 0x08110111  A9      : 0x3ffbe850
A10     : 0x00000001  A11     : 0x3ffc33a8  A12     : 0x3ffe10d0  A13     : 0x00000000
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000000  EXCCAUSE: 0x0000001d
EXCVADDR: 0x0811011d  LBEG    : 0x4000c2e0  LEND    : 0x4000c2f6  LCOUNT  : 0xffffffff

Backtrace:0x400ee459:0x3ffbe8700x400d8688:0x3ffbe890 0x4008366b:0x3ffbe8c0 0x400edcdb:0x3ffbe8e0 0x400edd15:0x3ffbe910 0x40082efd:0x3ffbe930 0x4014296b:0x3ffbcba0 0x400d2c87:0x3ffbcbc0 0x40092231:0x3ffbcbe0 0x40093a9d:0x3ffbcc00

ELF file SHA256: b139a553462c5d1e

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

rst:0xc (SW_CPU_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:6680
load:0x40078000,len:14848
load:0x40080400,len:3792
entry 0x40080694
I (27) boot: ESP-IDF v4.4.1-593-g6d85d53cee-dirty 2nd stage bootloader
I (27) boot: compile time 20:34:40
I (28) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (76) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (84) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (91) boot:  3 factory          factory app      00 00 00010000 00100000
I (99) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (106) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (114) boot: End of partition table
I (118) boot: Defaulting to factory image
I (123) boot_comm: chip revision: 3, min. application chip revision: 0
I (130) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15dc0h ( 89536) map
I (171) esp_image: segment 1: paddr=00025de8 vaddr=3ffbdb60 size=055c8h ( 21960) load
I (180) esp_image: segment 2: paddr=0002b3b8 vaddr=40080000 size=04c60h ( 19552) load
I (188) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=76b44h (486212) map
I (364) esp_image: segment 4: paddr=000a6b6c vaddr=40084c60 size=18384h ( 99204) load
I (405) esp_image: segment 5: paddr=000beef8 vaddr=50000000 size=00010h (    16) load
I (420) boot: Loaded app from partition at offset 0x10000
I (420) boot: Disabling RNG early entropy source...
I (432) cpu_start: Pro cpu up.
I (432) cpu_start: Starting app cpu, entry point is 0x4008121c

The meditation error occurs when i rebind the mmc driver to redetect the chip. Here's my log from dmesg:

[  124.243015] mmc2: queuing unknown CIS tuple 0x01 (3 bytes)
[  124.259792] mmc2: queuing unknown CIS tuple 0x1a (5 bytes)
[  124.273180] mmc2: queuing unknown CIS tuple 0x1b (8 bytes)
[  124.296070] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[  124.301688] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[  124.309112] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[  124.316813] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[  124.323543] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[  124.329117] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[  124.336389] mmc2: new SDIO card at address 0001
[  124.351117] esp_probe: ESP network device detected
[  125.781552] esp_handle_isr: CMD53 read/write error at 108
[  125.787184] esp_handle_isr: CMD53 read/write error at 115
[  125.823521] esp_sdio: probe of mmc2:0001:1 failed with error -110
[  125.870523] esp_sdio: probe of mmc2:0001:2 failed with error -110

Any ideas on where to go from here?

EDIT: on further review, looks like a wrong driver, I had an out-of-tree driver reload and it gave me a different message without the panic. Please hold. :)

wildbiotiger commented 1 year ago

OK, new issue, we are now CONNECTED via SDIO and the driver is recognized. HOWEVER, the epsta0 does not appear, nor does any other device with wireless capabilities. Any ideas of where to go from here? dmesg output, looks good?

[  938.442187] mmc2: card 0001 removed
[  941.549098] mmc2: queuing unknown CIS tuple 0x01 (3 bytes)
[  941.574322] mmc2: queuing unknown CIS tuple 0x1a (5 bytes)
[  941.592970] mmc2: queuing unknown CIS tuple 0x1b (8 bytes)
[  941.601716] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[  941.608487] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[  941.614080] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[  941.622117] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[  941.628835] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[  941.634593] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[  941.641801] mmc2: new SDIO card at address 0001
[  941.656877] esp_probe: ESP network device detected
[  941.668457] Rx Pre ====== 0
[  941.671276] Rx Pos ======  31
[  941.682656] Tx Pre ======  0
[  941.685562] Tx Pos ======  10
[  941.705330] esp_sdio: probe of mmc2:0001:2 failed with error -22

UART Output:

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

rst:0xc (SW_CPU_RESET),boot:0x3f (SPI_FAST_FLASH_BOOT)
configsip: 0, 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:6680
load:0x40078000,len:14848
load:0x40080400,len:3792
entry 0x40080694
I (27) boot: ESP-IDF v4.4.1-593-g6d85d53cee-dirty 2nd stage bootloader
I (27) boot: compile time 20:34:40
I (28) boot: chip revision: 3
I (32) boot_comm: chip revision: 3, min. bootloader chip revision: 0
I (39) boot.esp32: SPI Speed      : 40MHz
I (44) boot.esp32: SPI Mode       : DIO
I (48) boot.esp32: SPI Flash Size : 4MB
I (53) boot: Enabling RNG early entropy source...
I (58) boot: Partition Table:
I (62) boot: ## Label            Usage          Type ST Offset   Length
I (69) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (76) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (84) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (91) boot:  3 factory          factory app      00 00 00010000 00100000
I (99) boot:  4 ota_0            OTA app          00 10 00110000 00100000
I (106) boot:  5 ota_1            OTA app          00 11 00210000 00100000
I (114) boot: End of partition table
I (118) boot: Defaulting to factory image
I (123) boot_comm: chip revision: 3, min. application chip revision: 0
I (130) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=15dc0h ( 89536) map
I (171) esp_image: segment 1: paddr=00025de8 vaddr=3ffbdb60 size=055c8h ( 21960) load
I (180) esp_image: segment 2: paddr=0002b3b8 vaddr=40080000 size=04c60h ( 19552) load
I (188) esp_image: segment 3: paddr=00030020 vaddr=400d0020 size=76b44h (486212) map
I (364) esp_image: segment 4: paddr=000a6b6c vaddr=40084c60 size=18384h ( 99204) load
I (405) esp_image: segment 5: paddr=000beef8 vaddr=50000000 size=00010h (    16) load
I (420) boot: Loaded app from partition at offset 0x10000
I (420) boot: Disabling RNG early entropy source...
I (432) cpu_start: Pro cpu up.
I (432) cpu_start: Starting app cpu, entry point is 0x4008121c
I (419) cpu_start: App cpu up.
I (448) cpu_start: Pro cpu start user code
I (448) cpu_start: cpu freq: 240000000
I (448) cpu_start: Application information:
I (453) cpu_start: Project name:     network_adapter
I (458) cpu_start: App version:      df0fe64
I (463) cpu_start: Compile time:     Sep 29 2022 20:34:30
I (469) cpu_start: ELF file SHA256:  b139a553462c5d1e...
I (475) cpu_start: ESP-IDF:          v4.4.1-593-g6d85d53cee-dirty
I (482) heap_init: Initializing. RAM available for dynamic allocation:
I (489) heap_init: At 3FFAFF10 len 000000F0 (0 KiB): DRAM
I (495) heap_init: At 3FFB6388 len 00001C78 (7 KiB): DRAM
I (502) heap_init: At 3FFB9A20 len 00004108 (16 KiB): DRAM
I (508) heap_init: At 3FFD1520 len 0000EAE0 (58 KiB): DRAM
I (514) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (520) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (527) heap_init: At 4009CFE4 len 0000301C (12 KiB): IRAM
I (534) spi_flash: detected chip: at25
I (537) spi_flash: flash io: dio
I (542) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (556) FW_MAIN: *********************************************************************
I (562) FW_MAIN:                 ESP-Hosted Firmware version :: 1.0.1
I (570) FW_MAIN:                 Transport used :: SDIO
I (576) FW_MAIN: *********************************************************************
I (582) FW_MAIN: Supported features are:
I (586) FW_MAIN: - WLAN over SDIO
I (590) FW_BT: - BT/BLE
I (592) FW_BT:    - HCI Over SDIO
I (596) FW_BT:    - BT/BLE dual mode
I (598) FW_MAIN: Capabilities: 0x1d
I (612) system_api: Base MAC address is not set
I (612) system_api: read default base MAC address from EFUSE
I (616) BTDM_INIT: BT controller compile version [bf9c077]
I (620) phy_init: phy_version 4670,719f9f6,Feb 18 2021,17:07:07
I (944) FW_MAIN: ESP Bluetooth MAC addr: 78-e3-6d-78-59-8a

I (944) FW_SDIO_SLAVE: Using SDIO interface
I (1946) FW_SDIO_SLAVE: last reset cause: cx
I (423892) FW_MAIN: Start Data Path
I (651232) FW_MAIN: Stop Data Path
I (653938) FW_MAIN: Start Data Path

Other command dumps from Linux, just in case:

root@interceptor:/home/debian# iw list
root@interceptor:/home/debian# iw dev espsta0 scan
command failed: No such device (-19)
root@interceptor:/home/debian# iwconfig espsta0
espsta0   No such device

root@interceptor:/home/debian# iwconfig
sit0      no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

root@interceptor:/home/debian# lsmod
Module                  Size  Used by
esp32_sdio             53248  0
8021q                  28672  0
sha256_generic         16384  0
libsha256              20480  1 sha256_generic
sha256_arm             24576  0
cfg80211              651264  1 esp32_sdio
iptable_nat            16384  0
nf_nat                 36864  1 iptable_nat
nf_conntrack          102400  1 nf_nat
nf_defrag_ipv6         16384  1 nf_conntrack
nf_defrag_ipv4         16384  1 nf_conntrack
libcrc32c              16384  2 nf_conntrack,nf_nat
iptable_filter         16384  0
xhci_plat_hcd          16384  0
xhci_hcd              208896  1 xhci_plat_hcd
usbcore               225280  2 xhci_plat_hcd,xhci_hcd
dwc3                  139264  0
udc_core               53248  1 dwc3
usb_common             20480  5 udc_core,xhci_plat_hcd,usbcore,dwc3,xhci_hcd
ti_am335x_adc          16384  0
pm33xx                 16384  0
omap_des               20480  0
omap_aes_driver        24576  0
crypto_engine          16384  2 omap_des,omap_aes_driver
libdes                 28672  1 omap_des
omap_crypto            16384  2 omap_des,omap_aes_driver
omap_sham              32768  0
ti_emif_sram           16384  1 pm33xx
phy_omap_usb2          16384  3
dwc3_omap              16384  0
rtc_omap               20480  3 pm33xx
wkup_m3_ipc            16384  1 pm33xx
omap_wdt               16384  0
ti_am335x_tscadc       16384  1 ti_am335x_adc
ti_tfp410              16384  0
bluetooth             372736  1 esp32_sdio
ecdh_generic           16384  1 bluetooth
ecc                    36864  1 ecdh_generic
ip_tables              24576  2 iptable_filter,iptable_nat
x_tables               32768  2 ip_tables,iptable_filter
root@interceptor:/home/debian# iwconfig espsta0
espsta0   No such device

root@interceptor:/home/debian# iwconfig
sit0      no wireless extensions.

eth0      no wireless extensions.

lo        no wireless extensions.

root@interceptor:/home/debian# sudo echo 47810000.mmc > /sys/bus/platform/drivers/omap_hsmmc/unbind
root@interceptor:/home/debian# sudo echo 47810000.mmc > /sys/bus/platform/drivers/omap_hsmmc/bind
root@interceptor:/home/debian# ifconfig
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.137.80  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::1642:fcff:feee:60af  prefixlen 64  scopeid 0x20<link>
        ether 14:42:fc:ee:60:af  txqueuelen 1000  (Ethernet)
        RX packets 1173  bytes 96837 (94.5 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1734  bytes 222774 (217.5 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@interceptor:/home/debian# ifconfig -a
eth0: flags=-28605<UP,BROADCAST,RUNNING,MULTICAST,DYNAMIC>  mtu 1500
        inet 192.168.137.80  netmask 255.255.255.0  broadcast 192.168.137.255
        inet6 fe80::1642:fcff:feee:60af  prefixlen 64  scopeid 0x20<link>
        ether 14:42:fc:ee:60:af  txqueuelen 1000  (Ethernet)
        RX packets 1192  bytes 98211 (95.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1761  bytes 226148 (220.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

sit0: flags=128<NOARP>  mtu 1480
        sit  txqueuelen 1000  (IPv6-in-IPv4)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@interceptor:/home/debian#

So, if i can get espsta0 to appear, then I think we'd be golden, but I'm not sure what the failure is here.

mantriyogesh commented 1 year ago

Hello @wildbiotiger

1.0.1 is old release. Can you please use 1.0.2 release with release/ng-v1.0.2 as host code base?

Also just to understand, what point you have got sdio working? Did it work with https://github.com/espressif/esp-hosted/issues/161#issuecomment-1262445841? I am trying to understand what worked and what did not not (to get to correct line of treatment)

wildbiotiger commented 1 year ago

@mantriyogesh, we can compile it with 1.0.2, but the working version is the zipped firmware archive you had provided above. So, yes it did work with that firmware build. I am hesitant to reload the driver with an alternate version.

Here are the files and commits we used. GH_161_29sep22.tgz f1d32ab

mantriyogesh commented 1 year ago

Okay. Let me be truthful, I'm very confused right now. I'm trying to understand the exact (current) problem, so that I could give proper inputs.

  1. So original issue was flash size change (I hope nothing else). As you had no control, we got the binaies created with your expected change. Is that you are testing?

  2. That is mainly reason that you cannot test on 1.0.2. Because you might want to recreated firmware with those changes. Please confirm?

  3. Anytime you were able to load and use espsta0? If yes, which binary and what was the transport used?

  4. Is this first time you are trying to use sdio (never tried or worked with ESP-Hosted sdio transport)? If yes, check pull up requirement for your esp chipset from https://github.com/espressif/esp-hosted/issues/161#issuecomment-1270204699

wildbiotiger commented 1 year ago
  1. yes, that is what we are testing
  2. i just tested with a fresh download of the ng_host master branch, and that results in a successful load of SDIO and no reset, but no espsta0 appears
  3. No, that's the part I am stuck on now
  4. We have, the pull-ups are correct from what we can probe at the moment.
mantriyogesh commented 1 year ago
  1. Are you using jumper wires for connection? What would be the length?
  2. So do you need the firmware changes for flash size with 1.0.2?
  3. As I can see the probe was called. But there is some issue in esp log I can see data path stopped and again started. First bootup event was not received from esp to host. Even though the probe was triggered, worth check if the pullups are working.
  4. This start-> stop-> start data path happens always?
  5. With current 1.0.1 sdio, you using corresponding host code base? Any local changes, please share patch with base commit number
mantriyogesh commented 1 year ago

Anyway, I feel, worth to change your firmware with your expected code change on 1.0.2. Should I create and send that? Better to check on that.

wildbiotiger commented 1 year ago
  1. no, pcb impedance matched traces
  2. yes please
  3. yes, that appears to be the case, no bootup event detected
  4. no, just on manual driver reload, if i give it the correct reset pin, no start stop occurs
  5. using 1.0.2 now for testing, no code changes other than printk's for debugging.
mantriyogesh commented 1 year ago
  1. Resetpin is mandatory

    2) Okay

wildbiotiger commented 1 year ago

Added a bunch of debug logs prints in case it helps:

key things:

[14555.594904] init: esp reset
[14555.827684] init_adapter: start
[14555.830902] init: done
[14555.833270] init: init transport layer
[14558.958733] mmc2: queuing unknown CIS tuple 0x01 (3 bytes)
[14558.984356] mmc2: queuing unknown CIS tuple 0x1a (5 bytes)
[14559.005709] mmc2: queuing unknown CIS tuple 0x1b (8 bytes)
[14559.014424] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[14559.021361] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[14559.026979] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[14559.034966] mmc2: queuing unknown CIS tuple 0x80 (1 bytes)
[14559.041696] mmc2: queuing unknown CIS tuple 0x81 (1 bytes)
[14559.047494] mmc2: queuing unknown CIS tuple 0x82 (1 bytes)
[14559.054679] mmc2: new SDIO card at address 0001
[14559.067909] esp_probe: ESP network device detected
[14559.087345] esp_read_multi_byte:
[14559.087356] 1f
[14559.091004] esp_read_multi_byte:
[14559.092769] 00
[14559.096093] 00
[14559.097904] 80
[14559.099659] 00
[14559.101413] esp_read_multi_byte: done
[14559.106837] esp_process_interrupt
[14559.110177] esp_process_interrupt pkt!
[14559.113941] esp_process_new_packet_intr: queuing work
[14559.119111] esp_write_multi_byte:
[14559.119115] 00
[14559.122529] 00
[14559.124283] 80
[14559.126036] 00
[14559.127811] esp_write_multi_byte: done
[14559.138823] 00
[14559.138828] f0
[14559.140599] 01
[14559.142356] esp_read_multi_byte: done
[14559.158469] Rx Pre ====== 0
[14559.161288] Rx Pos ======  31
[14559.164381] esp_if_rx_work: work
[14559.167624] esp_get_packets: check
[14559.175528] esp_get_packets: read pkt
[14559.186844] esp_read_multi_byte:
[14559.186854] 00
[14559.190504] 10
[14559.192265] 14
[14559.194018] 00
[14559.195773] esp_read_multi_byte: done
[14559.203910] esp_read_multi_byte:
[14559.203919] 1f
[14559.207258] 00
[14559.219301] f0
[14559.221074] 01
[14559.222832] esp_read_multi_byte: done
[14559.230531] Tx Pre ======  0
[14559.233435] Tx Pos ======  10
[14559.236413] get_firmware_data: Read pkt done
[14559.242429] esp_get_len_from_slave: len: 0
[14559.246556] read_packet: no length 0 0
[14559.463724] getting adapter
[14559.466540] starting tx thread
[14559.471192] esp_write_byte: 01
[14559.485629] esp_sdio: probe of mmc2:0001:2 failed with error -22