Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

alt_timestamp_start?

Altera_Forum
Honored Contributor II
2,423 Views

I was trying to use the Hi-Res Timer, but NIOS II IDE Version 1.1.0 gave me the following error 

 

"Error undefined reference to `alt_timestamp_start' hello_world.c hello_world_0 line 24" 

 

for the following simple code: 

# include <stdio.h># include <alt_types.h># include "sys/alt_timestamp.h" 

 

int main() 

printf("Hello from Nios II!\n"); 

alt_timestamp_start(); // Tried to use Hi-Res Timer  

return 0; 

 

The example "Dhrystone" did work.  

Thanks for any suggestions.
0 Kudos
2 Replies
Altera_Forum
Honored Contributor II
1,460 Views

Is this error happening at the linking stage? 

 

If so then the problem may be that you haven&#39;t selected a timestamp timer. Please look at the system library properties page and check that you have selected a hardware device for both timers.
0 Kudos
Altera_Forum
Honored Contributor II
1,460 Views

Yes, I learned that I had to right click on the project and bring up the "system Library Properties" page and enable "high res timer" there. 

Thanks!
0 Kudos
Reply