Closed nhhollander closed 3 years ago
For reference I am compiling using gcc 9.3.0 on Ubuntu 20.04
Try gnueabi (without hf), this is the line I use, for example, for keyscan.c:
arm-linux-gnueabi-gcc -o keyscan keyscan.c -lpthread -s --sysroot=../arm/ -Wl,-dynamic-linker,/lib/ld-2.13.so
../arm/ contains usr and lib directories needed for compiling.
Where do you get the contents of the ../arm
directory? Using arm-linux-gnueabi-gcc
produces a binary which crashes with Invalid Instruction
instead of instantly powering down.
Aha! It turns out I was running into the same issue described in https://github.com/ottokiksmaler/nx500_nx1_modding/issues/76
In FileZilla's settings I unchecked "Treat files without extension as ASCII file" and set the default transfer type to Binary under Connection→Transfers→FTP: File Transfers
.
I'm trying to compile code for the camera, starting with the
keyscan360.c
provided in this repository, however I can not for the life of me get it to produce a valid binary. Compiliing witharm-linux-gnueabihf-gcc
produces a binary which instantly powers down the camera when run.While testing I discovered that any application compiled with
arm-linux-gnueabihf-gcc
, even one that contains onlyreturn 0;
results in the same behavior.Is there a particular version of
gcc
that needs to be used for cross compilation?