public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: assembler interlist
       [not found] <81c7u7$rlv@tandem.cam.org>
@ 1999-11-22 13:08 ` Mumit Khan
       [not found]   ` <81cvbe$j2s@tandem.cam.org>
                     ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Mumit Khan @ 1999-11-22 13:08 UTC (permalink / raw)
  To: help-gcc

In article <81c7u7$rlv@tandem.cam.org>,
denis lachapelle <sysacom@cam.org> wrote:
>I use the GNUC for the Hitachi H8S family. To debug properly and understand
>what the compiler does we would like to see the genarated assembler with the
>C source in comment, this is call assembler interlist.
>
>Can somebody may tell me what need to be the switch to use in the gcc
>command?
>
>So far we have this command:
>
>gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c
>
>which generate the assembler code, but the C code is not there!
>

I don't suppose the idea of looking at the assembler documentation
occurred to you ;-)

Here's a hint:

  $ gcc -Wa,-ahls,-L -g -c main.c

This will dump the listings to the standard output.

Either redirect the lists, or use "=<file>".

  $ gcc -Wa,-ahls=main.lst,-L -g -c main.c

Do look up the documentation for gas please.

Regards,
Mumit

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

* Re: assembler interlist
  1999-11-23  5:48   ` denis Lachapelle
@ 1999-11-23  5:43     ` Kai Ruottu
  1999-11-30 23:28       ` Kai Ruottu
  1999-11-30 23:28     ` denis Lachapelle
  1 sibling, 1 reply; 10+ messages in thread
From: Kai Ruottu @ 1999-11-23  5:43 UTC (permalink / raw)
  To: help-gcc

On Mon, 22 Nov 1999 21:42:50 -0800, "denis Lachapelle"
<sysacom@cam.org> wrote:

>I use the GNUC for the Hitachi H8S family.
>
>The following command line does not work properly because it's too long (I
>work on windows 95), could you explain me, how to do to avoid this problem?
>
>ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
>buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

 It is more usual to use 'gcc' also as the linker. Your link command
would then at first be almost as long...

 But all the 'default stuff', like the libs, startup and linker script
names can be moved into the 'specs' file. And if you always use the
same map-file name, it too can be put there (you can save it from
overwriting it, by renaming it later). So your command could be
(assuming the name 'gcc-h8300' for your H8-GCC) :

  gcc-h8300 -o main.mot ascii.o timer.o commands.o display.o serial.o
  main.o macro.o buffer.o serled.o

and perhaps short enough after moving the:

  -Map main.map -Tlink.cmd

to the '*link:' spec and the

  -lc -lgcc -lm

to the '*lib:' and '*libgcc:' specs in the 'specs' file. Please see
with 'gcc-h8300 -v' where your 'specs' resides. Like:

  E:\usr\local\samples>gcc-h8300 -v
  Reading specs from E:\usr\local\lib\gcc-lib\h8300-hms\2_95.1\specs
  gcc version 2.95.1 19990816 (release)

 If you will need much more objects, making a library archive from
them would be the solution. The objects can be added one-by-one there
using the H8/300-target archiver, using a command like:

  ar-h8300 ruv libmylib.a <obj_name>

 This will normally be done in the Makefile for your application.

 You just add (or replace) all the 'tested and should work now'
modules into the library 'libmylib.a', and use it with the 'still
under construction' modules like:
 
  gcc-h8300 -o main.mot main.o serial.o serled.o -lmylib

when your 'ascii.o', 'timer.o', 'commands.o', 'display.o', 'macro.o'
and 'buffer.o' are in the 'libmylib.a'.

 If you use some of the old Hitachi distributions, updating to
gcc-2.95.1 is now possible. Just look at:

  http://www.nettilinja.fi/~ankosken/embtools.htm

Cheers, Kai

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

* Re: assembler interlist
       [not found]   ` <81cvbe$j2s@tandem.cam.org>
@ 1999-11-23  5:47     ` Mumit Khan
  1999-11-30 23:28       ` Mumit Khan
  0 siblings, 1 reply; 10+ messages in thread
From: Mumit Khan @ 1999-11-23  5:47 UTC (permalink / raw)
  To: help-gcc

In article <81cvbe$j2s@tandem.cam.org>,
denis Lachapelle <sysacom@cam.org> wrote:
>Sorry but I look at the documentation, I guess I am not an efficient reader.
>So that you seems to be very knowledgeable about gnu c, could you answer
>that one:
>
>The following command line does not work properly because it's too long (I
>work on windows 95), could you explain me, how to do to avoid this problem?
>
>ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
>buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

It's a function of the runtime, so unless you provide more info, it's
hard to tell. What version of gcc? Using Cygwin, Mingw, DJGPP, ???
  
  $ gcc -v

provides the version info.

Windows 95 does support reasonably long command line, so I'm not sure

>I have tried to find a switch that redirect option to a file but I can't
>find any!

I assume you mean `redirect options *from* a file ...'. Again, it's a
function of the runtime. Versions of Cygwin provide @response_file, but
I don't recall what the first version to support that was.

Regards,
Mumit

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

* Re: assembler interlist
  1999-11-22 13:08 ` assembler interlist Mumit Khan
       [not found]   ` <81cvbe$j2s@tandem.cam.org>
@ 1999-11-23  5:48   ` denis Lachapelle
  1999-11-23  5:43     ` Kai Ruottu
  1999-11-30 23:28     ` denis Lachapelle
  1999-11-30 23:28   ` Mumit Khan
  2 siblings, 2 replies; 10+ messages in thread
From: denis Lachapelle @ 1999-11-23  5:48 UTC (permalink / raw)
  To: help-gcc

Sorry but I look at the documentation, I guess I am not an efficient reader.
So that you seems to be very knowledgeable about gnu c, could you answer
that one:

The following command line does not work properly because it's too long (I
work on windows 95), could you explain me, how to do to avoid this problem?

ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

I have tried to find a switch that redirect option to a file but I can't
find any!

If you answer this one, I will remember you.

Thank you,


Mumit Khan <khan@xraylith.wisc.edu> wrote in message
news: 81carb$fh4$1@news.doit.wisc.edu ...
> In article <81c7u7$rlv@tandem.cam.org>,
> denis lachapelle <sysacom@cam.org> wrote:
> >I use the GNUC for the Hitachi H8S family. To debug properly and
understand
> >what the compiler does we would like to see the genarated assembler with
the
> >C source in comment, this is call assembler interlist.
> >
> >Can somebody may tell me what need to be the switch to use in the gcc
> >command?
> >
> >So far we have this command:
> >
> >gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c
> >
> >which generate the assembler code, but the C code is not there!
> >
>
> I don't suppose the idea of looking at the assembler documentation
> occurred to you ;-)
>
> Here's a hint:
>
>   $ gcc -Wa,-ahls,-L -g -c main.c
>
> This will dump the listings to the standard output.
>
> Either redirect the lists, or use "=<file>".
>
>   $ gcc -Wa,-ahls=main.lst,-L -g -c main.c
>
> Do look up the documentation for gas please.
>
> Regards,
> Mumit
>


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

* Re: assembler interlist
  1999-11-22 13:08 ` assembler interlist Mumit Khan
       [not found]   ` <81cvbe$j2s@tandem.cam.org>
  1999-11-23  5:48   ` denis Lachapelle
@ 1999-11-30 23:28   ` Mumit Khan
  2 siblings, 0 replies; 10+ messages in thread
From: Mumit Khan @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

In article <81c7u7$rlv@tandem.cam.org>,
denis lachapelle <sysacom@cam.org> wrote:
>I use the GNUC for the Hitachi H8S family. To debug properly and understand
>what the compiler does we would like to see the genarated assembler with the
>C source in comment, this is call assembler interlist.
>
>Can somebody may tell me what need to be the switch to use in the gcc
>command?
>
>So far we have this command:
>
>gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c
>
>which generate the assembler code, but the C code is not there!
>

I don't suppose the idea of looking at the assembler documentation
occurred to you ;-)

Here's a hint:

  $ gcc -Wa,-ahls,-L -g -c main.c

This will dump the listings to the standard output.

Either redirect the lists, or use "=<file>".

  $ gcc -Wa,-ahls=main.lst,-L -g -c main.c

Do look up the documentation for gas please.

Regards,
Mumit

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

* Re: assembler interlist
  1999-11-23  5:43     ` Kai Ruottu
@ 1999-11-30 23:28       ` Kai Ruottu
  0 siblings, 0 replies; 10+ messages in thread
From: Kai Ruottu @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

On Mon, 22 Nov 1999 21:42:50 -0800, "denis Lachapelle"
<sysacom@cam.org> wrote:

>I use the GNUC for the Hitachi H8S family.
>
>The following command line does not work properly because it's too long (I
>work on windows 95), could you explain me, how to do to avoid this problem?
>
>ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
>buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

 It is more usual to use 'gcc' also as the linker. Your link command
would then at first be almost as long...

 But all the 'default stuff', like the libs, startup and linker script
names can be moved into the 'specs' file. And if you always use the
same map-file name, it too can be put there (you can save it from
overwriting it, by renaming it later). So your command could be
(assuming the name 'gcc-h8300' for your H8-GCC) :

  gcc-h8300 -o main.mot ascii.o timer.o commands.o display.o serial.o
  main.o macro.o buffer.o serled.o

and perhaps short enough after moving the:

  -Map main.map -Tlink.cmd

to the '*link:' spec and the

  -lc -lgcc -lm

to the '*lib:' and '*libgcc:' specs in the 'specs' file. Please see
with 'gcc-h8300 -v' where your 'specs' resides. Like:

  E:\usr\local\samples>gcc-h8300 -v
  Reading specs from E:\usr\local\lib\gcc-lib\h8300-hms\2_95.1\specs
  gcc version 2.95.1 19990816 (release)

 If you will need much more objects, making a library archive from
them would be the solution. The objects can be added one-by-one there
using the H8/300-target archiver, using a command like:

  ar-h8300 ruv libmylib.a <obj_name>

 This will normally be done in the Makefile for your application.

 You just add (or replace) all the 'tested and should work now'
modules into the library 'libmylib.a', and use it with the 'still
under construction' modules like:
 
  gcc-h8300 -o main.mot main.o serial.o serled.o -lmylib

when your 'ascii.o', 'timer.o', 'commands.o', 'display.o', 'macro.o'
and 'buffer.o' are in the 'libmylib.a'.

 If you use some of the old Hitachi distributions, updating to
gcc-2.95.1 is now possible. Just look at:

  http://www.nettilinja.fi/~ankosken/embtools.htm

Cheers, Kai

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

* Re: assembler interlist
  1999-11-23  5:47     ` Mumit Khan
@ 1999-11-30 23:28       ` Mumit Khan
  0 siblings, 0 replies; 10+ messages in thread
From: Mumit Khan @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

In article <81cvbe$j2s@tandem.cam.org>,
denis Lachapelle <sysacom@cam.org> wrote:
>Sorry but I look at the documentation, I guess I am not an efficient reader.
>So that you seems to be very knowledgeable about gnu c, could you answer
>that one:
>
>The following command line does not work properly because it's too long (I
>work on windows 95), could you explain me, how to do to avoid this problem?
>
>ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
>buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

It's a function of the runtime, so unless you provide more info, it's
hard to tell. What version of gcc? Using Cygwin, Mingw, DJGPP, ???
  
  $ gcc -v

provides the version info.

Windows 95 does support reasonably long command line, so I'm not sure

>I have tried to find a switch that redirect option to a file but I can't
>find any!

I assume you mean `redirect options *from* a file ...'. Again, it's a
function of the runtime. Versions of Cygwin provide @response_file, but
I don't recall what the first version to support that was.

Regards,
Mumit

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

* Re: assembler interlist
  1999-11-23  5:48   ` denis Lachapelle
  1999-11-23  5:43     ` Kai Ruottu
@ 1999-11-30 23:28     ` denis Lachapelle
  1 sibling, 0 replies; 10+ messages in thread
From: denis Lachapelle @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

Sorry but I look at the documentation, I guess I am not an efficient reader.
So that you seems to be very knowledgeable about gnu c, could you answer
that one:

The following command line does not work properly because it's too long (I
work on windows 95), could you explain me, how to do to avoid this problem?

ld crt0.o ascii.o timer.o commands.o display.o serial.o main.o macro.o
buffer.o serled.o -Map main.map -Tlink.cmd -o main.mot -lc -lgcc -lm

I have tried to find a switch that redirect option to a file but I can't
find any!

If you answer this one, I will remember you.

Thank you,


Mumit Khan <khan@xraylith.wisc.edu> wrote in message
news: 81carb$fh4$1@news.doit.wisc.edu ...
> In article <81c7u7$rlv@tandem.cam.org>,
> denis lachapelle <sysacom@cam.org> wrote:
> >I use the GNUC for the Hitachi H8S family. To debug properly and
understand
> >what the compiler does we would like to see the genarated assembler with
the
> >C source in comment, this is call assembler interlist.
> >
> >Can somebody may tell me what need to be the switch to use in the gcc
> >command?
> >
> >So far we have this command:
> >
> >gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c
> >
> >which generate the assembler code, but the C code is not there!
> >
>
> I don't suppose the idea of looking at the assembler documentation
> occurred to you ;-)
>
> Here's a hint:
>
>   $ gcc -Wa,-ahls,-L -g -c main.c
>
> This will dump the listings to the standard output.
>
> Either redirect the lists, or use "=<file>".
>
>   $ gcc -Wa,-ahls=main.lst,-L -g -c main.c
>
> Do look up the documentation for gas please.
>
> Regards,
> Mumit
>


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

* assembler interlist
  1999-11-22 12:16 denis lachapelle
@ 1999-11-30 23:28 ` denis lachapelle
  0 siblings, 0 replies; 10+ messages in thread
From: denis lachapelle @ 1999-11-30 23:28 UTC (permalink / raw)
  To: help-gcc

I use the GNUC for the Hitachi H8S family. To debug properly and understand
what the compiler does we would like to see the genarated assembler with the
C source in comment, this is call assembler interlist.

Can somebody may tell me what need to be the switch to use in the gcc
command?

So far we have this command:

gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c

which generate the assembler code, but the C code is not there!

Thank you,
--

Denis Lachapelle, denisl@sysacom.ca
Sysacom R&D plus inc.
www.sysacom.ca
tel (450) 585-6396, fax (450) 582-3231



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

* assembler interlist
@ 1999-11-22 12:16 denis lachapelle
  1999-11-30 23:28 ` denis lachapelle
  0 siblings, 1 reply; 10+ messages in thread
From: denis lachapelle @ 1999-11-22 12:16 UTC (permalink / raw)
  To: help-gcc

I use the GNUC for the Hitachi H8S family. To debug properly and understand
what the compiler does we would like to see the genarated assembler with the
C source in comment, this is call assembler interlist.

Can somebody may tell me what need to be the switch to use in the gcc
command?

So far we have this command:

gcc -Ic:\cygnus\include -c -S -fverbose-asm -o main.s main.c

which generate the assembler code, but the C code is not there!

Thank you,
--

Denis Lachapelle, denisl@sysacom.ca
Sysacom R&D plus inc.
www.sysacom.ca
tel (450) 585-6396, fax (450) 582-3231



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

end of thread, other threads:[~1999-11-30 23:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <81c7u7$rlv@tandem.cam.org>
1999-11-22 13:08 ` assembler interlist Mumit Khan
     [not found]   ` <81cvbe$j2s@tandem.cam.org>
1999-11-23  5:47     ` Mumit Khan
1999-11-30 23:28       ` Mumit Khan
1999-11-23  5:48   ` denis Lachapelle
1999-11-23  5:43     ` Kai Ruottu
1999-11-30 23:28       ` Kai Ruottu
1999-11-30 23:28     ` denis Lachapelle
1999-11-30 23:28   ` Mumit Khan
1999-11-22 12:16 denis lachapelle
1999-11-30 23:28 ` denis lachapelle

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