BootLoader for AVR-Doper

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
johnrigh
Posts: 1
Joined: Thu Feb 07, 2008 2:38 am

BootLoader for AVR-Doper

Post by johnrigh » Thu Feb 07, 2008 3:09 am

I have a "www.rototron.info" version of AVR-Doper, i.e. minus the HVSP.
I have compiled the latest firmware (AVR-Doper.2008-02-05.zip) and flashed it in. I left out the HID support since I only wanted the CDC part and I wanted more space for a bootloader. It is working well.

Now, I want to flash in a bootloader so that future firmware upgrades can be done over the USB interface.

As per the readme.txt file in the AVR-Doper firmware package, I looked at the Thomas Fischl's boot loader (http://www.fischl.de/avrusbboot/).

I could not get it to compile because the hardware configuration that the bootloader wants (and as defined in the source) is incompatible with the AVR-Doper's. Or maybe I don't know how to change the USB bus port pins that are defined in the bootloaders code correctly.

Now, is a suitable version of bootloader available in a compiled state somewhere ?

If not, then can someone help me get it to compile.

thanks.

christian
Objective Development
Objective Development
Posts: 1443
Joined: Thu Nov 09, 2006 11:46 am

Post by christian » Thu Feb 07, 2008 6:12 pm

Here's the bootloaderconfig.h file I used:

Code: Select all

#define BOOTLOADER_INIT \
    PORTB = 0;          \
    DDRB  = 0;          \
    PORTC = 0;          \
    DDRC  = 0;          \
    PORTD = 1 << 4;     \
    DDRD    = (1<<USB_CFG_DMINUS_BIT) | (1<<USB_CFG_DPLUS_BIT);\
    uchar i, j = 0;     \
    while(--j){     /* USB Reset by device only required on Watchdog Reset */\
        i = 0;          \
        while(--i); /* delay >10ms for USB reset */\
    }                   \
    DDRD  = 0;

#define BOOTLOADER_CONDITION ((PIND & (1 << 4)) == 0)



Don't remember what the boot loader condition was, but I guess it was the HID jumper.

BTW: It turned out that 10 ms delay is not enough for USB disconnect. For reliable detection, you need something like at least 250 ms.

Guest

Post by Guest » Thu Feb 07, 2008 10:47 pm

Thanks for the tip.

Post Reply