m5stack / Core2-for-AWS-IoT-Kit

Accompanying code for use with AWS IoT Kit content. Works with PlatformIO and ESP-IDF v4.2.
https://m5stack.com/collections/m5-core/products/m5stack-core2-esp32-iot-development-kit-for-aws-iot-edukit
MIT License
127 stars 66 forks source link

lvgl maybe cause heap overflow #66

Closed EeeeBin closed 3 years ago

EeeeBin commented 3 years ago

This heap is too large (320 64 2 = 40960), so that sometimes the esp32 does not have a large enough free block (the same size of DMA memory is applied for when the spi writes to the screen), which will cause memory overflow, and sometimes will not cause the esp32 to stop. Will produce some unexpected behavior, I encountered this problem in a project

It is recommended to set it to LV_HOR_RES_MAX * 32, the disadvantage is that it may cause lvgl to refresh the screen more slowly

https://github.com/m5stack/Core2-for-AWS-IoT-EduKit/blob/048feaa5a32dee024b71ae122febe46caa1b04bf/Getting-Started/components/core2forAWS/tft/disp_driver.h#L23