Skip to content

STK500V2 Protocol Bug in Mega 2560 Bootloader [imported] #505

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cmaglie opened this issue Nov 15, 2012 · 1 comment
Closed

STK500V2 Protocol Bug in Mega 2560 Bootloader [imported] #505

cmaglie opened this issue Nov 15, 2012 · 1 comment
Assignees
Labels
Component: Bootloader The bootloader is the program used to load the uploaded program into the microcontroller's memory Component: Firmware Limited to the contents of the firmwares folder in the core packages
Milestone

Comments

@cmaglie
Copy link
Member

cmaglie commented Nov 15, 2012

This is Issue 505 moved from a Google Code project.
Added by 2011-03-15T03:50:52.000Z by [email protected].
Please review that bug for more context and additional comments, but update this bug.

Original labels: Type-Defect, Priority-Medium, Component-stk500v2

Original description

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.

@cmaglie
Copy link
Member Author

cmaglie commented Feb 11, 2013

Please look at the pullrequest here #1183

The updated hex bootloader is available here:

https://github.com/cmaglie/Arduino/blob/mega2560-bootloader/hardware/arduino/bootloaders/stk500v2/stk500boot_v2_mega2560.hex

Please check it out and report here #1183 success or failures.
Thank you!

C

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Bootloader The bootloader is the program used to load the uploaded program into the microcontroller's memory Component: Firmware Limited to the contents of the firmwares folder in the core packages
Projects
None yet
Development

No branches or pull requests

1 participant