Go Down

Topic: Bootloader compatibility  ATmega 1280 and 1284P (Read 16646 times) previous topic - next topic


Not having access to the datasheets (or much else barring a browser), can anyone tell me whether the bootloader designed for the Arduino Mega board (or indeed the DFRobot MEGA 2010 clone) would work unchanged on the ATMega1284P-PU ?

(Obviously, the 1280, being TQFP, has more pins than a 40-pin DIP, but that aside, is the core functionality the same?

If not, I guess I will have to wait until I can compare the data sheets and work out what would need to be changed to modify the bootloader and core accordingly. Since there are differences for the 168, 328 and 1280 already, and I have a fair amount of experience as a C developer (27yrs+) including low-level (Un*x driver), it should be a fun project  ::)


Having now read the datasheets, there are a number of differences between the parts (number of USARTS, timers) as well as the obvious ones such as number of available pins.

However, it is fairly simliar to the 1280, so should be doable.

Can anyone tell me where/how the compile-time device type (__AVR_ATmega1280__, __AVR_ATmega8__) are actually defined, or if they are done by gcc based on the -mmcu command line option?

(And presumably, I should use the developers mailing list to feed back any changes...?)


The ATMega1284p is actually closer to the ATMega644p than the the 1280.

I to am very interested in getting the boot loader onto the 1284, got a few of the DIP versions.

Coding Badly

or if they are done by gcc based on the -mmcu command line option?



Oh good. Then modifying boards.txt will deal with it, and I can use the 644P as a basis to work from. I expect, if previous experiences with PICs is anything to go by, my most difficult job will be getting the fuses right.

Fortunately, the fuse calculator will be a big help.

Anyone know how imminent 0019 is? (I should ask on the developer mailing list really).


Maybe it's my mistake, but I think a modified Sanguino-Setup should be the key.

So, got you any efforts with 1284p?



No not yet, (paid) work keeps getting in the way.  :(
I have the Sanguino stuff to work with, which is lots of help.


Can anyone tell me where/how the compile-time device type (__AVR_ATmega1280__, __AVR_ATmega8__) are actually defined, or if they are done by gcc based on the -mmcu command line option?

that is done by the arduino IDE in parsing the commands to avrdude. it is taken from


from the boards.txt file in the ~/documents/Arduino/hardware/attiny85/

you could try it first in the terminal directly with avrdude to see if it knows the part.

more info here:


(learned from the "coding badly" user here on the forum)  ;)
"We're all in this together..."


May 28, 2010, 02:19 pm Last Edit: May 28, 2010, 02:21 pm by ChrisS Reason: 1
hmm, found something nice on DuinOS Thread... part of the board.txt...

seems this is what we search for....

Code: [Select]
Multiplo_Brain_M1284_DuinOS.name=Multiplo.Brain.M1284 + DuinOS



So, we have a little bit to modify, but essentially this should be the key...

For Pin assignment we have to adapt from Sanguino, but boards.txt (fuses etc.) should be this i think.

Maybe some of you may try it with 1284?

Greetings ChrisS


Ive tried something similar(modified the board.txt for sanguino) and the version of avrdude in arduino18 does not have the 1284p listed.  So when you try and upload the bootloader(again i just modified the sanguino one) it complains about the chip being invalid.  The newest avrdude that comes with AVRstudio has no such issue.  However I either have a wiring error in my board or the arduino as ISP will not suffice for programming a 1284p.

The problem I have is for instance when i try to read the fuses it gets half way through then throws an error as it seems the arduinoISP sketch has frozen.


May 29, 2010, 02:04 pm Last Edit: May 29, 2010, 02:10 pm by ChrisS Reason: 1
So when you try and upload the bootloader(again i just modified the sanguino one) it complains about the chip being invalid.

Would you please post detailed Debuginformation / Debugwindow-Output?

Thank you!

mmh, sketch compiles errorfree right?

I don't know what happens here... 1284p is a chipreplacement for 644p. Should be fully compatible.

Greetings ChrisS

(my 1284p are on the way, i can't test it by myself until they are arrived)


Maybe, have a look at this... last Update... espacially 0S....


Could be the next Hint in this Dungeon of compatibility ;)

Greetings ChrisS


May 29, 2010, 10:26 pm Last Edit: May 29, 2010, 10:41 pm by mdmetzle Reason: 1
When I try to burn the boot loader from the arduino environment with my freeduino running the arduinoISP sketch the output is:
Code: [Select]
D:\Myles\Desktop\arduino-0018\hardware/tools/avr/bin/avrdude -CD:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf -v -v -v -v -patmega1284p -cstk500v1 -P\\.\COM3 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDC:m -Ulfuse:w:0xFF:m

avrdude: Version 5.4-arduino, compiled on Oct 11 2007 at 19:12:32
        Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/

        System wide configuration file is "D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf"

avrdude: AVR Part "atmega1284p" not found.

Valid parts are:
 m6450 = ATMEGA6450      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:11732]
 m3250 = ATMEGA3250      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:11543]
 m645 = ATMEGA645       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:11354]
 m325 = ATMEGA325       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:11165]
 usb1287 = AT90USB1287     [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10977]
 usb1286 = AT90USB1286     [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10788]
 usb647 = AT90USB647      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10599]
 usb646 = AT90USB646      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10409]
 t84  = ATtiny84        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10226]
 t44  = ATtiny44        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:10044]
 t24  = ATtiny24        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:9862]
 m2561 = ATMEGA2561      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:9669]
 m2560 = ATMEGA2560      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:9476]
 m1281 = ATMEGA1281      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:9288]
 m1280 = ATMEGA1280      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:9099]
 m640 = ATMEGA640       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8911]
 t85  = ATtiny85        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8730]
 t45  = ATtiny45        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8551]
 t25  = ATtiny25        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8371]
 pwm3b = AT90PWM3B       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8190]
 pwm2b = AT90PWM2B       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:8007]
 pwm3 = AT90PWM3        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:7824]
 pwm2 = AT90PWM2        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:7640]
 t2313 = ATtiny2313      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:7453]
 m328p = ATMEGA328P      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:7265]
 m168 = ATMEGA168       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:7077]
 m88  = ATMEGA88        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:6891]
 m48  = ATMEGA48        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:6704]
 t861 = ATTINY861       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:6516]
 t461 = ATTINY461       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:6327]
 t261 = ATTINY261       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:6138]
 t26  = ATTINY26        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5981]
 m8535 = ATMEGA8535      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5823]
 m8515 = ATMEGA8515      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5665]
 m8   = ATMEGA8         [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5505]
 m161 = ATMEGA161       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5365]
 m32  = ATMEGA32        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:5190]
 m6490 = ATMEGA6490      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4997]
 m649 = ATMEGA649       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4812]
 m3290 = ATMEGA3290      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4629]
 m329 = ATMEGA329       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4444]
 m169 = ATMEGA169       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4264]
 m163 = ATMEGA163       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:4121]
 m162 = ATMEGA162       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:3925]
 m644p = ATMEGA644P      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:3734]
 m644 = ATMEGA644       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:3543]
 m324p = ATMEGA324P      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:3351]
 m164p = ATMEGA164P      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:3159]
 m16  = ATMEGA16        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2981]
 c128 = AT90CAN128      [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2790]
 m128 = ATMEGA128       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2612]
 m64  = ATMEGA64        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2431]
 m103 = ATMEGA103       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2291]
 8535 = AT90S8535       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2170]
 8515 = AT90S8515       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:2056]
 4434 = AT90S4434       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1973]
 4433 = AT90S4433       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1849]
 2343 = AT90S2343       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1725]
 2333 = AT90S2333       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1640]
 2313 = AT90S2313       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1527]
 4414 = AT90S4414       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1414]
 1200 = AT90S1200       [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1299]
 t15  = ATtiny15        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:1166]
 t13  = ATtiny13        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:993]
 t12  = ATtiny12        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:860]
 t11  = ATtiny11        [D:\Myles\Desktop\arduino-0018\hardware/tools/avr/etc/avrdude.conf:796]

latest avrdude output in next post
Edit - tracked down the latest avrdudes errors to being a wireing fault gonna try and fix that before I say anymore.


May 30, 2010, 12:17 am Last Edit: May 30, 2010, 12:21 am by mdmetzle Reason: 1
Yeah it was my circuit I rewired it and i can now download code to it through the ICSP connection.  I managed to set the fuses and get the sanguino boot-loader onto it.  However the boot-loader does not work.  I know its running as it is flashing the led while its in the boot-loader.

I also update copy of avrdude that arduino 18 uses, to do that just backup the avrdude executable and config file and overwrite them for windows they are in:


Did you recognise my post ....? -Os
Did you recognise the neccessary changed LDadress?

Links i have already posted?


Go Up