3

If I compile a sketch then upload using ICSP does it overwrite the bootloader?

I am using Arduino program and Arduino Uno as ICSP.

  • The Arduino IDE creates an additional hex file that does also contain the bootloader. But you have to use to commandline to upload it. – Gerben Apr 16 '16 at 16:01
3

Yes.
When you program using ISP you overwrite everything in the chips flash, even the bootloader.

This has some pro's and con's:

  • Pro: The program starts immediately, meaning it doesn't wait to check if there's any programming coming in before starting your sketch.
  • Con: You need to use ISP to program your Arduino again or to upload the bootloader again.

Normally there is not really any reason for not having the bootloader present but if you are programming bare Atmel chips without a serial interface this way might be preferable.

  • Thanks. I expected ths was the case, but I have a Nano which can't be powered/programmed by serial but works with ICSP. This seems to offer the opportunity to load a larger sketch. – Milliways Apr 16 '16 at 8:06
0

Yes, it will overwrite the bootloader.

In addition to Hans Neve's list of Pros, it has the added benefit of gaining you a couple hundred bytes (0.5KB) that is otherwise used by the bootloader.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.