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

 
 

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

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

Submitted by:  None
Submitted on:  Tue 10 Aug 2010 06:59:42 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: NonePrivacy: Public
Assigned to: NoneOriginator Name: Erik Walthinsen
Originator Email: -unavailable-Open/Closed: Open

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.

Anonymous

 

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

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 10 Aug 2010 06:59:42 PM UTCNoneAttached File-=>Added stk500v2-bareproto.diff, #21184

    Back to the top


    Powered by Savane 3.1-cleanup