Welcome to the complete codebase of the Frame hardware. For regular usage, check out the docs here.
The codebase is split into two sections. The nRF53 Firmware, and the FPGA RTL.
The nRF53 is designed to handle the overall system operation. It runs Lua, as well as handle Bluetooth networking, AI tasks and power management. The FPGA meanwhile, simply handles acceleration of the graphics and camera.
-
Ensure you have the ARM GCC Toolchain installed.
-
Ensure you have the nRF Command Line Tools installed.
-
Clone this repository along with its submodules:
git clone https://github.com/brilliantlabsAR/frame-codebase.git cd frame-codebase git submodule update --init
-
You should now be able to build the project by calling
make
from theframe-codebase
folder.make
-
Before flashing an nRF5340, you may need to unlock the chip first.
nrfjprog --recover
-
You should then be able to flash the device.
make flash
-
Open the project in VSCode.
There are some build tasks already configured within
.vscode/tasks.json
. Access them by pressingCtrl-Shift-P
(Cmd-Shift-P
on MacOS) →Tasks: Run Task
.Try running the
Build Firmware
task. The project should build normally.You many need to unlock the device by using the
Erase & Unlock nRF53
task before programming or debugging. -
To enable IntelliSense, be sure to select the correct compiler from within VSCode.
Ctrl-Shift-P
(Cmd-Shift-P
on MacOS) →C/C++: Select IntelliSense Configuration
→Use arm-none-eabi-gcc
. -
Install the Cortex-Debug extension for VSCode in order to enable debugging.
-
A debugging launch is already configured within
.vscode/launch.json
. Run theJ-Link
launch configuration from theRun and Debug
panel, or pressF5
. The project will automatically build and flash before launching. -
To monitor the logs, run the task
RTT Console
and ensure theJ-Link
launch configuration is running.
For quickly getting up and running, the accelerators which run on the FPGA are already pre-built and bundled within this repo. If you wish to modify the FPGA RTL, you will need to rebuild the fpga_application.h
file which contains the entire FPGA application.
-
Ensure you have the Yosys installed.
-
Ensure you have the Project Oxide installed.
-
Ensure you have the nextpnr installed.
-
MacOS users can do the above three steps in one using Homebrew.
brew install --HEAD siliconwitchery/oss-fpga/nextpnr-nexus
-
You should now be able to rebuild the project by calling
make
:make application_core/fpga_application.h