Hi community…
I would like to understand how much flash memory has my ESP32…
There are 3 versions of the same chip
Is there a way to understand which version I have of the chip ?
Thanks a lot
Hi community…
I would like to understand how much flash memory has my ESP32…
There are 3 versions of the same chip
Is there a way to understand which version I have of the chip ?
Thanks a lot
When you upload a firmware to the ESP32 with whatever configuration, esptool.py
is invoked and usually tells you in its output the detected flash size in the log.
Or, more direct in a CLI
PS C:\Users\Max\temp\cond_macro> python C:\Users\Max\.platformio\packages\tool-esptoolpy\esptool.py flash_id
esptool.py v3.1
Found 2 serial ports
Serial port COM4
Connecting........_
Detecting chip type... ESP32
Chip is ESP32-D0WDQ6 (revision 0)
Features: WiFi, BT, Dual Core, Coding Scheme None
Crystal is 40MHz
MAC: 24:0a:c4:04:26:38
Uploading stub...
Running stub...
Stub running...
Manufacturer: c8
Device: 4016
Detected flash size: 4MB
Hard resetting via RTS pin...
In my case, these IDs can be remapped onto the used flashchip using e.g.
https://github.com/flashrom/flashrom/blob/master/flashchips.h#L381-L389
So by this ID, I have a Gigadevice GD25Q32 flash chip, which has 32MBit (= 4MByte) of capacity.
Ok , ,
and the default partition is used because nothing is specified in platformio.ini…
so I should have 1.2 app 1.2 app 1.5 spifff… right ?
Thansk
If using Arduino-ESP32, the default is
which is 1.25 MByte App0 + App1, 1.4375MByte SPIFFS.
Ok so it seems that the chip version that I have is just 4Mb
ESP32-D0WD-V3
Is it right ?
Thanks
It looks so. You can make tripple sure by running
(adapted for your paths) to get the actual flash manufacturer and ID, which you can trace back to the used flash.
last question… for changing the partition scheme and increase a bit the size of app0 and app1 and decreasing the spiff size should I respect some constraints (for example strat and finish addressed?)
Thanks a lot
Alignment rules apply per documentation.
Max without saying nothing about partition I got…
By changing the platformio.ini
where
I got
Is it ok or normal ?
Thanks a lot
With huge_app.csv
it is going to take
Which is a single-application (not OTA) partition table with 0x300000 app size (=3.0MByte). This agrees with
If you want to create a custom partition table, don’t use file names already present in arduino-esp32/tools/partitions at master · espressif/arduino-esp32 · GitHub.
To check the size of the flash memory on an ESP32 microcontroller, you can use the ESP32 Arduino Core, which provides a set of libraries and tools for programming the ESP32 using the Arduino IDE.
To check the size of the flash memory, you can use the “ESP.getFlashChipSize()” function provided by the ESP32 Arduino Core. This function returns the size of the flash memory in bytes.
Here is an example Arduino sketch that demonstrates how to use the “ESP.getFlashChipSize()” function to get the size of the flash memory:
#include <ESP.h>
void setup() {
Serial.begin(9600);
delay(1000);
// Get the size of the flash memory
uint32_t flash_size = ESP.getFlashChipSize();
Serial.print("Flash size: ");
Serial.print(flash_size);
Serial.println(" bytes");
}
void loop() {
// Do nothing
}
When you upload and run this sketch on your ESP32, it will print the size of the flash memory to the Serial Monitor. The output will look something like this:
Flash size: 4194304 bytes
In this example, the flash memory size is 4MB (4194304 bytes).