Esp32-wroom-32e

Hello, I’m using expressif ESP32-wroom-32E raw module on custom PCB.

I’m currently using as board esp32dev and it works fine. But the default is for a 4MB, I have 8MB.

I didn’t find any way to change that, probably a lack of knowledge on my part about Platformio. How is it possible, probably in a settings file, that I use a module with 8MB and not 4MB?

Thanks for your help.

regards.

You will have to make a new partition file for the project, like this example:

Partition file: ‘ESP32_OTA_8M.csv’:

# Name,   Type, SubType, Offset,  Size, Flags
nvs,      data, nvs,     ,        0x4000,
otadata,  data, ota,     ,        0x2000,
phy_init, data, phy,     ,        0x1000,
factory,  app,  factory, ,        1M,
app0,     app,  ota_0,   ,        3M,
app1,     app,  ota_1,   ,        3M,

and point to it from the platformio.ini file:
board_build.partitions = ESP32_OTA_8M.csv

Of cause the partition file should match your project. Have a look at this documentation:
Partition Tables - ESP32 - — ESP-IDF Programming Guide latest documentation (espressif.com)

2 Likes

Thank you, very interesting.
Where do I write (in wich folder?) this partition file: ‘ESP32_OTA_8M.csv’:

In the root of the project, where the platformio.ini file is located.

Hello @niels
I have tried this partition file for my “ESP32-WROOM-32E-N8”.
When I upload the code I have my device rebooting all the time:

Do you think that your profile is correct for my device?

I have no experience with the ‘ESP32-WROOM-32E-N8’ so I can’t tell if that has something to do with it. It has been a while since I worked with the 8M version so I made some test to see if anything has changed - and you are right there has been some changes. First of all if you don’t have a board file describing your exact board characteristic you need to insert these two lines in the platformio.ini file:

board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608

Next I have removed one line in the partition file, now it looks like this:

# Name,     Type,   SubType,      Offset,      Size,        Flags
nvs,        data,    nvs,            ,         0x4000,
otadata,    data,    ota,            ,         0x2000,
phy_init,   data,    phy,            ,         0x1000,
app0,       app,     ota_0,       0x10000,     0x3f0000,
app1,       app,     ota_1,          ,         0x3f0000,

(The ‘Factory’ is removed, aligned partitions and changed the syntax)
Keep in mind that this is my partition table for an 8M with OTA, you might have other needs.
I didn’t have any compile or execute problems on my 8MB ‘ESP32-WROOM-32D’ module, also I didn’t have a code size > the OTA partition in my test. But looking at my boot log everything looked okay:

I (58) boot: Partition Table:
I (62) boot: ## Label Usage Type ST Offset Length
I (69) boot: 0 nvs WiFi data 01 02 00009000 00004000
I (76) boot: 1 otadata OTA data 01 00 0000d000 00002000
I (84) boot: 2 phy_init RF data 01 01 0000f000 00001000
I (91) boot: 3 app0 OTA app 00 10 00010000 003f0000
I (99) boot: 4 app1 OTA app 00 11 00400000 003f0000
I (106) boot: End of partition table

Thank you a lot for your answer :smiley:
I have try your settings, but it didn’t work for my device :pensive:
platformio.ini

[env:esp32doit-devkit-v1]
platform = espressif32
# board = adafruit_itsybitsy_esp32
board = esp32dev
framework = arduino
# flash_size = 8MB
board_build.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = ESP32_OTA_8M.csv
monitor_speed = 115200
debug_tool = esp-prog

ESP32_OTA_8M.csv

# Name, Type, SubType, Offset,     Size,        Flags
nvs,      data,    nvs,            ,           0x4000,
otadata,  data,    ota,            ,           0x2000,
phy_init, data,    phy,            ,           0x1000,
app0,     app,     ota_0,   0x10000,         0x3f0000,
app1,     app,     ota_1,          ,         0x3f0000,

On the other side, I have found another solution is by selecting:
board = adafruit_itsybitsy_esp32
For my device and it work and boot correctly and have the right size.

I am glad that you got it to work!

Well as I said, the board file (and of cause the partition table) has a lot to say. I noticed you are using the Arduino framework I think that, in combination with the partition table, also has an impact on getting it to work properly.
I don’t use Arduino, only the ESPIDF framework. I will list my platformio.ini file that worked with the partition table shown above, just so others can see what worked for me.

[env:nodemcu-32s]
platform = espressif32
board = nodemcu-32s
board_upload.flash_size = 8MB
board_upload.maximum_size = 8388608
board_build.partitions = ESP32_OTA_8M.csv
;board_build.partitions = ESP32_OTA_4M.csv
board_build.embed_files = src/mqtt_eclipseprojects_io.pem
framework = espidf
;upload_port = COM[6]
monitor_speed = 115200
monitor_filters = esp32_exception_decoder
debug_tool = olimex-arm-usb-ocd-h
debug_speed = 8000
build_flags = -DCORE_DEBUG_LEVEL=5

1 Like