Questions tagged [bootloader]

Refers to the code burned on the Arduino flash memory that runs every time the board is powered up. It starts the execution of user-loaded programs and allows uploading sketches from a PC through the USB connection. This tag should be used for questions about modifying, changing, uploading the default bootloader.

The bootloader is a small piece of code loaded into the high part of program memory (flash memory). It is optionally invoked by the processor after a reset (depending on BOOTRST fuse setting).

Its purpose is to allow self-programming of the flash, generally by checking the serial port for specific "programming" sequences within the first second or so after a reset. If such a sequence is found the bootloader responds to the programmer (usually avrdude running on the host computer), and in conjunction with the programmer accepts and acts upon instructions to erase and reprogram memory, change the EEPROM if desired, and change the fuses if desired.

The use of the bootloader avoids the need for special hardware to upload new code. However to change the bootloader itself (something not normally necessary) a special programmer is needed which plugs into the ICSP (In Circuit Serial Programming) header of the Arduino.


Once the bootloader has finished uploading new code (if required) it jumps to address 0x0000 which is the start of the actual code, so that the newly-uploaded sketch can now start.

If no programming instructions are detected by the bootloader after a short delay, it jumps to address 0x0000 to execute the previously-loaded code.

330 questions
22
votes
2 answers

How do I burn the bootloader?

I was instructed to "burn the bootloader" to my Arduino to fix an error I was getting. How can I do this? (And what exactly is the bootloader?)
The Guy with The Hat
  • 5,232
  • 7
  • 29
  • 51
13
votes
3 answers

What alternatives are there to the Optiboot bootloader?

Nearly all modern Arduino boards use the Optiboot bootloader. Compared to the ATmegaboot used before, this is smaller in flash terms (by about 1.5KB) and faster in upload speed (115.2k vs 57.6k) and starts your sketch quicker (the delay whilst…
Cybergibbons
  • 5,350
  • 7
  • 33
  • 51
13
votes
1 answer

Arduino Nano ATmega328P bootloader difference

There are two ATmega328P bootloaders, old and current. What is the difference between these bootloaders? I'm aware that Nanos sold by Arduino use the new bootloaders but I haven't been able to find any release notes about the bootloader.
Claus
  • 233
  • 1
  • 2
  • 5
3
votes
4 answers

How to remove Adafruit Pro Trinket bootloader flashing startup sequence

From what I understand, the Pro Trinket has "Optiboot" which allows it to detect which boot loader you are trying to use, one for USB and one for FTDI. When it's in this "bootloader state" the red LED on pin 13 buses for 10 seconds before it starts…
sam
3
votes
2 answers

How do I write an Arduino program to an AVR chip without the Arduino bootloader?

Is it possible to write an Arduino program to an AVR chip that does not have teh Arduino bootloader installed? What is the process to do so?
Mark Harrison
  • 559
  • 3
  • 14
  • 23
3
votes
1 answer

How to program an empty Mega2560 with an Arduino sketch?

I am writing code on Arduino mega. My current code is working fine. However, I'm not using all the pins. My question is: I have the hex file for my code and I can purchase a Mega2560 MCU. Is there any way to upload the hex file to it and how? What…
AMPS
  • 467
  • 11
  • 21
2
votes
0 answers

Will we be able to burn arduino zero pro's bootloader?

As arduino.org states, the bootloader is pre-burnt by Atmel at the factory. I'd like to know if it will be possible for us to buy "raw" ICs and burn them at home for our own boards, as we do with the Atmega328 for example.
Wesley Lee
  • 420
  • 3
  • 10
2
votes
1 answer

Is is possible to install a bootloader to an Arduino clone without a physical programmer?

I got an Arduino UNO clone, connected it to my PC via USB. I can't upload any sketches. Correct board and port are selected in the IDE. Windows recognizes it as a device, even though it has a CH340 (known issue with Chinese clones), so drivers don't…
2
votes
0 answers

COM port problem when uploading bootloader to SAMD21G

I use an ATSAMD21E16B-AU in my circuit and I want to upload the bootloader with the SAM-BA flash programming tool in this official link: http://www.atmel.com/Images/Atmel-42366-SAM-BA-Bootloader-for-SAM-D21_ApplicationNote_AT07175.pdf. I will use…
Adem Gül
  • 31
  • 1
2
votes
1 answer

Arduino mini requires uploading on every power up?

My Arduino mini is experiencing some really strange problem. I'm using the BlinkWithoutDelay example sketch for testing: const int ledPin = 13; int ledState = LOW; // ledState used to set the LED long previousMillis = 0; // will…
Asy
  • 123
  • 2
2
votes
1 answer

Do we really need to upload Arduino bootloader for new Atmega IC

I am using Atmega328p in my circuit. I will be programming this IC using Arduino. But because this is a PCB, so I will programming using USBasp programmer. So before uploading code as upload using programmer, I will select my arduino board in board…
User
  • 23
  • 2
2
votes
1 answer

Disable Boot Flash completely on ATMega

I want to reclaim the space reserved for the bootloader on my ATMega32u4 (Leonardo chip). But the lowest boot flash size I can see is BOOTSZ=11 which is 256 words (512 bytes). Is it not possible to completely disable it? Basing this off of this:…
Adam Haile
  • 599
  • 2
  • 7
  • 14
2
votes
2 answers

Arduino beginner question

I just got a new pro-micro Atmega32U4 board, and installed the current Arduino IDE (1.8) and cannot get it working. There is no entry for a pro-micro, so I chose Leonardo as it uses the same chip. When I choose upload, the two red LEDs blink fast,…
ctrl-d
  • 121
  • 2
1
vote
1 answer

ATMega328P U Query - does it work straight away on Uno R3

Quick query (I hope). I have an Arduio R3 board with ATMega328P U on board. It works fine. I bought some new MCUs, ordered with bootloader. Same IC designation. Before I dive into my new project I want to confirm they are okay. So ...............I…
1
vote
0 answers

Cannot flash Arduino Bootloader on SAMD21G with STLink via SWD programming and openOCD

I'm trying to flash the Arduino Bootloader on a bare ATSAMD21G with STLink via SWD programming and OpenOCD. These are the steps that I took: Create *.hex file to flash with ArduinoCore-samd repository Connect SWD pins from ST-Link to the ATSAMD21G…
Sayanee
  • 119
  • 2
1
2 3