Linking problem with esp_param.h

#include "esp_psram.h"

void  app_main() {

// write your
    esp_psram_init();
    size_t psram_size = esp_psram_get_size();
    printf("PSRAM size: %d bytes\n", psram_size);

}

Here is a simple code. There is a problem with linking esp_psram component, all other components are linking without problem. I use CLION(VSCode)+platformIO * 6.1.11. The same problem on both IDEs and Win/Ubuntu enviroments

CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/esp32-8048S043C.html
PLATFORM: Espressif 32 (6.5.0) > esp32-8048S043C
HARDWARE: ESP32S3 240MHz, 320KB RAM, 16MB Flash

c:/users/andrej/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: .pio\build\esp32-8048S043C\src\main.o:(.literal.app_main+0x4): undefined reference to `esp_psram_init'
c:/users/andrej/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: .pio\build\esp32-8048S043C\src\main.o:(.literal.app_main+0x8): undefined reference to `esp_psram_get_size'
c:/users/andrej/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: .pio\build\esp32-8048S043C\src\main.o: in function `app_main':
D:\IDF_projects\untitled1/src/main.c:6: undefined reference to `esp_psram_init'
c:/users/andrej/.platformio/packages/toolchain-xtensa-esp32s3/bin/../lib/gcc/xtensa-esp32s3-elf/12.2.0/../../../../xtensa-esp32s3-elf/bin/ld.exe: D:\IDF_projects\untitled1/src/main.c:7: undefined reference to `esp_psram_get_size'
collect2.exe: error: ld returned 1 exit status
*** [.pio\build\esp32-8048S043C\firmware.elf] Error 1
  1. You didn’t show your platformio.ini
  2. Did you properly enable PSRAM support in the menuconfig? See docs.
1 Like

Thank you, here is a additional link to the solution for nextcoming martyrs

although i didnt found in menuconfig
PSRAM Clock and CS IO for ESP32S3 —> keep (30)=CLK, (26)=CS setting, everything is working fine