public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] arm-elf-objcopy
@ 2004-07-26  9:42 Aravind B
  0 siblings, 0 replies; 10+ messages in thread
From: Aravind B @ 2004-07-26  9:42 UTC (permalink / raw)
  To: ecos


>Since the BSS should not be part of the hex file, it is not at all
>clear why this message is being generated. What options are you giving
>objcopy?

arm-elf-objcopy -O ihex $(EXECUTABLE).elf $(EXECUTABLE).hex

> I'm not sure what you are trying to do with this executable.
 I have 4 flash each 8 MB.I have hex file size 9.2MB. So i want to split
it,  so that i can download it on to the flash.

>What target are you using?
I am using arm9 softcore in an altera excalibur chip.
> What class of ARM CPU does it have?
arm922t

thanking in advance
Aravind 



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] arm-elf-objcopy
  2004-07-27  6:09 Aravind B
@ 2004-07-27  9:31 ` Nick Garnett
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Garnett @ 2004-07-27  9:31 UTC (permalink / raw)
  To: Aravind B; +Cc: ecos

Aravind B <arvindb@cranessoftware.com> writes:

> > Aravind B <arvindb@cranessoftware.com> writes:
> 
> > i have generated an hex file from elf using command
> > arm-elf-objcopy -O ihex simple-alarm2.elf simple.hex
> > when i tried to generate a bin file (dos environment) using this hex
> > file, i am getting an error - Invalid record type in hex record - < 
> > line
> > number>. This happens with all .hex files generated, using
> > arm-elf-objcopy.
> > What is the hex record at that line? Does it look invalid? Maybe the
> > DOS tool you are using has a different idea of what constitutes a hex
> > file to binutils. 
> > 
> > I would like to know if this error is due to incorrect usage of the
> > above command or for any other reason.
> 
> > Generally we have only ever generated different formats directly from
> > the ELF original. Going via some intermediary format doesn't always
> > work since the intermediary may not have preserved enough information.
> 
> > -- 
> > Nick Garnett                    eCos Kernel Architect
> > http://www.ecoscentric.com/     The eCos and RedBoot experts
> 
> 
> So intel hex file generated by dos environment is different form linux
> environment.
> the line which is giving error is 
> :040000054000004077.
> I think it is invalid because another line 
> :020000044003b7
> have the same address.


It looks like your DOS tool does not understand some of the 32 bit
record types.

> 
> i want to know why this is happening.And is there a way to get rid of
> it.
> Actually i want to split intel hex file so that it can be fit int my
> flash.For that i am using hex file splitter in dos.
> Is it possible to split hex file in linux.

objcopy has some options which might help here.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] arm-elf-objcopy
@ 2004-07-27  6:09 Aravind B
  2004-07-27  9:31 ` Nick Garnett
  0 siblings, 1 reply; 10+ messages in thread
From: Aravind B @ 2004-07-27  6:09 UTC (permalink / raw)
  To: ecos


> Aravind B <arvindb@cranessoftware.com> writes:

> i have generated an hex file from elf using command
> arm-elf-objcopy -O ihex simple-alarm2.elf simple.hex
> when i tried to generate a bin file (dos environment) using this hex
> file, i am getting an error - Invalid record type in hex record - < 
> line
> number>. This happens with all .hex files generated, using
> arm-elf-objcopy.
> What is the hex record at that line? Does it look invalid? Maybe the
> DOS tool you are using has a different idea of what constitutes a hex
> file to binutils. 
> 
> I would like to know if this error is due to incorrect usage of the
> above command or for any other reason.

> Generally we have only ever generated different formats directly from
> the ELF original. Going via some intermediary format doesn't always
> work since the intermediary may not have preserved enough information.

> -- 
> Nick Garnett                    eCos Kernel Architect
> http://www.ecoscentric.com/     The eCos and RedBoot experts


So intel hex file generated by dos environment is different form linux
environment.
the line which is giving error is 
:040000054000004077.
I think it is invalid because another line 
:020000044003b7
have the same address.

i want to know why this is happening.And is there a way to get rid of
it.
Actually i want to split intel hex file so that it can be fit int my
flash.For that i am using hex file splitter in dos.
Is it possible to split hex file in linux.

thanking in advance

Aravind B



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] arm-elf-objcopy
  2004-07-23 13:36 Aravind B
@ 2004-07-23 13:38 ` Nick Garnett
  0 siblings, 0 replies; 10+ messages in thread
From: Nick Garnett @ 2004-07-23 13:38 UTC (permalink / raw)
  To: Aravind B; +Cc: ecos

Aravind B <arvindb@cranessoftware.com> writes:

> i have generated an hex file from elf using command
> arm-elf-objcopy -O ihex simple-alarm2.elf simple.hex
> when i tried to generate a bin file (dos environment) using this hex
> file, i am getting an error - Invalid record type in hex record - < line
> number>. This happens with all .hex files generated, using
> arm-elf-objcopy.

What is the hex record at that line? Does it look invalid? Maybe the
DOS tool you are using has a different idea of what constitutes a hex
file to binutils. 

> 
> I would like to know if this error is due to incorrect usage of the
> above command or for any other reason.

Generally we have only ever generated different formats directly from
the ELF original. Going via some intermediary format doesn't always
work since the intermediary may not have preserved enough information.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com/     The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] arm-elf-objcopy
@ 2004-07-23 13:36 Aravind B
  2004-07-23 13:38 ` Nick Garnett
  0 siblings, 1 reply; 10+ messages in thread
From: Aravind B @ 2004-07-23 13:36 UTC (permalink / raw)
  To: ecos

i have generated an hex file from elf using command
arm-elf-objcopy -O ihex simple-alarm2.elf simple.hex
when i tried to generate a bin file (dos environment) using this hex
file, i am getting an error - Invalid record type in hex record - < line
number>. This happens with all .hex files generated, using
arm-elf-objcopy.

I would like to know if this error is due to incorrect usage of the
above command or for any other reason.

Thanking in advance 
Aravind B



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] arm-elf-objcopy
  2004-07-20 11:25 Aravind B
  2004-07-20 11:25 ` Gary Thomas
@ 2004-07-20 17:07 ` Marco Aurélio da Cruz
  1 sibling, 0 replies; 10+ messages in thread
From: Marco Aurélio da Cruz @ 2004-07-20 17:07 UTC (permalink / raw)
  To: Aravind B, ecos-discuss

Hi Aravind.

I don't know if I can help, but I needed to use a little manoeuvre to 
make the EPROM possible on my AT91M558000 basead board.

After I generate my .elf file I was using objcopy to generate a .hex 
file. It happens that the .hex did not work in my EETOLS TOP MAX 
Programmer. So I generated the .bin file, but it was huge (32MB). The 
objcopy generated a flat file that comprised the whole target memory 
map. So, I edited the .bin file and cut out all bytes until the 
beginning of the efective code (I supposed it should be at 0x0200:0000 
but it was at 0x1FF:FC00).
Afterwards I saved the new .bin file and recorded my EPROM and it worked 
fine!!

Marco 



Aravind B wrote:

>hi,
>i am trying to convert .elf to .hex file using the command
>arm-elf-objcopy -O ihex receive.elf receive.hex.
>My .elf file is 4.2Mb. But my .hex file size is 9 Mb which is beyound my
>flash capacity.
>So is there any way to reduce the size of .hex file
>
>thanking in advance
>
>
>
>  
>

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] arm-elf-objcopy
@ 2004-07-20 13:37 Aravind B
  0 siblings, 0 replies; 10+ messages in thread
From: Aravind B @ 2004-07-20 13:37 UTC (permalink / raw)
  To: ecos-discuss

> >On Tue, 2004-07-20 at 05:29, Aravind B wrote:
> On Tue, 2004-07-20 at 16:55, Gary Thomas wrote:
> > On Tue, 2004-07-20 at 05:18, Aravind B wrote:
> > > hi,
> > > i am trying to convert .elf to .hex file using the command
> > > arm-elf-objcopy -O ihex receive.elf receive.hex.
> > > My .elf file is 4.2Mb. But my .hex file size is 9 Mb which is
beyound my
> > > flash capacity.
> > > So is there any way to reduce the size of .hex file
> > 
> > How big is the actual data?  Use "arm-elf-size" to see this.
> > Maybe look at the headers to see if there is some reason for this
> > huge size.  Can you send the output of "arm-elf-objdump -h"?
> > 
> arm-elf-objdump receive.elf -h
> 
> receive.elf:     file format elf32-littlearm
> 
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .rom_vectors  00000040  40000000  40000000  00008000  2**0
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   1 .text         0002cee8  40000040  40000040  00008040  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   2 .fini         00000000  4002cf28  4002cf28  0004868c  2**0
>                   CONTENTS
>   3 .rodata       0000c614  4002cf28  4002cf28  00034f28  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   4 .rodata1      00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   5 .fixup        00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   6 .gcc_except_table 00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   7 .fixed_vectors 00000140  10000020  10000020  000486a0  2**5
>                   CONTENTS, READONLY
>   8 .data         0000068c  10008000  4003953c  00048000  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   9 .bss          00033318  1000868c  1000868c  0005068c  2**5
>                   ALLOC
>  10 .comment      00000a9e  00000000  00000000  0005068c  2**0
>                   CONTENTS, READONLY

> Your program is actually only about 200KB.  I think the problem may
> be the disparate sections confusing the ihex format (which IIRC is
> rather simpleminded).  

> Why are you converting to ihex anyway?  to use with e FLASH programmer
> or JTAG unit?  Can't you use some other format, like Motorola 
> S-records?

 Flash chip i am using supports only intel format as it intel chip.



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] arm-elf-objcopy
       [not found]   ` <1090322974.5674.5.camel@ambica>
@ 2004-07-20 12:34     ` Gary Thomas
  0 siblings, 0 replies; 10+ messages in thread
From: Gary Thomas @ 2004-07-20 12:34 UTC (permalink / raw)
  To: Aravind B; +Cc: eCos Discussion

Please copy responses to the mailing list so that all may benefit.  
Private email support is only available with a support contract from
MLB Associates.

On Tue, 2004-07-20 at 05:29, Aravind B wrote:
> On Tue, 2004-07-20 at 16:55, Gary Thomas wrote:
> > On Tue, 2004-07-20 at 05:18, Aravind B wrote:
> > > hi,
> > > i am trying to convert .elf to .hex file using the command
> > > arm-elf-objcopy -O ihex receive.elf receive.hex.
> > > My .elf file is 4.2Mb. But my .hex file size is 9 Mb which is beyound my
> > > flash capacity.
> > > So is there any way to reduce the size of .hex file
> > 
> > How big is the actual data?  Use "arm-elf-size" to see this.
> > Maybe look at the headers to see if there is some reason for this
> > huge size.  Can you send the output of "arm-elf-objdump -h"?
> > 
> arm-elf-objdump receive.elf -h
> 
> receive.elf:     file format elf32-littlearm
> 
> Sections:
> Idx Name          Size      VMA       LMA       File off  Algn
>   0 .rom_vectors  00000040  40000000  40000000  00008000  2**0
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   1 .text         0002cee8  40000040  40000040  00008040  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, CODE
>   2 .fini         00000000  4002cf28  4002cf28  0004868c  2**0
>                   CONTENTS
>   3 .rodata       0000c614  4002cf28  4002cf28  00034f28  2**2
>                   CONTENTS, ALLOC, LOAD, READONLY, DATA
>   4 .rodata1      00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   5 .fixup        00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   6 .gcc_except_table 00000000  4003953c  4003953c  0004868c  2**0
>                   CONTENTS
>   7 .fixed_vectors 00000140  10000020  10000020  000486a0  2**5
>                   CONTENTS, READONLY
>   8 .data         0000068c  10008000  4003953c  00048000  2**2
>                   CONTENTS, ALLOC, LOAD, DATA
>   9 .bss          00033318  1000868c  1000868c  0005068c  2**5
>                   ALLOC
>  10 .comment      00000a9e  00000000  00000000  0005068c  2**0
>                   CONTENTS, READONLY

Your program is actually only about 200KB.  I think the problem may
be the disparate sections confusing the ihex format (which IIRC is
rather simpleminded).  

Why are you converting to ihex anyway?  to use with e FLASH programmer 
or JTAG unit?  Can't you use some other format, like Motorola S-records?

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] arm-elf-objcopy
@ 2004-07-20 11:25 Aravind B
  2004-07-20 11:25 ` Gary Thomas
  2004-07-20 17:07 ` Marco Aurélio da Cruz
  0 siblings, 2 replies; 10+ messages in thread
From: Aravind B @ 2004-07-20 11:25 UTC (permalink / raw)
  To: ecos-discuss

hi,
i am trying to convert .elf to .hex file using the command
arm-elf-objcopy -O ihex receive.elf receive.hex.
My .elf file is 4.2Mb. But my .hex file size is 9 Mb which is beyound my
flash capacity.
So is there any way to reduce the size of .hex file

thanking in advance



-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] arm-elf-objcopy
  2004-07-20 11:25 Aravind B
@ 2004-07-20 11:25 ` Gary Thomas
       [not found]   ` <1090322974.5674.5.camel@ambica>
  2004-07-20 17:07 ` Marco Aurélio da Cruz
  1 sibling, 1 reply; 10+ messages in thread
From: Gary Thomas @ 2004-07-20 11:25 UTC (permalink / raw)
  To: Aravind B; +Cc: ecos-discuss

On Tue, 2004-07-20 at 05:18, Aravind B wrote:
> hi,
> i am trying to convert .elf to .hex file using the command
> arm-elf-objcopy -O ihex receive.elf receive.hex.
> My .elf file is 4.2Mb. But my .hex file size is 9 Mb which is beyound my
> flash capacity.
> So is there any way to reduce the size of .hex file

How big is the actual data?  Use "arm-elf-size" to see this.
Maybe look at the headers to see if there is some reason for this
huge size.  Can you send the output of "arm-elf-objdump -h"?

-- 
Gary Thomas <gary@mlbassoc.com>
MLB Associates


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2004-07-27  8:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-26  9:42 [ECOS] arm-elf-objcopy Aravind B
  -- strict thread matches above, loose matches on Subject: below --
2004-07-27  6:09 Aravind B
2004-07-27  9:31 ` Nick Garnett
2004-07-23 13:36 Aravind B
2004-07-23 13:38 ` Nick Garnett
2004-07-20 13:37 Aravind B
2004-07-20 11:25 Aravind B
2004-07-20 11:25 ` Gary Thomas
     [not found]   ` <1090322974.5674.5.camel@ambica>
2004-07-20 12:34     ` Gary Thomas
2004-07-20 17:07 ` Marco Aurélio da Cruz

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).