Page 1 of 1

error: 'esp_spiram_get_size' was not declared in this scope

Posted: Wed Jan 04, 2023 5:33 am
by d3vnu11
Trying to setup a Freematics One+ for use with traccar and getting this error when attempting to build with Arduino Builder.

Build Target: ESP32 (MCU: esp32 @ 240Mhz)
Library path: hardware/arduino/esp32/libraries/SPI/src
Library path: hardware/arduino/esp32/libraries/FS/src
Library path: hardware/arduino/esp32/libraries/SD/src
Library path: hardware/arduino/esp32/libraries/SPIFFS/src
Library path: C:\Users\user\Documents\Freematics-master\Freematics-master/libraries/httpd
Library path: C:\Users\user\Documents\Freematics-master\Freematics-master/libraries/FreematicsPlus
Library path: hardware/arduino/esp32/libraries/WiFi/src
Referenced libraries: [SPI] [FS] [SD] [SPIFFS] [httpd] [FreematicsPlus] [WiFi]

[Sketch]
Compiling datalogger.ino.cpp...
C:\Users\user\AppData\Local\Temp/ArduinoBuilder/datalogger.ino.cpp: In function 'void showSysInfo()':
C:\Users\user\AppData\Local\Temp/ArduinoBuilder/datalogger.ino.cpp:727:36: error: 'esp_spiram_get_size' was not declared in this scope
Error compiling source code.

Re: error: 'esp_spiram_get_size' was not declared in this scope

Posted: Fri Feb 24, 2023 10:24 pm
by calvarez
It happened to me as well but on the datalogger example. I commented the "esp_spiram_get_size" function call inside "showSysInfo()" and it worked for me.

Re: error: 'esp_spiram_get_size' was not declared in this scope

Posted: Wed Apr 10, 2024 11:42 am
by victoriafeest
Even with the datalogger example, I had the same problem. To fix that, I commented out the call to "esp_spiram_get_size" inside "showSysInfo()" and it ran well.

Re: error: 'esp_spiram_get_size' was not declared in this scope

Posted: Thu Apr 11, 2024 12:14 pm
by stanley
I believe esp_spiram_get_size is an updated API provided by recent ESP32 Arduino core. It seems you might be using an older core.