Project

General

Profile

Firmware » History » Revision 7

Revision 6 (horiz0n, 02/19/2016 10:50 PM) → Revision 7/8 (horiz0n, 02/19/2016 10:51 PM)

{{>toc}} 

 h1. [[OsmoSDR]] [[PageOutline]] 
 = OsmoSDR Firmware 


 = 

 The [[OsmoSDR]] OsmoSDR firmware is written in C language.    It uses a modified version of the Atmel-provided sam3u drivers (at91lib). 

 There are multiple firmware images available, providing different interfaces towards the host PC. 


 h2. 

 == Firmware Variants 


 == 

 There are multiple firmware images available, providing different interfaces towards the host PC. 


 h3. 

 === standard (usb-audio) firmware 


 === 

 The standard firmware image exports a composite USB device with two interfaces: 
 
  * A USB standard audio class device (for actual received baseband samples) 
 
  * A USB CDC-ACM serial device (for hardware control like tuning) 

 The audio class device offers (at least) two sample rates: 
 
  * a high sample rate (1/2/4 MHz) for USB Audio drivers like the ALSA driver included in mainline Linux 
 
  * a low sample rate of 96 kHz (possibly 128 kHz) to work with the poor USB Audio driver of MS Windows OSs 


 h2. 

 == Firmware flashing 


 == 

 There are two methods of flashing the firmware: 


 h3. 

 === DFU firmware flashing 


 === 

 This is currently being worked on.    FIXME. 


 h3. 

 === SAM-BA / rum-ba firmware flashing 


 === 

 The sam3u contains a ROM based recovery boot loader called "SAM-BA".    To activate this loader, 
 you have to 
 
  * power down the device 
 
  * close the ERASE jumper 
 
  * power up the device (1 second is sufficient) 
 
  * power down the device 
 
  * remove the ERASE jumper 
 
  * power up the device again 

 You will now the SAM-BA enumerate on USB using the following parameters: 
 
  * Vendor ID 0x03eb 
 
  * Product ID 0x6124 
 
  * String: "Atmel Corp. at91sam SAMBA bootloader" 

 The SAM-BA loader exports a CDC-ACM (virtual serial port) interface. 

 <pre> 
 <pre> 
 You can now use either Atmel's original host PC software (large, complex) or the {{{rum-ba}}} program provided by OsmoSDR to flash the full firmware image: 
 {{{ 
 $ ./rumba /dev/ttyACM0 flashmcu loader.bin 
 </pre> 


 h2. }}} 

 == Firmware building 


 == 

  * You first need to build and/or obtain a Cortex-M3 [[Toolchain]]. 
 [wiki:Toolchain]. 
  * Next, in addition to osmo-sdr.git you also need a clone of at91lib.git from git://git.gnumonks.org/at91lib.git which needs to be 
    on the same level as osmo-sdr.git, i.e. one common parent directory between at91lib and osmo-sdr 


 h2. 

 == Flashing the Firmware 


 == 

 Flash the application partition 
 <pre> 
 {{{ 
 dfu-util -d 16c0:0763 -i0 -a0 -D firmware/osmosdr-project/bin/osmo-sdr-test-osmo-sdr-at91sam3u4-dfu.bin 
 </pre> 

 }}} 

 Convert FPGA image: 
 <pre> 
 {{{ 
 utils/vmelinearize$ ./vmelin ../../fpga/hw-v2/deploy/usbrx_algo.vme ../../fpga/hw-v2/deploy/usbrx_data.vme > /tmp/fpga.out 
 </pre> 

 }}} 

 Flash the FPGA partition 
 <pre> 
 {{{ 
 dfu-util -d 16c0:0763 -i0 -a3 -D /tmp/fpga.out 
 </pre> 
 }}} 
 ignore "Error during download" 



Add picture from clipboard (Maximum size: 48.8 MB)