My interest is in how I might build userspace programs to run on either of these. My x86 Fedora system has a package called "gcc-arm-linux-gnu" (as well as arm-none-eabi-gcc-cs). I have used both of these at various times for embedded "bare metal" projects. The question now is whether I can use the "linux" compiler to compile a simple userspace program.
I give it a try, expecting some issues:
arm-linux-gnu-gcc -o that that.c /usr/bin/arm-linux-gnu-ld: cannot find crt1.o: No such file or directory /usr/bin/arm-linux-gnu-ld: cannot find crti.o: No such file or directory /usr/bin/arm-linux-gnu-ld: cannot find -lc: No such file or directory /usr/bin/arm-linux-gnu-ld: cannot find crtn.o: No such file or directoryWe knew we would need both header files and various libraries (libc if nothing else). It is possible that the header files installed for my x86 system would work, but I am not willing to bet on it. The official statement about gcc-arm-linux-gnu is:
Only building kernels is currently supported. Support for cross-building user space programs is not currently provided as that would massively multiply the number of packagesI also tried arm-none-eabi -- It got farther, finding:
/usr/lib/gcc/arm-none-eabi/13.2.0This directory has "include" (but no stdio.h, just stdarg.h and such). It finds things in "newlib" under newlib/libc/stdlib and such, but these all fail trying to call basic system calls like _exit.
This could be pursued further -- in particular the business of newlib.
Another option would be to use some ARM board with a full blown linux install (such as a BBB, an OrangePi running Debian, or even a raspberry Pi. These should have everything set up and ready to go.
Something for another day.
Tom's Computer Info / [email protected]