This was the FS issue I saw when debugging wifi and only happens
when the first write is to sector 0. It causes issues because it
blanks all of sector 0 after the first block.
Fixes#3133
* Fix flash writes that don't end on a sector boundary. Fixes#2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.