summaryrefslogtreecommitdiffstats
path: root/firmware/usb-dfu-project
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-01-15 21:17:27 +0100
committerHarald Welte <laforge@gnumonks.org>2012-01-15 21:17:27 +0100
commitffcfa587241414c662b1691f99ac02657b4977c8 (patch)
tree9ed7b1bd03e0b4ae1bdeff7bb90c00a895617775 /firmware/usb-dfu-project
parentd33031df671d2eb499978cc132135085cb2f35ad (diff)
add README for DFU
Diffstat (limited to 'firmware/usb-dfu-project')
-rw-r--r--firmware/usb-dfu-project/README54
1 files changed, 54 insertions, 0 deletions
diff --git a/firmware/usb-dfu-project/README b/firmware/usb-dfu-project/README
new file mode 100644
index 0000000..e1b588a
--- /dev/null
+++ b/firmware/usb-dfu-project/README
@@ -0,0 +1,54 @@
+This builds a USB DFU compatible boot loader for sam3u based boards.
+
+try
+ make BOARD=at91sam3u-ek
+or
+ make BOARD=osmo-sdr
+depending on your board type.
+
+The result is a < 16kBytes file in the ./bin/ subdirectory, which you can
+flash using JTAG, SAM-BA or rum-ba to the beginning of FLASH0.
+
+The DFU loader will check in early boot if the "DFU button" is set. If yes,
+it will enter the DFU mode, if not it continuest to boot directly the
+application.
+
+DFU button mappings:
+ at91sam3u-ek: Button marked PB-LEFT on the board
+ osmo-sdr: PA12 (can be closed with a jumper on the header)
+
+The regular application program can change from run-time to DFU mode quite
+easily. In fact, this happens using a standardized USB control request and is
+thus already implemented in the at91lib.git on git.gnumonks.org.
+
+You can switch the device from runtime into DFU mode using
+ dfu-util -e -d 0x16c0:0x0763
+
+After that, you can flash a new application image into the respective partition using
+ dfu-util -d 0x16c0:0x0763 -a0 -D ./bin/my-foobar-project-dfu.bin
+
+which should show something like:
+
+Opening DFU capable USB device... ID 16c0:0763
+Run-time device DFU version 0100
+Found DFU: [16c0:0763] devnum=0, cfg=1, intf=0, alt=0, name="OsmoSDR DFU Interface - Application Partition"
+[...]
+Starting download: [##################################################] finished!
+state(7) = dfuMANIFEST, status(0) = No error condition is present
+state(2) = dfuIDLE, status(0) = No error condition is present
+
+
+However, that application has to be built using a compatible linker script.
+
+building application firmware for DFU
+=====================================
+
+This needs a special linker script which is implemented as dfu.lds in the
+at91lib repository on git.gnumonks.org. You can then build your project to
+get linked to the "application partition" using
+ make dfu
+in the respective project directory
+
+There is a 'usb-fast-audi-source' project that can be used for demonstration
+purpose, it has 'make BOARD=osmo-sdr dfu' support
+