A simple plugin for the FlipperZero written as a tutorial example [ie. excessive documentation & error handling]
Since the move to FAP, your "plugins" are now known as "applications"
- "Plugins" are
- Compiled in to the kernel
- Flashed as part of the firmware in the main SoC
- Require the developer to edit/maintain
/applications/meta/applications.fam
- "Applications" are
- Compiled as separate programs
- Live on the SDCard
- Do NOT require code edits outside their own directory
The upshot is easier development, and (essentailly) unlimited features on your Flipper!
On an x86[1] computer, at a Linux[2] command prompt, type:
mkdir -p ~/flipperZero/official/
cd ~/flipperZero/official/
git clone --recursive https://github.com/flipperdevices/flipperzero-firmware.git ./
./fbt
...and wait while it downloads all the required tools and performs the first build of the code.
[1] The FlipperZero Toolchain is ONLY available for x86 PCs. EG. You will NOT be able to do this on a RaspberyyPi.
[2] You CAN write FAPs under Windows. Perahps a friendly windows user would like to write a tutorial on this?
./fbt flash_usb_full
Note:
flash_usb
is used to install JUST the firmwareflash_usb_full
also installs the "resources" (images and such)
Be aware that since the introdcution of FAP [Sept 2022], Applications are Resources (in the same way that Images are Resources).
Assuming your devkit is in: ~/flipperZero/official/
...checkout this demo with:
cd ~/flipperZero/official//applications_user
mkdir bc_demo
cd bc_demo
git clone https://github.com/csBlueChip/FlipperZero_plugin_howto.git ./
Compile with:
cd ~/flipperZero/official/
./fbt fap_bc_demo
...And/Or (Compile and) Upload with:
cd ~/flipperZero/official/
./fbt launch_app APPSRC=bc_demo
...Flashing will fail if the FlipperZero is in the applications menu, or running an application!
- Review the
README.txt
file for an overview of the code, and how to get started. - Take a look in
bc_demo.c
for, frankly, an abusive amount of commenting; and overkill error-handling.
The code is all M.I.T. Licensed ...take it ...use it ...butcher it ...polish it ...whatever.
...If you do anything cool with it, I'd love to see your creation :)
If you wish to review this repository at the last point before the FAP update, use this link
If you wish to review the (trivial) change[s] required to convert from the old "plugin" system to the new "FAP"/"Application" system, see this link ...the addition of an icon and a sub-folder are optional.
In March 2023 the mutex API was "broken"/superceded. Due to changes in the Speaker API (which happened (essentially) at the same time) (and the fact that I didn't really think things through properly) the update to this repository wasn't 'clean'. If you'd like to see a 'clean' update to an app that uses mutex'es, check out the patch to my WiiEC FAP