Boot loop if platform == espressif32 if using default_16MB.csv partition table
See original GitHub issueI upgraded to Espressif 4.2.0
using PIO.
My chip is ESP32_WROVER_E ( 16 mb flash and 8mb external ram )
My sketch worked fine with custom partition table before. I used this platform and package:
platform = https://github.com/platformio/platform-espressif32.git#feature/arduino-upstream
platform_packages =
framework-arduinoespressif32 @ https://github.com/espressif/arduino-esp32#master
Now with this INI:
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
board_build.filesystem = littlefs
board_build.f_cpu = 240000000L
upload_port = COM8
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder, colorize, log2file
board_build.flash_size = 16MB
board_build.flash_mode = dio
board_build.partitions = default_16MB.csv
board_build.f_flash = 80000000L
build_flags = -DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
-mfix-esp32-psram-cache-strategy=memw
-DCORE_DEBUG_LEVEL=0
-D CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY
-D CONFIG_SPIRAM_ALLOW_STACK_EXTERNAL_MEMORY
Now my ESP bootloops with the following message:
rst:0x3 (SW_RESET),boot:0x13 (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:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
ets Jul 29 2019 12:21:46
rst:0x3 (SW_RESET),boot:0x13 (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:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
ets Jul 29 2019 12:21:46
rst:0x3 (SW_RESET),boot:0x13 (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:1
load:0x3fff0030,len:1184
load:0x40078000,len:12804
ho 0 tail 12 room 4
load:0x40080400,len:3032
entry 0x400805e4
ets Jul 29 2019 12:21:46
If i comment out the board_build.partitions = default_16MB.csv
so the compiler use the default csv file, my board is working fine.
I have tried with different flash_mode, flash frequency and board. Tried to erase the flash, upload empty data folder. Deleted .platformio folder. Nothing helps. If i use default_16MB.csv ( or maybe if it is bigger than 4mb?? ) my esp boot loops.
Tested with two ESP32_WROVER-E boards. Both with external ram and 16mb flash size. The upload monitor confirms that these chips has 16mb flash. ( and i know that for sure because i used the exact same sketch and partition before )
Uploading output:
Processing esp-wrover-kit (platform: espressif32; board: esp-wrover-kit; framework: arduino)--------------------------------------------------------------------------------------------Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp-wrover-kit.html
PLATFORM: Espressif 32 (4.2.0) > Espressif ESP-WROVER-KIT
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (ftdi) On-board (ftdi) External (cmsis-dap, esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa)
PACKAGES:
- framework-arduinoespressif32 3.20002.0 (2.0.2)
- tool-esptoolpy 1.30300.0 (3.3.0)
- tool-mkfatfs 2.0.1
- tool-mklittlefs 1.203.210628 (2.3)
- tool-mkspiffs 2.230.0 (2.30)
- toolchain-xtensa-esp32 8.4.0+2021r2-patch3
LDF: Library Dependency Finder -> https://bit.ly/configure-pio-ldf
LDF Modes: Finder ~ chain, Compatibility ~ soft
Found 37 compatible libraries
Scanning dependencies...
Dependency Graph
|-- <ArduinoJson> 6.19.2
|-- <FS> 2.0.0
|-- <LittleFS> 2.0.0
| |-- <FS> 2.0.0
|-- <HTTPClient> 2.0.0
| |-- <WiFi> 2.0.0
| |-- <WiFiClientSecure> 2.0.0
| | |-- <WiFi> 2.0.0
|-- <ESPmDNS> 2.0.0
| |-- <WiFi> 2.0.0
|-- <Ethernet> 2.0.0
| |-- <WiFi> 2.0.0
|-- <WiFi> 2.0.0
|-- <AsyncTCPSock> 0.0.1
| |-- <WiFiClientSecure> 2.0.0
| | |-- <WiFi> 2.0.0
|-- <ESP Async WebServer> 1.2.3
| |-- <AsyncTCPSock> 0.0.1
| | |-- <WiFiClientSecure> 2.0.0
| | | |-- <WiFi> 2.0.0
| |-- <FS> 2.0.0
| |-- <WiFi> 2.0.0
| |-- <ArduinoJson> 6.19.2
|-- <Update> 2.0.0
|-- <JPEGDecoder> 1.8.0
| |-- <LittleFS> 2.0.0
| | |-- <FS> 2.0.0
| |-- <FS> 2.0.0
| |-- <SD> 2.0.0
| | |-- <FS> 2.0.0
| | |-- <SPI> 2.0.0
|-- <SPI> 2.0.0
|-- <TFT_eSPI> 2.3.4
| |-- <SPIFFS> 2.0.0
| | |-- <FS> 2.0.0
| |-- <FS> 2.0.0
| |-- <SPI> 2.0.0
|-- <ErriezDS3231> 2.0.0
| |-- <Wire> 2.0.0
|-- <Wire> 2.0.0
Building in release mode
Building FS image from 'data' directory to .pio\build\esp-wrover-kit\littlefs.bin
Looking for upload port...
Use manually specified: COM8
Uploading .pio\build\esp-wrover-kit\littlefs.bin
esptool.py v3.3
Serial port COM8
Connecting.....
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: e0:e2:e6:06:fd:08
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 921600
Changed.
Configuring flash size...
Auto-detected Flash size: 16MB
Flash will be erased from 0x00c90000 to 0x00ffffff...
Compressed 3604480 bytes to 3646...
Writing at 0x00c90000... (100 %)
Wrote 3604480 bytes (3646 compressed) at 0x00c90000 in 13.9 seconds (effective 2074.7 kbit/s)...
Hash of data verified.
Here is my platform update output:
pio update
Updating platformio/contrib-piohome 3.4.1 @ ~3.4.1 [Up-to-date]
Updating platformio/tool-unity 1.20500.200612 @ ~1.20500.0 [Up-to-date]
Updating platformio/tool-scons 4.40300.1 @ ~4.40300.0 [Up-to-date]
Platform Manager
================
Platform espressif32
--------
Updating platformio/espressif32 4.2.0 [Up-to-date]
Updating espressif/toolchain-xtensa-esp32 8.4.0+2021r2-patch3 @ 8.4.0+2021r2-patch3[Up-to-date]
Updating platformio/framework-arduinoespressif32 3.20002.0 @ ~3.20002.0 [Up-to-date]
Updating platformio/tool-esptoolpy 1.30300.0 @ ~1.30300.0 [Up-to-date]
Updating platformio/tool-mkspiffs 2.230.0 @ ~2.230.0 [Up-to-date]
Updating platformio/tool-mklittlefs 1.203.210628 @ ~1.203.0 [Up-to-date]
Updating platformio/tool-mkfatfs 2.0.1 @ ~2.0.0 [Up-to-date]
Library Manager
===============
Library Storage: C:\Users\Pc\.platformio\lib
PS C:\Users\Pc\OneDrive\Dokumentumok\GitHub\HsH_Core_2.0>
Minimal example:
Platformio Latest Espressif 4.2.0 . Created data folder.
Pio Ini:
[env:esp-wrover-kit]
platform = espressif32
board = esp-wrover-kit
framework = arduino
board_build.filesystem = littlefs
board_build.f_cpu = 240000000L
upload_port = COM8
upload_speed = 921600
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
board_build.flash_size = 16MB
board_build.flash_mode = dio
board_build.partitions = default_16MB.csv
board_build.f_flash = 80000000L
Main.cpp:
#include <Arduino.h>
void setup() {
Serial.begin(115200);
vTaskDelay(1000);
Serial.println("Hello from PIO IDE!");
}
void loop() {
}
Issue Analytics
- State:
- Created a year ago
- Comments:35 (10 by maintainers)
Top GitHub Comments
I had a particular project which failed with this bootloop when switched to newest 2.0.3 framework. I’ve been doing cleaning, restarting, whatever and still had bootloop. Switched to 2.0.2 and it started working. But the other project with 2.0.3 were fine, I realized only in this one I was using 16MB flash store some pictures in SPIFFS. So I googled and found this issue. With 2.0.2 and below, just this line was enough:
board_build.partitions = large_spiffs_16MB.csv
With 2.0.3 using these lines the bootloop is gone, so the fix is indeed confirmed!
Yes, it looks like the problem was that it should be
board_upload.flash_size = 16MB
instead ofboard_build.flash_size = 16MB
. Thank you @valeros, i really appreciate your help. I wonder why did it work before. I have always used this option. Sorry for my stupidness.Closing this.