Go Down

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


I finally got the ICSP connection working reliably, and the arduino18 environment to burn the bootloader.  I successfully uploaded the ADAboot loader with the modifications and the compiler optimizations ChrisS linked to.  I however do not know if it is working, as the LED does not blink.  Also I have not tried to actually upload any code to the device either. Ill get to work on this more tomorrow but thats all for now.


May 30, 2010, 08:19 am Last Edit: May 30, 2010, 08:25 am by ChrisS Reason: 1
mmh, ok... gratulation to this step.

I ask because the bottom of the link says:
"RESOLVED: I modified the optimization from -O2 to -Os and NO ERRORS! and now the bootloader is working (led flashes correctly) :D"

you say nothing flashes...
also in your LAST posting with commandprompt, there is no such optimization switch...

I hate to say....mmh, are you shure about your ledwiring?
Have you checked/wired ResetPin?

In my opinion, it should work already if you patched files in 1284p Hardarefolder like for 644p.

Check this to be sure:

This is patch modification for 644p... by Robocraft/(maybe NYC Resistor).

mmh, i don't have checked fuses already... please recheck them...

i will do my checks if 1284p have arrived... *angry* it seems that I have choosen a real real real slow slow company for selling me 1284p.  :|

I don't know if Adaboot needs some special Hardware thingys around mcu to work/startup?

For today, I wish you good luck... hope to hear more good news from you :)

Greetings ChrisS

Sturmfabrik - mediale Dienstleistungen


After much frustration I have tracked all my issues down to a breadboard with many faulty junctions....

I did end up getting the bootloader to blink the LED again a bad junction. This is to say the least frustrating.  I have not been able to upload code as I am having trouble finding good connections...


Ok here is were I am.  I have it so that arduin 18 is able to burn the boot loader correctly, and the status LED does indeed blink while it is in the boot loader however the bootloader does not work.  The code downloads and during the verification process all 0xFF is returned. with the modified adaboot loader that chrisS linked too.


May 31, 2010, 09:44 am Last Edit: May 31, 2010, 09:56 am by ChrisS Reason: 1
0xFF isn't right I think....

Seems you got clock or connection problems....

Check clock Fuses / connection... I think Fuses maybe the Problem...
I know... blinking works...

I got much 0xFF's while testing with 644P.... and the answer where in my task that I used wrong Capacitors for Clock-Quarz. I used micoFrard not Pico... that happend by me.

Checkit... it may help you.

Try the latest AVRStudio for test to burn Bootloader... without IDE... still supports 1284p.

Greetings ChrisS
Sturmfabrik - mediale Dienstleistungen


Jun 01, 2010, 01:23 pm Last Edit: Jun 01, 2010, 01:23 pm by ChrisS Reason: 1
mmh, ok... i read again...

you are sure that you edited make file in bootloaders subdirectory...
to the right LDSECTION?

# Makefile for ATmegaBOOT
# E.Lins, 18.7.2005
# $Id$

# program name should not be changed...
PROGRAM    = ATmegaBOOT_644

# enter the target CPU frequency
AVR_FREQ   = 16000000L

MCU_TARGET = atmega644
LDSECTION  = --section-start=.text=0xF800 has to be a higher value... don't now the right adress....

Greetings ChrisS
Sturmfabrik - mediale Dienstleistungen

Mark S

Steve S:

What 1284 board are you using?




Nope did not make that change. Ill have to give it a try.
I'm going to see if the datasheet has anything to say on this...


The thing is... Bootloader Position in Flash is in relation of Flashsize at all.

So the Bootloader has to be on a specific position in flash to get working.

This is a information got on the first posts i posted.

I found that maybe the problem was "simply" the different LDSECTION value that I have to change for the 1284P.
So, as the datasheet say, for a boot size of 1024 words (2kbytes) the boot reset address is 0xFC00 then the LDSECTION will be LDSECTION = --section-start=.text=0x1F800 (0xFC00 x 2 = 0x1F800)
The value of 1F800 is even confirmed calculating it starting from the flash size (128k = 131072 bytes - 2048 bytes = 129024 bytes = 0x1F800)

Here the poster calculated 1F800.... for a 2048 Bytes Bootloader... i think with -Os parameter we should get 2048 Bytes....

If you don't have any positive results... maybe you think about UsbAspLoader... it's a Bootloader which emulates the Usbasp-Programmer for progranmming Mcu itself.... so you are able to boot, and use the ide to programm your sketches in Flashmemory like you want to.

Disadvantage, cause of use of Digitalpins instead of USART you arne't able to use virtualcomport-Communication....

For simple Programming purposes it should do the job.

UsbAspLoader ist a v-Usb Projekt (ArduinoCompatible) to get rid of FTDI (etc.) Chips... to include softwareusb directly inside of the mcu Bootloader....

Hope it helps a little bit to get further....

Greetings ChrisS

My 1284p aren't arrived yet... *little bit angry*

Sturmfabrik - mediale Dienstleistungen


Well I can program the chip just fine with the ICSP connection. Its just the bootloader thats giving me issues. If I could easily use the arduino environment with a programmer I would be happy.  Still I would like to get the bootloader working, I have gotten no further...


try the LDSection.....

ok, if you want to use the ide to programm... have a look at UsbAspLoader... again.... it is a bootloader which emulates a programmer to allow programming via IDE directly to the chip itself without external FTDI or something like this.

Greetings ChrisS
Sturmfabrik - mediale Dienstleistungen


Yes I was messing with the LDSection but I never got anything that functioned. So i decided not to report my failures.

I will have to look at the UsbAspLoader though I had forgetten you can change the programmer in the board.txt...

Steve S

Mark S

It isn't on a board (yet), unless you count a breadboard....


Have you made any further progress with this? I had been following the thread, but no sign of updates for a while - didn't look like you were too far away! Extra hardware serial ports would be really useful for me, without the unnecessary expense of a mega, and the 1284 would have more RAM than a sanguino.


I do plan on trying again but I haven't had time to mess with it as of late.  Id probably be more apt to try if I had a sanguino board to use this on and not the flaky breadboard I have been using (keep getting loose connections ect its a very very cheap breadboard ;) ).

Go Up