I tried the SPI implementation, and unforunately it always hangs within a few seconds unless you're on a version of the SDK <= 2.15.x (it appears a similar issue has been reported before). I also tried the SPI pipeline flashing code linked above, and it doesn't work on the esp32 because the drivers used for Micron flash don't support extended addressing, and cannot write above 16MB - the pipeline DAP file with even a modest sized model is always going to be > 16MB.
I also tried UART, but there are a few issues that make it difficult to use in production:
- The supported baud rate is too low to transfer NN output, tracklet outputs (at least in busy scenes at reasonable frame rates), or image output.
- Reading from UART isn't working properly
- The low baud rate may cause the script to run slower than the input stages of the pipeline, and this isn't handled gracefully by the pipeline.
- I have to implement my own protocol for transferring the depthai objects over UART, because the script node doesn't allow us to add libraries.
Unless i'm mistaken, this basically means that people have to run a linux os just to have USB support for the depthai libraries, which isn't possible in a lot of embedded use cases.