Support passing arguments via serial CLI to external FAPs #2505
Labels
Core+Services
HAL, furi & core system services
New Feature
Contains an IMPLEMENTATION of a new feature
All applications that aren't run on startup are required to have an entry point of the form
int32_t entry_point(void* p)
:flipperzero-firmware/scripts/fbt/appmanifest.py
Lines 354 to 357 in ccaa386
This implies that some kind of context or arguments object is provided by the Flipper Zero to the app via the
void* p
. This appears to be the case for built-in apps; for example, the iButton app checks ifp
is a C string, and then parses it:flipperzero-firmware/applications/main/ibutton/ibutton.c
Lines 313 to 336 in 224d0ae
However, when running an external FAP from the serial CLI, providing arguments causes it to fail to start:
Allowing arguments to be passed when starting via the serial CLI would enable external FAPs to act similarly to built-in CLI apps (albeit with the
loader open Applications
prefix).Alternatively, if there were a way for an external FAP to register a CLI interface (like is often done in apps with type
FlipperAppType.STARTUP
), that would satisfy the use case. However, I suspect this would be trickier as it would require scanning the entire directory tree to find external FAPs to register in this way, so passing arguments directly to the external FAP is likely to be simpler.The text was updated successfully, but these errors were encountered: