Page 1 of 1

AVR Doper Firmware Issue with AVR Studio Upgrade

Posted: Tue Apr 01, 2008 6:25 pm
by rdagger
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?

Posted: Tue Apr 01, 2008 9:32 pm
by christian
The firmware has the version number hard-coded. Simply change the version number in the firmware to whatever AVR-Studio expects.

Posted: Sat Apr 05, 2008 9:16 pm
by Guest
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

Posted: Sun Apr 06, 2008 8:46 am
by christian
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]

Posted: Sun Apr 06, 2008 12:31 pm
by Guest
Hi,

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

Thanks!

Posted: Mon Apr 07, 2008 8:22 am
by iphi
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

where's stk500protocol.c

Posted: Tue Oct 07, 2008 10:47 am
by hychoi
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]