Up Squared Audio DSP

System Requirements

Prerequisites

The Zephyr SDK 0.11 or higher is required.

Since firmware binary signing for Audio DSP is mandatory on Intel products form Skylake onwards the signing tool and key are needed.

up_squared board is running Linux with SOF Diagnostic Driver 2 built and loaded.

Signing tool

rimage is Audio DSP firmware image creation and signing tool. The tool is used by Sound Open Firmware 3 to generate binary firmware signed images.

For the building instructions refer to rimage Build Instructions 4.

Signing keys

The key used is Intel Open Source Technology Center (OTC) community key. It can be freely used by anyone and intended for firmware developers. Please download and store private key from the location: https://github.com/thesofproject/sof/blob/master/rimage/keys/otc_private_key.pem

For more information about keys refer to rimage keys 5.

Setup up_squared board

To setup Linux on up_squared board refer to Getting Started with Ubuntu Core on an UP Squared Board 1.

After installing Linux build and install SOF Diagnostic Driver 2.

Programming and Debugging

Build Zephyr application

Applications can be build in the usual way (see Building an Application for more details). The only additional step required is signing. For example, for building hello_world application following steps are needed.

  1. Building Zephyr application hello_world

    # From the root of the zephyr repository
    west build -b intel_adsp_cavs15 samples/hello_world
    
  2. Sign and create firmware image

    west sign -t rimage -- -k <path to otc_private_key.pem>
    

Loading image to Audio DSP

SOF Diagnostic Driver 2 provide interface for firmware loading. Python tools in the board support directory use the interface to load firmware to ADSP.

$ sudo boards/xtensa/intel_adsp_cavs15/tools/fw_loader.py -f <path to zephyr.ri>

Debugging

The only way to debug application is using logging. Logging and ADSP logging backend needs to be enabled in the application configuration.

ADSP logging backend writes logs to the ring buffer in the shared memory. Python tools are using SOF Diagnostic Driver 2 interface to get logs.

$ sudo boards/xtensa/intel_adsp_cavs15/tools/dump_trace.py
Open HDA device: /dev/hda
0 : Hello World! intel_adsp_cavs15
1

https://software.intel.com/en-us/articles/getting-started-with-ubuntu-core-on-an-up-squared-board

2(1,2,3,4)

https://github.com/thesofproject/sof-diagnostic-driver

3

https://github.com/thesofproject/sof

4

https://github.com/thesofproject/rimage#building

5

https://github.com/thesofproject/sof/tree/master/rimage/keys