-
-
Notifications
You must be signed in to change notification settings - Fork 326
Having trouble achieving smaller memory footprint #2210
-
After reading your Blog article here: https://www.pschatzmann.ch/home/2025/09/23/arduino-audio-tools-using-less-memory/ I tried out a small test case using PlatformIO,
Here are my results with a stripped down app: (empty setup and loop)
ini file:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [= ] 6.4% (used 21032 bytes from 327680 bytes)
Flash: [== ] 17.8% (used 233241 bytes from 1310720 bytes)
After adding library reference:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
monitor_speed = 115200
lib_deps =
https://github.com/pschatzmann/arduino-audio-tools
and adding the include statement:
#include "AudioTools.h"
// put function declarations here:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
}
I gain a lot more flash usage:
RAM: [= ] 8.7% (used 28556 bytes from 327680 bytes)
Flash: [==== ] 37.7% (used 494289 bytes from 1310720 bytes)
Can anyone tell me what I am doing wrong? I am wondering if including the library directly from github could be the issue. Or am I using different hardware than you were (I am using an audiokit 2.2).
Beta Was this translation helpful? Give feedback.
All reactions
What ESP32 core version did you use to test ?
Here is the result with the actual 3.3.2 release using IDF 5.5.1
Replies: 1 comment 7 replies
-
So that would be a platformio problem then!
Did you double check that the right version of the AudioTools is loaded ?
Beta Was this translation helpful? Give feedback.
All reactions
-
I will check it now and try downloading it manually instead.
Beta Was this translation helpful? Give feedback.
All reactions
-
I installed the Arduino IDE 2.3.6. This time I downloaded the 1.20 version from releases as a zip file (https://github.com/pschatzmann/arduino-audio-tools/releases) and installed it into the arduino IDE.
After building it is still using a lot more flash than your example:
Sketch uses 523457 bytes (39%) of program storage space. Maximum is 1310720 bytes.
Global variables use 27380 bytes (8%) of dynamic memory, leaving 300300 bytes for local variables. Maximum is 327680 bytes.
Beta Was this translation helpful? Give feedback.
All reactions
-
I updated to arduino 2.3 6 with identical results.
Beta Was this translation helpful? Give feedback.
All reactions
-
What ESP32 core version did you use to test ?
Here is the result with the actual 3.3.2 release using IDF 5.5.1
Beta Was this translation helpful? Give feedback.
All reactions
-
Why would you still use these obsolete versions ?
Actually there is no 2.3.6 ESP32 core version in the board manager !
Beta Was this translation helpful? Give feedback.
All reactions
-
I meant arduino IDE 2.3.6. I think you found the problem with the esp32 core version. I will find the newest one and try it.
Beta Was this translation helpful? Give feedback.
All reactions
-
Yep, turned updates on:
Sketch uses 264443 bytes (20%) of program storage space. Maximum is 1310720 bytes.
Global variables use 20768 bytes (6%) of dynamic memory, leaving 306912 bytes for local variables. Maximum is 327680 bytes.
Thanks for your help.
Beta Was this translation helpful? Give feedback.