Is it possible to change the Auto-dfu so that it does it’s thing after the compilation instead of before?
If for example the device doesn’t DFU then the compile portion doesn’t start. Or if the device has an external WDT then the time taken to compile might go over the WDT time and get reset before flashing.
How long is your WDT period?
If you perform a full update (device OS plus application - which may take considerably longer) having the WDT kick in mid process could be devastating to the device.
However, I'd back the proposal
If the build failed there would also be no need to enter DFU Mode at all but keep the device running.
the WDT doesn’t kick in for around 80seconds of not being kicked. And with a duff application the device will go back to safemode anyway so not too devastating, as for a full os update. Its something we are concerned about but with the “Software WDT” not being 100% reliable, we need an external WDT and will risk it. However with OTA updates, the application is still running untill downloaded, so not really an issue.
Is it possible to change the Auto-dfu so that it does it’s thing after the compilation instead of before?
no promises but i'll see what i can do
in the meantime, you could instead try running the steps independently:
run the compile task - e.g Particle: Compile application (local)
run the flash task - e.g. Particle: Flash application (local)
this will cause step 2 to complete much faster since no additional compilation will be required (assuming of course you use companion tasks and haven't modified your source or project's device settings).
the WDT doesn’t kick in for around 80seconds
even with smarter dfu-mode handling, that seems likely to be tripped from time to time.