This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Best way to do a flash memory dump to host from target?
- From: Gary Thomas <gary at mlbassoc dot com>
- To: Andrew Greenberg <andrew at uad dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Tue, 29 Mar 2005 13:45:02 -0700
- Subject: Re: [ECOS] Best way to do a flash memory dump to host from target?
- Organization: MLB Associates
- References: <5.2.1.1.2.20050329123242.03e03440@mail.speakeasy.net>
On Tue, 2005-03-29 at 12:38 -0800, Andrew Greenberg wrote:
> Hi all,
>
> I've got RedBoot running in RAM on a remote target and before I write a ROM
> version to flash I'd like to capture the existing flash memory so I can "go
> back" if I ever want to.
>
> 1. the stock RedBoot I built doesn't seem to have any facilities for this;
> there's 'load' which allows me to load in file via x/y modem, but is there
> a package I can add that will give me a 'send' so that I can send a memory
> chunk via x/y modem back to the host?
>
> 2. I can do a minicom capture of dump -b <address> -l <length> -s which
> will give me the s-record listing and then use objcopy to convert that to a
> binary... but yeech, that's a twisted way to get it.
Why convert it at all? If you want to reload it, the 'load' command
understands S-records. Using the -b option, you can relocate the data
to RAM for programming to the FLASH.
>
> 3. Finally, it looks like in gdb I can say 'dump binary memory <filename>
> <start address> <stop address>. I've done this a few times, and it seems
> like it works, but I often get error message from gdb about invalid packets
> which makes me a bit worried that the data is being corrupted. Is this what
> most people do?
You shouldn't get errors from GDB. If they are repeatable (even
somewhat), a trace would be good to see.
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss