While testing the ESPHome Bluetooth Proxy component I am running into a boot loop problem with an ESP32.
This is a LilyGO TTGO T7 Mini32 V1.3 board.
The ESPHome Bluetooth Proxy page states that: “The ESP32 Platform component should be configured to use the esp-idf framework, as the arduino framework uses significantly more memory and performs poorly with the Bluetooth proxy enabled.”
Originally I did use the Arduino framework, and this does work, but I am now trying to convert to the esp-idf framework and this fails.
The only difference between the two configurations is:
esp-idf framework:
esp32:
board: ttgo-t7-v13-mini32
framework:
# type: arduino
type: esp-idf
# captive_portal:
Arduino framework:
esp32:
board: ttgo-t7-v13-mini32
framework:
type: arduino
# type: esp-idf
captive_portal:
For the rest there is nothing connected to any pins, I and there are only some basic internal sensors defined in the configuration.
Flashing through the USB serial connection appears to finish normally, but right after this the ESP goes into a boot loop with the following serial log:
Wrote 0x136a50 bytes to file /data/t7v13-02/.pioenvs/t7v13-02/firmware-factory.bin, ready to flash to offset 0x0
======================== [SUCCESS] Took 1174.08 seconds ========================
INFO Successfully compiled program.
esptool.py v4.5.1
Serial port /dev/ttyUSB1
Connecting…
Chip is ESP32-D0WDQ6-V3 (revision v3.0)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 08:3a:f2:47:0b:d0
Uploading stub…
Running stub…
Stub running…
Changing baud rate to 460800
Changed.
Configuring flash size…
Auto-detected Flash size: 4MB
Flash will be erased from 0x00010000 to 0x00136fff…
Flash will be erased from 0x00001000 to 0x00007fff…
Flash will be erased from 0x00008000 to 0x00008fff…
Flash will be erased from 0x00009000 to 0x0000afff…
Compressed 1206864 bytes to 774701…
Wrote 1206864 bytes (774701 compressed) at 0x00010000 in 18.2 seconds (effective 531.6 kbit/s)…
Hash of data verified.
Compressed 25504 bytes to 15998…
Wrote 25504 bytes (15998 compressed) at 0x00001000 in 0.7 seconds (effective 294.8 kbit/s)…
Hash of data verified.
Compressed 3072 bytes to 134…
Wrote 3072 bytes (134 compressed) at 0x00008000 in 0.1 seconds (effective 350.6 kbit/s)…
Hash of data verified.
Compressed 8192 bytes to 31…
Wrote 8192 bytes (31 compressed) at 0x00009000 in 0.1 seconds (effective 487.2 kbit/s)…
Hash of data verified.Leaving…
Hard resetting via RTS pin…
INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyUSB1 with baud rate 115200
[12:08:37]\x80 \x80 \x80 \x80\xf8\x80\x80 \x80 \x80 \x80 @ \x82\xbdÍ00030000
[12:08:37]1150 mmu set 00040000, pos 00040000
[12:08:37]1150 mmu set 00050000, pos 00050000
[12:08:37]1150 mmu set 00060000, pos 00060000
[12:08:37]1150 mmu set 00070000, pos 00070000
[12:08:37]1150 mmu set 00080000, pos 00080000
[12:08:37]1150 mmu set 00090000, pos 00090000
[12:08:37]1150 mmu set 000a0000, pos 000a0000
[12:08:37]1150 mmu set 000b0000, pos 000b0000
[12:08:37]1150 mmu set 000c0000, pos 000c0000
[12:08:37]1150 mmu set 000d0000, pos 000d0000
[12:08:37]1150 mmu set 000e0000, pos 000e0000
[12:08:37]1150 mmu set 000f0000, pos 000f0000
[12:08:37]1150 mmu set 00100000, pos 00100000
[12:08:37]1150 mmu set 00110000, pos 00110000
[12:08:37]1150 mmu set 00120000, pos 00120000
[12:08:37]1150 mmu set 00130000, pos 00130000
[12:08:37]1150 mmu set 00140000, pos 00140000
[12:08:37]1150 mmu set 00150000, pos 00150000
[12:08:37]1150 mmu set 00160000, pos 00160000
[12:08:37]1150 mmu set 00170000, pos 00170000
[12:08:37]ets Jul 29 2019 12:21:46
[12:08:37]
[12:08:37]rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
[12:08:37]configsip: 0, SPIWP:0xee
[12:08:37]clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
[12:08:37]mode:QIO, clock div:1
[12:08:37]load:0x3fff0030,len:6660
[12:08:37]load:0x3df03df0,len:-1400336
[12:08:37]1150 mmu set 00010000, pos 00010000
[12:08:37]1150 mmu set 00020000, pos 00020000
[12:08:37]1150 mmu set 00030000, pos 00030000
[12:08:37]1150 mmu set 00040000, pos 00040000
[12:08:37]1150 mmu set 00050000, pos 00050000
[12:08:37]1150 mmu set 00060000, pos 00060000
[12:08:37]1150 mmu set 00070000, pos 00070000
[12:08:37]1150 mmu set 00080000, pos 00080000
[12:08:37]1150 mmu set 00090000, pos 00090000
[12:08:37]1150 mmu set 000a0000, pos 000a0000
[12:08:37]1150 mmu set 000b0000, pos 000b0000
[12:08:37]1150 mmu set 000c0000, pos 000c0000
[12:08:37]1150 mmu set 000d0000, pos 000d0000
[12:08:37]1150 mmu set 000e0000, pos 000e0000
[12:08:37]1150 mmu set 000f0000, pos 000f0000
[12:08:37]1150 mmu set 00100000, pos 00100000
[12:08:37]1150 mmu set 00110000, pos 00110000
[12:08:37]1150 mmu set 00120000, pos 00120000
[12:08:38]1150 mmu set 00130000, pos 00130000
[12:08:38]1150 mmu set 00140000, pos 00140000
[12:08:38]1150 mmu set 00150000, pos 00150000
[12:08:38]1150 mmu set 00160000, pos 00160000
[12:08:38]1150 mmu set 00170000, pos 00170000
[12:08:38]ets Jul 29 2019 12:21:46
[12:08:38]
Converting back to the Arduino framework gives a working unit again.
Doing a “Clean Build Files” between the conversion does not help either.
Does somebody have an idea what could be causing this problem and how to flash this ESP32 with the esp-idf framework?