2022-07-10 03:47:36 +03:00
# How to Build by yourself:
2022-08-14 06:25:32 +03: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 03:47:36 +03:00
## Clone the Repository
You should clone with
```shell
2022-10-09 02:27:38 +03:00
$ git clone --recursive https://github.com/DarkFlippers/unleashed-firmware.git
2022-07-10 03:47:36 +03:00
```
2023-04-14 00:09:48 +03: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 03:47:36 +03:00
2022-08-14 06:25:32 +03:00
# Build on Linux/macOS
2022-07-10 03:47:36 +03:00
2022-08-14 06:25:32 +03:00
Check out `documentation/fbt.md` for details on building and flashing firmware.
2022-07-10 03:47:36 +03:00
2023-04-14 00:09:48 +03:00
### Compile plugin and run it on connected flipper
```sh
./fbt COMPACT=1 DEBUG=0 launch_app APPSRC=applications_user/yourplugin
```
2022-07-10 03:47:36 +03:00
### Compile everything for development
2023-07-06 01:20:09 +03:00
Edit this file to enable/disable Main apps that you need in DEBUG mode, flash space doesn't allows us to fit them all in DEBUG currently
- `applications/main/application.fam`
2022-07-10 03:47:36 +03:00
```sh
2023-04-14 00:09:48 +03:00
./fbt FIRMWARE_APP_SET=debug_pack updater_package
2022-07-10 03:47:36 +03:00
```
### Compile everything for release + get updater package to update from microSD card
```sh
2022-08-14 06:25:32 +03:00
./fbt COMPACT=1 DEBUG=0 updater_package
2022-07-10 03:47:36 +03:00
```
Check `dist/` for build outputs.
2023-04-14 00:09:48 +03:00
Use ** `flipper-z-{target}-update-{suffix}.tgz` ** to flash your device.
2022-07-10 03:47:36 +03:00
2022-08-14 06:25:32 +03:00
# Build on Windows
2022-07-10 03:47:36 +03:00
Check out `documentation/fbt.md` for details on building and flashing firmware.
2022-07-20 21:57:03 +03:00
### Compile everything for development
2022-07-10 03:47:36 +03:00
2023-07-06 01:20:09 +03:00
Edit this file to enable/disable Main apps that you need in DEBUG mode, flash space doesn't allows us to fit them all in DEBUG currently
- `applications/main/application.fam`
2022-07-10 03:47:36 +03:00
```sh
2023-04-18 04:38:18 +03:00
./fbt.cmd FIRMWARE_APP_SET=debug_pack updater_package
2022-07-10 03:47:36 +03:00
```
2022-07-20 21:57:03 +03:00
### Compile everything for release + get updater package to update from microSD card
```sh
2023-04-18 04:38:18 +03:00
./fbt.cmd COMPACT=1 DEBUG=0 updater_package
2022-07-20 21:57:03 +03:00
```
2023-04-18 15:03:09 +03:00
**You may need to change** `/` **to** `\` **in front of fbt command (Only for Windows)!**
2022-07-20 21:57:03 +03:00
Check `dist/` for build outputs.
2023-04-14 00:09:48 +03:00
Use ** `flipper-z-{target}-update-{suffix}.tgz` ** to flash your device.
2022-07-20 21:57:03 +03:00
2022-08-14 06:25:32 +03:00
If compilation fails, make sure all submodules are all initialized. Either clone with `--recursive` or use `git submodule update --init --recursive` .