How to properly configure platformio.ini when working with ESP32-D0WD-V3. She has 16 Mb Flash on board, and, as far as I understand, 520 RAM instead of 320.
I look here: Boards — PlatformIO latest documentation, I can’t find a suitable type… I’m confused
Chip is ESP32-D0WD-V3 (revision 3)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
Crystal is 40MHz
MAC: 34:86:5d:17:df:20
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 0x00001000 to 0x00006fff...
Flash will be erased from 0x00008000 to 0x00008fff...
Flash will be erased from 0x00009000 to 0x0000afff...
Flash will be erased from 0x00100000 to 0x001e9fff...
Flash params set to 0x0240
I don’t think internal chip revision updates make much of a difference when compiling code. You can just pick a board that has 16MB of flash declared (esp32thing_plus), or use the bogstandard esp32dev with a parittion table suitable for 16MB (default_16MB.csv)
I just couldn’t find a board in the list yesterday that declared 16MB of memory. Where I did not look - only 4 came across everywhere. But today I figured out how to do it myself using JSON.
But there was a problem with RAM. Despite the fact that I declared 520 memory in JSON, after compilation, the project still sees only 320. Although when compiled, it appears that the board has 520
If the RAM changed, which I myself am unsure of without digging through datasheets, it needs to be be declared in the linkerscript used by the framework. The linker script at Arduino-ESP32
PlatformIO has this redudant information for convenience to display the percentage of RAM used, sometimes it also gets forwarded in linker scripts where the memory size is dynamic. Not for ESP32 though.
If the application uses PSRAM and is based on ESP32 rev. 3 (ECO3), setting CONFIG_ESP32_REV_MIN to 3 disables PSRAM bug workarounds, reducing the code size and improving overall performance.
When compiling with framework = arduino, espidf there’s indeed a performance gain when setting CONFIG_ESP32_REV_MIN_3=y in sdkconfig.defaults. However, I cannot find a way to do the same with framework = arduino as it seems there’s no corresponding key in platformio.ini/board_build). Is that a known limitation?