🛠 Graver Optiboot par ICSP : +1,5 Ko de flash et upload accéléré

Arduino Pro Mini · avance · Schéma : IMG-pro-mini-avance-7-promini-optiboot-icsp.svg — Arduino Pro Mini reliée par ses broches SPI 10-13 et RESET à un programmateur ISP (Arduino as ISP), gravure du bootloader Optiboot de 512 octets en lieu et place de l'ATmegaBOOT de 2 Ko

Objectives

The factory bootloader on the Pro Mini (ATmegaBOOT, STK500 v1 protocol at 57600 baud) reserves 2 KB of flash: the sketch is limited to 30,720 bytes. Optiboot is only 512 bytes — "only 512 bytes, freeing 1.5k of extra code space compared to older bootloaders" — starts immediately after power-on (fastboot) and accepts higher baud rates; it is explicitly compatible with the Pro line. We burn this bootloader via ICSP (the SPI pins 10-13 + RESET accept an ISP programmer) and recover 32,256 bytes of flash, just like on an Uno.

Hardware

Complete Code

1. Cote MAITRE : televerser le sketch File > Examples > 11.ArduinoISP
   > ArduinoISP, puis Tools > Programmer > « Arduino as ISP ».
2. Graver le bootloader via l'IDE (carte « Arduino Pro or Pro Mini »
   + CPU 5V/16MHz) : Tools > Burn Bootloader. L'IDE ecrit le
   firmware, les fusibles et la signature en une passe.
3. Alternative avrdude manuelle (hex Optiboot telecharge) :
   avrdude -c arduino -P COMx -b 19200 -p m328p -U lock:w:0x3F:m
   puis ecriture de optiboot_atmega328.hex en flash, puis lock 0x0F.
   (fusibles cristal 16 MHz : lfuse 0xFF, hfuse 0xDE ; l'efuse encode
   la taille du bootloader — laissez l'IDE la choisir)
4. Verifier : avrdude -c arduino -P COMx -b 19200 -p m328p -v
   l'efuse lu doit correspondre a un bootloader de 512 o (Optiboot)
   et non 2 Ko (ATmegaBOOT).

Expected Verification

After burning, a classic serial upload works again via the 6-pin connector (the IDE Pro Mini profile remains at 57600, a speed Optiboot also accepts). The maximum sketch size increases from 30,720 to 32,256 bytes: a sketch that previously refused to fit now compiles. When powered on via battery, the sketch starts without the delay of the old ATmegaBOOT (fastboot).

Common Errors

Other tutorials for this board

Code examples for this board

← Back to the board 🛠 All tutorials