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: Thu, 25 May 2006 02:18:00 -0000 [thread overview]
Message-ID: <vt2d5e3rkne.fsf@theseus.home.> (raw)
In-Reply-To: <4474F8D3.3000708@sakuraindustries.com> (Steven Johnson's message of "Thu, 25 May 2006 11:22:43 +1100")
Steven Johnson <sjohnson@sakuraindustries.com> writes:
> Answering the ideas proposed directly below:
>
>>Background
Well, the "Background" section was mostly meant to explain what flash
is and why it needs special treatment, for people who aren't familiar
with it. The comments you've posted on that seem like they'll be
important when we get down to talking about implementation, so I'll
leave them aside for now.
>>If the program image loaded by the load command will result in any
>>portion of the program image being placed in flash memory, then GDB is
>>responsible for modifying the flash accordingly. GDB must not modify
>>bytes outside of the program image itself. Therefore, if the program
>>image occupies only a portion of a flash sector, GDB is responsible
>>for arranging flash read/erase/write commands appropriately so as to
>>avoid changing unmodified portions of the sector.
>>
>>
> This should be optional, doing the copy away and back takes time. If
> there are no parameters in the flash, then it slows down the "load" for
> no gain.
That's a good point. It's important for the interface to allow
efficient implementations; performance is part of the user interface.
If everyone hacks around it because it's slow, then we haven't
contributed much.
In your experience, on modern devices, what's the longest it takes to
copy a sector of flash to RAM? Does the time required to write a
sector depend on how much you actually modify from the "erased" state?
> I think the ability to tell GDB about a targets "memory map" in a
> generic way would be good, for example being able to tell GDB:
> 1. A region of memory is read only (whether it be flash or otherwise)
> 2. A region of memory is not to be read cached. ie, it must be fetched
> from the target each time it is read by GDB.
> 3. A region of memory doesnt exist, don't read or write it.
Actually, GDB already has this, to some extent; look at the "mem"
command, or see (gdb)Memory Region Attributes in the GDB manual. I
could see making flash state a new kind of memory region attribute.
Assuming that we can expand in this way as needed, do you think the
single global option could be useful in the first cut?
next prev parent reply other threads:[~2006-05-25 0:52 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
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 [this message]
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=vt2d5e3rkne.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