A bunch of notes on writing applications for Flipper Zero.
-
Install the dev firmware version on your Flipper with qFlipper or from the source code. To be honest, I don't know if this is needed or not, but it saves me from the "API mismatch" error.
-
Clone and build the Flipper Zero firmware:
$ mkdir -p ~/flipperZero/official/ $ cd ~/flipperZero/official/ $ git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git ./ $ ./fbt
-
Move your app's code into
~/flipperZero/official/applications_user
folder:$ ~/flipperZero/official/flipperzero-firmware tree applications_user applications_user ├── simple_app_1 │ ├── application.fam │ ├── simple_app_1.c │ └── CS.png ├── ... ...
-
Build your app:
$ cd ~/flipperZero/official/ # build $ ./fbt fap_<appid> # or build and install and launch $ ./fbt launch_app APPSRC=<appid>
FURI_LOG_D(TAG, MSG)
- debugFURI_LOG_T(TAG, MSG)
- traceFURI_LOG_I(TAG, MSG)
- infoFURI_LOG_E(TAG, MSG)
- errorFURI_LOG_W(TAG, MSG)
- warning
Example: FURI_LOG_I("SNAKE", "Score is %d", score)
To get the debug output you need to open Flipper Zero Command Line Interface:
$ screen /dev/serial/by-id/usb-Flipper_Devices_Inc._Flipper_Unfp0ur_flip_Unfp0ur-if00
...
>: log
Press CTRL+C to stop...
# To end the session, use ctl+a then ctl+d to detach.
$ screen -list
$ screen -X -S <sess name> quit # lol don't blame me
Path to the Apps Assets folder will be /ext/apps_assets/hello_world
#include <furi.h>
// Define log tag
#define TAG "app_name_or_smth"
...
// Application entry point
int32_t hello_world(void* p) {
// Mark argument as unused
UNUSED(p);
...
return 0;
}
- Simple GUI app (does nothing): simple_app_1
- Simple GUI app (does nothing) with input callback: simple_app_2
- Flipper Zero Documentation - incomplete but still useful. Read it first.
- Flipper Zero Example Apps - some examples for .
- Flipper Zero Firmware Documentation
- "Сборка Hello World под Flipper Zero" by Pavel Yakovlev
- Flipper Hello World app
- The Flipper Zero user interface editor
- FlipperZero_plugin_howto - detailed installation description + complicated and overcommented plugin code.
- Your First Plugin - WARNING: this one is completely outdated though is a good step by step guide for newbies.
- Flipper Zero dev tutorial with examples. - looks good