bugAVR Downloader/UploaDEr - Bugs: bug #30736, Patch to stk500v2 to support...


You are not allowed to post comments on this tracker with your current authentication level.

bug #30736: Patch to stk500v2 to support non-USB XPROG

Submitter:  None
Submitted:  Tue 10 Aug 2010 06:59:42 PM UTC
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  None Privacy:  Public
Assigned to:  None Originator Name:  Erik Walthinsen
Originator Email:  -email is unavailable- Open/Closed:  Open
Release:  None Programmer hardware: 
Device type: 

Tue 10 Aug 2010 06:59:42 PM UTC, original submission:  

In developing a stk500v2 XPROG bootloader for my product, I ran into a problem with avrdude switching into the USB-only unframed version of the protocol after SIGN_ON.  It does so because of an assumption that every stk500v2-xprog device will be communicating over USB.  In my case I'm running over a serial link (and soon running that over a mutliplexed protocol), and the assumption is no longer correct.

I did a quick hack to the stk500v2.c code in order to make both cases work.  Basically it adds a struct var 'bareproto', which is used to decide whether to send the stk500 commands framed or unframed, rather than the specific programmer type.  The flag itself is set when the actual comms port is selected, and currently is only set if it's USB.

Being a quick hack I don't expect this patch to go anywhere itself.  However, something like it should be put in place, since non-USB XPROG implementations are likely to show up (especially since I'll be releasing mine at some point soon...).

Likely a better way to implement it would be an avrdude.conf flag that would specifically set it to "framed-mode".  Along those lines it would be nice to have some way to define programmers by their SIGN_ON responses.  Since SIGN_ON is always sent in full stk500 framed mode no matter what, having avrdude check through the .conf for a string match (rather than hard-coded) and then picking up the "framed-mode" flag before continuing would make it easy to define new programmer types for bootloaders, etc.

Due to my development schedule I'm unable to do anything further on this at this point, but if it's still an issue when I have a bit more time, I'll see if I can give it a go.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #21184:  stk500v2-bareproto.diff added by None (2KiB - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by None (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-08-10 None Attached File- Added stk500v2-bareproto.diff, #21184

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code