Welcome to the complete codebase of the Frame hardware. For regular usage, check out the docs here.
The codebase is split into three sections. The nRF52 Application, the nRF52 Bootloader, and the FPGA RTL.
The nRF52 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.
-
Open this repository in a Dev Container (you will need Docker installed) and initialize any submodules by running the below from
./:git submodule update --init --recursive
-
Run the following from
./:make release
-
Download the
./builddirectory to your local machine. -
Ensure you have nrfutil installed. You can follow the instructions at this link to install this library onto
$PATH. -
On your local machine with
nrfutilinstalled run:nrfutil device recover
-
On your local machine with
nrfutilinstalled in the parent directory where./buildis located run:nrfutil device program \ --options reset=RESET_HARD \ --firmware ./build/frame-firmware-*.hex -
The device should now be programmed and running the latest firmware and advertise its Bluetooth name as
Frame. You can use a utility such as nRF Connect for iPhone to locate the device and prove it is advertising.
-
Open the project in VSCode.
There are some build tasks already configured within
.vscode/tasks.json. Access them by pressingCtrl-Shift-P(Cmd-Shift-Pon MacOS) →Tasks: Run Task.Try running the
Buildtask. The project should build normally.You many need to unlock the device by using the
Erasetask before programming or debugging. -
To enable IntelliSense, be sure to select the correct compiler from within VSCode.
Ctrl-Shift-P(Cmd-Shift-Pon 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 theApplication (J-Link)launch configuration from theRun and Debugpanel, or pressF5. The project will automatically build and flash before launching. -
To monitor the logs, run the task
RTT Consoleand ensure theApplication (J-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 fpga/fpga_application.h
To understand more around how the FPGA RTL works. Check the documentation here.
