Support for EPS32-PICO-V3

Hi,
I am recently trying out ESP32-PICO-V3-02 chip but I noticed this board is not listed in PlatformIO.
So I am wondering how I can unlock the real 8MB flash and internal PS-RAM probably.

Per schematics it’s just an ESP32 with 8MB flash + 2 MByte PSRAM chip (https://www.espressif.com/sites/default/files/documentation/esp32-pico-v3-02_datasheet_en.pdf).

Have you tried

[env:esp32dev]
platform = espressif32
boad = esp32dev
framework = arduino
board_build.partitions = default_8MB.csv
build_flags =
    -DBOARD_HAS_PSRAM
    -mfix-esp32-psram-cache-issue

? (docs)

1 Like

Thanks for your reply.
I think I managed to use the 8MB flash using your suggestion.

board_build.partitions = default_8MB.csv

But I am guessing I need the latest Ardunio core to get access to the PS-RAM, otherwise, the MCU keeps rebooting with the following error code.

E (180) psram: Not a valid or known package id: 6
abort() was called at PC 0x40084f87 on core 0

ELF file SHA256: 0000000000000000

Backtrace: 0x40089788:0x3ffbbaf0 0x400899f9:0x3ffbbb10 0x40084f87:0x3ffbbb30 0x400ebb25:0x3ffbbb60 0x400d5a9f:0x3ffbbb80 0x400d59dd:0x3ffbbba0 0x400d72dc:0x3ffbbbc0 0x400ebc9e:0x3ffbbbf0 0x4008a9fd:0x3ffbbc10

Rebooting…

Do you know which version of Ardunio is used in Platform-Espressif32 v3.5.0?

It’s the older 1.0.6 version.

Can you try setting

platform = https://github.com/Jason2866/platform-espressif32.git

instead in the platformio.ini?

1 Like

Yes, that works perfectly fine.
I guess I need to stay in an unofficial branch for a while.

Do you have it in the roadmap?

Should this work now properly without any custom branches? =)

Does not work here on my side :slightly_frowning_face:

[env]
platform = espressif32
board = esp32dev
#board_build.partitions = default_8MB.csv
build_flags =
-DARDUINO_ARCH_ESP32
-DBOARD_HAS_PSRAM
-mfix-esp32-psram-cache-issue
framework = arduino
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 115200

once I uncomment the default_8MB.csv line, the device will not boot anymore and prints errors that it cannot boot…

The “percentage” updates… but that doesnt help if its not booting :stuck_out_tongue:

With which settings does it work in the Arduino IDE?

Thanks Max,

I don’t know, I don’t use the Arduino IDE :man_shrugging:

VS-Code + PlatformIO

Well does your board have 8MB flash? Pleas execute <python> esptool.py flash_id in accordance to Upload failed on esp-wrover-kit (framework = arduino, espidf) - #2 by maxgerhardt and post the output here.

1 Like

As you already posted above, I am using the ESP32-pico-v3-02.

This chip has 8MB built in.

esptool.py v4.2.1
Found 2 serial ports
Serial port /dev/ttyUSB0
Connecting.....
Detecting chip type... Unsupported detection protocol, switching and trying again...
Connecting.....
Detecting chip type... ESP32
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:d1:a6:44
Uploading stub...
Running stub...
Stub running...
Manufacturer: 68
Device: 4017
Detected flash size: 8MB
Hard resetting via RTS pin...

build script says 4MB?

Verbose mode can be enabled via `-v, --verbose` option
CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32dev.html
PLATFORM: Espressif 32 (5.2.0) > Espressif ESP32 Dev Module
HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash
DEBUG: Current (cmsis-dap) External (cmsis-dap, esp-bridge, 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.20005.220925 (2.0.5) 
 - tool-esptoolpy @ 1.40201.0 (4.2.1) 
 - 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 41 compatible libraries
Scanning dependencies...
Dependency Graph
|-- SPI @ 2.0.0
|-- WiFi @ 2.0.0
|-- LittleFS @ 2.0.0
|   |-- FS @ 2.0.0
|-- ArduinoJson @ 6.19.4
|-- ESPAsyncDNSServer @ 1.0.0+sha.89e6db8
|   |-- ESP32 Async UDP @ 2.0.0
|-- ESPAsync_WiFiManager @ 1.15.0+sha.d45153b
|   |-- AsyncTCP @ 1.1.1
|   |-- ESP Async WebServer @ 1.2.3
|   |   |-- AsyncTCP @ 1.1.1
|   |   |-- FS @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |-- ESP_DoubleResetDetector @ 1.3.2
|   |-- ESPAsyncDNSServer @ 1.0.0+sha.89e6db8
|   |   |-- ESP32 Async UDP @ 2.0.0
|   |-- WiFi @ 2.0.0
|-- NeoPixelBus @ 2.7.0
|   |-- SPI @ 2.0.0
|-- AsyncMqttClient @ 0.9.0
|   |-- AsyncTCP @ 1.1.1
|-- HTTPClient @ 2.0.0
|   |-- WiFi @ 2.0.0
|   |-- WiFiClientSecure @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|-- HTTPUpdate @ 2.0.0
|   |-- HTTPClient @ 2.0.0
|   |   |-- WiFi @ 2.0.0
|   |   |-- WiFiClientSecure @ 2.0.0
|   |   |   |-- WiFi @ 2.0.0
|   |-- Update @ 2.0.0
|   |-- WiFi @ 2.0.0
|-- FS @ 2.0.0
Building in release mode
Retrieving maximum program size .pio/build/release/firmware.elf
Checking size .pio/build/release/firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM:   [==        ]  16.0% (used 52460 bytes from 327680 bytes)
Flash: [========= ]  94.5% (used 1239105 bytes from 1310720 bytes)

What are the exact bootloader messages at 115200 baud after you flash it with the 8MB partition table?

1 Like
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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

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:2
load:0x3fff0030,len:1184
load:0x40078000,len:13132
load:0x40080400,len:3036
entry 0x400805e4
ets Jul 29 2019 12:21:46

Please install the Arduino IDE + Arduino-ESP32 2.0.5 core and test with the same configuration (done via the Arduino IDE → Tools menu). That way we know whether PlatformIO is at fault or the core itself.

Did you also try the simplest possible blink + print sketch in PlatlformIO with the 8MByte partition table? Your sketch seems quite extensive.

1 Like

this works… at least does not crash

but I have no clue what they exactly do? can find any settings saved anywhere… this IDE is horrible :see_no_evil:

Then let’s equalize the settings accoding to the docs. Can you use the following platformio.ini:

[env]
platform = espressif32
board = esp32dev
framework = arduino
; PSRAM: "Enabled"
; Core Debug Level: "Verbose"
build_flags =
  -DBOARD_HAS_PSRAM
  -mfix-esp32-psram-cache-issue
  -DCORE_DEBUG_LEVEL=5
; Partition Scheme: "8M with spiffs"
board_build.partitions = default_8MB.csv
; Flash Mode: "QIO"
board_build.flash_mode = qio
; upload + monitor sports and speed
upload_port = /dev/ttyUSB0
monitor_port = /dev/ttyUSB0
monitor_speed = 115200

And use the exact some source code as in the Arduino IDE in your src/main.cpp.

1 Like

stripped it down…

image

platformio result is:

RAM:   [=         ]   5.0% (used 16520 bytes from 327680 bytes)
Flash: [=         ]   7.7% (used 257305 bytes from 3342336 bytes)

and arduino result is

Sketch uses 262409 bytes (7%) of program storage space. Maximum is 3342336 bytes.
Global variables use 16520 bytes (5%) of dynamic memory, leaving 311160 bytes for local variables. Maximum is 327680 bytes.

so its very close… but still crashing

built outputs: Deleted

What are the bootloader messages after flashing it with the Arduino IDE but opening the serial monitor in PlatformIO and pressing the reset button?