Inspired by an example question before beta, can I make the Leonardo bootloader take less that 8 seconds to run? It is very slow and I want to speed it up somehow.
-
2Can you give us more details about your development environment (IDE you use). Did you burn the bootloader yourself, or did the board came with the bootloader already loaded? Do you have a link to the bootloader code on the net? Also, do you know if this delay is normal of all Leonardo boards? Because 8s seems to be an awful lot of time for a dev board to boot.Ricardo– Ricardo2014年05月06日 13:36:34 +00:00Commented May 6, 2014 at 13:36
-
It's the default IDE (this wouldn't make any difference, but OK), and i used the stock bootloader that came with the board.TheDoctor– TheDoctor2014年05月06日 13:57:32 +00:00Commented May 6, 2014 at 13:57
-
What version of the official Arduino IDE? I'm trying to determine the exact bootloader code base. But it won't be helpful because the bootloader you're using didn't come from your IDE. Since it came installed from factory, we may never know which one it is. The only hope is for you to burn the bootloader from your IDE into the board and report the same delay. If you decide to do it, just beware of what you're doing.Ricardo– Ricardo2014年05月06日 14:00:01 +00:00Commented May 6, 2014 at 14:00
-
Or someone may give it a try and post an answer assuming one given version of a given bootloader out there. It's possible, but not optimal.Ricardo– Ricardo2014年05月06日 14:03:34 +00:00Commented May 6, 2014 at 14:03
-
2Yes, you can shorten the value of TIMEOUT_PERIOD in caterina.c - see leonardomiliani.com/2013/… But beware that a shorter value may make it harder to recover if you load a sketch that breaks the USB support.Chris Stratton– Chris Stratton2014年05月08日 16:24:31 +00:00Commented May 8, 2014 at 16:24
1 Answer 1
Detailed instructions on how to shorten the bootloader time of Leonardo, etc. are explained here (as stated by Chris Stratton).
The crux of the matter was to redefine the timeout period,
/* ./arduino/hardware/arduino/bootloaders/caterina/Caterina.c */
#define TIMEOUT_PERIOD 8000
to a lower value.
However, I do not have such issues with Leonardo. It boots very fast. So this issue depends on your environment.
There is also Optiboot, an alternative bootloader that really boots faster.
-
The code.google.com link is not broken yet (Google Code closed down in 2016), but it moved to GitHub.Peter Mortensen– Peter Mortensen2025年08月29日 17:03:38 +00:00Commented Aug 29 at 17:03
-
www.leonardomiliani.com is still up, but the link here is broken: "Not Found. The requested URL was not found on this server.". I couldn't find it, but maybe it exists, e.g., under a (slightly) different name (and thus URL).Peter Mortensen– Peter Mortensen2025年08月29日 17:10:27 +00:00Commented Aug 29 at 17:10
-
I located the leonardomiliani.com article through archive.org's Wayback Machine and used the publication date with current site navigation to find its new URL. It is now edited into the answer.timemage– timemage2025年09月05日 18:03:10 +00:00Commented 6 hours ago