Skip to content

Loading builds...

Changes

#2644 (Mar 10, 2026, 10:05:07 AM)

Makefile: on clean: remove dfu & flash .o & .d files

Change-Id: I9705f15c41ea0df8b8486b6326264db36f797dd8
laforge at

#2643 (Mar 10, 2026, 9:45:07 AM)

dfu: make dfu_state/dfu_status volatile

Both variable might be changed from IRQ and from main loop.

Change-Id: I7ad5255064917c203cebe5ab54a5d457baa2f5ed
lynxis at
dfu: mainloop: work on a local copy of dfu_state

Prevent race conditions between main loop and irq.
Copy at the start of the loop the dfu state and work on it.

Change-Id: Ic146c8fa5ba25425cf785bae66f9c99b0faab944
lynxis at
dfu: irq: replace if(states) with a switch case

Improves the overview. No functional change.

Change-Id: Ic32fe16dff4b7bb933ec62e36a9c7c7829aece1b
lynxis at
dfu: usb_dfu() convert if() intos switch/case

Improves the overview of the handled states.
No functional change.

Change-Id: Ie0abcdb51612598e77cacf7772276919ded17d5a
lynxis at

#2628 (Feb 24, 2026, 7:25:07 PM)

dfu: fix bState transition/reporting order as per dfu spec

DFU spec wants the next state, not the current one.

Change-Id: I06519c73cdb0b082002632da9cfe7436c63f52b0
ewild at
dfu: make resp buffer static

USB dma uses a buffer depending on alignment, so this can be safe,
but it should not be depend on reading and knowing the asf source code...

Change-Id: I2f9336143190350817e6352b00751b35b1600b62
ewild at
dfu: do not reset itself

In theory USB_DFU_ATTRIBUTES_WILL_DETACH is nice, in practice
not so much, because usb uses control transfers and "waiting" for
status response completion after finishing flashing is cumbersome.
There is basically no advantage if the device resets itself, and
just waiting for the host to do it like most DFU devices
(and what the BL used to do in the beginning) works
around the status issue.

Right now dfu-utils is unhappy because the final get status never is answered because the response is submitted by the device, but the self reset immediately afterwards is faster, so it never arrives at the host.

Change-Id: I1b9e48470083597640918a8a1126922b31150153
benispeter at