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 [26 Jun 2014 05:52] – [Export XML firmware file from SigmaStudio] Lars-Peter Clausenresources:tools-software:linux-software:sigmadsp_genfirmware [01 Jul 2014 09:48] (current) – remove outdated fw loader documentation Lars-Peter Clausen
Line 2: Line 2:
  
 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 ====== 
- 
-The source code for the SigmaDSP Firmware Utility can be downloaded from the wiki. 
- 
-{{:resources:tools-software:linux-software:sigma-firmware-util.tar.bz2|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//. 
- 
-<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target</wrap> 
-<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 ===== 
- 
-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. 
- 
-{{ :resources:tools-software:linux-software:sigma_dsp_link_download.png?direct&400 |}} 
- 
-2) Scroll down to the Capture window and locate the writes for "Program Data" and "Param". 
- 
-{{ :resources:tools-software:linux-software:sigma_dsp_export.png?direct&400 |}} 
- 
-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 
- 
-{{ :resources:tools-software:linux-software:sigma_dsp_export_save_as_raw.png?direct&400 |}} 
- 
-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. 
- 
-<WRAP box bggreen><wrap info>This specifies any shell prompt running on the target - |Generate firmware file</wrap> 
-<xterm> 
-> ./gen_firmware parameter.bin program.bin adau1761.bin 
-</xterm> 
-</WRAP> 
  
 ===== Export XML firmware file from SigmaStudio ===== ===== Export XML firmware file from SigmaStudio =====
Line 66: Line 20:
 ===== Generate the binary firmware file ===== ===== Generate the binary firmware file =====
  
-Currently the SigmaDSP Firmware Utility for Linux only runs on a Linux system. The next step is to copy the XML file from the previous instructions to a Linux machine.+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]]. 
 + 
 +<xterm> 
 +> wget %%https://raw.githubusercontent.com/analogdevicesinc/sigmadsp-genfirmware/master/sigmadsp_fwgen%% 
 +> chmod +x sigmadsp_fwgen 
 +</xterm> 
 + 
 +The next step is to copy the XML file from the previous instructions to a Linux machine. 
 + 
 +The fwgen utility expects at least 3 parameters. The 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. 
 + 
 +<xterm> 
 +> ./sigmadsp_fwgen design.xml 48000 adau1761.bin 
 +</xterm>
  
 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. 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.
Line 73: Line 40:
  
 <xterm> <xterm>
-> ./fwgen.py design_48000.xml 48000 design_32000.xml 32000 design_16000.xml 16000 ... ssm4329.bin+> ./sigmadsp_fwgen design_48000.xml 48000 design_32000.xml 32000 design_16000.xml 16000 ... adau1761.bin
 </xterm> </xterm>
  
 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. 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.1403754766.txt.gz · Last modified: 26 Jun 2014 05:52 by Lars-Peter Clausen