public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
* Re: downloading binary file
@ 2001-10-02 14:37 Hugo Villeneuve
  0 siblings, 0 replies; 8+ messages in thread
From: Hugo Villeneuve @ 2001-10-02 14:37 UTC (permalink / raw)
  To: Fernando Nasser, Fernando Nasser, Red Hat Insight

Hi Fernando,

	Sorry for the lag. I think it should be necessary to add the 
"download binary file" command to GDB. Here is what I want to do:

	I have my "ram2flash" program that is used to copy the content 
of a 84K block of RAM memory to Flash memory. What I need to do is to 
copy a very large binary file (336K) into the Flash memory using my 
ram2flash program. In order to do that, I must split the binary file 
into 336K/84K = 4 blocks. Once I have my 4 blocks of binary data, I 
must download each of them to RAM memory, and then call my 
"ram2flash" program to actually do the programming in Flash (for each 
of the four blocks). I tried to convert each of the binary blocks to 
ELF format, but GDB doesn't allow me to download it because this file 
has no debugging information. This is why I think the "download binary 
file" command would be useful.

	For sure, it isn't really a GDB debugger task, but a nice 
addition. In fact, most of the debuggers I used on other processors 
(not GDB) had this very basic feature.

	Bye, Hugo.


>With the knowledge that you can use objdump to make your binary 
>file into an elf file and then use that to load it on your
>target memory, are you still willing to work on this (your 
>problem is mostly solved, so I understand if you don't).
>
>I still think it would be a nice convenience for an engineer to say:
>
>binload address filename
>
>and have part of the target memory filled.
>
>As well as 
>
>bindump address length filename
>
>and save part of the memory on a binary file.
>
>
>Some people said they like the idea and some people objected that 
>this is nt a gdb task.
>
>
>If you want, I can start a discussion in the gdb@sourcesl.redhat.com
>to propose that before we go any further.
>
>
>Think about it and let me know.
>
>Have a nice weekend.
>
>Regards,
>Fernando
>
>
>
>
>Hugo Villeneuve wrote:
>> 
>> Hi,
>> 
>>         I want to know if it is possible with insight to download a 
raw
>> binary file to my board?
>> 
>>         I'm using a JEENI with the "AMR Angel/Ethernet" target. In 
fact,
>> what I want to do is load an ELF application in RAM, using the load
>> command of Insight. Then I want to download the binary file to RAM 
and
>> call my application to write this binary file in Flash memory.
>> 
>
>
>-- 
>Fernando Nasser
>Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
>2323 Yonge Street, Suite #300
>Toronto, Ontario   M4P 2C9
>

--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
@ 2001-11-16  8:21 Hugo Villeneuve
  0 siblings, 0 replies; 8+ messages in thread
From: Hugo Villeneuve @ 2001-11-16  8:21 UTC (permalink / raw)
  To: Fernando Nasser, Fernando Nasser, Red Hat Insight

Hi Fernando,

	Sorry for the lag. I think it should be necessary to add the 
"download binary file" command to GDB. Here is what I want to do:

	I have my "ram2flash" program that is used to copy the content 
of a 84K block of RAM memory to Flash memory. What I need to do is to 
copy a very large binary file (336K) into the Flash memory using my 
ram2flash program. In order to do that, I must split the binary file 
into 336K/84K = 4 blocks. Once I have my 4 blocks of binary data, I 
must download each of them to RAM memory, and then call my 
"ram2flash" program to actually do the programming in Flash (for each 
of the four blocks). I tried to convert each of the binary blocks to 
ELF format, but GDB doesn't allow me to download it because this file 
has no debugging information. This is why I think the "download binary 
file" command would be useful.

	For sure, it isn't really a GDB debugger task, but a nice 
addition. In fact, most of the debuggers I used on other processors 
(not GDB) had this very basic feature.

	Bye, Hugo.


>With the knowledge that you can use objdump to make your binary 
>file into an elf file and then use that to load it on your
>target memory, are you still willing to work on this (your 
>problem is mostly solved, so I understand if you don't).
>
>I still think it would be a nice convenience for an engineer to say:
>
>binload address filename
>
>and have part of the target memory filled.
>
>As well as 
>
>bindump address length filename
>
>and save part of the memory on a binary file.
>
>
>Some people said they like the idea and some people objected that 
>this is nt a gdb task.
>
>
>If you want, I can start a discussion in the gdb@sourcesl.redhat.com
>to propose that before we go any further.
>
>
>Think about it and let me know.
>
>Have a nice weekend.
>
>Regards,
>Fernando
>
>
>
>
>Hugo Villeneuve wrote:
>> 
>> Hi,
>> 
>>         I want to know if it is possible with insight to download a 
raw
>> binary file to my board?
>> 
>>         I'm using a JEENI with the "AMR Angel/Ethernet" target. In 
fact,
>> what I want to do is load an ELF application in RAM, using the load
>> command of Insight. Then I want to download the binary file to RAM 
and
>> call my application to write this binary file in Flash memory.
>> 
>
>
>-- 
>Fernando Nasser
>Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
>2323 Yonge Street, Suite #300
>Toronto, Ontario   M4P 2C9
>

--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
  2001-11-06 12:02 ` Grant Edwards
@ 2001-11-06 12:37   ` Fernando Nasser
  0 siblings, 0 replies; 8+ messages in thread
From: Fernando Nasser @ 2001-11-06 12:37 UTC (permalink / raw)
  To: Grant Edwards; +Cc: Hugo Villeneuve, Red Hat Insight

Grant Edwards wrote:
> 
> It would be awfully handy to have commands to dump a region of
> memory to a file in any of the bfd formats, and to be able to
> read such a file into memory at a specific location.  I keep
> threatening to impliment that, but I never do it...
> 

I also find them very useful (specially the second one).

Hugo has offered to help and I am currently looking for the 
FSF assignment form so he can fill and send it.



-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
       [not found] <20011106192114.6355F2D0553@breg.mc.mpls.visi.com>
@ 2001-11-06 12:02 ` Grant Edwards
  2001-11-06 12:37   ` Fernando Nasser
  0 siblings, 1 reply; 8+ messages in thread
From: Grant Edwards @ 2001-11-06 12:02 UTC (permalink / raw)
  To: Hugo Villeneuve; +Cc: Red Hat Insight

On Tue, Nov 06, 2001 at 02:19:57PM -0500, Hugo Villeneuve wrote:
> Hi,
> 
> 
> >I know you can if you convert the binary file to ELF using
> >arm-elf-objcopy.
> 
> This binary file is in fact produced from an ELF file. The problem is 
> that the .text section of this ELF file points to Flash memory, and I 
> want to download it to RAM memory.

So put it there.   objcopy can move sections around as well as
convert from one format to another.  It's a very handy little
program.  Do "man objcopy" and pay particular attention to
the --change-section-address option.

> >What model of Jeeni do you have?  I've never heard of the 
> >"AMR Angel/Ethernet" target before...
> 
> My typo error: should be "ARM Angel/Ethernet"

It would be awfully handy to have commands to dump a region of
memory to a file in any of the bfd formats, and to be able to
read such a file into memory at a specific location.  I keep
threatening to impliment that, but I never do it...

-- 
Grant Edwards
grante@visi.com

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
@ 2001-11-06 11:23 Hugo Villeneuve
  0 siblings, 0 replies; 8+ messages in thread
From: Hugo Villeneuve @ 2001-11-06 11:23 UTC (permalink / raw)
  To: Red Hat Insight

>If you are interested, I can give you some pointers to the right 
code,
>but you would have to sign an assignment of you code to the FSF
>(Free Software Foundation) first, so that your command can be 
integrated
>to GDB.
>
>How does it sound?


Sounds good, I'm waiting for your pointers.

	Thank-you, Hugo Villeneuve


--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
@ 2001-11-06 11:20 Hugo Villeneuve
  0 siblings, 0 replies; 8+ messages in thread
From: Hugo Villeneuve @ 2001-11-06 11:20 UTC (permalink / raw)
  To: Red Hat Insight

Hi,


>I know you can if you convert the binary file to ELF using
>arm-elf-objcopy.

This binary file is in fact produced from an ELF file. The problem is 
that the .text section of this ELF file points to Flash memory, and I 
want to download it to RAM memory.

>What model of Jeeni do you have?  I've never heard of the 
>"AMR Angel/Ethernet" target before...

My typo error: should be "ARM Angel/Ethernet"


	Hugo Villeneuve

--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: downloading binary file
       [not found] <200111061526.HAA13164@cygnus.com>
@ 2001-11-06  7:49 ` Fernando Nasser
  0 siblings, 0 replies; 8+ messages in thread
From: Fernando Nasser @ 2001-11-06  7:49 UTC (permalink / raw)
  To: hvilleneuve; +Cc: Red Hat Insight

Hugo Villeneuve wrote:
> 
> Hi,
> 
>         I want to know if it is possible with insight to download a raw
> binary file to my board?
> 

No, GDB (Insight is just the GUI to the GNU debugger, GDB) does not have
a command for that.  However, it does have all mechanisms to write to
the
target memory, so it would be easy to someone (you, perhaps?) to write
and add a command to read from a certain file format and write to the
target memory.

If you are interested, I can give you some pointers to the right code,
but you would have to sign an assignment of you code to the FSF
(Free Software Foundation) first, so that your command can be integrated
to GDB.

How does it sound?


>         I'm using a JEENI with the "AMR Angel/Ethernet" target. In fact,
> what I want to do is load an ELF application in RAM, using the load
> command of Insight. Then I want to download the binary file to RAM and
> call my application to write this binary file in Flash memory.
> 
-------

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* downloading binary file
@ 2001-11-06  7:00 Hugo Villeneuve
  0 siblings, 0 replies; 8+ messages in thread
From: Hugo Villeneuve @ 2001-11-06  7:00 UTC (permalink / raw)
  To: Red Hat Insight

Hi,

	I want to know if it is possible with insight to download a raw 
binary file to my board?

	I'm using a JEENI with the "AMR Angel/Ethernet" target. In fact, 
what I want to do is load an ELF application in RAM, using the load 
command of Insight. Then I want to download the binary file to RAM and 
call my application to write this binary file in Flash memory.

	Hugo Villeneuve.



--------------------------------------
  Hugo Villeneuve
  Hardware/Firmware Developer
  SoftAcoustik Inc.

  (418) 521-1515
  hvilleneuve@softacoustik.com
  http://www.softacoustik.com
-------------------------------------- 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2001-11-16 16:21 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-02 14:37 downloading binary file Hugo Villeneuve
2001-11-06  7:00 Hugo Villeneuve
     [not found] <200111061526.HAA13164@cygnus.com>
2001-11-06  7:49 ` Fernando Nasser
2001-11-06 11:20 Hugo Villeneuve
2001-11-06 11:23 Hugo Villeneuve
     [not found] <20011106192114.6355F2D0553@breg.mc.mpls.visi.com>
2001-11-06 12:02 ` Grant Edwards
2001-11-06 12:37   ` Fernando Nasser
2001-11-16  8:21 Hugo Villeneuve

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).