Recreated "DFU loader for XMOS USB AUDIO devices" document from PDF (original source could not be found)

This commit is contained in:
Sam Chesney
2014-06-05 14:42:11 +01:00
parent 674669a0de
commit abddcd4cc1
6 changed files with 170 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
Building the loaderOSX
=======================
The loader is compiled using libusb, the code for the loader is contained in the
file xmosdfu.cpp
To build the loader
-------------------
``g++ -m32 -o xmosdfu -I. xmosdfu.cpp libusb-1.0.0.dylib``

View File

@@ -0,0 +1,26 @@
Installing the factory image to the device
==========================================
To rebuild the USB audio firmware with the DFU device interface edit the
device_defines.h file and comment in the #define DFU line.
Use the XMOS Development Tools to run the command:
``xflash --boot-partition-size 0x20000 usb_audio.xe``
This programs the factory default firmware image into the flash device. This
will add a new interface to the device that supports the DFU mechanism.
To use the firmware upgrade mechanism you need to build a firmware upgrade
image:
#. Edit the ``device_defines.h`` file and change the BCD_DEVICE number for the
application.
#. Rebuild the application.
To generate the firmware upgrade image run the following command:
``xflash --upgrade 1 usb_audio.xe 0x20000 -o new_firmware.bin``
You should now have the file ``usb_audio_class1.bin`` which contains the
firmware for the audio class 1 implementation.

10
module_dfu/doc/index.rst Normal file
View File

@@ -0,0 +1,10 @@
DFU loader for XMOS USB AUDIO devices
=====================================
.. toctree::
Introduction <introduction>
Installing the factory image to the device <factory_image>
Using the DFU loaderWindows <thesycon_dfu>
Using the DFU loaderOSX <xmos_dfu>
Building the loaderOSX <building_xmos_dfu>

View File

@@ -0,0 +1,22 @@
Introduction
============
The DFU loader is a flash device firmware upgrade mechanism. To work correctly
your development board must contain the latest DFU enabled firmware.
The firmware upgrade for XMOS USB devices implementation uses the USB standard
DFU device class mechanism and is based on the following specification:
http://www.usb.org/developers/devclass_docs/usbdfu10.pdf
Supported functionality:
- Download of new firmware to device
- Upload of existing firmware from device
- Revert device back to factory image
- Automatic reboot of device on firmware upgrade
You must use XMOS Development Tools version 10.4.1 (or later) with firmware
interface.
The DFU device on Windows requires the Theyscon USB Audio 2.0 Windows driver
version 1.13.3.0 or later.

View File

@@ -0,0 +1,57 @@
Using the DFU loaderWindows
============================
Set up the image loader
-----------------------
#. Open the DFU Console Window from the Thesycon folder on the Start menu
(Program Files>Thesycon>USB Audio 2.0 Class Driver EVAL>DFU console).
#. change directory to where the files have been extracted.
To check the device has been detected, run the following command in the DFU
console:
``dfucons info``
The console shows the DFU devices that have been detected.
Download new firmware
---------------------
To program the new firmware run the command:
``dfucons download usb_audio_class1.bin``
Note that once this is done the device restarts as an XMOS audio 1.0 device. The
original factory default audio 2 application is still present but the device is
now running the upgraded application firmware.
You can check the device has been updated by running the command:
``dfucons info``
This will display the device revision.
Uploading existing firmware from the device
-------------------------------------------
You can retrieve a firmware image from the device, providing an upgrade image is
present.
Run the command:
``dfucons upload currentfirmware.bin``
The file ``currentfirmware.bin`` contains the latest upgrade image. This file is
an exact copy of the data from the flash and can be downloaded to the device
again to test.
Reverting firmware to factory image
-----------------------------------
To revert the device back to its factory (i.e XFLASH) installed state from the
new firmware, run the command:
``dfucons revertfactory``
The device will now only contain the factory firmware and will be running as an
audio 2 device again.

View File

@@ -0,0 +1,45 @@
Using the DFU loaderOSX
========================
Set up the image loader
-----------------------
#. Open a terminal
#. Change directory to where the files have been extracted
#. Source the ``setup.sh`` script
Download new firmware
---------------------
To program the new firmware run the command:
``./xmosdfu --download usb_audio_class1.bin``
Note that once this is done the device restarts as an XMOS audio 1.0 device. The
original factory default audio 2 application is still present but the device is
now running the upgraded application firmware.
Uploading existing firmware from the device
-------------------------------------------
You can retrieve a firmware image from the device, providing an upgrade image is
present.
Run the command:
``./xmosdfu --upload currentfirmware.bin``
The file ``currentfirmware.bin`` contains the latest upgrade image. This file is
an exact copy of the data from the flash and can be downloaded to the device
again to test.
Reverting firmware to factory image
-----------------------------------
To revert the device back to its factory (i.e XFLASH) installed state from the
new firmware, run the command:
``./xmosdfu --revertfactory``
The device will now only contain the factory firmware and will be running as an
audio 2 device again.