From 2965b094f27bf62bc2252b94bb3ff2973af58e55 Mon Sep 17 00:00:00 2001 From: mossmann Date: Fri, 28 Sep 2012 15:51:08 -0700 Subject: [PATCH] Updated LPC43xx USB DFU Notes (markdown) --- LPC43xx-USB-DFU-Notes.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/LPC43xx-USB-DFU-Notes.md b/LPC43xx-USB-DFU-Notes.md index 1370344..5852ac8 100644 --- a/LPC43xx-USB-DFU-Notes.md +++ b/LPC43xx-USB-DFU-Notes.md @@ -15,3 +15,26 @@ Set the boot mode jumpers to USB0: BOOT[0:3] = "1010". Jumper setting takes effe ### USB DFU Utility http://dfu-util.gnumonks.org/ +## Usage Notes +DFU boot downloads to RAM then executes. Need a DFU suffix, but also a header + +> cp blinky.bin blinky.dfu + +Add DFU suffix and address prefix: +> /usr/local/bin/dfu-suffix --pid=0x000c --vid=0x1fc9 --did=0x0 -s 0 -a blinky.dfu + +Create header: +> echo "0000000: da ff 02 00 ff ff ff ff" | xxd -g1 -r > header.bin + +where the 02 means 2 x 512 + 16 bytes ... this should be automated. +Assume rounded up. + +Add header +> cat header.bin blinky.dfu > load.dfu + +Check for device: +> /usr/local/bin/dfu-util -l + +Download (I used the latest dfu-util from git) +> /usr/local/bin/dfu-util -d 1fc9:000c -a 0 -D load.dfu +