Electronic – arduino – When to use an Arduino bootloader

arduinoavrbootloadermicrocontroller

I need to make a robot within a month for a competition. I used to use Arduinos for my projects, but graduated to just flashing code with avrdude to standalone AVR microcontrollers.

I was thinking, just because I don't use the Arduino hardware anymore, is there any reason not to burn an Arduino bootloader on to my microcontrollers for some projects? Are there scenarios (like my current task) in which doing so would actually be advantageous?

It is a little easier to write code for an Arduino, and there are several open source libraries. I am sure there are other key advantages (and disadvantages) which I am not aware of, but would like to know about.

Essentially, under which scenario(s) would it be a good idea to burn an Arduino bootloader to my micrcontroller.

Best Answer

The basic answer is that some people don't want to buy or make a programmer. They just need a serial port to program the IC using a bootloader. It's cheaper.

Or sometime you want to be able to upgrade your code on the field without using your expensive programmer. Then a bootloader is fine.

But if you think about the usage of your system and don't find a need for a bootloader, then there is no reason to keep it. It takes flash space for nothing.

The Arduino bootloader is just a bootloader: something that allows the chip to program itself with new data on boot. Nothing else. Thus having it or not doesn't impact your code performance (except for the available flash space or start-up delay).

Thus answering your question:

  • If you don't have a programmer -> keep the bootlaoder
  • If you have a programmer -> up to you, it depends if you want to be able to upgrade without the programmer or not.