Accessing images from PSRAM

What do you want to achieve?

I am experiencing memory exhaustion (DRAM) due to large UI assets. Since the application requires significant overhead for BLE, Wi-Fi, and Cloud connectivity, I need to optimize image handling to free up resources for these background services…

Is there any way i can push the exported images .c files to PSRAM ???

What have you tried so far?

  • I tried to load images via SPIFFS but couldn’t get it working as lv_image_set_src couldn’t read the path.
  • The macro EXT_RAM_BSS_ATTR doesn’t help, image doesn’t get displayed at runtime.

Others

  • SquareLine Studio version: 1.5.4
  • LVGL version: 9.2.2
  • IDE: Espressif IDE
  • MPU: ESP32-WROVER-B

The macro EXT_RAM_BSS_ATTR doesn’t help, image doesn’t get displayed at runtime.

This attribute is for zero-initialized (or uninitialized) data. If your PSRAM image draws in black, this macro is probably why. If you find the linker script config, it’s marked NOINIT.

Also, the default placement for images is in QSPI flash, which should not impact your DRAM usage. If you did move images to PSRAM, it may not help with your internal DRAM consumption. You may be facing DRAM pressure more from the other causes you mentioned above. If you haven’t yet, you might review this page.