Author Topic: AVR bootloader confusion  (Read 2577 times)

0 Members and 1 Guest are viewing this topic.

Offline TheWinterSnowTopic starter

  • Contributor
  • Posts: 36
AVR bootloader confusion
« on: April 01, 2015, 02:44:26 pm »
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.
 

Offline sunnyhighway

  • Frequent Contributor
  • **
  • Posts: 276
  • Country: nl
Re: AVR bootloader confusion
« Reply #1 on: April 01, 2015, 08:49:24 pm »
I think you are looking for an AVR programmer
 

Offline PeterFW

  • Frequent Contributor
  • **
  • Posts: 577
  • Country: de
    • Stuff that goes boom
Re: AVR bootloader confusion
« Reply #2 on: April 01, 2015, 09:51:22 pm »
I am looking at running an FT232RL as well.

Use a CY7C65213 instead, better then the FTDI stuff :)

Quote
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. 
(...)
that the Arduino bootloader for the Arduino Mega 2560 should work as a bootloader?  I don't want to assume though.

You 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... :)
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: AVR bootloader confusion
« Reply #3 on: April 01, 2015, 10:45:05 pm »
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.
 

Offline TheWinterSnowTopic starter

  • Contributor
  • Posts: 36
Re: AVR bootloader confusion
« Reply #4 on: April 01, 2015, 11:01:34 pm »
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.

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.


That 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.
 

Offline westfw

  • Super Contributor
  • ***
  • Posts: 4199
  • Country: us
Re: AVR bootloader confusion
« Reply #5 on: April 02, 2015, 01:44:29 am »
The 2560 bootloader is here:  https://github.com/arduino/Arduino/tree/master/hardware/arduino/avr/bootloaders/stk500v2
and here: https://github.com/msproul/Arduino-stk500v2-bootloader

It 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.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf