Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the iTOP-4412 development board compile and run test programs based on Linux-C?

2025-04-08 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This issue of the content of the editor will bring you about the iTOP-4412 development board based on Linux-C test program compilation and running is how, the article is rich in content and professional analysis and description for you, after reading this article, I hope you can get something.

ITOP-4412 development board can run many file systems, and before implementing specific functions on a specific file system, you can

To use the Linux-C program to test the hardware and drivers. And these programs can be easily ported to Android, Qt/E and

On the smallest file system.

Special reminder: Linux-C programs are cross-platform. As long as you compile according to the method described below, you can convert Linux-.

C's program runs with the Android system, and uses Linux-C 's program to test what we care about. In essence, we

It can be understood that Android is just a large file. Take the following first helloworld as an example, on the Linux kernel

There are two programs running "helloworld" + "Android".

Linux-C test program source code and executable program in the network disk directory "iTOP4412 development board data collection (excluding CD-ROMs)"

Content)\ iTOP-4412 development board system source code and mirror (other)\ mini module test program.

8.1 compile and run the test program

8.1.1 Settings of the compilation environment

The application of the C program runs on Android, and the compiler is gcc4.4.1. The installation method of the compiler

Take the fifth chapter.

Modify the environment variable as shown in the following figure.

After the modification, update the environment variables, as shown in the following figure

8.1.2 compiling helloworld

The source code of the program helloworld.c is as follows.

As shown in the following figure, the executable file helloworld is generated.

After the Android system of the development board is running stably, connect the OTG interface to the USB of the computer and open it.

"cmd.exe" in the "USB_fastboot_tool\ platform-tools" directory, as shown in the following figure.

Of course, you can also upload the executable file helloworld through your mobile assistant, TF card or USB drive.

8.1.4 modify program permissions and run helloworld

As shown in the following figure, in HyperTerminal, type "cd / data" to enter the "/ data" directory and use "chmod 777"

Helloworld "modify permissions, and finally enter the command". / helloworld "to run the program. HyperTerminal will print out

"Hello world!" Which indicates that the program runs successfully

Later tests can run the program using either the serial console or the adb command.

The above is what the iTOP-4412 development board based on Linux-C test program compiled and run is like. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow 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.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report