02-24-2014 12:45 AM
I am trying to compile and link the CoreMark benchmark program to run on the ZedBoard (ARM Cortex-A9). I get this error: undefined reference to `clock_gettime'.
When I try to add -lrt the linker tells me it can't find it.
Building target: CoreMark.elf
Invoking: ARM gcc linker
arm-xilinx-eabi-gcc -Wl,-T -Wl,../src/lscript.ld -L../../standalone_bsp_0/ps7_cortexa9_0/lib -o "CoreMark.elf" ./src/core_list_join.o ./src/core_main.o ./src/core_matrix.o ./src/core_portme.o ./src/core_state.o ./src/core_util.o -Wl,--start-group,-lxil,-lgcc,-lc,-end-group
./src/core_portme.o: In function `start_time':
/home/svenand/Projects/ZynqIntro/LED_Controller/workspace/CoreMark/Debug/../src/core_portme.c:122: undefined reference to `clock_gettime'
./src/core_portme.o: In function `stop_time':
/home/svenand/Projects/ZynqIntro/LED_Controller/workspace/CoreMark/Debug/../src/core_portme.c:147: undefined reference to `clock_gettime'
collect2: error: ld returned 1 exit status
make: *** [CoreMark.elf] Error 1
Sven
02-25-2014 02:48 AM
I've the same problem
02-28-2014 01:05 PM
I wrote my own clock_gettime routine. See my blog: http://svenand.blogdrive.com/archive/174.html
Sven
03-03-2014 12:58 AM
You can use the ARM's SCU Timer if you are running your application without OS.
Look xscutimer.h.