avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avrdude-dev] [bug #30736] Patch to stk500v2 to support non-USB XPROG


From: anonymous
Subject: [avrdude-dev] [bug #30736] Patch to stk500v2 to support non-USB XPROG
Date: Tue, 10 Aug 2010 18:59:43 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.8) Gecko/20100723 Ubuntu/10.04 (lucid) Firefox/3.6.8

URL:
  <http://savannah.nongnu.org/bugs/?30736>

                 Summary: Patch to stk500v2 to support non-USB XPROG
                 Project: AVR Downloader/UploaDEr
            Submitted by: None
            Submitted on: 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: address@hidden
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

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.



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 10 Aug 2010 06:59:42 PM UTC  Name: stk500v2-bareproto.diff  Size:
2kB   By: None

<http://savannah.nongnu.org/bugs/download.php?file_id=21184>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/bugs/?30736>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]