Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@codesourcery.com>
To: Steven Johnson <sjohnson@sakuraindustries.com>
Cc: gdb@sourceware.org
Subject: Re: GDB support for Flash memory programming
Date: Wed, 24 May 2006 22:07:00 -0000	[thread overview]
Message-ID: <vt28xorw2lt.fsf@theseus.home.> (raw)
In-Reply-To: <4473B2D2.9000104@sakuraindustries.com> (Steven Johnson's message of "Wed, 24 May 2006 12:11:46 +1100")


Steven Johnson <sjohnson@sakuraindustries.com> writes:
> I've been using GDB to debug programs (and load them with "load") in
> flash for a long time.  What I do, isn't necessarily generic, but i
> thought it worth relaying given the current topic, my experience may be
> useful (or not).

Thanks for taking the time to look over the proposal!  From my point
of view, this list hardly ever has much discussion on issues that are
specific to embedded development (as opposed to more generic concerns,
like, say, stack unwinding), so I'm encouraged to think that there
could be a solid base of users whose experience we can build on.

That's quite a setup you've got there.

> Its a little clunky and requires some small custom commands to be added
> to the monitor stub (none of which are very difficult), but it works
> well is 100% reliable and is fast.  Now if bput'ing and mem-remapping
> (or the like) became standard commands and gdb did it, instead of the
> stub, so much
> better.  In my opinion that's all that's really required for a GDB
> generic approach, because, there are so many different targets with
> different flash
> programming requirements (different algorithms, 8, 16, 32 bit, etc.)
> that I'm not sure a fully "generic" approach is ever going to be very
> workable.  At the very least, there is going to need to be different
> flash programming algorithms, and then GDB is going to have to be taught
> what ones are appropriate for a particular memory space on a particulat
> target, and it may have multiple different ones, etc..  With the method
> I describe here it doesn't matter, because the user provides a "flash
> burning stub" which takes care of it for the target in question.
>
> I have concerns about GDB "Burning" flash directly, because burning
> flash directly over a JTAG interface is (in my experience) orders of
> magnitude slower than burning from target ram to flash.  Provided the
> target has available ram to do it, i would always prefer a load to ram,
> burn from there approach, because it is heaps faster, and speed matters
> (especially at load).  no one wants to wait 10 minutes or more, every
> time they want to do a new "load" to test a bug.

Well, I think you're making assumptions about the implementation that
aren't implied by the proposal.  As we say:

    In what follows, the term "GDB" refers to the user's view of GDB,
    which includes GDB, any applicable stub, the ICE units, etc. Thus
    statements like "GDB must do X" are not meant to imply that GDB proper
    must do X, but rather that GDB must cause X to occur.

For the time being, let's assume that detailed knowledge of the device
can be placed somewhere appropriate, that we can work out ways to use
efficient transfer methods, and so on.  For example, the details of
the flash programming algorithm don't need to be in GDB itself: the
stub could be responsible for the details, and GDB would simply need
to provide the stub blocks of data in some convenient way.

I guess what we really want to settle at this point is, if we could
arrange for the commands to Just Work as described, would that
actually be what you need for your workflow?  Or are there other needs
that we don't understand yet?


  reply	other threads:[~2006-05-24 21:11 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24  1:44 Jim Blandy
2006-05-24  2:03 ` Steven Johnson
2006-05-24 22:07   ` Jim Blandy [this message]
2006-05-25  2:35     ` Steven Johnson
2006-05-24  4:43 ` Nathan J. Williams
2006-05-24 22:17   ` Jim Blandy
2006-05-24  8:03 ` Russell Shaw
2006-05-25  0:22   ` Jim Blandy
2006-05-25  3:05     ` Russell Shaw
2006-05-25  0:39   ` GDB and remote protocols Daniel Jacobowitz
2006-05-25  3:04     ` Russell Shaw
2006-05-25  0:52 ` GDB support for Flash memory programming Steven Johnson
2006-05-25  1:11   ` Peter Barada
2006-05-25  2:18   ` Jim Blandy
2006-05-25  3:29     ` Steven Johnson
2006-05-26 18:42       ` Jim Blandy
2006-05-27  0:02         ` Steven Johnson
2006-06-17 20:07 ` Mark Kettenis
2006-06-18  9:55   ` Jim Blandy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt28xorw2lt.fsf@theseus.home. \
    --to=jimb@codesourcery.com \
    --cc=gdb@sourceware.org \
    --cc=sjohnson@sakuraindustries.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox