This article explains how to debug our applications with the NFS network file system, where we use the Linux qt system as
Cases.
When we debug the application on the qt system, we first build the executable binaries on the virtual machine Ubuntu by cross-compiling,
Then copy the generated binaries to the file system, then regenerate the system.imgwith the command, then burn the system.img to
Development Board, and then launch the board to run our program, or to download the executable file to the Development Board via TFTP.
Both of these methods are cumbersome to operate, so let's talk about using the NFS Debugger.
First of all, my NFS mount Directory is "/home/broswer/nfs/root" (How to build NFS, you can refer to our iTOP-4412
Implementation of the NFS Network File System . PDF).
Then we use the helloword program as an example to achieve, my helloword.c saved in the "/home/brower/test directory", In Virtual
The terminal of the machine uses the "VI helloworld.c" command to open the helloword.c, as shown in :
We can see the helloword.c inside a print statement, output "Int_hello world! ".
Next, the virtual machine's terminal uses the command "arm-none-linux-gnueabi-gcc-o HelloWorld helloworld.c-static" to compile
HELLOWORD.C, generate the executable file helloword, as shown in:
When the compilation is complete, Hellowordis generated, as shown in:
Next we launch the Development Board and enter the Linux qt(mounted NFS System) system, the serial port printing information as shown:
We can see the information of NFS mounted through the image above .
Next we enter the "LS" command in the serial port, you can view the file under the root file system, as shown in:
We then enter the command "CP helloworld/home/broswer/nfs/root/" on the terminal of the virtual machineand copy the generated execution text
"Helloword" to the Network File system directory (My network file system here is "/home/broswer/nfs/root/", everyone
Need to be modified according to your network File system directory) as shown in:
Then in the serial port input "ls", we can see the board file system has "helloword" file, as shown:
Next, in the serial port input "./helloword" command Run "helloword", run the result as shown:
We can see the serial print " Int_hello world! "up.
With the above steps, we can use the easy-to-NFS debugging program.
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
WebEx to debug an application for ITOP-4412 Development Board NFS