unleashed-firmware/documentation/HowToBuild.md

72 lines
1.9 KiB
Markdown
Raw Normal View History

2022-07-10 00:47:36 +00:00
# How to Build by yourself:
2022-08-14 03:25:32 +00:00
## Install required software
- Git - [Download](https://git-scm.com/downloads) for Windows, on Linux/Mac install via package manager (`brew`, `apt`, ...)
For development:
- Git
- VSCode
2022-07-10 00:47:36 +00:00
## Clone the Repository
You should clone with
```shell
2022-10-08 23:27:38 +00:00
$ git clone --recursive https://github.com/DarkFlippers/unleashed-firmware.git
2022-07-10 00:47:36 +00:00
```
2023-04-13 21:09:48 +00:00
## VSCode integration
`fbt` includes basic development environment configuration for VS Code. Run `./fbt vscode_dist` to deploy it. That will copy the initial environment configuration to the `.vscode` folder. After that, you can use that configuration by starting VS Code and choosing the firmware root folder in the "File > Open Folder" menu.
2022-07-10 00:47:36 +00:00
2022-08-14 03:25:32 +00:00
# Build on Linux/macOS
2022-07-10 00:47:36 +00:00
2022-08-14 03:25:32 +00:00
Check out `documentation/fbt.md` for details on building and flashing firmware.
2022-07-10 00:47:36 +00:00
2023-04-13 21:09:48 +00:00
### Compile plugin and run it on connected flipper
```sh
./fbt COMPACT=1 DEBUG=0 launch_app APPSRC=applications_user/yourplugin
```
2022-07-10 00:47:36 +00:00
### Compile everything for development
```sh
2023-04-13 21:09:48 +00:00
./fbt FIRMWARE_APP_SET=debug_pack updater_package
2022-07-10 00:47:36 +00:00
```
### Compile everything for release + get updater package to update from microSD card
```sh
2022-08-14 03:25:32 +00:00
./fbt COMPACT=1 DEBUG=0 updater_package
2022-07-10 00:47:36 +00:00
```
Check `dist/` for build outputs.
2023-04-13 21:09:48 +00:00
Use **`flipper-z-{target}-update-{suffix}.tgz`** to flash your device.
2022-07-10 00:47:36 +00:00
2022-08-14 03:25:32 +00:00
# Build on Windows
2022-07-10 00:47:36 +00:00
Check out `documentation/fbt.md` for details on building and flashing firmware.
2022-07-20 18:57:03 +00:00
### Compile everything for development
2022-07-10 00:47:36 +00:00
```sh
2023-04-13 21:09:48 +00:00
.\fbt.cmd FIRMWARE_APP_SET=debug_pack updater_package
2022-07-10 00:47:36 +00:00
```
2022-07-20 18:57:03 +00:00
### Compile everything for release + get updater package to update from microSD card
```sh
2022-08-14 03:25:32 +00:00
.\fbt.cmd COMPACT=1 DEBUG=0 updater_package
2022-07-20 18:57:03 +00:00
```
Check `dist/` for build outputs.
2023-04-13 21:09:48 +00:00
Use **`flipper-z-{target}-update-{suffix}.tgz`** to flash your device.
2022-07-20 18:57:03 +00:00
2022-08-14 03:25:32 +00:00
If compilation fails, make sure all submodules are all initialized. Either clone with `--recursive` or use `git submodule update --init --recursive`.