Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

What are the steps of developing Linux applications based on AM437x

Shulou Source: shulou.com Published: 2022-06-02 01:40:38 09月30日 Update

This article introduces you what is the AM437x-based Linux application development steps, the content is very detailed, interested friends can refer to, hope to be helpful to you.

Helloworld demo program

Table 1

Development board model

Whether this lab is supported

TL437x-EVM

Support

TL437x-EasyEVM

Support

TL437x-IDK

Support

TL437xF-EVM

Support

This document demonstrates the steps of writing, cross-compiling, and running the application on the target board in the process of helloworld application development through the simplest Linux application development.

Write helloworld source code

First set up a helloword directory under Ubuntu to store helloworld.c source files

Host# mkdir-p / home/tronlong/AM437x/app/helloworld

Host# cd / home/tronlong/AM437x/app/helloworld

Figure 1

Use the gedit tool to create a new helloworld.c file and edit the program source code. The command to create a new helloworld.c file is as follows:

Host# gedit helloworld.c

Enter the following code in helloworld.c:

# include

Int main (void) {

Printf ("Hello World!\ nwww.tronlong.com\ n")

}

Figure 2

Just like the text editor under Windows, press "Ctrl+S" to save the edited content, and then click the red cross button in the upper left corner to exit.

Cross-compile helloworld programs

Before cross-compilation, ensure that the cross-compilation tool chain that comes with the corresponding platform Linux Processor-SDK package is in effect, and then execute the following command to cross-compile the program:

Host# arm-linux-gnueabihf-gcc helloworld.c-o helloworld

Arm-linux-gnueabihf-gcc is the cross-compilation tool chain used, helloworld.c is the application source file, and "- o helloworld" represents the cross-compiled program image named "helloworld", which can be arbitrary.

Figure 4

As can be seen from the prompt, the helloworld image file is a 32-bit small-end ARM platform program that can be run directly on the ARM platform.

Run the helloworld program in the development board

Copy the helloworld image file to any path of the development board file system, and then execute the following command to run the helloworld program in the same path as the executable image file:

Target#. / helloworld

After running the program, the system will print the program information, as shown below:

Figure 5

On the AM437x-based Linux application development steps are shared here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.

Tags: Programs development files interleaving compiling applications applications support running mirroring steps content commands tools platforms source code more systems paths help Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno NVidia Shulou Information Microsoft OPPO Reno Apple