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]

Time functions in newlib


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 
implicitly by gcc, as well as a couple of things that would be tedious to 
rewrite (like sprintf).

Is there any guide on what I need to do to get the following two functions 
ported to my architecture:

* time-based functions, e.g. clock()? Is there a global tick count variable 
I can just increment in an ISR?

* memory allocation functions - I don't specifically want to use them, but 
occasionally some "kinda POSIX" code I want to test requires these 
functions. How do I tell newlib where its heap begins and ends? (In my 
architecture, RAM available for heap begins right after the BSS segment, 
and extends up to 4Mb beyond it).

The first one of those is much more interesting to me, I can work around 
the second one.

-- 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/

"Far better it is to dare mighty things, to win glorious triumphs, even 
though checkered by failure, than to rank with those poor spirits who 
neither enjoy much nor suffer much, because they live in the gray twilight 
that knows not victory nor defeat."
(Theodore Roosevelt)



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