Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
3 tasks done
Jakes4050 opened this issue May 29, 2024 · 1 comment
Closed
3 tasks done

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

Jakes4050 opened this issue May 29, 2024 · 1 comment

Comments

@Jakes4050
Copy link

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?

@github-actions github-actions bot changed the title 'esp_spiram_get_size' was not declared in this scope 'esp_spiram_get_size' was not declared in this scope (AEGHB-667) May 29, 2024
@leeebo
Copy link
Collaborator

leeebo commented Jun 3, 2024

@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).

@leeebo leeebo closed this as completed Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants