Description
I'd like to request special hooks to run recipes intended to minimize the wait time for uploading.
A hook similar to recipe.hooks.sketch.postbuild.NUMBER.pattern is needed, but only run if the build is for Upload. If the user clicked Verify, this recipe should not be run. The idea is to begin the process of a board rebooting as early as possible (but after the user's sketch it known to compile without errors), to allow time for USB enumeration and driver initialization while the build process continues.
Another build error hook would probably also be needed. If building any library, the core lib, or linking fails, the error hook would run a recipe which quits bootloader mode and causes the selected board to reboot to whatever code was previously programmed.
For the common case of relatively small sketches on native USB boards like MKR & Micro (and Teensy), the time for USB enumeration is often the a large chunk total time required to upload. If we could start that early in the build process, users could have a much quicker total upload experience.