![]() |
BSB Developer Docs
|
This page covers the common flows for building, flashing and working with the firmware in an IDE. For an in-depth reference of the build system and its targets, see Build System.
Ensure there is enough free disk space and clone the source code:
Run the following to generate the project configuration in the .vscode folder:
Then open the workspace file (.vscode/fbt.code-workspace) in VS Code (File > Open Workspace from File...) and pick a build task from the Ctrl+Shift+B menu. See Build System for additional options, such as selecting a language server.
To build the firmware, run:
The build output is placed in the dist/ folder. See Build System for hardware target selection and other build options.
With the device connected via USB and its virtual ethernet interface initialised, the firmware can be flashed with:
For the available presets and component flags, see Flashing over USB.
The SWD interface is not accessible on an assembled device — it has to be partially disassembled and the BSB debug board attached. Connect an ST-Link or a CMSIS-DAP compatible debugger to the SWD pins on the debug board and run:
Resource files are required for correct firmware operation. They are included by default when flashing with ./fbt flash_usb, so this step is only needed when the firmware was flashed separately (e.g. via a debugger).
To build and upload the resources, run
while the device is connected via USB and its virtual ethernet interface is initialised.