Commit Graph

13 Commits

Author SHA1 Message Date
Kevin Redon b842918d16 set initial DFU state to ERROR if application is corrupt
as specified in DFU standard

Change-Id: Icd503a2d19f829eb43a83c28b526b73d595640f0
2019-02-14 18:59:39 +01:00
Kevin Redon 26037ab23b remove OCTSIM in USB ID
this bootloader is initiated and meant for the sysmo-OCTSIM, but
it can be applied for other SAM E5x/D5x boards.
Thus we remove the OCTSIM name an just use the more generic
bootloader name.

Change-Id: Icc46f0d8b4b649fd00b5c6cea5bad91a93891f14
2019-01-31 18:02:10 +01:00
Kevin Redon dfa652604c use reserved bootloader get application start
the reserved bootloader size is set in the NVM user configuration
and allows to know the application start address (e.g. after the
bootloader)

Change-Id: I9dda27d6401caabb4a6470aa3fe9691f63097136
2019-01-16 18:41:23 +01:00
Kevin Redon 37409534d7 enable flashing by providing real downloaded data length
Change-Id: I6f16170a4b41a70d89954e2c4a841efc67a26786
2019-01-16 18:41:23 +01:00
Kevin Redon b140e502aa removed unused USB CDC stack
Change-Id: Ib1735ad4add9278be9a1fb730752377de99c4f4b
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 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 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 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