• Stars
    star
    562
  • Rank 79,281 (Top 2 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created about 2 years ago
  • Updated 3 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Compact tool for building and debugging applications for Flipper Zero.

uFBT - micro Flipper Build Tool

uFBT is a cross-platform tool for building applications for Flipper Zero. It is a simplified version of Flipper Build Tool (FBT).

uFBT has an official GitHub Action. With it, you can automate building and publishing your application using GitHub workflows.

uFBT enables basic development tasks for Flipper Zero, such as building and debugging applications, flashing firmware, creating VSCode development configurations. It uses prebuilt binaries and libraries, so you don't need to build the whole firmware to compile and debug your application for Flipper.

Installation

  • Linux & macOS: python3 -m pip install --upgrade ufbt
  • Windows: py -m pip install --upgrade ufbt

uFBT uses your system's Python for running bootstrap code. Minimal supported version is Python 3.8. For executing actual build tasks, uFBT will download and use its own Python binaries and a toolchain built for your platform.

On first run, uFBT will download and install required SDK components from release update channel of official firmware. For more information on how to switch to a different version of the SDK, see Managing the SDK section.

Usage

Building & running your application

Run ufbt in the root directory of your application (the one with application.fam file in it). It will build your application and place the resulting binary in dist subdirectory.

You can upload and start your application on Flipper attached over USB using ufbt launch.

To see other available commands and options, run ufbt -h.

Debugging

In order to debug your application, you need to be running the firmware distributed alongside with current SDK version. You can flash it to your Flipper using ufbt flash (over ST-Link), ufbt flash_usb (over USB) or ufbt flash_blackmagic (using Wi-Fi dev board running Blackmagic firmware).

You can attach to running firmware using ufbt debug (for ST-Link) or ufbt blackmagic (for Wi-Fi dev board).

VSCode integration

uFBT provides a configuration for VSCode that allows you to build and debug your application directly from the IDE. To deploy it, run ufbt vscode_dist in the root directory of your application. Then you can open the project in VSCode (File-Open Folder...) and use the provided launch (ctrl+shift+b) & debugging (ctrl+shift+d) configurations.

Application template

uFBT can create a template for your application. To do this, run ufbt create APPID=<app_id> in the directory where you want to create your application. It will create an application manifest and its main source file. You can then build and debug your application using the instructions above.

Application manifests are explained in the FBT documentation.

Other

  • ufbt cli starts a CLI session with the device;
  • ufbt lint, ufbt format run clang-format on application's sources.

Managing the SDK

To update the SDK, run ufbt update. This will download and install all required SDK components from previously used source.

  • To switch to SDK for a different release channel, run ufbt update --channel=[dev|rc|release].
    • uFBT also supports 3rd-party update indexers, following the same schema as official firmware. To use them, run ufbt update --index-url=<url>, where <url> is a URL to the index file, e.g. https://update.flipperzero.one/firmware/directory.json.
  • To use SDK for a certain release or a not-yet-merged branch from official repo, run ufbt update --branch=0.81.1 or ufbt update --branch=owner/my-awesome-feature.
    • You can also use branches from other repos, where build artifacts are available from an indexed directory, by specifying --index-url=<url>.
  • uFBT can also download and update the SDK from any fixed URL. To do this, run ufbt update --url=<url>.
  • To use a local copy of the SDK, run ufbt update --local=<path>. This will use the SDK located in <path> instead of downloading it. Useful for testing local builds of the SDK.

uFBT stores its state in .ufbt subfolder in your home directory. You can override this location by setting UFBT_HOME environment variable.

ufbt-bootstrap

Updating the SDK is handled by uFBT component called bootstrap. It has a dedicated entry point, ufbt-bootstrap, with additional options that might be useful in certain scenarios. Run ufbt-bootstrap --help to see them.

Troubleshooting

If something goes wrong and uFBT state becomes corrupted, you can reset it by running ufbt clean. If that doesn't work, you can try removing .ufbt subfolder manually from your home folder.

ufbt-bootstrap and SDK-related ufbt subcommands accept --verbose option that will print additional debug information.

More Repositories

1

flipperzero-firmware

Flipper Zero firmware source code
C
12,714
star
2

Flipper-Android-App

Android Mobile app to rule all Flipper's family
Kotlin
1,519
star
3

qFlipper

qFlipper — desktop application for updating Flipper Zero firmware via PC
C++
1,147
star
4

Flipper-iOS-App

iOS Mobile App to rule all Flipper's family
Swift
723
star
5

flipper-application-catalog

Flipper Application Catalog
Python
579
star
6

flipperzero-3d-models

Flipper Zero 3D models
510
star
7

blackmagic-esp32-s2

C
493
star
8

flipperzero-good-faps

Flipper Zero Official Apps maintained by Flipper Team and Friends
C
297
star
9

docs

Flipper Zero documentation repo
Python
182
star
10

flipperzero-sd-card-examples

Examples of all types of files stored on Flipper Zero SD card
166
star
11

lab.flipper.net

JavaScript
146
star
12

flipperzero-devboard-stlinkv3

Devboard for Flipper Zero based on ST-Link V3
108
star
13

flipperzero-nfc-tools

Repository contains nfc tools for Flipper companions
C
106
star
14

flipperzero-toolchain

Flipper Zero Embedded Toolchain
Shell
101
star
15

flipperzero-ufbt-action

Official ufbt Action wrapper for building Flipper Zero applications
95
star
16

flipperzero-game-engine

C
89
star
17

flipperzero-protobuf

This repository contains Flipper Zero RPC protocol protobuf description
77
star
18

flipperzero-catalog-sample-app

C
60
star
19

flipperzero_protobuf_py

Python
58
star
20

video-game-module

C
58
star
21

go-flipper

Go
56
star
22

flipperzero-remote-testbench-front

Remote testbench for Flipper zero - Frontend
JavaScript
43
star
23

flipperzero-nfc-rpc

Examples for control NFC over RPC
Python
41
star
24

webdfu

Driver for working with DFU in a browser over WebUSB
TypeScript
36
star
25

flipper-hackathon-moscow

Flipper Hackathon Moscow 2021
36
star
26

flipper-menu-generator

Generates menu tree image from markdown code
JavaScript
36
star
27

update.flipperzero.one

JavaScript
28
star
28

flipperzero-documentation

CSS
28
star
29

Casper-flipper-blog-theme

Handlebars
26
star
30

flipperzero-game-engine-example

Flipper Zero game engine example project
C
25
star
31

flipper-questions-and-answers

Flipper Question and Answer sessions archive
22
star
32

stm32wb_copro_scripts

Python
22
star
33

homebrew-flipper

Ruby
21
star
34

webflipper

Web client
JavaScript
20
star
35

flipper-update-indexer

Flipper update file uploader and indexer
Python
20
star
36

flipper-documentation-indexer

Python
17
star
37

map-gcc-parser-python

Python
14
star
38

.github

14
star
39

flipper-update-server

Go
13
star
40

flpr.app

HTML
11
star
41

stm32wb_copro

C++
11
star
42

flipper-tilda-webserver

Tilda exporter and webserver
Python
11
star
43

flipperzero-protobuf-jvm

9
star
44

floopper-bloopper

C
9
star
45

welcomer-bot

Python
9
star
46

IRDB

Flipper IR database with device catalogs
9
star
47

flipper-map-reporter

Map file analyser CI/CD
Shell
9
star
48

flipper-k8s-db-backuper

Make backups of databases in k8s
Python
9
star
49

docker-rsync-server

Shell
8
star
50

flipper-factory-reset

Fully reset flipper and set it to the shipping state
Python
8
star
51

sub-sync

Sync Ghost and Sendinblue subscribers
Go
8
star
52

discord-backers-bot

Go
7
star
53

inotify-safe-mv

Dockerfile
7
star
54

flipperzero-protobuf-metric

Protobuf for flipper metrics
7
star
55

discord-notifier

Go
6
star
56

thumbnail-autogen

Dockerfile
5
star
57

chmocker

Chroot-based Docker-like pseudo-containers for MacOS
Python
5
star
58

firmware-report-server

Flipper Zero FW build report analyzer backend
Python
5
star
59

QA-flipper-units

Simple script to run the unit tests inside flipper and validate the result
Python
5
star
60

go-metric

Server for metric from application
Go
4
star
61

firmware-report-client

Svelte
3
star
62

flipper-url-shortener

Python
3
star
63

ship-flipp

Go
2
star
64

flipper-catalog-apps-downloader

Python
1
star
65

IRDB-Backend

Backend for IRDB database
Kotlin
1
star
66

flipper-github-runner-docker-qa

Self-hosted github actions runners for QA
Python
1
star
67

flipper-local-ssl

Flipper LAN SSL Deployer
Python
1
star