Compile and run the first HelloWorld program on a Linux minimal system

Source: Internet
Author: User

First, install and use SSH software

1. Installing SSH Software

1) SSH software compression package can be downloaded in the network disk, downloaded after the decompression, into the extracted folder, such as.

2) Single-hit "Sshsecureshellclient-3.2.9.exe" to start the installation

3) For example, Generate desktop icon.

1. Using SSH software to transfer files

1) Enter the virtual machine's Ubuntu system and use the Ifconfig command to determine the Ubuntu IP address. As the

The IP address of the user, which needs to be confirmed by itself, is just an example of this machine's IP.

2) Double-click the shortcut "SSH Secure File Transfer Client", open the SSH software, click the menu "File"--"Quick connnect", then, will pop up as shown in the dialog box, "User Name" in the dialog box Enter "Root" inside. "Host Name" is entered in the previous look at the Ubuntu IP address, "such as.

3) For example, in the pop-up window, click the button "Yes".

4) For example, in the popup window, enter the user password. If you are using a "built-in image", the password is "Topeet".

5) as shown, the SSH software for Windows is already connected to Ubuntu.

6) For example, the left part is the Windows host's file directory, the right is the Ubuntu system directory, can be dragged by the mouse to transfer files, very convenient. Drag files to the right after you can view the dragged files under Ubuntu's corresponding folder.

Ii. installation and use of notepad++ software

Search notepad++ from the Internet, download and install, open and then write the C language code, with its advantage is more than directly under Ubuntu to write a more friendly interface, such as

Third, write HelloWorld code

Create a new HELLOWORLD.C source file, open it with notepad++, and write the code inside, as shown in.

Iv. Compiling code

1. Save the written code, create a new code folder under Shh/home folder, and drag the written HELLOWORLD.C code below it, such as.

Enter the Ubuntu system from inside the terminal into the/home/code folder can see HELLOWORLD.C files, such as.

2. Compile the file through Arm-none-linux-gnueabi-gcc-4.4.1-o HelloWorld helloworld.c-static, and you can get the executable file as shown in

3, open the SSH software, click the Refresh button to see the newly generated HelloWorld files, such as

4. Copy it to the USB flash drive and insert the USB stick onto the development Board.

5, open the Development Board button, after the boot run mount/dev/sda1/mnt/disk/instructions to mount the USB stick to the development Board, into the/mnt/disk/after the HelloWorld file in the USB flash drive, indicating the success of the mount, such as.

6. Execute the./helloworld instruction and run the HelloWorld file to get the following results

The above is the overall process of Linux system development thereafter.

Compile and run the first HelloWorld program on a Linux minimal system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.