You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-4Lines changed: 22 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,10 @@ uFBT uses your system's Python for running bootstrap code. Minimal supported ver
15
15
16
16
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](#managing-the-sdk) section.
17
17
18
+
### Using pyenv
19
+
20
+
If you are using `pyenv` to manage python versions, after installation you may need to run `pyenv rehash` to generate [shim](https://github.com/pyenv/pyenv#understanding-shims) for `ufbt` command.
21
+
18
22
## Usage
19
23
20
24
### Building & running your application
@@ -27,9 +31,9 @@ To see other available commands and options, run `ufbt -h`.
27
31
28
32
### Debugging
29
33
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).
34
+
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` (using a supported SWD probe), `ufbt flash_usb` (over USB).
31
35
32
-
You can attach to running firmware using`ufbt debug` (for ST-Link) or `ufbt blackmagic` (for Wi-Fi dev board).
36
+
For other flashing and debugging options, see`ufbt -h`.
33
37
34
38
### VSCode integration
35
39
@@ -44,7 +48,8 @@ Application manifests are explained in the [FBT documentation](https://github.co
44
48
### Other
45
49
46
50
*`ufbt cli` starts a CLI session with the device;
47
-
*`ufbt lint`, `ufbt format` run clang-format on application's sources.
51
+
*`ufbt lint`, `ufbt format` run clang-format on application's sources;
52
+
* You can temporarily add toolchain binaries (compiler, linter, OpenOCD and others) to your PATH. See `ufbt --help` for more information.
48
53
49
54
## Managing the SDK
50
55
@@ -57,8 +62,15 @@ To update the SDK, run `ufbt update`. This will download and install all require
57
62
- uFBT can also download and update the SDK from any **fixed URL**. To do this, run `ufbt update --url=<url>`.
58
63
- 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.
59
64
60
-
uFBT stores its state in `.ufbt` subfolder in your home directory. You can override this location by setting `UFBT_HOME` environment variable.
65
+
### Global and per-project SDK management
66
+
67
+
By default, uFBT stores its state - SDK and toolchain - in `.ufbt` subfolder of your home directory. You can override this location by setting `UFBT_HOME` environment variable.
68
+
69
+
uFBT also supports dotenv (`.env`) files, containing environment variable overrides for the project in current directory. Most commonly, you will want to use this to override the default state directory to a local one, so that your project could use a specific version and/or hardware target of the SDK.
61
70
71
+
You can enable dotenv mode for current directory by running `ufbt dotenv_create`. This will create `.env` file in current directory with default values, linking SDK state to `.ufbt` subfolder in current directory, and creating a symlink for toolchain to `.ufbt/toolchain` in your home directory. You can then edit `.env` file to further customize the environment.
72
+
73
+
You can also specify additional options when creating the `.env` file. See `ufbt dotenv_create --help` for more information.
62
74
63
75
### ufbt-bootstrap
64
76
@@ -69,3 +81,9 @@ Updating the SDK is handled by uFBT component called _bootstrap_. It has a dedic
69
81
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.
70
82
71
83
`ufbt-bootstrap` and SDK-related `ufbt` subcommands accept `--verbose` option that will print additional debug information.
84
+
85
+
## Contributing
86
+
87
+
uFBT is a small tool and does not contain the actual implementation of build system, project templates or toolchain. It functions as a downloader and manager of SDK components that are packaged [alongside with Flipper firmware](https://github.com/flipperdevices/flipperzero-firmware/tree/dev/scripts/ufbt).
88
+
89
+
Issues and pull requests regarding `ufbt-bootstrap` features like SDK management should be reported to this project, and the rest - related to actual application development - to [Flipper firmware repo](https://github.com/flipperdevices/flipperzero-firmware/issues).
0 commit comments