Note : The development board takes the IMX6ULL PRO development board as an example! ! !
text
1. Compile the program on the development board, that
is, use the cross compiler to compile the program
1. The most important thing is to find the prefix of the cross-compilation first:
(1) A way to use the auto-completion function:
input arm- and then add the Tab key, and the desired prefix will come out
(2) The second method is to view the environment variable CROSS_COMPILE
book@100ask:~$ echo $CROSS_COMPILE
arm-linux-gnueabihf-
2. If it is not cross-compiled, it will report an error on the development board as a format error
$ arm-linux-gnueabihf-gcc -o hello hello.c
3. After successfully compiling on Ubuntu, transfer the file to the development board and run the program.
First copy the compiled hello file to the Ubuntu nfs service directory
$ cp hello /home/book/nfs_rootfs
/mnt/hello
2. Compile the driver on the development board