Commit Graph

16 Commits

Author SHA1 Message Date
Kevin Redon 5ba20ae63b implement flashing-side of the DFU state machine
the USB-side state machine currently sets the length to 0,
preventing the actual flashing to be tested

Change-Id: I5ed9cc2a22ed5e41bb59a3ce3f21ab098cec48e7
2019-01-16 18:41:23 +01:00
Kevin Redon dd3269b421 restructure and complete the USB-side DFU state machine
the USB control request are now handled in separate function
depending on the direction (IN or OUT).
download and manifestation are handled.
numerous additional state machine fixes are included.

Change-Id: I5237393c2789fdeddca2182da25ef417a2e71216
2019-01-16 18:41:23 +01:00
Kevin Redon 9e94e7d7ca make USB descriptor available for the two state machines
this is required to know the DFU bmAttributes since they affect
the state machine

Change-Id: Ib3907423bb9e197f53ed4522e8a5789a3d29489e
2019-01-16 18:41:23 +01:00
Kevin Redon 2f8fcbbef6 declare variables so the main loop can read the data to be flashed provided by the USB stack
Change-Id: I092357aad95abef1a781be1ea77944f2ea523dab
2019-01-16 18:41:23 +01:00
Kevin Redon d25509abca add system LED initialisation
Change-Id: I79f1b769fc9dd7e1a972bacf0928ff46988f0e36
2019-01-16 18:40:31 +01:00
Kevin Redon 5c7d9805c2 add code to initialize flash
Change-Id: I2a208abb39a9da8796e2a4bcb803ce32686cb95f
2019-01-16 18:40:31 +01:00
Kevin Redon 9bebe583ae add flash ASF4 driver
this is imported from the Atmel Start website

Change-Id: I5eccb37da64c7def7b99418773d09b6d98664432
2019-01-16 18:40:31 +01:00
Kevin Redon 2257c6c32a add initial DFU class request handling
downloading is not supported yet, but the rest works

Change-Id: I4896d73602bb1b1001c1ce3af9b98e5173b45edf
2019-01-16 18:40:31 +01:00
Kevin Redon c976a85af4 add documentation and fix timeout value
Change-Id: Ia1d6ef4e4a5c9929aefd149c4e3eaf2dfe37fea8
2019-01-16 18:40:31 +01:00
Kevin Redon 74a8e3b615 fix USB enabling
Change-Id: I22cdd77648ac21490909423bf529fb31f30d6af0
2019-01-16 18:40:31 +01:00
Kevin Redon 56739ea049 ignore gdb history file
Change-Id: Ie3acf07ad7404fa3981baf65dab2a3ef416f9938
2019-01-16 18:40:31 +01:00
Kevin Redon efd55db9cc add USB DFU description
uses the USB CDC ACM example code as template to create a USB DFU
description according to USB DFU specification version 1.1

USB DFU stack is under LGPLv2.1 or later license

Change-Id: I7bd6cb46b734ffe8a51f2de7083b4f9e76d385e6
2019-01-16 18:39:41 +01:00
Kevin Redon df28f25276 ignore output files
Change-Id: Ia6c90711a67a9b1cafc7a6cc3b07aa769e8684d0
2019-01-16 18:29:20 +01:00
Max 77643ea6c3 Add git-review config
Change-Id: If28c2f4908f8df96b627fd42b7e122e559d9382a
2019-01-13 13:05:24 +00:00
Harald Welte 9079bc8bcd add contrib/jenkins.sh for build verification
Change-Id: I7ba3a711c3291ca3d61c8064e3e94ab2ae7563e3
2019-01-13 13:40:56 +01:00
Kevin Redon 8476b94ab0 use USB CDC Echo example project
this is the USB CDC Echo example project source code,
for the Microchip SAM E54 Xplained Pro development board,
based on the ATSAME54P20A micro-controller,
exported from the Atmel START website,
using the ASFv4 library.

Change-Id: Ic0e58e42d1a4076bc84a0a8d3509ec4b09a37f46
2019-01-09 15:33:36 +01:00