In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
In this issue, Xiaobian will bring you about the compilation and operation of the 4418 development board based on Linux-c test program. The article is rich in content and analyzed and described from a professional perspective. After reading this article, I hope you can gain something.
Linux-c test program based on iTOP4418 development board
iTOP-4418 development board can run a lot of file systems, before implementing specific functions on specific file systems, you can
Use Linux-c programs to test hardware and drivers. And these programs are easy to port to Android, Qt/E, and minimal
On the file system.
Special reminder: Linux-c program is cross-platform, as long as the method described below to compile, you can Linux-c
The Linux-C program runs with Android, and we use Linux-C programs to test what we care about. Essentially, we can
Android is just a big file, take the first helloworld below as an example, running on the Linux kernel
There are two programs "helloworld"+"Android".
The test code is in the net disk directory "iTOP-4418 development board information summary (excluding CD content)\07_iTOP-4418 development board
Android application development environment software and source code\04_linux-C test program "under.
8.1 Compilation and Running of Test Programs
8.1.1 Setting up the compilation environment
C programs run on Android using gcc 4.4.1. The compiler installation method reference
Chapter 5.
Modify the environment variables as shown in the following figure.
After modification, update the environment variables, as shown in the following figure.
As shown in the figure below, enter "arm" and press "TAB" key to display the compiler you need later.
"arm-none-linux-gnueabi-gcc-4.4.1"。
8.1.2 Compiling helloworld
The source code for helloworld.c is as follows.
To compile helloworld, type arm-none-linux-gnueabi-gcc-4.4.1 -o helloworld
helloworld.c -static", as shown below, generates the executable helloworld file.
8.1.3 Upload helloworld to development board
Copy the executable helloworld file to the fastboot burn directory, as shown below, this directory is burned
Directory where fastboot tools are located. See Section 3.6 for instructions on how to use the fastboot tool.
After the Android system of the development board runs stably, connect the OTG interface to the USB of the computer and open "fastboot"
"cmd.exe" in the directory, as shown in the following figure.
After the development board is fully started, connect the OTG interface, and the screen of the development board will prompt "Allow debugging". Select
"Allow" is fine.
Then enter the command "chmod 777 /data" in the serial console to modify the permissions of the data directory, as shown in the following figure.
As shown below, enter the command "adb push helloworld /data" in "cmd.exe" of PC to upload the program.
Go to the board's "/data" directory. If "Allow USB debugging" is not enabled, the following message will be prompted.
After "Run USB debug" is turned on, use the command "adb push helloworld /data" as shown in the following figure.
Of course, you can also upload the executable file helloworld via mobile assistant, TF card or USB flash drive. If prompted command
Unable to use, note: please refer to section 10.2.2 of the manual for updating adb.
8.1.4 Modifying program permissions and running helloworld
As shown below, in the HyperTerminal, enter "cd /data" into the "/data" directory and use "chmod 777"
helloworld"command modify permissions, and finally type"./ The helloworld command runs the program. The HyperTerminal will print out
"Hello world! "It indicates that the program was successfully run.
iTOP4418 development board already supports Android 7.1 system
The above is the compilation and operation of the 4418 development board based on Linux-c test program shared by Xiaobian. If there is a similar doubt, please refer to the above analysis for understanding. If you want to know more about it, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.