espressif/esp-iot-solution

'esp_spiram_get_size' was not declared in this scope (AEGHB-667)

Jakes4050 opened this issue · 1 comments

Answers checklist.

  • I have read the documentation ESP-IDF Programming Guide and the issue is not addressed there.
  • I have updated my IDF branch (master or release) to the latest version and checked that the issue is present there.
  • I have searched the issue tracker for a similar issue and not found a similar issue.

General issue report

Good day Very new to ESP 32. Trying to upload your sketch to a ESP32 Cam AI Thinker and receive this error message while compiling.

In file included from sketch/appGlobals.h:6,
from /home/jacotoy/Arduino/ESP32-CAM_MJPEG2SD/ESP32-CAM_MJPEG2SD.ino:8:
/home/jacotoy/Arduino/ESP32-CAM_MJPEG2SD/ESP32-CAM_MJPEG2SD.ino: In function 'void setup()':
ESP32-CAM_MJPEG2SD:18:43: error: 'esp_spiram_get_size' was not declared in this scope
18 | LOG_INF("PSRAM size: %s", fmtSize(esp_spiram_get_size()));
| ^~~~~~~~~~~~~~~~~~~
sketch/globals.h:349:61: note: in definition of macro 'LOG_INF'
349 | #define LOG_INF(format, ...) logPrint(INF_FORMAT(format), ##VA_ARGS)
| ^~~~~~~~~~~
exit status 1
'esp_spiram_get_size' was not declared in this scope

Please assist?

@Jakes4050 I think this problem is unrelated to esp-iot-solution, it's a general esp32-arduino Migration from 2.x to 3.x questions.

Your Arduino project ESP32-CAM_MJPEG2SD.ino using esp_spiram_get_size, which is an ESP-IDF v4.x function (Arduino 2.x based version), please Install esp32-arduino 2.x version instead in your project.

Or, you need to port the project from esp32-arduino 2.x to 3.x (based on ESP-IDF 5.x).