I just connected my ESP32 to the Arduino IDE.
I noticed however that the same sketch (blinking the onboard LED) takes 174860 bytes (13%) of program storage space. Maximum is 1310720 bytes. Global variables use 13748 bytes (4%) of dynamic memory, leaving 313932 bytes for local variables. Maximum is 327680 bytes, while on the Arduino UNO takes 928 bytes (2%) of program storage space. Maximum is 32256 bytes. Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.
Why?
Is there a way to fix it?
ESP32 sketches take more space than Arduino Uno
- Vader_Mester
- Posts: 300
- Joined: Tue Dec 05, 2017 8:28 pm
- Location: Hungary
- Contact:
Re: ESP32 sketches take more space than Arduino Uno
The 2 chips are very very different! The uno is an 8bit device, the ESP32 is a 32bit device. So in a nutshell, an instruction and a simple variable in the uno only takes up 1 or 2 bites of memory, while in the ESP, 1 instruction and one variable takes up 4bytes. About 4x the size
Additionally the functionality and software framework is very different.
Consider this analogy:
Arduino Uno: Nokia 3310
ESP32: Samsung Galaxy S9
Additionally the functionality and software framework is very different.
Consider this analogy:
Arduino Uno: Nokia 3310
ESP32: Samsung Galaxy S9
Code: Select all
task_t coffeeTask()
{
while(atWork){
if(!xStreamBufferIsEmpty(mug)){
coffeeDrink(mug);
} else {
xTaskCreate(sBrew, "brew", 9000, &mug, 1, NULL);
xSemaphoreTake(sCoffeeRdy, portMAX_DELAY);
}
}
vTaskDelete(NULL);
}
Who is online
Users browsing this forum: Bing [Bot], Google [Bot] and 91 guests