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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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, ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 (...
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 ...
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 ...
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 ...
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 ...
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 ...
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).
...
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 ...
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 ...
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?
...
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 ...
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.
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
...
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:
...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
bootloader × 328arduino-uno × 67
atmega328 × 53
avrdude × 38
arduino-mega × 30
arduino-ide × 29
uploading × 29
isp × 25
serial × 18
programming × 17
arduino-nano × 17
usb × 16
arduino-leonardo × 16
avr × 15
atmega32u4 × 13
reset × 11
attiny × 10
arduino-pro-mini × 10
atmega2560 × 10
flash × 9
esp8266 × 8
power × 8
bluetooth × 7
sketch × 7
arduino-pro-micro × 7