Flash issue ESP32-PICO-MINI-02

Hello,
I recently switched from TTGO-Micro32-v2 to ESP32-PICO-MINI-02
But I can’t make it work; basically, I can’t run any code on the chip!
Most likely it is not anything to do with PlatformIO

When I connect the MCU to the PC (USB bridge) in the terminal MCU endlessly prints this

rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
invalid header: 0xffffffff

After burning a very simple code (I use PlatformIO), I get slightly different errors as follows

rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 271414342, 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:12812
load:0x40080400,len:3032
entry 0x400805e4

When I try to erase the flash, it seems everything is working just fine!

Connecting...................
Chip is ESP32-PICO-V3-02 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, Embedded Flash, Embedded PSRAM, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 30:83:98:d0:1c:b0
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 5.1s
Hard resetting via RTS pin...

Could you please help me to find out what would be wrong?

Does it work in the Arduino IDE? Under which settings if yes?

What is your platformio.ini?

I seem to have a similar issue.

@rezza - did you try to setup you platform.io with 8MB flash size?

I am having a similar issue though realized a bit differently. I think Platform IO’s characterization of the ESP32 Pico Mini 2 chip maybe incorrect?

I can built my code but when it goes to load Platform IO reports code is too large for flash memory. The build is 1.3MB, yet the Pico Mini 2 has 8 MB of flash memory.

Has anybody been able to find a workaround?

Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (1360381 bytes) is greater than maximum allowed (1310720 bytes)
RAM:   [=         ]  14.6% (used 47688 bytes from 327680 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========]  103.8% (used 1360381 bytes from 1310720 bytes)
=============================== [FAILED] Took 37.29 seconds ===============================

UPDATE: THIS POST FIXED ISSUE ~

This post is almost 2 years old and your problem is different. It would have been better to create a new post.

There is no “characterization”. It depends to the board settings in your platformio.ini - which you did not show.

The ESP32-PICO-MINI-02-N8R2 is a chip and not a board and comes with 8 MB Flash and 2 MB PSRAM.

The default partition table defines 1310720 bytes for the sketch partition. This is 49661 bytes less than your sketch needs.

You can change this size by either selecting a different (suitable) predefined partition table or creating your own custom partition table.

The default_8MB.csv defines 3342336 bytes for the sketch and should match your needs.

See