使用platfromio编译后内存占用过多
shuaizenge opened this issue · 3 comments
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (1769221 bytes) is greater than maximum allowed (1310720 bytes)
RAM: [=== ] 28.5% (used 93400 bytes from 327680 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========] 135.0% (used 1769221 bytes from 1310720 bytes)
编译后内存占用过多,超过100%不能烧录
目前我的解决方法是:
在platformio.ini中添加
board_build.partitions = partitions-no-ota.csv
board_build.f_cpu = 240000000L
board_build.f_flash = 80000000L
board_build.flash_mode = qio
新建立一个partitions-no-ota.csv文件
内容为:
#Name, Type, SubType, Offset, Size, Flags
nvs, data, nvs, 0x9000, 0x5000,
otadata, data, ota, 0xe000, 0x2000,
app0, app, ota_0, 0x10000, 0x300000,
spiffs, data, spiffs, 0x310000,0xF0000,
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
Error: The program size (1769221 bytes) is greater than maximum allowed (1310720 bytes)
RAM: [=== ] 28.5% (used 93400 bytes from 327680 bytes)
*** [checkprogsize] Explicit exit, status 1
Flash: [==========] 135.0% (used 1769221 bytes from 1310720 bytes)编译后内存占用过多,超过100%不能烧录
我编译的时候内存和 flash 都比你输出的大,不知道是否你修改了开发板配置呢?
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [===== ] 51.4% (used 168352 bytes from 327680 bytes)
Flash: [==== ] 43.4% (used 1451121 bytes from 3342336 bytes)
确实没有改配置,有空试试,谢谢啦