Bryan Mayland
TVWBB Hall of Fame
Update the sketch on the 328p via avrupdate/hmdude? No there's no bootloader on the ATmega in the HeaterMeter (when connected to the rPi). The chip is flashed using SPI, the same way something like a USBtinyISP would flash a bootloader, except instead of putting a bootloader on, I just flash the program directly.
Optiboot is great and all but the SPI method is 10x faster (4Mbit vs 112kbit). Also you can't reboot to the Optiboot by using the watchdog, it will only boot into Optiboot if the RESET button was pushed. The down side to SPI is that you can't erase single blocks of the ATmega storage, so I've got to do what's called a "chip erase" before writing, which sets all the bytes of the ATmega to 0xff.
To answer the question I think you might be asking:
The bootloader is used to allow you to program the chip over serial (UART FTDI cable). It is a little stub program that copies blocks from the serial port and writes them to flash. If there was no bootloader the only way to put a new Arduino sketch on would be over SPI which would mean they'd have to have 4 more wires, and the USB connection would be a lot more complicated. Because I can program over SPI directly, no need for a bootloader.
Optiboot is great and all but the SPI method is 10x faster (4Mbit vs 112kbit). Also you can't reboot to the Optiboot by using the watchdog, it will only boot into Optiboot if the RESET button was pushed. The down side to SPI is that you can't erase single blocks of the ATmega storage, so I've got to do what's called a "chip erase" before writing, which sets all the bytes of the ATmega to 0xff.
To answer the question I think you might be asking:
The bootloader is used to allow you to program the chip over serial (UART FTDI cable). It is a little stub program that copies blocks from the serial port and writes them to flash. If there was no bootloader the only way to put a new Arduino sketch on would be over SPI which would mean they'd have to have 4 more wires, and the USB connection would be a lot more complicated. Because I can program over SPI directly, no need for a bootloader.