Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FBT/SDK: New app flag UnloadAssetPacks to free RAM #260

Merged
merged 11 commits into from
Nov 7, 2024

Conversation

Willy-JL
Copy link
Member

@Willy-JL Willy-JL commented Oct 13, 2024

What's new

  • 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 ca5f3bb as this implementation supersedes it

For the reviewer

  • I've uploaded the firmware with this patch to a device and verified its functionality
  • I've confirmed the bug to be fixed / feature to be stable

@Willy-JL Willy-JL self-assigned this Oct 13, 2024
@Willy-JL Willy-JL added the enhancement New enhancement or request label Oct 13, 2024
Copy link

github-actions bot commented Oct 13, 2024

Compiled f7 firmware for commit 94067ba2:

@Willy-JL Willy-JL marked this pull request as draft October 14, 2024 21:54
@Willy-JL Willy-JL marked this pull request as ready for review November 7, 2024 04:22
@Willy-JL Willy-JL merged commit 5eb5d75 into dev Nov 7, 2024
5 checks passed
@Willy-JL Willy-JL deleted the unload-assetpacks-flag branch November 7, 2024 05:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New enhancement or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants