public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
@ 2002-10-25  8:26 Cusson, Pascal
  0 siblings, 0 replies; 14+ messages in thread
From: Cusson, Pascal @ 2002-10-25  8:26 UTC (permalink / raw)
  To: Qiang Huang; +Cc: ecos-discuss

Hi Qiang,
   As stated before there are many free tools to convert an elf (format
produced by default) to S-Record. The problem with S-Record is that they
don't contain the debug information. I would really doubt that ecos
won't work with S-record however you will not be available to use a
debugger.

Pascal 

-----Original Message-----
From: Qiang Huang [mailto:jameshq@liverpool.ac.uk]
Sent: Friday, October 25, 2002 10:59 AM
To: Nick Garnett
Cc: Ecos-Discuss
Subject: RE: [ECOS] Is it possible to convert *.out file to *.srec file?


what do u mean ecos relies on the features of the ELF format to work
correctly? Does that mean I can't convert the ELF format to *.srec
format
and use?
Thanks

-----Original Message-----
From: Nick Garnett [mailto:nickg@ecoscentric.com]
Sent: 25 October 2002 11:53
To: Qiang Huang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Is it possible to convert *.out file to *.srec file?


"Qiang Huang" <jameshq@liverpool.ac.uk> writes:

> If I build the ecos application to *.out file, is there any way I can
> convert it to *.srec file format?
> Thanks a lot
>

You should not be using tools that produce a.out format object
files. eCos relies on features of the ELF format to work correctly.

If your tools are producing a.out files then they are the wrong
ones. Look at the documentation on the website for how to build the
correct ones.

--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/



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

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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  7:59 ` Qiang Huang
@ 2002-10-25  8:20   ` Andrew Lunn
  0 siblings, 0 replies; 14+ messages in thread
From: Andrew Lunn @ 2002-10-25  8:20 UTC (permalink / raw)
  To: Qiang Huang; +Cc: Ecos-Discuss

You have to be careful not to mix up two things here.

There are file names and there are object file formats.

elf is an object file format. So if Coff and aout. These specify how
you represent machine code, symbol tables, data etc in an object file
or an executable. For eCos elf format is used.

Then there are file names. For a unix system, you can name your
program anything you want. For M$ system, the ending has some
importance. eg .com and .exe or .bat till the OS how to execute the
file. Now, when you ask gcc to link an image, and you don't pass the
-o option to give is a name, it defaults to a.out. This is purely
historic. The name it uses has nothing to do with the file format.

Now, you can turn any object file formats i listed above to .srec. All
this does is strip away all the information that is not needed, like
the symbol table, the debug information etc. It leaves behind the raw
image you need to put into memory and execute. It then takes this raw
image and turns it into an ASCII format which many bootloaders and
flash programmers understand. This ASCII format is called srec.

This should answer the second part of the question. 

For the first part, the linker scripts are setup for elf. You could in
theory re-write them for another format. There could be other things
which require elf, like the magic sections redboot uses for its
commands, and the HAL tables. I don't know enough about gcc to so...

I think, a long time ago, someone asked about using a different object
file format. They had a special tool chain from a manufacture which
did not support elf. I don't remember the outcome of the discussion,
but its probably in the archive....

HTH

        Andrew

On Fri, Oct 25, 2002 at 03:59:27PM +0100, Qiang Huang wrote:
> what do u mean ecos relies on the features of the ELF format to work
> correctly? Does that mean I can't convert the ELF format to *.srec format
> and use?
> Thanks
> 
> -----Original Message-----
> From: Nick Garnett [mailto:nickg@ecoscentric.com]
> Sent: 25 October 2002 11:53
> To: Qiang Huang
> Cc: Ecos-Discuss
> Subject: Re: [ECOS] Is it possible to convert *.out file to *.srec file?
> 
> 
> "Qiang Huang" <jameshq@liverpool.ac.uk> writes:
> 
> > If I build the ecos application to *.out file, is there any way I can
> > convert it to *.srec file format?
> > Thanks a lot
> >
> 
> You should not be using tools that produce a.out format object
> files. eCos relies on features of the ELF format to work correctly.
> 
> If your tools are producing a.out files then they are the wrong
> ones. Look at the documentation on the website for how to build the
> correct ones.
> 
> --
> Nick Garnett - eCos Kernel Architect
> http://www.eCosCentric.com/
> 
> 
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss
> 

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

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

* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
       [not found] <m3elaerdry.fsf@ecoscentric.com>
@ 2002-10-25  7:59 ` Qiang Huang
  2002-10-25  8:20   ` Andrew Lunn
  0 siblings, 1 reply; 14+ messages in thread
From: Qiang Huang @ 2002-10-25  7:59 UTC (permalink / raw)
  To: Nick Garnett; +Cc: Ecos-Discuss

what do u mean ecos relies on the features of the ELF format to work
correctly? Does that mean I can't convert the ELF format to *.srec format
and use?
Thanks

-----Original Message-----
From: Nick Garnett [mailto:nickg@ecoscentric.com]
Sent: 25 October 2002 11:53
To: Qiang Huang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Is it possible to convert *.out file to *.srec file?


"Qiang Huang" <jameshq@liverpool.ac.uk> writes:

> If I build the ecos application to *.out file, is there any way I can
> convert it to *.srec file format?
> Thanks a lot
>

You should not be using tools that produce a.out format object
files. eCos relies on features of the ELF format to work correctly.

If your tools are producing a.out files then they are the wrong
ones. Look at the documentation on the website for how to build the
correct ones.

--
Nick Garnett - eCos Kernel Architect
http://www.eCosCentric.com/



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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  7:12             ` Jonathan Larmour
@ 2002-10-25  7:18               ` Grant Edwards
  0 siblings, 0 replies; 14+ messages in thread
From: Grant Edwards @ 2002-10-25  7:18 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Qiang Huang, Ecos-Discuss

On Fri, Oct 25, 2002 at 03:11:55PM +0100, Jonathan Larmour wrote:
> Grant Edwards wrote:
> > On Fri, Oct 25, 2002 at 02:09:17PM +0100, Jonathan Larmour wrote:
> > 
> > 
> >>Yes. You could specify -o foo on the command line and it would create the 
> >>file as "foo" instead of a.out.
> > 
> > 
> > Except under Cygwin, where specifying "-o foo" creates foo.exe.
> > IMO, this is a bug in the linker.  [The end result is that the
> > makefiles I use under Linux don't work under Cygwin.]
> 
> I think they "fixed" that now in more recent GCC when cross compiling.

Could be (IIRC, I ran into the problem with ld rather than
gcc).

I hear that GCC 3.x now ignores carriage returns in source
files in a useful manner.  That was a long time coming and
could have save me hours of time spent troubleshooting cutomer
problems over the phone.  :)

-- 
Grant Edwards
grante@visi.com

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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  7:10           ` Grant Edwards
@ 2002-10-25  7:12             ` Jonathan Larmour
  2002-10-25  7:18               ` Grant Edwards
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Larmour @ 2002-10-25  7:12 UTC (permalink / raw)
  To: Grant Edwards; +Cc: Qiang Huang, Ecos-Discuss

Grant Edwards wrote:
> On Fri, Oct 25, 2002 at 02:09:17PM +0100, Jonathan Larmour wrote:
> 
> 
>>Yes. You could specify -o foo on the command line and it would create the 
>>file as "foo" instead of a.out.
> 
> 
> Except under Cygwin, where specifying "-o foo" creates foo.exe.
> IMO, this is a bug in the linker.  [The end result is that the
> makefiles I use under Linux don't work under Cygwin.]

I think they "fixed" that now in more recent GCC when cross compiling.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  6:09         ` Jonathan Larmour
@ 2002-10-25  7:10           ` Grant Edwards
  2002-10-25  7:12             ` Jonathan Larmour
  0 siblings, 1 reply; 14+ messages in thread
From: Grant Edwards @ 2002-10-25  7:10 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Qiang Huang, Ecos-Discuss

On Fri, Oct 25, 2002 at 02:09:17PM +0100, Jonathan Larmour wrote:

> Yes. You could specify -o foo on the command line and it would create the 
> file as "foo" instead of a.out.

Except under Cygwin, where specifying "-o foo" creates foo.exe.
IMO, this is a bug in the linker.  [The end result is that the
makefiles I use under Linux don't work under Cygwin.]

-- 
Grant Edwards
grante@visi.com

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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  6:05       ` Qiang Huang
  2002-10-25  6:09         ` Jonathan Larmour
  2002-10-25  6:10         ` Gary Thomas
@ 2002-10-25  7:08         ` Grant Edwards
  2 siblings, 0 replies; 14+ messages in thread
From: Grant Edwards @ 2002-10-25  7:08 UTC (permalink / raw)
  To: Qiang Huang; +Cc: Jonathan Larmour, Ecos-Discuss

On Fri, Oct 25, 2002 at 02:05:52PM +0100, Qiang Huang wrote:
> gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/
> ecos-work/install/lib -Ttarget.ld -nostdlib
> 
> which format will be the output?( I got a.out file here. is this ELF
> format?)

$ man file

-- 
Grant Edwards
grante@visi.com

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

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

* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  6:05       ` Qiang Huang
  2002-10-25  6:09         ` Jonathan Larmour
@ 2002-10-25  6:10         ` Gary Thomas
  2002-10-25  7:08         ` Grant Edwards
  2 siblings, 0 replies; 14+ messages in thread
From: Gary Thomas @ 2002-10-25  6:10 UTC (permalink / raw)
  To: Qiang Huang; +Cc: Jonathan Larmour, eCos Discussion

On Fri, 2002-10-25 at 07:05, Qiang Huang wrote:
> like in the example:
> 
> gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/
> ecos-work/install/lib -Ttarget.ld -nostdlib
> 
> which format will be the output?( I got a.out file here. is this ELF
> format?)
> 

Most likely.  Again, check your documentation for the details, but
you can use the "file" command like this, just to verify:
  [gthomas@hermes ecos]$ file test/timer
  test/timer: ELF 32-bit MSB executable, PowerPC or cisco 4500, version 1 (SYSV), 
  statically linked, not stripped

> Thanks a lot.
> 
> -----Original Message-----
> From: Jonathan Larmour [mailto:jifl@eCosCentric.com]
> Sent: 25 October 2002 13:58
> To: Qiang Huang
> Cc: Ecos-Discuss
> Subject: Re: [ECOS] Is it possible to convert *.out file to *.srec file?
> 
> 
> Qiang Huang wrote:
> > how can I find out which target is support in my platform?
> 
> I'm not sure exactly
> what you mean, but we always generate ELF and go
> *from* there to other formats like binary, srec, etc.
> 
> As for what your platform requires, that's your problem - look at your own
> board documentation!
> 
>  > what is *.out
> > file format stand for?
> 
> out means it's the output. Nothing more.
> 
> Jifl
> --
> eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
> --[ "You can complain because roses have thorns, or you ]--
> --[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine
> 
> 
> 
> 
> -- 
> Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
> and search the list archive: http://sources.redhat.com/ml/ecos-discuss

-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  6:05       ` Qiang Huang
@ 2002-10-25  6:09         ` Jonathan Larmour
  2002-10-25  7:10           ` Grant Edwards
  2002-10-25  6:10         ` Gary Thomas
  2002-10-25  7:08         ` Grant Edwards
  2 siblings, 1 reply; 14+ messages in thread
From: Jonathan Larmour @ 2002-10-25  6:09 UTC (permalink / raw)
  To: Qiang Huang; +Cc: Ecos-Discuss

Qiang Huang wrote:
> like in the example:
> 
> gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/
> ecos-work/install/lib -Ttarget.ld -nostdlib
> 
> which format will be the output?( I got a.out file here. is this ELF
> format?)

Yes. You could specify -o foo on the command line and it would create the 
file as "foo" instead of a.out. Or you could call it foo.exe, or foo.dll, 
or foo.txt for all it matters. The file will still be in ELF format!

The name a.out as a default is just a long-standing UNIX tradition. It's 
not to be confused with "a.out format" which is different from ELF.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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

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

* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  5:57     ` Jonathan Larmour
@ 2002-10-25  6:05       ` Qiang Huang
  2002-10-25  6:09         ` Jonathan Larmour
                           ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Qiang Huang @ 2002-10-25  6:05 UTC (permalink / raw)
  To: Jonathan Larmour; +Cc: Ecos-Discuss

like in the example:

gcc -g -IBASE_DIR/ecos-work/install/include hello.c -LBASE_DIR/
ecos-work/install/lib -Ttarget.ld -nostdlib

which format will be the output?( I got a.out file here. is this ELF
format?)

Thanks a lot.

-----Original Message-----
From: Jonathan Larmour [mailto:jifl@eCosCentric.com]
Sent: 25 October 2002 13:58
To: Qiang Huang
Cc: Ecos-Discuss
Subject: Re: [ECOS] Is it possible to convert *.out file to *.srec file?


Qiang Huang wrote:
> how can I find out which target is support in my platform?

I'm not sure exactly
what you mean, but we always generate ELF and go
*from* there to other formats like binary, srec, etc.

As for what your platform requires, that's your problem - look at your own
board documentation!

 > what is *.out
> file format stand for?

out means it's the output. Nothing more.

Jifl
--
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine




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

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

* Re: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  4:16   ` Qiang Huang
@ 2002-10-25  5:57     ` Jonathan Larmour
  2002-10-25  6:05       ` Qiang Huang
  0 siblings, 1 reply; 14+ messages in thread
From: Jonathan Larmour @ 2002-10-25  5:57 UTC (permalink / raw)
  To: Qiang Huang; +Cc: Ecos-Discuss

Qiang Huang wrote:
> how can I find out which target is support in my platform?

I'm not sure exactly what you mean, but we always generate ELF and go 
*from* there to other formats like binary, srec, etc.

As for what your platform requires, that's your problem - look at your own 
board documentation!

 > what is *.out
> file format stand for?

out means it's the output. Nothing more.

Jifl
-- 
eCosCentric       http://www.eCosCentric.com/       <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[  can rejoice because thorns have roses." -Lincoln   ]-- Opinions==mine


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

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

* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  3:21 ` Andy Simpkins
@ 2002-10-25  4:16   ` Qiang Huang
  2002-10-25  5:57     ` Jonathan Larmour
  0 siblings, 1 reply; 14+ messages in thread
From: Qiang Huang @ 2002-10-25  4:16 UTC (permalink / raw)
  To: Ecos-Discuss

how can I find out which target is support in my platform? what is *.out
file format stand for?
Thanks a lot

-----Original Message-----
From: Andy Simpkins [mailto:andy.simpkins@mindsail.com]
Sent: 25 October 2002 11:21
To: Qiang Huang; Ecos-Discuss
Subject: RE: [ECOS] Is it possible to convert *.out file to *.srec file?


use objcopy

i.e. on the platform I use...
arm-elf-objcopy -O srec foo.out foo.srec

Andy

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Qiang Huang
Sent: 25 October 2002 09:58
To: Ecos-Discuss
Subject: [ECOS] Is it possible to convert *.out file to *.srec file?


If I build the ecos application to *.out file, is there any way I can
convert it to *.srec file format?
Thanks a lot



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





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

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

* RE: [ECOS] Is it possible to convert *.out file to *.srec file?
  2002-10-25  1:58 Qiang Huang
@ 2002-10-25  3:21 ` Andy Simpkins
  2002-10-25  4:16   ` Qiang Huang
  0 siblings, 1 reply; 14+ messages in thread
From: Andy Simpkins @ 2002-10-25  3:21 UTC (permalink / raw)
  To: Qiang Huang, Ecos-Discuss

use objcopy

i.e. on the platform I use...
arm-elf-objcopy -O srec foo.out foo.srec 

Andy

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of Qiang Huang
Sent: 25 October 2002 09:58
To: Ecos-Discuss
Subject: [ECOS] Is it possible to convert *.out file to *.srec file?


If I build the ecos application to *.out file, is there any way I can
convert it to *.srec file format?
Thanks a lot



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



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

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

* [ECOS] Is it possible to convert *.out file to *.srec file?
@ 2002-10-25  1:58 Qiang Huang
  2002-10-25  3:21 ` Andy Simpkins
  0 siblings, 1 reply; 14+ messages in thread
From: Qiang Huang @ 2002-10-25  1:58 UTC (permalink / raw)
  To: Ecos-Discuss

If I build the ecos application to *.out file, is there any way I can
convert it to *.srec file format?
Thanks a lot



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

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

end of thread, other threads:[~2002-10-25 15:26 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-25  8:26 [ECOS] Is it possible to convert *.out file to *.srec file? Cusson, Pascal
     [not found] <m3elaerdry.fsf@ecoscentric.com>
2002-10-25  7:59 ` Qiang Huang
2002-10-25  8:20   ` Andrew Lunn
  -- strict thread matches above, loose matches on Subject: below --
2002-10-25  1:58 Qiang Huang
2002-10-25  3:21 ` Andy Simpkins
2002-10-25  4:16   ` Qiang Huang
2002-10-25  5:57     ` Jonathan Larmour
2002-10-25  6:05       ` Qiang Huang
2002-10-25  6:09         ` Jonathan Larmour
2002-10-25  7:10           ` Grant Edwards
2002-10-25  7:12             ` Jonathan Larmour
2002-10-25  7:18               ` Grant Edwards
2002-10-25  6:10         ` Gary Thomas
2002-10-25  7:08         ` Grant Edwards

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