To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 3626
3625  |  3627
Subject: 
Re: NQC v. LegOS / size
Newsgroups: 
lugnet.robotics
Date: 
Wed, 10 Feb 1999 07:08:22 GMT
Viewed: 
1362 times
  
The maths routines are somewhere in libgcc.a, though I think there's a
single file with all the routines instead of several small ones, so you may
end up wasting memory. In addition, you probably need to access libc.a too
since some of the libgcc.a routines use, say, memcpy. (It may be possible to
inline some of the offending routines by specifying higher optimisation
levels to the compiler, "-O3" say, but I haven't tried this.) Anyway, when
building legOS things, I think a couple of options are: find the libgcc
source and copy the bits you need into your own files; or add the two
libraries I mentioned above to the link statement in the make file.

To do the latter, first find your libraries! On my Windows PC, I've
installed Cygwin (and the H8/300 stuff) under C:\Cygnus, and my libraries
are
C:\Cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\h8300-hms\egcs-2.91.57\libg
cc.a and
C:\Cygnus\cygwin-b20\H-i586-cygwin32\lib\gcc-lib\h8300-hms\lib\libc.a and
therefore I changed the link statement to:

$(LD) ... --oformat coff-h8300
/Cygnus/cygwin-b20/H-i586-cygwin32/lib/gcc-lib/h8300-hms/egcs-2.91.57/libgcc
.a /Cygnus/cygwin-b20/H-i586-cygwin32/lib/gcc-lib/h8300-hms/lib/libc.a
/Cygnus/cygwin-b20/H-i586-cygwin32/lib/gcc-lib/h8300-hms/egcs-2.91.57/libgcc
.a

(All one line, and a heck of a line it is! And yes, libgcc is deliberately
specified twice.)

You can shorten this with judicious use of make macros or the "-L" option to
the linker.

I have checked this by building some stuff with floating point manipulation
but I haven't actually downloaded anything to the RCX.

Hope this helps.

Gavin



Message has 1 Reply:
  Re: NQC v. LegOS / size
 
(...) No, they are not in one object file. They are in a single source file, but if you look at the build process it defines a symbol like L_cmpsi3 and compiles/assembles it separately for each function. John A. Tamplin Traveller Information (...) (25 years ago, 12-Feb-99, to lugnet.robotics)

Message is in Reply To:
  Re: NQC v. LegOS / size
 
=>From: Ben Laurie <ben@algroup.co.uk> =>... =>Markus L. Noga wrote: =>> Apart from the limitations imposed by H8 architecture (an 8/16 bit =>> platform with the usual constraints on integer length, available memory =>> and library functions), (...) (25 years ago, 9-Feb-99, to lugnet.robotics)

23 Messages in This Thread:










Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR