This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Time functions in newlib



----- Original Message -----
From: "Lewin A.R.W. Edwards" <ledwards@digi-frame.com>
To: "Cliff Tsai" <clifftsai@axisoft.com>; <newlib@sources.redhat.com>;
"Lewin A.R.W. Edwards" <larwe@larwe.com>
Sent: Thursday, July 12, 2001 2:32 AM
Subject: Re: Time functions in newlib


> Hi Cliff,
>
> > > I'm working with a custom ARM7 platform, and I'm basically linking
with
> > > newlib only to get access to a few math functions that are inserted
> > > * time-based functions, e.g. clock()? Is there a global tick count
> >variable
> > > I can just increment in an ISR?
> >
> >For clock(),you need a libgloss function:times(),
> >That is dependent on your hardware.
>
> Libgloss isn't supported on arm-unknown-elf, or at least the newlib
> configure script tells me it isn't.
>

There's a syscall.c that including some libgloss function,but you must
modify them
to work properly on your platform.

> > > functions. How do I tell newlib where its heap begins and ends? (In my
> >
> >Specify the heap begin and end in the linker script,
>
> Er, but what are the names of the symbols? :)
>

For example,you can define sbrk_start,and sbrk_end in your linker script,
And use these symbol in your sbrk.c.The sbrk_start and sbrk_end is the
memory
address that you want to provide for malloc,alloc.....
Or you can just define them in your headerfile  or somewhere else that
visible by sbrk.

> I guess I will spend some time this weekend reading the sources. Thanks
for
> your response..
>
>

You can get a demo linker script after you've built your crossgcc,check the
sub-dir unerder "corssgcc".
I'm sure you can get a arm-.x, or arm-elf.xn...,and also see the related
source files of newlib.I think that helps.
Learning the Open Source Software is full of fun.

Good Luck.

Cliff

> -- Lewin A.R.W. Edwards
> Embedded Engineer, Digi-Frame Inc.
> Work: http://www.digi-frame.com/
> Tel (914) 937-4090 9am-6:30pm M-F ET
> Personal: http://www.larwe.com/ http://www.zws.com/
>
>
>



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]