AVR bootloader confusion - Page 1
Forum section: electronics / general

author: TheWinterSnow
author_rank: Contributor
timestamp: April 01, 2015, 02:44:26 pm
content: I am building a programmable scientific calculator using an ATmega2560 and I am attempting to set it up so that I can update the firmware over USB. I am looking at running an FT232RL as well. What is confusing me at the moment is it has been hard to find information regarding non-arduino based AVR bootloaders or AVR bootloaders in general. I am trying to find a bootloader for the ATmega2560 that will allow me to update the firmware. I don't want to make assumptions but considering the USB to RS232 conversion and flashing an AVR should be the same, that the Arduino bootloader for the Arduino Mega 2560 should work as a bootloader? I don't want to assume though.

author: sunnyhighway
author_rank: Frequent Contributor
timestamp: April 01, 2015, 08:49:24 pm
content: I think you are looking for anAVR programmer

author: PeterFW
author_rank: Frequent Contributor
timestamp: April 01, 2015, 09:51:22 pm
content: Quote from: TheWinterSnow on April 01, 2015, 02:44:26 pmUse a CY7C65213 instead, better then the FTDI stuffQuoteYou either upload your program with a dedicated programmer through the ATMega2560 programing interface or use a bootloader to upload your code though the serial interface.But you have to burn the bootloader at least once with the "real" programmer.Try a google search with "AVRISP MK2", "AVR Dragon" or "USBASP".Those are programmers.For a search yielding results on the bootloader, ty "stk500 v2 atmega2560".The programmer is a tad faster then the bootloader, uloading 200kb of code through the bootloader will take a decent amount of time.Currently i have a ATMega2560 on a breadboard, been doing something similar as you.Alltough it is not a calculator but it could be... ist a matter of the firmware...

author: westfw
author_rank: Super Contributor
timestamp: April 01, 2015, 10:45:05 pm
content: Yes, the arduino bootloader will work as a bootloader for non-arduino systems.You still need a "device programmer" for installing the bootloader.Note that the 2560 is somewhat pickier about both bootloaders and programmers, since it has more than 128kB of flash.

author: TheWinterSnow
author_rank: Contributor
timestamp: April 01, 2015, 11:01:34 pm
content: Yes, I get that you first need an ICSP first to get the bootloader onto the chip, I already have that on the board. For future firmware updates I wanted to make things easier in that I can reflash the device through USB that is extrnal to the chassis, that way I don't ahve to take it apart and connect an ICSP to reprogram it. Considering the enclosure it will be in that would be a royal PITA that could end up breaking components as its a tight fit. I also am running it with a Li-on battery that is USB rechargable, so getting USB programming would be a nice feature.Quote from: westfw on April 01, 2015, 10:45:05 pmThat is what I wanted to know. I am aware of the 2560 being picky with Bootloaders and programmers, hence why I wanted to get the right bootloader. I will be using the Atmel AVRISP mkII for burning the bootloader, unless someone has a better recommendation.

author: westfw
author_rank: Super Contributor
timestamp: April 02, 2015, 01:44:29 am
content: The 2560 bootloader is here:https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/stk500v2and here:https://github.com/msproul/Arduino-stk500v2-bootloaderIt hasn't had much development since it first appeared. Perhaps that's a good thing.At least one person on the arduino forums has trimmed it down to only 2kB.