Skip to content

Commit 5b97036

Browse files
committed
Merge branch 'release-candidate' into release
2 parents cd977c7 + 7d66ba0 commit 5b97036

22 files changed

+1328
-136
lines changed

.gitattributes

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
* text=auto eol=lf
2+
*.bat eol=crlf
3+
*.ps1 eol=crlf
4+
*.cmd eol=crlf

.gitignore

Lines changed: 132 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,135 @@
1+
# State dir
12
.ufbt
2-
.vscode
3+
4+
# Created by https://www.toptal.com/developers/gitignore/api/python,scons,c++,visualstudiocode,c
5+
# Edit at https://www.toptal.com/developers/gitignore?templates=python,scons,c++,visualstudiocode,c
6+
7+
### Python ###
8+
# Byte-compiled / optimized / DLL files
9+
__pycache__/
10+
*.py[cod]
11+
*$py.class
12+
13+
# C extensions
14+
15+
# Distribution / packaging
16+
.Python
17+
build/
18+
develop-eggs/
19+
dist/
20+
downloads/
21+
eggs/
22+
.eggs/
23+
lib/
24+
lib64/
25+
parts/
26+
sdist/
27+
var/
28+
wheels/
29+
share/python-wheels/
30+
*.egg-info/
31+
.installed.cfg
32+
*.egg
33+
MANIFEST
34+
35+
# PyInstaller
36+
# Usually these files are written by a python script from a template
37+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
38+
*.manifest
39+
*.spec
40+
41+
# Installer logs
42+
pip-log.txt
43+
pip-delete-this-directory.txt
44+
45+
# Unit test / coverage reports
46+
htmlcov/
47+
.tox/
48+
.nox/
49+
.coverage
50+
.coverage.*
51+
.cache
52+
nosetests.xml
53+
coverage.xml
54+
*.cover
55+
*.py,cover
56+
.hypothesis/
57+
.pytest_cache/
58+
cover/
59+
60+
# IPython
61+
profile_default/
62+
ipython_config.py
63+
64+
# pyenv
65+
# For a library or package, you might want to ignore these files since the code is
66+
# intended to run in multiple environments; otherwise, check them in:
67+
# .python-version
68+
69+
# pipenv
70+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
71+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
72+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
73+
# install all needed dependencies.
74+
#Pipfile.lock
75+
76+
# poetry
77+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
78+
# This is especially recommended for binary packages to ensure reproducibility, and is more
79+
# commonly ignored for libraries.
80+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
81+
#poetry.lock
82+
83+
# pdm
84+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
85+
#pdm.lock
86+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
87+
# in version control.
88+
# https://pdm.fming.dev/#use-with-ide
89+
.pdm.toml
90+
91+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
92+
__pypackages__/
93+
94+
95+
# Environments
96+
.env
97+
.venv
98+
env/
99+
venv/
100+
ENV/
101+
env.bak/
102+
venv.bak/
103+
104+
# mkdocs documentation
105+
/site
106+
107+
108+
### SCons ###
109+
# for projects that use SCons for building: http://http://www.scons.org/
3110
.sconsign.dblite
4111

5-
toolchain/*
112+
# When configure fails, SCons outputs these
113+
config.log
114+
.sconf_temp
115+
116+
### VisualStudioCode ###
117+
.vscode/*
118+
!.vscode/settings.json
119+
!.vscode/tasks.json
120+
!.vscode/launch.json
121+
!.vscode/extensions.json
122+
!.vscode/*.code-snippets
123+
124+
# Local History for Visual Studio Code
125+
.history/
126+
127+
# Built Visual Studio Code Extensions
128+
*.vsix
129+
130+
### VisualStudioCode Patch ###
131+
# Ignore all local history of files
132+
.history
133+
.ionide
134+
135+
# End of https://www.toptal.com/developers/gitignore/api/python,scons,c++,visualstudiocode,c

README.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# uFBT - micro Flipper Build Tool
2+
3+
uFBT is a tool for building applications for Flipper Zero. It is a simplified version of [Flipper Build Tool (FBT)](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/fbt.md).
4+
5+
uFBT allows you to perform basic development tasks for Flipper Zero, like building and debugging applications, flashing firmware. It uses prebuilt binaries and libraries, so you don't need to build the whole firmware to compile and debug your application.
6+
7+
8+
## Installation
9+
10+
Clone this repository and add its path to your `PATH` environment variable. On first run, uFBT will download and install all required SDK components from `dev` branch of official firmware.
11+
12+
### Updating the SDK
13+
14+
To update the SDK, run `ufbt update`. This will download and install all required SDK components from previously used channel or branch.
15+
16+
To switch to a different version of the SDK, run `ufbt update --channel=[dev|rc|release]`. Or you can use any not-yet-merged branch from official repo, like `ufbt update --branch=feature/my-awesome-feature`.
17+
18+
If something goes wrong and uFBT state becomes corrupted, you can reset it by running `ufbt purge`. If that doesn't work, you can try removing `.ufbt` subfolder manually from ufbt's folder.
19+
20+
## Usage
21+
22+
### Building & running your application
23+
24+
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.
25+
26+
You can upload and start your application on Flipper attached over USB using `ufbt launch`.
27+
28+
### Debugging
29+
30+
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).
31+
32+
You can attach to running firmware using `ufbt debug` (for ST-Link) or `ufbt blackmagic` (for Wi-Fi dev board).
33+
34+
### VSCode integration
35+
36+
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.
37+
38+
### Application template
39+
40+
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.
41+
Application manifests are explained in the [FBT documentation](https://github.com/flipperdevices/flipperzero-firmware/blob/dev/documentation/AppManifests.md).
42+
43+
### Other
44+
45+
* `ufbt cli` starts a CLI session with the device;
46+
* `ufbt lint`, `ufbt format` run clang-format on application's sources.

0 commit comments

Comments
 (0)