Software > Software

recommended bootloading software?

(1/3) > >>

Admin:
I'm trying to find some better bootloading software to upload .hex to my various ATmegas.

Ive been usisng MegaLoad, but its kind of buggy . . .

recommendations?

And I remember a long time ago I used hyperterminal as a bootloader, but can't remember how I did it . . .

Oh and I prefer GUI over command line . . . ;D

rgcustodio:
Hello Admin,

I think there's a discrepancy on how everyone defines and uses the term bootloader. I think we are confusing bootloader and a downloader/uploader.

A downloader/uploader is a program that runs on the host PC and downloads your software from the host PC to the embedded system/robot. Most probably you will still be connected to the machine via ISP or seial. Some require that you have an actual bootloader on the system/robot already burned. The software that came with our ISP programmer is a downloader/uploader, as well as avrdude.

A bootloader, on the other hard resides on flash (or ROM) and assists the developer to painlessly write the firmware to the embedded system/robot. The bootloader reads data from an input port (this is the serial most of the time for small MCUs) and writes the data to the flash itself! You won't need the specialized ISP in this case, so you can do on-site programming w/o special HW or SW. You will most probably just use a serial terminal connected to the system/robot and host PC and download away.


When you used Hyperterminal, it suggests that you have a bootloader on your system/robot. MegaLoad is actually just an uploader which comes with code for the bootloader. Using MegaLoad without a bootloader installed on your ATmega will probably fail. (BTW, I haven't used MegaLoad firsthand so the previous statements might be totally iincorrect.)

With a bootloader on your ATmega that requires a serial connection, you can use any serial terminal software GUI, CUI etc :) do download your program to the system/robot.

If you truly want bootloaders there are tons here.
http://hubbard.engr.scu.edu/embedded/avr/bootloader/index.html
http://www.chip45.com/chip45boot
http://www.chip45.com/index.pl?page=ATmegaBOOT&lang=en
http://www.avrfreaks.net/index.php?module=Freaks%20Tools&func=viewItem&item_id=328
Or you can build your own to suite your specific needs.

Regards,
Rommel

Admin:
I've spent the last 8 hours today working on this, so I know a bit more now . . .

I've been using the term 'bootloader' for everything, oops . . . thanks for the clarification!

The problem I am having is that I'm using the ATmega2560 which like no one uses . . . so I can't find any source for it anywhere . . . I've been forced to do a lot of monkey business (coding) . . . What complicates this is that the ATmega2560 has four different UART ports, and I want to specify which port the bootloader uses . . .

Ok so lets clarify what I have by using the new terminology . . .

MegaLoad (link at the top) comes with files that must be compiled with ICC (yea, annoying, I couldn't get it to compile in AVR Studio). This creates a .hex bootloader which then I upload using AVR Studio.

Using the very buggy MegaLoad I am then able to upload my normal program to that bootloader, verifying that it works.

What I want to do is not use MegaLoad, but any other uploader. Unfortunately all the others I've tried (BLIPS, hyperterminal, teraterm, AVR Studio) fail to work. So I suspect that the bootloader is somehow configured to only work with MegaLoad (not STK500 V1 compatible?) . . . but I'm not sure how . . .

Anyway, looking at the chip45 code . . . I saw this before, and gave up because it doesnt have defines (sig2, sig3, page_size) for the ATmega2560 - and I'm too noobish to understand that (spent an hour trying to figure it out) . . . ideas?
Scrolling down I see this line:
uint8_t bootuart = 0;
does that define which UART I can use?

reading around some more I realize what I need is called a "bootloader thats STK500 V1 compatible"

rgcustodio:
Here's a quickie response :) (i'll be going out of the office in a bit)

I for one haven't worked on the ATmega2560! ;)


1) MegaLoad seems to have "special" processing in the bootloader.


--- Code: ---:
RxChar();
TxChar('>');
if (RxChar() == '<')
{
TxChar(PageSize);
TxChar(DeviceID);
  TxChar(FlashSize);
  TxChar(BootSize);
  TxChar(EEpromSize);

  RxChar();
  TxChar('!');

while (1)
{
WDR();
GetPageNumber();

if (RealPageAddress == 0xffff) break;

if (WriteFlashPage()) TxChar('!');
else TxChar('@');
}
:

--- End code ---

based on the website, i assume that this is the "handshake" while the others are used for error detection and correction. So if the software you are using to transfer the data to the robot doesn't understand this "codes" from the boot loader your transfer won't succeed.

2) The bootloader from chip45 has two versions, one is ATmegaBOOT and the other is chip45boot. The code you pointed out is for the ATmegaBOOT. And I do think it is used for selecting the UART device. The code checks PINF or PIND (depending on the selected device) if its low and assigns the correct value to "bootuart". I think the chip45boot bootloader is newer and maybe more friendly to the user.

I tried to use chip45boot on my Butterfly's (Atmel ATmega169/ATmega169P)  but I just can't make it work :(

3) Here's another bootloader, it is not STK500 compliant, but it requires the downloading application to support the Xmodem interface. I don't know if it fits the bootblock of your ATmega but it's worth a try.
http://www.embedded.dk/projects/Embedded/AVR_Projects_Bootloader.htm

HTH!

Regards,

Admin:
Question . . . I want in my code to restart the bootloader upon receiving a command by UART . . . so upon receiving this command I *think* I need to disable UART then jump to the bootloader start address, right?

So probing around I *think* 0x1fe00 is that start address for the ATmega2560 . . . so how do I jump there? I need to do some kind of pointer, no? Whats the syntax to do that jump?


--- Quote ---i assume that this is the "handshake" while the others are used for error detection and correction
--- End quote ---
yea thats what I assumed too . . . I asked the MegaLoad programmer, but he just said:
"The bootloader is compatible with any define MCU STK500 is only a hardware platform" and "the problem is not on my side,..." :-\


I am still looking into your #2 and #3 . . . xmodem is fine since both hyperterminal and teraterm both use that . . . and my bootblock is 4k :)

Navigation

[0] Message Index

[#] Next page

Go to full version