Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
RFC: Add support for DFU #9
Comments
hughsie
added a commit
to hughsie/m-stack
that referenced
this issue
Nov 12, 2015
hughsie
added a commit
to hughski/colorhug-plus-firmware
that referenced
this issue
Nov 12, 2015
|
I had a look at the code, and I think it looks great! I'll provide some more detailed comments in the coming days. Which MCUs are you currently targeting, and which userspace DFU software have you validated with? |
hughsie
commented
Nov 12, 2015
|
I'm currently using a 18F46J50 on a custom PCB although there's nothing intrinsically pic18 specific about it I think. I've got the J50 buried somewhere at home for the app examples which I'm guessing you'll want at some stage. I've validated the implementation with dfu-util, although I have opened up a feature request for a little extra feature that makes it easier to deploy on a device like the ColorHug+: https://sourceforge.net/p/dfu-util/tickets/10/ -- without it everything still works but you have to tell the user to do I'm also the guy behind fwupd, and I've just merged in a LGPLv2+ libdfu private implementation (which also does the extra step) which means we can deploy DFU updates on https://secure-lvfs.rhcloud.com/ -- libdfu is pretty new and as-yet-unreleased but it does support things like cancellation and loading files from remote locations. The fwupd code is here: hughsie/fwupd@a3acd7f All review very welcome, I'm also happy to "sign" the CLA and update the file headers with GPLv3/commercial if you send me it via email (info_at_hughski_dot_com). |
hughsie
commented
Nov 12, 2015
|
I forgot to say; I'm also happy to send you a ColorHug PCB for free if you want to test DFU on a real device with all the LVFS and fwupd integration, although I suspect you'll just want this working on the demo boards. |
egasimus
commented
Dec 10, 2015
|
+1 |
hughsie commentedNov 10, 2015
Hi,
My name is Richard Hughes and I'm the guy behind the ColorHug project. For a few hardware versions I've been using the Microchip USB stack which I've been getting increasingly frustrated with. In comparison, m-stack has been an absolute pleasure, and is available as GPL which makes producing easy-to-consume OpenHardware so much easier. Thanks!
For an upcoming project, I've decided to switch the bootloader to DFU (www.usb.org/developers/docs/devclass_docs/DFU_1.1.pdf) which allows me to support different OS's and use a standardised interface rather than the ColorHug-specific HID bootloader I'm using now.
I've implemented usb_dfu.c and am currently using it as a runtime-mode and DFU-mode state machine. I've implemented enough to make my device work work, but I wondered if you were interested in having this implementation as a pull request into m-stack? If so, I'll do all the extra work to write a demo program, use the same documentation style as the rest of your project, and add all the optional parts of the specification. If you're not interested (it is self contained, and doesn't need any changes to existing files in m-stack) that's fine too.
I'm also the guy behind the fwupd and LVFS projects, so I'm quite interested in making it easy for OpenHardware projects to deploy updates onto thousands of devices securely. I'm also a PIC guy, although there is also one person working on the arduino support for DFU as well. If I can get people using a standard protocol (e.g. I tell them "just use this file from m-stack") then I only have to write one USB update provider for fwupd, rather than the plethora of USB bootloaders there are now.
I'm also happy to sign the ICLA. If this sounds interesting to you I can put together a pull request for some initial review. Thanks.