Skip to content

Changes

Started 9 hr 12 min ago
Queued 7.1 sec
Took 10 sec on built-in
dfu: MANIFEST_SYNC: stay in MANIFEST_SYNC when manifestationIntolerant & completed

In theory a device which is manifestintolerant and completed the manifestation should
not reach MANIFEST_SYNC again.

Remove the state transistion to WAIT-RESET and stay in the current state and
wait for the main loop to change the state is safer.

Change-Id: I8c34a18e2336731126a8c01070d86e2547578e3d
lynxis at
dfu: protect USB_DFU_STATE_DFU_MANIFEST by a critical section

In the MANIFEST state, the IRQ won't move the state, but
to prevent incosistency between dfu_manifestation_complete &
dfu_state, use a critical section.

Change-Id: Idf5fb7d55b4051ba7e235dfa409a4de18a8f208c
lynxis at
Replace snprintf() to free 4 kb

Change-Id: Ide644648bda86d4ae77a6713d1e140a4b78ba835
lynxis at
dfu: download: flash the first block in manifest phase

To prevent half flashed applications, erase the first page
when dfu downloading starts and save the first block for later.
In manifest stage, flash the first block.
If the first 4 byte are 0xffffffff, the board won't boot
into application and go into the dfu bootloader.

Change-Id: I894f3ee71587ccb287e92d7025039954991c631f
lynxis at
dfu: flash: protect parsing of rc of flashing

Otherwise it is not guaranteed that both dfu_status and dfu_state
are in sync when the IRQ handler is running.

Change-Id: Ifc0d56d779ec31382855d6c367478104bc04e1e7
lynxis at
dfu: download: make variables between IRQ and main loop volatile

Both are access by IRQ and mainloop and are written by the IRQ handler.

Change-Id: Ic3dccd77eff7feb164f9f07047680eef3f7c2516
lynxis at
dfu: download: align download data buffer

The download data buffer is given to the usb stack.
Ensure the data buffer is dma capable to prevent an
additional memcpy() by the usb hal.

Change-Id: I01191a125aa62c2198e38d5e5fcd27d4e421c62e
lynxis at