Wiki

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
resources:tools-software:linux-software:sigmadsp_genfirmware [03 Jan 2013 20:42] – external edit resources:tools-software:linux-software:sigmadsp_genfirmware [01 Jul 2014 09:48] (current) – remove outdated fw loader documentation Lars-Peter Clausen
Line 3: Line 3:
 The SigmaDSP Firmware Utility for Linux allows to generate a firmware file which can be loaded by the Linux SigmaDSP device drivers. 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 ======+===== Export XML firmware file from SigmaStudio =====
  
-The source code for the SigmaDSP Firmware Utility can be downloaded from the wiki.+1) Open your design in SigmaStudio and click the "Link Compile Connect" button for your Project.
  
-{{:resources:tools-software:linux-software:sigma-firmware-util.tar.bz2|SigmaDSP Firmware Utility Download}}+{{:resources:tools-software:linux-software:sigmastudio_export1.png?500|}}
  
-===== Build and install the SigmaDSP Firmware Utility ======+2) Click the "Export System Files" button and select a location and a name for the exported system files.
  
-Download the SigmaDSP Firmware Utility and extract the tar archive. To build the tool run //make//.+{{:resources:tools-software:linux-software:sigmastudio_export2.png?500|}}
  
-<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> +{{:resources:tools-software:linux-software:sigmastudio_export3.png?500|}}
-<xterm><nowiki> +
-> wget http://wiki.analog.com/_media/resources/tools-software/linux-software/sigma-firmware-util.tar.bz2 +
-> tar -xjf sigma-firmware-util.tar.bz +
-> cd sigma-firmware-util +
-> make +
-</nowiki></xterm> +
-</WRAP>+
  
-===== Export raw firmware files from SigmaStudio =====+3) Open up the location where you stored the exported system files and look for a file with the .xml extension.
  
-1) Open your design in SigmaStudio and click the "Link Compile Download" button for your ProjectIf you don't have device connected, you'll get an error message, but the following steps will work nonetheless.+{{:resources:tools-software:linux-software:sigmastudio_export4.png?500|}} 
 +===== Generate the binary firmware file =====
  
-{{ :resources:tools-software:linux-software:sigma_dsp_link_download.png?direct&400 |}}+Currently the SigmaDSP Firmware Utility for Linux only runs on a Linux system and can be downloaded from [[https://raw.githubusercontent.com/analogdevicesinc/sigmadsp-genfirmware/master/sigmadsp_fwgen|here]].
  
-2) Scroll down to the Capture window and locate the writes for "Program Data" and "Param".+<xterm> 
 +> wget %%https://raw.githubusercontent.com/analogdevicesinc/sigmadsp-genfirmware/master/sigmadsp_fwgen%% 
 +> chmod +x sigmadsp_fwgen 
 +</xterm>
  
-{{ :resources:tools-software:linux-software:sigma_dsp_export.png?direct&400 |}}+The next step is to copy the XML file from the previous instructions to a Linux machine.
  
-3) Now right-click each of them and select "Save as Raw > Address + Data ..." from the popup menu. +The fwgen utility expects at least parametersThe first parameter is the filename of the XML file exported from SigmaStudio, the second parameter is the samplerate that the XML file was generated for and the third parameter is the output file name.
-Save "Program Data" as program.bin and "Param" as parameter.bin+
  
-{{ :resources:tools-software:linux-software:sigma_dsp_export_save_as_raw.png?direct&400 |}} +<xterm> 
- +./sigmadsp_fwgen design.xml 48000 adau1761.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 processE.g. in this example program.bin would be 237 bytes and parameter.bin would be 34 bytes.+</xterm>
  
-===== Generate firmware =====+If you want to support multiple samplerates with your firmware file you need to export a XML file for each samplerate. Each file needs to be specified on the command line followed by the samplerate it was generated for. The last parameter is the name of the output file.
  
-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.+E.g.
  
-<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target - |Generate firmware file</wrap> 
 <xterm> <xterm>
-> ./gen_firmware parameter.bin program.bin adau1761.bin+> ./sigmadsp_fwgen design_48000.xml 48000 design_32000.xml 32000 design_16000.xml 16000 ... adau1761.bin
 </xterm> </xterm>
-</WRAP> 
  
 +When such a firmware file with support for multiple samplerates is loaded the kernel driver will automatically take care of programming the correct design for the currently selected samplerate to the SigmaDSP.
 ===== Load the firmware on the target system ===== ===== Load the firmware on the target system =====
  
resources/tools-software/linux-software/sigmadsp_genfirmware.txt · Last modified: 01 Jul 2014 09:48 by Lars-Peter Clausen