xmos / sln_voice

XCORE-VOICE Solution
Other
9 stars 20 forks source link

Implement USB DFU #10

Closed keithm-xmos closed 1 year ago

keithm-xmos commented 3 years ago

Implement DFU over USB in the STLP voice application.

mbanth commented 2 years ago

@keithm-xmos, what help do you want/need for this issue? It may be possible to share portions of the DFU code for sln_voice and xvf3800.

keithm-xmos commented 2 years ago

In order for DFU to work nicely in an RTOS application, we have requested a change to the bootloader. In a nutshell, the bootloader will support a user defined function for reading an image from flash. The bootloader will load images from flash as normal if this user defined function is not provided - keeping it backwards compatible. It is not clear if or when this bootloader enhancement will be implemented.

Alternatively, now that we will soon have a new QSPI flash library distributed with the XTC tools, we plan to migrate the RTOS driver to use this library instead of the qspi_io library in fwk_io. The desire is to consolidate to a single QSPI library - the one that comes with the tools. Before this can happen we need to scope out the new library to see if it is a (near) drop in replacement or if more work is needed.

The consolidation to a single QSPI library is a desired enhancement regardless of how we approach DFU in an RTOS application. However, consolidation is a prerequisite if we do not get the requested changes to the bootloader. Also a requirement if we do not get the requested changes to the bootloader is a low-level mechanism to synchronize access to the new QSPI flash library. We will need to ensure that multiple clients are not reading/writing with the library at the same time. This could be an issue if one or more clients are bypassing the RTOS flash driver.

keithm-xmos commented 2 years ago

Requires https://github.com/xmos/xcore_sdk/issues/501 and https://github.com/xmos/fwk_rtos/issues/46