Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
20 years ago

alt_timestamp_start?

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.

2 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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.
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    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!