From 9b7ccb3fd3cd88c7adb2ab2f49909e4a7b3bc56b Mon Sep 17 00:00:00 2001 From: Elly Romanova <25254561+ellyromanova@users.noreply.github.com> Date: Thu, 27 Aug 2026 22:16:43 +0300 Subject: [PATCH] Update the App Development documentation section (#4412) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update the App Development documentation section - Expanded the App Development section (applications.dox) to provide more introduction to the topic and include links to new guides and additional resources. - Added 4 new guides: Your first app in C, Debugging FAPs, Using Furi API, GUI in Apps. Co-Authored-By: Ruslan Nadyrshin <110516632+rnadyrshin@users.noreply.github.com> * Update applications.dox Co-Authored-By: Ruslan Nadyrshin <110516632+rnadyrshin@users.noreply.github.com> * Minor fixes --------- Co-authored-by: knrn64 <25254561+knrn64@users.noreply.github.com> Co-authored-by: Ruslan Nadyrshin <110516632+rnadyrshin@users.noreply.github.com> Co-authored-by: Štefan Croitoru <66339601+turbospok@users.noreply.github.com> --- .../app_dev/app_dev_debugging_faps.md | 68 +++++++ documentation/app_dev/app_dev_furi_api.md | 45 +++++ documentation/app_dev/app_dev_gui.md | 184 ++++++++++++++++++ .../app_dev/app_dev_your_first_app_in_c.md | 119 +++++++++++ documentation/doxygen/applications.dox | 36 +++- ...v_flipperzero_app_wifi_devboard_debug.webp | Bin 0 -> 88940 bytes documentation/images/app_dev_gui_dialogs.jpg | Bin 0 -> 53019 bytes documentation/images/app_dev_gui_viewport.png | Bin 0 -> 27825 bytes .../images/app_dev_gui_views_and_scenes.jpg | Bin 0 -> 130639 bytes .../images/flipper_zero_architecture.png | Bin 0 -> 60659 bytes .../images/flipper_zero_hardware.png | Bin 0 -> 44006 bytes 11 files changed, 447 insertions(+), 5 deletions(-) create mode 100644 documentation/app_dev/app_dev_debugging_faps.md create mode 100644 documentation/app_dev/app_dev_furi_api.md create mode 100644 documentation/app_dev/app_dev_gui.md create mode 100644 documentation/app_dev/app_dev_your_first_app_in_c.md create mode 100644 documentation/images/app_dev_flipperzero_app_wifi_devboard_debug.webp create mode 100644 documentation/images/app_dev_gui_dialogs.jpg create mode 100644 documentation/images/app_dev_gui_viewport.png create mode 100644 documentation/images/app_dev_gui_views_and_scenes.jpg create mode 100644 documentation/images/flipper_zero_architecture.png create mode 100644 documentation/images/flipper_zero_hardware.png diff --git a/documentation/app_dev/app_dev_debugging_faps.md b/documentation/app_dev/app_dev_debugging_faps.md new file mode 100644 index 000000000..9f6ae09de --- /dev/null +++ b/documentation/app_dev/app_dev_debugging_faps.md @@ -0,0 +1,68 @@ +# Debugging FAPs {#app_dev_debugging_faps} + +In the [previous guide](#app_dev_your_first_app_in_c), you learned how to create and run basic applications written in C on the Flipper Zero. + +Now, let's explore real-time debugging. It allows launching an application, pausing execution at any point, stepping through code line by line, and monitoring variable states and execution flow. This approach helps identify and fix significantly more bugs than testing without real-time debugging. + +> [!note] +> Using in-circuit debugging is optional — you can still debug applications by loading and running them over USB. + +## Requirements + +The Flipper Zero microcontroller’s SWD (Serial Wire Debug) interface is accessible through the device’s expansion port. You can connect a supported SWD probe to this interface to control program execution. + +Therefore, you will need the following: + +- Flipper Zero +- Windows, Linux or macOS computer +- One of the supported SWD probes + +## Supported SWD probes + +To use real-time debugging, you need a device that functions as a debug probe. This can be: + +- Another Flipper Zero: simply run the [Dap LINK app](https://lab.flipper.net/apps/dap_link) to enable SWD probe functionality +- [WiFi Devboard for Flipper Zero](https://shop.flipperzero.one/products/wifi-devboard) with stock firmware +- CMSIS-DAP compatible probes (from [Raspberry Pi](https://www.raspberrypi.com/products/debug-probe/), [l-tek](https://www.l-tek.com/web-shop/cmsis-dap-debug-probe/), [makerdiary](https://makerdiary.com/products/pitaya-link), and others) +- [Blackmagic compatible probes](https://black-magic.org/hardware.html) +- Other compatible probes: [ST-LINK V2](https://www.st.com/en/development-tools/st-link-v2.html), [ST-LINK V3](https://www.st.com/en/development-tools/stlink-v3set.html), etc. + +## Prerequisites + +Your computer must have the necessary tools and libraries installed to compile and run applications on Flipper Zero. We recommend using a preconfigured package that automates this setup — **uFBT (micro Flipper Build Tool)**. Install it by following the instructions in the [uFBT repo](https://github.com/flipperdevices/flipperzero-ufbt). + +Debugging must also be enabled on your Flipper Zero. To do this, set **Settings > System > Debug** to **ON**. + +## Step-by-step guide + +1\. **Connect the SWD probe to the Flipper Zero expansion port.** If you are using a probe not specially designed for Flipper Zero, you need to connect 3 pins: SWCLK (pin 10), SWDIO (pin 12), and GND (pin 8/11/18). If your SWD probe provides a UART interface, it is helpful to connect it to the Flipper Zero USART (pins 13, 14). This serial port outputs logs and information about critical program crashes when they occur, aiding in debugging. + +2\. **Connect the SWD probe to your computer.** Most debuggers connect via USB cable, but the WiFi Devboard supports connection via USB or WiFi (see [official documentation](#dev_board) for details). + + + \image html app_dev_flipperzero_app_wifi_devboard_debug.webp width=700 + +3\. **In Visual Studio Code, switch to debugging mode** by clicking the debug icon in the left menu or use the keyboard shortcut `Ctrl+Shift+D` on Windows/Linux or `Cmd+Shift+D` on macOS. Select the debugger model and press the **Play** button. + +> [!note] +> Starting a debug session halts firmware execution. To resume, click the **Continue** button on the toolbar at the top of your VS Code window. + +4\. **Use the debug control buttons** (reset, pause, run, step in, step out, and disconnect). + +5\. **Set breakpoints** by clicking to the left of the code line. Code execution will automatically pause when it reaches a line with a breakpoint. + +6\. **View the call stack tree.** When code execution is paused, you can view the call stack tree in the Call Stack window, showing the functions the processor has entered at the moment of the pause. + +7\. **View variable values** using the Variables, Watch, or Live Watch panels. + +Watch the demo below to see how to debug Flipper Zero FAPs in VS Code: + +\htmlonly + +
)6E;}3x@_Bamu=hZvTfV8ZFSkUx@_C#JAKag{koVnb2+ou+BbXci_FN3
zco3l^DJEv34Gg3%Dx{#Mz^MTP1Ox>2_nn0VvIhbB`-L!A3mE9O7AyytdJfV7gwKXG
zMWUFvkeGDIlhPkP!rT_H(cwvprU2SEVb9{<
zaSnb<@^1t?fH`j(z|v*XOVSeL<;yqXlisENv!8`8BEaqm`8(n}4X{${*DQbC+8}-%
zS5@}4vn?N9cL})cb>KtmHRyf1p!5m*Dtkqg@RR$7{Iq+Cd(gk 5~(R=gUag&of9&mH^q8UBEZSZ