22 votes
Accepted

What happens when code is uploaded using the bootloader?

When you reset a Uno running the Optiboot loader, the bootloader first flashes pin 13 three times. Top line (gray) is sent to the Arduino, middle line (orange) is sent from the Arduino. While that ...
Nick Gammon's user avatar
  • 37.6k
17 votes
Accepted

Arduino Nano ATmega328P bootloader difference

The bootloader currently shipped on the official Arduino Nano boards and selected via the Arduino IDE's Tools > Processor > ATmega328P after choosing Tools > Board > Arduino Nano is the same version ...
per1234's user avatar
  • 4,048
12 votes
Accepted

Can we burn Arduino bootloader into any microcontroller chip?

The answer needs to have multiple parts: Yes, in principle you can create a bootloader for any microcontroller, which acts like the Arduino's. Please be aware that there are different bootloaders, ...
the busybee's user avatar
  • 1,713
11 votes

Pin 13 fires relay when powering on... How to disable?

There are three things you can do: Remove the bootloader entirely and program the board with a hardware programmer (USB-ASP, Another Arduino, etc). Edit the bootloader source, recompile, and ...
Majenko's user avatar
  • 105k
10 votes

How do I burn the bootloader?

What is a bootloader? And what exactly is the bootloader? The bootloader is a small piece of code residing in the "high" part of program memory. Normally it is not erased when you upload new ...
Nick Gammon's user avatar
  • 37.6k
10 votes
Accepted

NodeMCU does not boot up when GPIO pin is high

Certain pins of the ESP8266 perform special functions at bootup. GPIO15, when HIGH, makes the ESP8266 boot from an SD card. You can read more about the special functions of the pins here. The ...
Majenko's user avatar
  • 105k
9 votes
Accepted

Can I program a factory fresh Atmega328P through UART pins without burning a bootloader?

No, the ATmega's ISP does not operate over the UART pins but only the ISP pins. To program it via a UART, you need to first load a bootloader, unless your chip was pre-programmed by the vendor, ...
Chris Stratton's user avatar
8 votes
Accepted

ino.hex vs ino.with_bootloader.hex

If flashing with AVR In System Programing (ISP) the bootloader is not needed. Only the flashing over Serial needs a bootloader. The ISP erases the flash including the bootloader. To be able to use ...
Juraj's user avatar
  • 17.6k
8 votes
Accepted

Can I force a function to live in the boot sector without overwriting the bootloader?

The Optiboot version 8 has a do_spm function which can be called from application. The Optiboot repository contains an example for the use of this function. SPM is the AVR CPU instruction to write to ...
Juraj's user avatar
  • 17.6k
7 votes
Accepted

Purpose of USB (FTDI) and ICSP connectors

The ICSP is used for 'bare metal' programming. This what you'd use if you wanted to replace or remove the bootloader, change the clock oscillator settings, or program the device as a bare 328. The ...
Neil_UK's user avatar
  • 404
6 votes

How i can have one code for multi sensors

You have to keep some points in your mind: (1) You have to ensure that pins must be not conflicting with each other. If you merge all sensor codes in one code then pins must be conflict. So you have ...
Hasan's user avatar
  • 1,478
6 votes
Accepted

Extend program space by getting rid of bootloader on NANO

It's enforcing this line from the arduino:avr boards.txt nano.menu.cpu.atmega328.upload.maximum_size=30720 To be clear, the board is assumed to have a bootloader, even if you're not using it to get ...
timemage's user avatar
  • 4,821
5 votes
Accepted

Arduino Burn the code programmatically

First, the Arduino Uno has 32 KB of flash, but only 1 KB of RAM. So, to be able to store the new program in a string means your new program can only be, at most, 1kb. Secondly, only the bootloader ...
Gerben's user avatar
  • 11.3k
5 votes
Accepted

How does the compiler/assembler work wrt bootloader?

On the Uno and similar AVR-based boards, the compiler and assembler are not aware of the bootloader. The compiled program starts at address zero. There you have the interrupt vector table, starting ...
Edgar Bonet's user avatar
  • 41.4k
4 votes

Upload a .hex file, using a standalone ISP, without overwriting bootloader

To preserve the bootloader, you should use the -D option in the ISP command line just as it was used in the bootloader upload command line. This will disable usage of full-chip erase. I expect you ...
Chris Stratton's user avatar
4 votes

Confusion with ATmega328P and 3.3V/8MHz

If you are using an LED to indicate that your sketch is running, then that may be the problem. For example, if you have a fairly average red LED, it might have a forward voltage of 2.0v @ 20ma (...
AMADANON Inc.'s user avatar
4 votes
Accepted

Confusion with ATmega328P and 3.3V/8MHz

It was a brownout fuse problem. Changing boards.txt from: atmega328bb.bootloader.extended_fuses=0x05 to atmega328bb.bootloader.extended_fuses=0x02 solved it for me (*). The chip and red LED now ...
Paul Grime's user avatar
4 votes
Accepted

Standalone Arduino with ATMEGA328P / Serial working, but serial programming not (only once after buning bootloader)

There is a problem with your circuit and the way you have it wired when programming. You have failed to use the RTS line for Serial programming. You need to have that line connected to the RESET of ...
RSM's user avatar
  • 1,437
4 votes

Why do I get avrdude: stk500v2_ReceiveMessage(): timeout error when uploading to Arduino Mega?

The error message basically means that the programmer is unable to contact the boot-loader on the device. The code you're trying to upload has no bearing on the problem. There could be one of the ...
abhiarora's user avatar
  • 141
4 votes

Is ATmega 328 on Arduino UNO already bootloaded?

In Arduino board, arduino controller means ATMEGA328P-PU already bootloaded. So, you can use directly. But if you buy only ATMEGA328P-PU chip or any other ATMEGA chip then you have to do bootloading ...
Hasan's user avatar
  • 1,478
4 votes

How does avrdude burn a bootloader much quicker than the Arduino IDE?

In the Arduino IDE do this: File > Preferences > Show verbose output during: > upload (check) > OK Tools > Burn Bootloader After it finishes examine the output in the black console ...
per1234's user avatar
  • 4,048
4 votes

Is it possible to upload an arduino sketch through the serial port (RX) instead of USB

No need to have a specific bootloader. The basic bootloader can do that (in Arduino that's the case so I hope this answer will apply in your case. But if not, the principle is certainly the same). ...
Peter's user avatar
  • 345
4 votes

avrdude fuse error when programming ATMEGA328 without crystal

The ATMega328P datasheet has the following table in it: The top 5 bits of the of the Extended Fuse Byte are default 1 and are reserved. You're not really supposed to change them, since they might be ...
timemage's user avatar
  • 4,821
4 votes
Accepted

What does avrdude: Device signature = 0x000000 mean? Faulty wiring? Software issue? Incorrect tutorial?

There is one part of the tutorial that is incorrect - or rather missing. When you open the serial port the Arduino resets. That includes when the serial port is opened by avrdude. You need to prevent ...
Majenko's user avatar
  • 105k
4 votes

As a novice, how do I program my Atmega328p?

Are the ATMEGA and STM32 programmers not universal? They are not the same. As far as I know their programming arrangements are completely distinct. What programming methods can this chip support? ...
RedGrittyBrick's user avatar
4 votes
Accepted

How do I escape a boot loop?

Start holding the reset button. This is to prevent the Arduino from entering the boot loop. Unplug the Arduino and plug it back in. Open a new sketch. Remove all of the code and replace it with int ...
glibg10b's user avatar
  • 297
3 votes

Why when I press the reset button

Because first the bootloader is executed and takes 2 seconds (or more on a Leonardo) to time out when it doesn't receive a proper response from the computer.
Majenko's user avatar
  • 105k
3 votes

What alternatives are there to the Optiboot bootloader?

TinySafeBoot is an alternative for ATtiny and ATmega devices. Compatible to plenty of ATtinys and ATmegas (see below) Read/Write access to Flash and EEPROM. All IOs available for serial communication ...
Ashlyn Black's user avatar
3 votes

Will the Uno bootloader work in the Duemilanove?

So I researched it a bit, and there does not seem to be any problems with running the UNO bootloader on a Duemilanove board. The biggest difference between the two seems to be the USB interface: ...
EJTH's user avatar
  • 198

Only top scored, non community-wiki answers of a minimum length are eligible