cannot find crt0.o file

R. Diez rdiezmail-newlib@yahoo.de
Fri Mar 25 10:58:50 GMT 2022


> [...]
> With the configuration, the newlib was successfully built. But when trying
> to compile and link the program, the arm-none-eabi-gcc prints error "crt0.o
> not found".

This is a common annoyance with GCC for ARM. I filed a request about it more than 5 years ago:

Bug 68605 - Add -mno-crt0 to disable automatic crt0 injection
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68605

I normally just add an empty file called crt0.c (or crt0.cpp) to my project, search for it here:

https://github.com/rdiez/JtagDue/blob/master/Project/Makefile.am

The comments around it should provide you with enough information.

Regards,
   rdiez


More information about the Newlib mailing list