Pages: [1] 2   Go Down
Author Topic: Help with installing a bootloader  (Read 2651 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am trying to install the bootloader for the ATMEGA 1280.

I am using Arduno v17 and an USB tiny ISP programmer.

It seems to upload fine but at the end I get this message
Reading | ################################################## | 100% 70.45s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x1f000
         0x0c != 0xff
avrdude: verification error; content mismatch

avrdude done.  Thank you.

Thanks
« Last Edit: May 27, 2010, 03:24:34 pm by Jassper » Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
first mismatch at byte 0x1f000

Is your bootloader larger than 124kb ????
Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I don't know, I am useing the one that comes with the Arduino_17 program. I also updated to version 18, same result. I wouldn't think that the standard bootloader is larger than what the chip can hold.


I have been able to upload several different sketches to the MEGA1280 and they seem to run fine, but I am worried that it is unreliable because of the boot load error.


EDIT
I am useing the this programmer, http://www.sparkfun.com/commerce/product_info.php?products_id=9231
could that be an issue?
« Last Edit: May 28, 2010, 07:05:22 am by Jassper » Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

bump
Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have been having the same error on both 1280 and 2560, HOWEVER, it programs correctly and works.

On the 1280, the standard bootloader has a MONITOR mode, open up the serial port at 57600 and type "!!!"  It easiest to just hold down the "!" and hit reset on the board. this will bring up monitor which will verify that its working properly.

I have the standard bootloader modified to run on the 2560, but it does not support past 128K due to limitations in stk500 protocol

Mark
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
On the 1280, the standard bootloader has a MONITOR mode, open up the serial port at 57600 and type "!!!"  It easiest to just hold down the "!" and hit reset on the board. this will bring up monitor which will verify that its working properly.

That's interesting, I have not read that posted here before. I tried it on my Seeeduino mega. It printed out a signature line, but then went ahead and jumped to the existing sketch. If there was no existing sketch already in flash, would the monitor stay in control, and is it interactive with the user in anyway?

Lefty

« Last Edit: May 29, 2010, 07:13:12 pm by retrolefty » Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Lefty

the "monitor" has a very short time out, there are several commands you can give it including "j" to jump to the user program.

I have never seen it mentioned anywhere either, I discovered it looking through the bootloader source code that came with v0018.  It is specifically limited to the 1280.  I have been working on 2560 quite a bit and have found lots of interesting things.

Mark
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 361
Posts: 17263
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I have never seen it mentioned anywhere either, I discovered it looking through the bootloader source code that came with v0018.  It is specifically limited to the 1280.  I have been working on 2560 quite a bit and have found lots of interesting things.

That's very cool. I'll look over the source code someday, not that I'm very good at it.  ;D

I've done a lot of bootloader flashing on 328, 168, and mega 8 chips to test out my USBtiny programmer and a windows GUI driven AVRDUDE program, however I've stayed away from playing with my Seeeduino mega bootloader as it's soldered SM packaging scares me if I was to screw it up and not able to reload it properly.  smiley-wink


Lefty

Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
the "monitor" has a very short time out, there are several commands you can give it including "j" to jump to the user program.

Mark, Is there a way to get a list of these commands?
Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I went through the source code and came up with this.

First open the USB port at 57600 baud

First you send it "!!!"


it gives you a welcome message
     ATmegaBOOT / Arduino Mega - (C) Arduino LLC - 090930

Then you can type

    t  Toggle LED

    r  <ignore><x><x><ignore><ignore>   Read byte from address xx (x is a BINARY value)

    u  loop back, continuous loop to echo back what every you send

     b  external Bus, does something with external memory

     j Jump to user program, same as doing nothing.


It not a real good monitor, it doesnt do much, it is limited in size

It is only compiled for
      __AVR_ATmega128__ and
      __AVR_ATmega1280__

      I added __AVR_ATmega2560__

The monitor has a very short timeout. If you dont type something it goes back to waiting for download and then will start the user program if it exists

Mark
« Last Edit: May 30, 2010, 07:20:26 pm by msproul » Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hay thanks,

I have been reading your other post as well
http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1274821710

Do you think that might have something to do with the error message after installing the Bootloader?
Logged

USA
Offline Offline
Full Member
***
Karma: 2
Posts: 213
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Jassper

No, it does not. The above 80K has been resolved but I dont have it working yet because I cannot get gcc to compile.  the bug has been fixed in gcc 4.4.0

Mark
« Last Edit: May 31, 2010, 03:06:30 pm by msproul » Logged

0
Offline Offline
Sr. Member
****
Karma: 1
Posts: 415
MEGA_Stick_II is here
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This is what I am working on,


it breaks out all 100 pins on the ATMEGA 1280.

This is the first proto type, so far 3 issues to note. 1) the ISP connector is "mirrored" so I had to solder the connector from the underside to line up with my programmers ISP. 2) the overall width of the board is 0.05 in to wide and won't line up with a breadboard. 3) the TX and RX LEDs don't flicker when uploading.

It provides a pin for unregulated voltage so you can use the on board V reg, or you can provide it an external +5 volts on the REG pin to power it. I also use a simple jumper to enable or disable USB port power.

At first I thought the TX and RX LEDs were installed back words, but I verified that I got them the correct polarity.

I haven't tested all the I/Os yet but everything seems to work aside from the above stated issues.

This is however 100% hand soldered so I need to investigate if I have a pins "jumped" someplace but my initial checks show negative.

EDIT
Found the issue with the TX and RX LEDs. Will correct on the next proto run
« Last Edit: June 01, 2010, 01:42:03 pm by Jassper » Logged

Cape Town, South Africa
Offline Offline
Full Member
***
Karma: 0
Posts: 177
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
This is what I am working on,

That's quite neat  smiley  Good work.
Logged

Offline Offline
Edison Member
*
Karma: 3
Posts: 1001
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
I am using Arduno v17 and an USB tiny ISP programmer.
Since you're into building your own boards based on one of the 128k  AVR's I would get a "real programmer". The USB Tiny is a big mess, both hardware and software wise. As it is now you really don't know whether the programmer is at fault or your board is. Get an AVRSIP MKII using the Stk500v2 protocol. If you think the Atmel version is too expensive to justify, you may look at eBay for Chinese copies.
Logged

Pages: [1] 2   Go Up
Jump to: