Flipper ZeroWorkshop

Loading the Blender model…

Flipper ZeroWorkshop
Lesson 47 of 50

Writing an external app (FAP)

0/50

Completed

Flipper Zero SimulatorDismantle, inspect and operate the device.
Interactive lab
Schematic
Lesson guide47 / 50

Writing an external app (FAP)

Compile a counter app and watch it run on the model.

Module: Wireless and system

Hardware

An FAP is an ELF loaded from the SD card. The counter below runs live on the 3D LCD: OK increments, Back resets.

Apps can also use the Video Game Module: its RP2040 mirrors the display and reads a 6-axis IMU for motion games.

Key specs

Build
ufbt

Firmware code

static void draw(Canvas* c, void* ctx) {
    App* a = ctx; char s[16];
    snprintf(s, sizeof(s), "%d", a->n);
    canvas_draw_str_aligned(c, 64, 32, AlignCenter, AlignCenter, s);
}

Check yourself

An FAP file is…

  • An ELF app
  • A font
  • A PNG

← 46. Firmware architecture · All lessons · 48. Power management →

Try it yourself

l47_writing_an_external_ap.c

static void draw(Canvas* c, void* ctx) {
    App* a = ctx; char s[16];
    snprintf(s, sizeof(s), "%d", a->n);
    canvas_draw_str_aligned(c, 64, 32, AlignCenter, AlignCenter, s);
}
Ready Line – API calls 0 Time 0 ms
Flipper CLI · virtual Ready
C · Flipper firmware API

Lessons

Lesson 01Tour of the Flipper ZeroLesson 02Enclosure and mechanicsLesson 03Exploded view and assemblyLesson 04The main PCBLesson 05STM32WB55 microcontrollerLesson 06Battery and chargingLesson 07USB-C and DFU recoveryLesson 08Monochrome 128×64 LCDLesson 09Drawing with the canvas APILesson 10D-pad and tactile switchesLesson 11Input events and the Back buttonLesson 12Menus and the GUI stackLesson 13Haptics, LED and speakerLesson 14GPIO header pinoutLesson 15Digital input and outputLesson 16PWM outputLesson 17Analog input (ADC)Lesson 18UART serialLesson 19I²C busLesson 20SPI busLesson 21CC1101 sub-GHz transceiverLesson 22Spectrum analyzerLesson 23OOK and ASK modulationLesson 24FSK and data rateLesson 25Decoding a synthetic remoteLesson 26Antennas and rangeLesson 27Low-frequency RFID basicsLesson 28EM4100 and Manchester codingLesson 29Read and emulate a synthetic tagLesson 30The antenna board coilsLesson 31NFC and ISO 14443Lesson 32Reading an NTAG synthetic tagLesson 33MIFARE Classic sectors and keysLesson 34AnticollisionLesson 35Emulating a synthetic NFC tagLesson 361-Wire protocolLesson 37DS1990A ROM and CRCLesson 38Infrared basicsLesson 39NEC protocolLesson 40Universal remote databaseLesson 41USB HID in a sandboxLesson 42USB CDC and mass storageLesson 43Bluetooth LE radioLesson 44Scanning BLE advertisersLesson 45microSD and FATLesson 46Firmware architectureLesson 47Writing an external app (FAP)Lesson 48Power managementLesson 49Security, ethics and lawLesson 50Capstone: assemble, operate, diagnose