Apps can register flags=["UnloadAssetPacks"], in application.fam to request unload active asset pack, therefore freeing RAM
NFC and MFKey apps already use this flag
Hacky shenanigans with .fapmeta ELF section, 1 byte larger to store flags data, but backwards compatible both ways (checks for smaller OFW manifest and loads it correctly, and when this larger manifest is laoded by other firmwares it overflows 1 byte into padding memory of FlipperApplication struct since manifest struct is 85 bytes, padded to 88 for alignment)
Reverts part of ca5f3bb09aa8b1ea610ce7cb45b6567b7bfc13b3 as this implementation supersedes it
For the reviewer
[x] I've uploaded the firmware with this patch to a device and verified its functionality
[x] I've confirmed the bug to be fixed / feature to be stable
What's new
flags=["UnloadAssetPacks"],
inapplication.fam
to request unload active asset pack, therefore freeing RAM.fapmeta
ELF section, 1 byte larger to store flags data, but backwards compatible both ways (checks for smaller OFW manifest and loads it correctly, and when this larger manifest is laoded by other firmwares it overflows 1 byte into padding memory ofFlipperApplication
struct since manifest struct is 85 bytes, padded to 88 for alignment)For the reviewer