[FL-2832] fbt: more fixes & improvements (#1854)
* github: bundling debug folder with scripts; docs: fixes & updates; fbt: added FAP_EXAMPLES variable to enable building example apps. Disabled by default. fbt: added TERM to list of proxied environment variables * fbt: better help output; disabled implicit_deps_unchanged; added color to import validator reports * fbt: moved debug configuration to separate tool * fbt: proper dependency tracker for SDK source file; renamed linker script for external apps * fbt: fixed debug elf path * fbt: packaging sdk archive * scripts: fixed sconsdist.py * fbt: reworked sdk packing; docs: updates * docs: info on cli target; linter fixes * fbt: moved main code to scripts folder * scripts: packing update into .tgz * fbt, scripts: reworked copro_dist to build .tgz * scripts: fixed naming for archived updater package * Scripts: fix ぐるぐる回る Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
@@ -30,7 +30,7 @@ Only 2 parameters are mandatory: ***appid*** and ***apptype***, others are optio
|
||||
| METAPACKAGE | Does not define any code to be run, used for declaring dependencies and application bundles |
|
||||
|
||||
* **name**: Name that is displayed in menus.
|
||||
* **entry_point**: C function to be used as application's entry point.
|
||||
* **entry_point**: C function to be used as application's entry point. Note that C++ function names are mangled, so you need to wrap them in `extern "C"` in order to use them as entry points.
|
||||
* **flags**: Internal flags for system apps. Do not use.
|
||||
* **cdefines**: C preprocessor definitions to declare globally for other apps when current application is included in active build configuration.
|
||||
* **requires**: List of application IDs to also include in build configuration, when current application is referenced in list of applications to build.
|
||||
@@ -55,7 +55,7 @@ The following parameters are used only for [FAPs](./AppsOnSDCard.md):
|
||||
* **fap_author**: string, may be empty. Application's author.
|
||||
* **fap_weburl**: string, may be empty. Application's homepage.
|
||||
* **fap_icon_assets**: string. If present, defines a folder name to be used for gathering image assets for this application. These images will be preprocessed and built alongside the application. See [FAP assets](./AppsOnSDCard.md#fap-assets) for details.
|
||||
* **fap_extbuild**: provides support for parts of application sources to be build by external tools. Contains a list of `ExtFile(path="file name", command="shell command")` definitions. **`fbt`** will run the specified command for each file in the list.
|
||||
* **fap_extbuild**: provides support for parts of application sources to be built by external tools. Contains a list of `ExtFile(path="file name", command="shell command")` definitions. **`fbt`** will run the specified command for each file in the list.
|
||||
Note that commands are executed at the firmware root folder's root, and all intermediate files must be placed in a application's temporary build folder. For that, you can use pattern expansion by **`fbt`**: `${FAP_WORK_DIR}` will be replaced with the path to the application's temporary build folder, and `${FAP_SRC_DIR}` will be replaced with the path to the application's source folder. You can also use other variables defined internally by **`fbt`**.
|
||||
|
||||
Example for building an app from Rust sources:
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
[fbt](./fbt.md) has support for building applications as FAP files. FAP are essentially .elf executables with extra metadata and resources bundled in.
|
||||
|
||||
FAPs are built with `faps` **`fbt`** target. They can also be deployed to `dist` folder with `plugin_dist` **`fbt`** target.
|
||||
FAPs are built with `faps` target. They can also be deployed to `dist` folder with `fap_dist` target.
|
||||
|
||||
FAPs do not depend on being run on a specific firmware version. Compatibility is determined by the FAP's metadata, which includes the required [API version](#api-versioning).
|
||||
|
||||
@@ -15,7 +15,7 @@ To build your application as a FAP, just create a folder with your app's source
|
||||
|
||||
* To build your application, run `./fbt fap_{APPID}`, where APPID is your application's ID in its manifest.
|
||||
* To build your app, then upload it over USB & run it on Flipper, use `./fbt launch_app APPSRC=applications/path/to/app`. This command is configured in default [VSCode profile](../.vscode/ReadMe.md) as "Launch App on Flipper" build action (Ctrl+Shift+B menu).
|
||||
* To build all FAPs, run `./fbt plugin_dist`.
|
||||
* To build all FAPs, run `./fbt faps` or `./fbt fap_dist`.
|
||||
|
||||
|
||||
## FAP assets
|
||||
|
@@ -43,7 +43,7 @@ To run cleanup (think of `make clean`) for specified targets, add `-c` option.
|
||||
### High-level (what you most likely need)
|
||||
|
||||
- `fw_dist` - build & publish firmware to `dist` folder. This is a default target, when no other are specified
|
||||
- `plugin_dist` - build external plugins & publish to `dist` folder
|
||||
- `fap_dist` - build external plugins & publish to `dist` folder
|
||||
- `updater_package`, `updater_minpackage` - build self-update package. Minimal version only inclues firmware's DFU file; full version also includes radio stack & resources for SD card
|
||||
- `copro_dist` - bundle Core2 FUS+stack binaries for qFlipper
|
||||
- `flash` - flash attached device with OpenOCD over ST-Link
|
||||
@@ -56,6 +56,7 @@ To run cleanup (think of `make clean`) for specified targets, add `-c` option.
|
||||
- `get_blackmagic` - output blackmagic address in gdb remote format. Useful for IDE integration
|
||||
- `lint`, `format` - run clang-format on C source code to check and reformat it according to `.clang-format` specs
|
||||
- `lint_py`, `format_py` - run [black](https://black.readthedocs.io/en/stable/index.html) on Python source code, build system files & application manifests
|
||||
- `cli` - start Flipper CLI session over USB
|
||||
|
||||
### Firmware targets
|
||||
|
||||
|
Reference in New Issue
Block a user