Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Undefined reference to `times' #15

Open
gayathri191855 opened this issue May 27, 2022 · 0 comments
Open

Undefined reference to `times' #15

gayathri191855 opened this issue May 27, 2022 · 0 comments

Comments

@gayathri191855
Copy link

I want to calculate cpu time in main.c. After executing the makefile, I got the following linker error.

CC main.o
CC firmware.elf
/usr/lib/riscv64-unknown-elf/bin/ld: ../build//software/libc/libc.a(libc_time_clock.c.o): in function clock': /home/user/Desktop/Gayathri_examples/github_lab_examples/fpga_101/lab004/build/software/libc/../../../../../../../../pythondata-software-picolibc/pythondata_software_picolibc/data/newlib/libc/time/clock.c:73: undefined reference to times'
collect2: error: ld returned 1 exit status
make: *** [Makefile:18: firmware.elf] Error 1

I have no idea what happened. I didn't expect the error because I followed the instructions carefully. Can anyone tell me why I got this error and how to resolve it?
If my hardware doesn't support times, is there any way to calculate clock cycles taken by main.c in liteX?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant