AVR Doper Firmware Issue with AVR Studio Upgrade

General discussions about V-USB, our firmware-only implementation of a low speed USB device on Atmel's AVR microcontrollers
Post Reply
rdagger
Posts: 6
Joined: Tue Apr 01, 2008 6:13 pm
Contact:

AVR Doper Firmware Issue with AVR Studio Upgrade

Post by rdagger » Tue Apr 01, 2008 6:25 pm

I built a simplified version of the AVR Doper back in 2006 and it has worked great. However, I recently upgraded AVR Studio to version 4.13 SP2. Now I get the following message when I connect to the AVR Doper:
An STK500 with firmware version 2.04 has been detected. The firmware version corresponding to this installation of AVR Studio is 2.0A. Press OK to launch the upgrade program to perform an upgrade, or Cancel to continue wihtout upgrading. NOTE! Correct operation is not guaranteed if an upgrade is not performed.

Obviously, the upgrade doesn't work. It is annoying to have keep clicking cancel every time I connect. Is there any way to lose this warning?

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

Post by christian » Tue Apr 01, 2008 9:32 pm

The firmware has the version number hard-coded. Simply change the version number in the firmware to whatever AVR-Studio expects.

Guest

Post by Guest » Sat Apr 05, 2008 9:16 pm

Hi,

where exactly can I find the firmware version number that AVR Studio reads in the code? Should be V2.04, but I couldn't find that string.

Thanks, Thomas

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

Post by christian » Sun Apr 06, 2008 8:46 am

That's indeed hard to find: in stk500protocol.c there's

Code: Select all

stkParam_t      stkParam = {{
                    0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0,
                    1, 2, 4, 0, 50, 0, 1, 0x80,
                    2, 0, 0xaa, 0, 0, 0, 0, 0,
                }};


The type is defined as

Code: Select all

typedef union{
    uchar   bytes[32];
    struct{
        int     buildVersionLow;
        uchar   reserved1[14];
        uchar   hardwareVersion;
        uchar   softwareVersionMajor;
        uchar   softwareVersionMinor;
        uchar   reserved2;
        uchar   vTarget;
        uchar   vRef;
        uchar   oscPrescale;
        uchar   oscCmatch;
        uchar   sckDuration;
        uchar   reserved3;
        uchar   topcardDetect;
        uchar   reserved4;
        uchar   status;
        uchar   data;
        uchar   resetPolarity;
        uchar   controllerInit;
    }       s;
}stkParam_t;


So the first three numbers in the third row (1, 2, 4) are hardware version, software version major and software version minor.

[/url]

Guest

Post by Guest » Sun Apr 06, 2008 12:31 pm

Hi,

I changed the minor version to 10 and all works fine now.

Thanks!

iphi
Rank 2
Rank 2
Posts: 68
Joined: Mon Jun 25, 2007 11:37 am

Post by iphi » Mon Apr 07, 2008 8:22 am

Correction,

to my previous post

I changed the minor version to 10 and all works fine now.


The newly built firmware doesn't work properly, see my other posting:

http://forums.obdev.at/viewtopic.php?t=1351


Regards, Tom

hychoi

where's stk500protocol.c

Post by hychoi » Tue Oct 07, 2008 10:47 am

christian wrote:That's indeed hard to find: in stk500protocol.c there's

Code: Select all

stkParam_t      stkParam = {{
                    0, 0, 0, 0, 0, 0, 0, 0,
                    0, 0, 0, 0, 0, 0, 0, 0,
                    1, 2, 4, 0, 50, 0, 1, 0x80,
                    2, 0, 0xaa, 0, 0, 0, 0, 0,
                }};


The type is defined as

Code: Select all

typedef union{
    uchar   bytes[32];
    struct{
        int     buildVersionLow;
        uchar   reserved1[14];
        uchar   hardwareVersion;
        uchar   softwareVersionMajor;
        uchar   softwareVersionMinor;
        uchar   reserved2;
        uchar   vTarget;
        uchar   vRef;
        uchar   oscPrescale;
        uchar   oscCmatch;
        uchar   sckDuration;
        uchar   reserved3;
        uchar   topcardDetect;
        uchar   reserved4;
        uchar   status;
        uchar   data;
        uchar   resetPolarity;
        uchar   controllerInit;
    }       s;
}stkParam_t;


So the first three numbers in the third row (1, 2, 4) are hardware version, software version major and software version minor.

[/url]

Post Reply