1/1

|
test timer function of newlib-1.0rc1
by chichun on Sep 20, 2011 |
chichun
Posts: 2 Joined: Aug 31, 2011 Last seen: Sep 29, 2011 |
||
|
Dear all:
I have a project that is based on the processor or1200, and use newlib-1.0rc1 as library. I need tick timer for developing programs, the test program like: ------------------------------------------------------------------ extern int or1k_timer_ticks; int main(int argc, char *argv[]) { .... or1k_timer_init(100); or1k_timer_enable(); .... while(1) { printf("or1k_timer_ticks=%d\n",or1k_timer_ticks); } } ------------------------------------------------------------------ then, complie and run or32-elf-sim -f sim.cfg xxx.or32 the results: or1k_timer_ticks = 0 or1k_timer_ticks = 0 or1k_timer_ticks = 0 or1k_timer_ticks = 0 or1k_timer_ticks = 0 exit(54896) Could anybody tell me how to solve the problem, Thanks Chichun |
|||
|
RE: test timer function of newlib-1.0rc1
by jeremybennett on Sep 20, 2011 |
jeremybennett
Posts: 815 Joined: May 29, 2008 Last seen: Jun 13, 2019 |
||
|
Hi Chichun I'm not sure how Julius Baxter's extension library works with Or1ksim. You certainly need to make sure the tick timer is configured by setting the upr field in section cpu. The user guide has details in its configuration chapter. You might like to join IRC (channel #opencores on freenode.net). Julius is often online, and he should know what is needed. HTH Jeremy
-- |
|||
|
RE: test timer function of newlib-1.0rc1
by chichun on Sep 29, 2011 |
chichun
Posts: 2 Joined: Aug 31, 2011 Last seen: Sep 29, 2011 |
||
|
Deal all:
We have solved the problem by recompiling the source code of newlib-1.0rc1. thanks, chichun |
|||
1/1

