SDK Tools Architecture

From code to target

Three main steps will guide generation from code to target:

  1. Configuration files that manipulate the following tools (red)

  2. Tools that manipulate the source code: CMake, Kconfig, Device Tree (green)

  3. Tools that manipulate the target: Gapy, Openocd, gap_flasher (blue)

The build system CMake is also responsible on another level of linking together all the other tools.

../_images/sdk_architecture.png

As seen in the schema, source code and app configuration files (red) are ingested by CMake, Kconfig and the Device Tree.

  • KConfig allows configuring the build, choosing which device tree file will be used to generate BSP configurations.

  • Device tree itself takes .dts files as input, choose which to enable thanks to KConfig, and generates BSP base configuration files (in the for of c source code).

  • CMake finally takes the rules written in SDK, KConfig options and rules added by application to build the source code, using GCC.

  • This in turns produces a binary, via GCC, which is fed to Gapy.

Gapy then takes this binary, with optionally a custom flash layout (blue file in APP folder part) and generates a flash image. If the application is to be run on board, then Gapy will call and control Openocd (which is a JTAG bridge) to control the chip, and load the gap_flasher on board. Finally Gapy will feed the flash image to the gap flasher, via openocd and reset the board.

If application is to be run on GVSoC(simulator), Gapy will just generate flash images and run GVSoC using those. If no flash layout was provided, a default one is in the sdk, under utils/default_layouts/ folder

Target tools

In addition to previous tools, another set of tools is used to communicate with a running target. Those are:

  • gap_cli: A tool to communicate with a running target, via serial link (typically UART)

  • gap_profiler: A tool to extract information from a GVSoC run, mostly performance related

  • SSBL scripts: set of script to manipulate the SSBL, mostly for OTA via JTAG. To be noted that the CLI method is preferred.

Code generating tools

A few tools will also help generate code for the target. Those are:

  • Autotiler, which generates cluster code, based on provided graph to accelerate various processing

  • NNTool which controls Autotiler

  • SFUGen which generates C code configuring the SFU

  • Audio Framework which allows configuring SFUGen via a more user friendly interface.

This tools all work by generating C code, which will be added to the APP folder part of the drawing. And all have their CMake integrations. Those also have their own entry files, whose documentation can be found in their documentation under the Tools menu.