how long from when the bootloader exits until user code starts to run?

For example I guess the C language implies some setup time and Arduino has the setup() function, and maybe other things I don't know about.

So how long is it from bootloader exit to start of user code in sketch (upper bound)?

The user code should start almost instantly after the bootloader finishes - like an interval of a number of nano seconds.

The startup delay is the period while the bootloader waits to see if the PC wants to upload a new program.


Maybe this also helps. See the last post:

On WHAT board? And WHAT bootloader?

1. The function of the Bootloader routine is to receive Intel-Hex formatted application file (the sketch) from Arduino IDE and then fuse the binary codes of the sketch into the flash of the MCU. After that the user application program starts almost instantly (~125 ns).

2. Assume the sketch size is 3050 bytes and the Bd is 9600. The time required to start the application program from the point of uploading is the sum of the following two components:
(1) Data transfer time : (1/9600)30508 = 2.54 sec
(2) Write time into flash : ~= 4.5 ms*3050 = 13.75 sec

Assume the sketch size is 3050 bytes and the Bd is 9600.

That is not the OP's question - read it carefully.


On WHAT board? And WHAT bootloader?

Uno rev3 with the standard bootloader but note I'm not interested in bootloader time, but rather in any setup that happens implicitly due to C environment or arduino software at the start of the main program.

In my application I'm programming with in-system programmer (no bootloader) and trying to figure out how fast user code actually starts running (given SUT1/SUT0 fuse settings).

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.