Boo0ns / arduino

Automatically exported from code.google.com/p/arduino
0 stars 0 forks source link

STK500V2 Protocol Bug in Mega 2560 Bootloader #505

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The STK500V2 bootloader is comparing the seqNum to 1 or the current sequence 
(IE: Requiring the sequence to be 1 or match seqNum before continuing).  

The correct behavior is for the STK500V2 to accept the PC's sequence number, 
and echo it back for the reply message.

Here is the fix for the stk500boot.c file:

                    case ST_GET_SEQ_NUM:
                        seqNum          =   c;    
                        msgParseState   =   ST_MSG_SIZE_1;
                        checksum        ^=  c;
                        break;

This is on line 600 of the local copy of the source I have.

Original issue reported on code.google.com by mark.stu...@gmail.com on 15 Mar 2011 at 3:50

GoogleCodeExporter commented 9 years ago
Mark, this seems like something you're better positioned to handle than me.  

Original comment by dmel...@gmail.com on 30 Dec 2011 at 10:49

GoogleCodeExporter commented 9 years ago
Does anyone have a way to test this?

Original comment by mark.l.s...@gmail.com on 2 Jan 2012 at 1:01

GoogleCodeExporter commented 9 years ago
I've done a pull request here:

https://github.com/arduino/Arduino/pull/1183

a precompiled version with the suggested fix is here:

https://github.com/cmaglie/Arduino/blob/06ee62afc66e9917b3dc38bcf496de0e1a3d7d7d
/hardware/arduino/bootloaders/stk500v2/stk500boot_v2_mega2560.hex

Original comment by c.mag...@bug.st on 24 Jan 2013 at 2:42

GoogleCodeExporter commented 9 years ago

Original comment by c.mag...@arduino.cc on 11 Mar 2013 at 11:58