I am currently experiencing intermittent M4 upload errors which I can produce using both the internal (flash: uploading input firmware failed) and external (UDOONeo M4 Sketch START failed: reboot system!) Arduino IDEs. By intermittent I mean that I can upload the sketch and it will work flawlessly, then click upload again and receive an error in the process. I'd say it's about 50/50 on whether it will work, although the M4 often locks up completely during the process, requiring me to delete m4last.fw and reboot to get it back up and running. I would post the code for reference, but it is quite extensive (6 files + 2 customized libraries) and I can't seem to boil it down to a version which fails consistently. For now I am really just looking for common pitfalls that lead to the M4 programming error, so I will document what my program is doing and what I've done so far to troubleshoot: My program extensively uses the gyro (via Wire1 I2C), Serial0 port, and 4 PWMs for ESC control. In each loop iteration, I am taking gyro readings and checking Serial0 for commands from an external receiver as well as periodically writing debugging data to Serial0. I am also using delay() and delayMicroseconds() within each loop iteration. Up until this point, I have tested every subsystem and it all works perfectly until I combine everything, and even then it is fully functional except for the intermittent upload errors. It seems like the combination of Wire1 and Serial0 is related to the cause of the problem, because I only have the issue when both are used in the program. I will mention that I had to completely rewrite the gyro library (FXAS21002C.cpp/h). See this thread: http://www.udoo.org/forum/threads/how-to-read-the-angle-from-the-gyro-fxas21002c.4777/#post-21348 for the reasons why. My issue is very similar to this one: http://www.udoo.org/forum/threads/m4-sketch-start-failed-reboot-system.5147/, except that I am not using an external timing library. Does this seem at all familiar to you guys? Has anyone successfully used both the onboard gyro and Serial0 read/write extensively in the same M4 program? Please let me know what you think and in the meantime I will keep trying to isolate the problem so I can post a minimal sketch. Thanks!