VxWorks download program

Source: Internet
Author: User

Reprinted please identify Source: http://blog.csdn.net/zgh1988/article/details/7998054

1. You can create two types of projects in tornado environment: a bootable VxWorks image (bootable project) and downloadable application modules (downloadable project ).

2. Downloadable Projects

In the previous section, we have successfully run the Vxworks system, so we need to develop applications on this basis.

(1) create a downloadable Project

(2) Add a file

File --> New --> C/C ++ source file

File Name: Test

(3) Click the test. cpp file to add the code.

# Include <stdio. h>

Void test ()

{

Printf ("Hello VxWorks! \ N ");

}

You may find that there is no main function here, and there is no process concept in VxWorks. Only a task represents a task. So we declare only one function.

(4) Compile and link

The dark buttons on the left are: build project, re-buildall, compile current source file, and update Dependencies from the right to the left. However, the execution order is: update dependencies --> compile current source file --> buildporject

In this case, there will be two files in your project:

(5) Configure target shell

Tools --> target shell --> Configure target servers

Target name/IP address of the target machine

After completing the two configurations, click the "launch" button to start the target server.

(6) download the program

At the top of the re-build button, select target @ pc0326ybv from a drop-down list.

Click Download object file or boot image.

You can either download project1.out or test. O. (Note: The VxWorks system starts at this time ).

Click "--> I", launch Shell

Run the command: moduleshow --> Test

3. Project Guidance

(1) create a bootable Project

(2) file --> New --> C/C ++ source file

File Name: Test

(3) Compile and run the program to create a VxWorks Image

(4) replace D with the VxWorks image generated above: the original VxWorks image under the disk directory.

Re-open the VM, run the VxWorks operating system, and execute the test task. However, an error occurs,

Undefined Symbol: Test

Why is this problem? This is because the file we defined is test. cpp and will be renamed during the compilation process, so test has changed.

So we should do this:

Re-replace D: The image in the directory and re-run the VxWorks operating system. This is the success!

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.