MIPS cross compiling
Hi,
I need to compile a software for MIPS architecture. I followed this tutorial: https://www.linux-mips.org/wiki/Toolchains to build my own toolchain, and everything went ok. I am trying to compile a simple "hello world", just to test, and I receive: Code:
# mips-unknown-linux-gnu-gcc hello.c -o hellomips Code:
# find . -name stdio.h hello.c's content: Code:
#include <stdio.h> Thank yoU! |
|
Hi pan64, I already configured PATH accordingly:
Code:
# echo $PATH (mips-unknown-linux-gnu-gcc resides in /opt/cross/bin) Are you referring to a different issue? Thankyou |
This is how you need to continue:
Quote:
|
Hi pan64, thank you very much, your last link is even more detailed.
Just one last doubt: how can I determine in my target system is MIPS little endian or big endian? |
probably this helps: https://www.linux-mips.org/wiki/Endianness
but actually I would write a simple check program. |
Hi, I guess I would first need to know which architecture is before writing a check program, isn't? :)
I tried to copy a binary executable from target system (mips o mipsel, I don't know) to my Linux machine. File shows this: Code:
$ file dmesg Code:
$ hexdump dmesg |head so I assume is 32bit, but I don't know how to distinguish between big endian and little endian. |
|
All times are GMT -5. The time now is 08:05 AM. |