This version is outdated by a newer approved version.DiffThis version (11 Apr 2013 14:45) was approved by Lars-Peter Clausen.The Previously approved version (02 Jan 2013 22:42) is available.Diff

This is an old revision of the document!

SigmaDSP Firmware Utility for Linux

The SigmaDSP Firmware Utility for Linux allows to generate a firmware file which can be loaded by the Linux SigmaDSP device drivers.

Download the SigmaDSP Firmware Utility

The source code for the SigmaDSP Firmware Utility can be downloaded from the wiki.

SigmaDSP Firmware Utility Download

Build and install the SigmaDSP Firmware Utility

Download the SigmaDSP Firmware Utility and extract the tar archive. To build the tool run make.

This specifies any shell prompt running on the target

> wget
> tar -xjf
> cd sigma-firmware-util
> make

Export raw firmware files from SigmaStudio

1) Open your design in SigmaStudio and click the “Link Compile Download” button for your Project. If you don't have device connected, you'll get an error message, but the following steps will work nonetheless.

2) Scroll down to the Capture window and locate the writes for “Program Data” and “Param”.

3) Now right-click each of them and select “Save as Raw > Address + Data …” from the popup menu. Save “Program Data” as program.bin and “Param” as parameter.bin

The saved files should be of exactly two bytes larger as the number in the “Bytes” column in the “Capture” view, if they are not something went wrong during the export process. E.g. in this example program.bin would be 237 bytes and parameter.bin would be 34 bytes.

Generate firmware

Copy the parameter.bin and program.bin files to the Linux system on which the gen_firmware tool is installed. Run the gen_firmware tool with the parameter.bin and program.bin as first and second argument, the third argument is the filename for the generated firmware. The firmware filename depends on the SigmaDSP audio chip used and can be found on documentation page of driver for the device.

This specifies any shell prompt running on the target - |Generate firmware file

> ./gen_firmware parameter.bin program.bin adau1761.bin

Load the firmware on the target system

In order to load firmware files the kernel needs to have firmware support (CONFIG_FW_LOADER) enabled.

Device Drivers  --->
    Generic Driver Options  --->
      <*> Userspace firmware loading support

The firmware can either be built into the kernel or can be installed on the root file systen. If both the firmware is built into the kernel and present on the root file system the firmware built into the kernel will always take precedence.

Built into the kernel

To built the firmware into the kernel copy the firmware file to the kernel's “firmware” folder. In your kernel config enable CONFIG_FIRMWARE_IN_KERNEL and set CONFIG_EXTRA_FIRMWARE to the name of the firmware file.

Device Drivers  --->
    Generic Driver Options  --->
      <*> Userspace firmware loading support
      [*]   Include in-kernel firmware blobs in kernel binary
      ("adau1761.bin") External firmware blobs to build into the kernel binary

Example .config:


Now rebuild the kernel image.

Installed on the root filesystem

It is also possible to install the firmware file on the root filesystem. This allows to update it without having to update the whole kernel. To install it on the root file system copy it to the “/lib/firmware/“ folder on the target system.

If the firmware is installed on the root filesystem the driver needs to be built as a module, otherwise it will try to load the firmware before the root filesystem has been mounted.

More information

resources/tools-software/linux-software/sigmadsp_genfirmware.1357242155.txt.gz · Last modified: 26 Jun 2014 05:35 (external edit)