|
1 | | -.. _Up_Squared_Audio_DSP: |
| 1 | +.. _intel_adsp_cavs15: |
2 | 2 |
|
3 | | -Up Squared Audio DSP |
4 | | -#################### |
| 3 | +Intel ADSP CAVS 1.5 |
| 4 | +################### |
5 | 5 |
|
6 | | -System Requirements |
7 | | -******************* |
8 | | - |
9 | | -Prerequisites |
10 | | -============= |
11 | | - |
12 | | -The Zephyr SDK 0.11 or higher is required. |
13 | | - |
14 | | -Since firmware binary signing for Audio DSP is mandatory on Intel products |
15 | | -form Skylake onwards the signing tool and key are needed. |
16 | | - |
17 | | -``up_squared`` board is running Linux with `SOF Diagnostic Driver`_ built and |
18 | | -loaded. |
19 | | - |
20 | | -Signing tool |
21 | | ------------- |
| 6 | +Overview |
| 7 | +******** |
22 | 8 |
|
23 | | -rimage is Audio DSP firmware image creation and signing tool. The tool is used |
24 | | -by `Sound Open Firmware`_ to generate binary firmware signed images. |
| 9 | +This board configuration is used to run Zephyr on the Intel CAVS 1.5 Audio DSP. |
| 10 | +This configuration is present, for example, on Intel `Apollo Lake`_ microprocessors. |
| 11 | +Refer to :ref:`intel_adsp_generic` for more details on Intel ADSP ACE and CAVS. |
25 | 12 |
|
26 | | -For the building instructions refer to `rimage Build Instructions`_. |
27 | | - |
28 | | -Signing keys |
29 | | ------------- |
30 | | - |
31 | | -The key used is Intel Open Source Technology Center (OTC) community key. |
32 | | -It can be freely used by anyone and intended for firmware developers. |
33 | | -Please download and store private key from the location: |
34 | | -https://github.com/thesofproject/sof/blob/master/keys/otc_private_key.pem |
| 13 | +System requirements |
| 14 | +******************* |
35 | 15 |
|
36 | | -For more information about keys refer to `rimage keys`_. |
| 16 | +Xtensa Toolchain |
| 17 | +---------------- |
37 | 18 |
|
38 | | -Setup up_squared board |
39 | | ----------------------- |
| 19 | +If you choose to build with the Xtensa toolchain instead of the Zephyr SDK, set |
| 20 | +the following environment variables specific to the board in addition to the |
| 21 | +Xtensa toolchain environment variables listed in :ref:`intel_adsp_generic`. |
40 | 22 |
|
41 | | -To setup Linux on ``up_squared`` board refer to |
42 | | -`Getting Started with Ubuntu Core on an UP Squared Board`_. |
| 23 | +.. code-block:: shell |
43 | 24 |
|
44 | | -After installing Linux build and install `SOF Diagnostic Driver`_. |
| 25 | + export TOOLCHAIN_VER=RG-2017.8-linux |
| 26 | + export XTENSA_CORE=X4H3I16w2D48w3a_2017_8 |
45 | 27 |
|
46 | 28 | Programming and Debugging |
47 | 29 | ************************* |
48 | 30 |
|
49 | | -Build Zephyr application |
50 | | -======================== |
51 | | - |
52 | | -Applications can be build in the usual way (see :ref:`build_an_application` |
53 | | -for more details). The only additional step required is signing. For example, |
54 | | -for building ``hello_world`` application following steps are needed. |
55 | | - |
56 | | -#. Building Zephyr application ``hello_world`` |
57 | | - |
58 | | - .. zephyr-app-commands:: |
59 | | - :zephyr-app: samples/hello_world |
60 | | - :board: intel_adsp_cavs15 |
61 | | - :goals: build |
62 | | - |
63 | | -#. Sign and create firmware image |
64 | | - |
65 | | - .. code-block:: console |
66 | | -
|
67 | | - west sign -t rimage -- -k <path to otc_private_key.pem> |
68 | | -
|
69 | | -Loading image to Audio DSP |
70 | | -========================== |
71 | | - |
72 | | -`SOF Diagnostic Driver`_ provide interface for firmware loading. Python tools |
73 | | -in the board support directory use the interface to load firmware to ``ADSP``. |
74 | | - |
75 | | -Assume that the up_squared board's host name is ``cavs15`` (It also can be an |
76 | | -ip address), and the user account is ``user``. Then copy the python tool to the |
77 | | -``up_squared`` board from your build environment:: |
78 | | - |
79 | | - $ scp boards/xtensa/intel_adsp/tools/cavstool.py user@cavs15: |
80 | | - $ scp boards/xtensa/intel_adsp/tools/remote-fw-service.py user@cavs15: |
81 | | - |
82 | | - |
83 | | -Note that the ``/dev/hda`` device file created by the diagnostic driver must |
84 | | -be readable and writable by the process. So we simply by running the |
85 | | -loader script as root: |
86 | | - |
87 | | -.. code-block:: console |
88 | | -
|
89 | | - cavs15$ sudo ./remote-fw-service.py |
90 | | -
|
91 | | -Cavstool_server.py is a daemon which accepts a firmware image from a remote host |
92 | | -and loads it into the ADSP. After successful firmware download, the daemon also |
93 | | -sends any log messages or output back to the client. |
94 | | - |
95 | | -Running and Debugging |
96 | | -===================== |
97 | | - |
98 | | -While the python script is running on ``up_squared`` board, you can start load |
99 | | -image and run the application by: |
100 | | - |
101 | | -.. code-block:: console |
102 | | -
|
103 | | - west flash --remote-host cavs15 |
104 | | -
|
105 | | -or |
106 | | - |
107 | | -.. code-block:: console |
108 | | -
|
109 | | - west flash --remote-host 192.168.x.x --pty |
110 | | -
|
111 | | -Then you can see the log message immediately: |
112 | | - |
113 | | -.. code-block:: console |
114 | | -
|
115 | | - Hello World! intel_adsp_cavs15 |
116 | | -
|
117 | | -
|
118 | | -Integration Testing With Twister |
119 | | -================================ |
120 | | - |
121 | | -The ADSP hardware also has integration for testing using the twister |
122 | | -tool. The ``cavstool_client.py`` script can be used as the |
123 | | -``--device-serial-pty`` handler, and the west flash script should take |
124 | | -a path to the same key file used above. |
125 | | - |
126 | | -.. code-block:: console |
127 | | -
|
128 | | - ./scripts/twister --device-testing -p intel_adsp_cavs15 \ |
129 | | - --device-serial-pty $ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/cavstool_client.py,myboard.local,-l \ |
130 | | - --west-flash "--remote-host=myboard.local" |
131 | | -
|
132 | | -And if you install the SOF software stack in rather than the default path, |
133 | | -you also can specify the location of the rimage tool, signing key and the |
134 | | -toml config, for example: |
135 | | - |
136 | | -.. code-block:: console |
137 | | -
|
138 | | - ./scripts/twister --device-testing -p intel_adsp_cavs15 \ |
139 | | - --device-serial-pty $ZEPHYR_BASE/soc/xtensa/intel_adsp/tools/cavstool_client.py,myboard.local,-l \ |
140 | | - --west-flash "--remote-host=myboard.local,\ |
141 | | - --rimage-tool=/path/to/rimage_tool,\ |
142 | | - --key=/path/to/otc_private_key.pem,\ |
143 | | - --config-dir=/path/to/config_dir" |
144 | | -
|
145 | | -
|
146 | | -.. target-notes:: |
147 | | - |
148 | | -.. _Getting Started with Ubuntu Core on an UP Squared Board: https://software.intel.com/en-us/articles/getting-started-with-ubuntu-core-on-an-up-squared-board |
149 | | - |
150 | | -.. _SOF Diagnostic Driver: https://github.com/thesofproject/sof-diagnostic-driver |
151 | | - |
152 | | -.. _Sound Open Firmware: https://github.com/thesofproject/sof |
153 | | - |
154 | | -.. _rimage Build Instructions: https://github.com/thesofproject/rimage#building |
| 31 | +Refer to :ref:`intel_adsp_generic` for generic instructions on programming and |
| 32 | +debugging applicable to all CAVS and ACE platforms. |
155 | 33 |
|
156 | | -.. _rimage keys: https://github.com/thesofproject/sof/tree/master/rimage/keys |
| 34 | +.. _Apollo Lake: https://www.intel.com/content/www/us/en/products/platforms/details/apollo-lake.html |
0 commit comments