Bring Up a LOLIN D32 Pro: Verify Flash, PSRAM and Partition Settings
A development board can have plenty of memory on its specification list and still reject a large application or fail to allocate an image buffer. Flash capacity, application partitions and working RAM describe different resources. Checking them separately is a useful first step before building a display, audio or data-processing project.
The LOLIN D32 Pro ESP32 board in the PMD Way LOLIN ESP32 collection includes external memory and peripheral connections. Its catalogue description contains historical software-access wording, so use the actual board revision and current framework documentation to establish the resources your program can use.
Resolve the memory specification rather than guessing
The store listing describes 16 MB flash and 4 MB PSRAM. The manufacturer's D32 Pro page itself has inconsistent figures: its feature list says 8 MB PSRAM, while the technical table says 4 MB and lists flash variants. This is a reason to verify the supplied board, not choose whichever number suits the project.
Record the board revision, module markings and relevant schematic. Keep an original photograph with the project files. Ask for clarification if the required capacity cannot be established from the supplied item and its documentation.
Do not repeat the catalogue's statement that Arduino and MicroPython can only access 4 MB as a universal present-day limit. Usable storage depends on hardware, firmware configuration, partitioning and the particular software build.
Keep three memory questions separate
| Resource | What it is used for | Useful check |
|---|---|---|
| SPI flash | Persistent firmware and configured data storage | Detected chip capacity and firmware configuration |
| Application partition | Space allocated to a firmware image | Selected partition scheme and built image size |
| Internal RAM and PSRAM | Runtime state and temporary buffers | Initialised memory, free space and largest available allocation |
Increasing a filesystem partition does not increase RAM for a framebuffer. Enabling PSRAM does not enlarge an application partition. A microSD card provides another storage destination, but it is not automatically part of the processor's ordinary working heap.
Identify flash without erasing the board
Start with a reliable data-capable USB cable, the correct serial device and the board's documented connection procedure. Close other programs that are holding the serial port. Preserve existing firmware and user files before planning any upload that might replace them.
Espressif's esptool command guide documents the read-only flash-identification command:
esptool --port COM4 flash-id
Replace COM4 with the board's actual port. Command spelling can differ between esptool releases, so use the installed version's help. Record the reported chip identification and flash capacity. Entering the bootloader can reset or interrupt the running application even though this command does not erase flash.
If identification fails, investigate the USB connection, serial driver, port selection and bootloader entry before changing memory settings. A communication failure is not evidence that the flash chip has a different capacity.
Choose a partition scheme for the application
The Arduino-ESP32 partition guide explains how flash is divided into application and data areas. A board with a large flash chip can still have a small application slot because the chosen scheme reserves space for other purposes.
Decide whether the project needs over-the-air update slots, a local filesystem and persistent settings. Select a documented scheme compatible with the verified flash capacity. Do not enlarge a partition beyond physical storage or overlap existing regions.
Changing the partition layout can make previously stored data inaccessible or cause it to be overwritten by later uploads. Export important configuration and files first, and keep the chosen layout with the build settings. Physical capacity and an intentional storage plan are both necessary.
Confirm that PSRAM is initialised and usable
Use the correct board definition and PSRAM settings for the supplied revision and installed framework. Read the startup log for memory-initialisation results before running a large application.
The official Arduino-ESP32 memory API declarations include ESP.getPsramSize(), ESP.getFreePsram() and ESP.getMaxAllocPsram(). These distinguish the runtime's available PSRAM pool, its current free space and the largest block it can allocate. Use the APIs supported by your installed core and report values in bytes to avoid unit ambiguity.
A zero result should trigger investigation of the board, configuration and boot log. Do not treat it as proof that the catalogue memory is physically absent. Conversely, a successful initialisation message is not proof that every library allocates its buffers there.
Espressif's classic ESP32 external-RAM guide describes allocation policies and restrictions, including a limited directly mapped address space. Physical PSRAM size and the pool exposed to ordinary allocations can differ. Some buffers need internal memory; extra PSRAM is not an unrestricted replacement for it.
Budget the peak working set
Calculate buffer sizes before combining features. For example, an uncompressed 320 × 240 image using two bytes per pixel needs 153,600 bytes. Two such buffers need 307,200 bytes before the display library, network stack, application objects and other overhead. This is arithmetic for an example format, not a promised display configuration.
Check allocation results and provide a defined response when memory is unavailable. Total free memory can exceed a requested buffer while no sufficiently large contiguous block exists. Repeated allocation and release patterns also deserve testing during extended operation.
PSRAM holds temporary data. Save information that must survive a power interruption to a suitable persistent store with an appropriate write and recovery strategy. Do not confuse successful buffering with successful storage.
Save a reproducible bring-up record
Keep the board revision, flash identification, framework version, board settings, partition scheme and startup memory report together. Add peak-memory observations after enabling the project's demanding features.
When a later build fails, compare this record before replacing hardware or enlarging random settings. It turns a vague “out of memory” problem into a specific question about physical capacity, flash allocation or runtime buffers.