Optimize factory binary size

This commit is contained in:
decentclock
2022-09-26 14:14:23 -04:00
parent 85779d5a29
commit 8c7c081b72
2 changed files with 9 additions and 2 deletions

View File

@@ -24,3 +24,10 @@ anyhow = "1"
[package.metadata.espflash]
partition_table = "table.csv"
[profile.release]
strip = true # Automatically strip symbols from the binary.
opt-level = "z" # Optimize for size.
lto = true
codegen-units = 1
panic = "abort"

View File

@@ -3,5 +3,5 @@
nvs, data, nvs, 0x9000, 0x4000,
otadata, data, ota, 0xd000, 0x2000,
phy_init, data, phy, 0xf000, 0x1000,
factory, app, factory, 0x10000, 1200K,
ota_0, app, ota_0, 0x140000, 2800K,
factory, app, factory, 0x10000, 377K,
ota_0, app, ota_0, 0x70000, 3648K,
1 # ESP-IDF Partition Table
3 nvs, data, nvs, 0x9000, 0x4000,
4 otadata, data, ota, 0xd000, 0x2000,
5 phy_init, data, phy, 0xf000, 0x1000,
6 factory, app, factory, 0x10000, 1200K, factory, app, factory, 0x10000, 377K,
7 ota_0, app, ota_0, 0x140000, 2800K, ota_0, app, ota_0, 0x70000, 3648K,