Developing embedded Linux programs with VC6

Source: Internet
Author: User

First of all, VC6 naturally can not directly develop the Linux program, mainly using its editing environment, but as a developer who has been using VC6 on Windows, not to VC6 as the core of development is how not accustomed to ah.

It is also stated that the Linux is a layman, the reference to the Linux things are layman's view, for reference only.

2015 suddenly a little ambitious, ready to transfer their license plate recognition software to the Linux system, which can be cured in the camera, can also be made into embedded hardware. After a simple review, Intel's Edison platform was selected. The advantages are (1) small size, self-contained WiFi module, (2) faster than the same period of Raspberry Pi; (3) x86 system, the original algorithm inside the special instruction optimization (such as MMX instructions) can continue to be effective; (4) There are official forums and technical support; The disadvantage is also obvious, high price, Edison module + The Braekout floor is priced at least twice times as much as the Raspberry Pi. But because it was developed under Linux, it should be easier to replace the platform.

The following links are Intel's Edison home page:

Http://www.intel.com/content/www/us/en/do-it-yourself/edison.html

For people who have been using VC6 integrated environment development for a long time, figuring out how to make Linux programming is a challenge, finding the whole tool chain and being able to configure it is also difficult, especially if there is no accumulation, no teachers, and network resources.

Just started using the standard tool chain developed by Edison, using Eclipse, with Edison's Cross compiler, to realize Edison's development. But found a lot of unaccustomed places, one is the eclipse run slowly, not like Vc6 as flowing; the other is that eclipse must use Intel's plug-in, but at a fee (because the Intel compiler has a --sysroot option, The standard eclipse seems to be unable to handle it, but now it seems to have an Intel version of Eclipse.

Later decided to use the VC6 integration environment to write the program, the following measures are adopted:

(1) Each program to establish a VC project, management and editing to modify the source files and header files;

(2) The program must compile successfully in Win32, and can run correctly. After this step, use the cross compiler to compile the program under Linux. In order to achieve this, to (1) try to use pure C library functions, to ensure that most of the code is common in two platforms, (2) Minimize the platform-related code, (3) Do need the platform-related code, encapsulation, through conditional compilation calls different code, (4) all communication as far as possible network communication, Package the unified socket communication module;

Because it is an embedded program, the above requirements for code implementation are easy to implement.

(3) A tool that calls the Intel Cross compiler, automatically reads the list of files from the VC6 project, compiles the connection, and displays the compilation information and errors in the Output window of the VC6. is the parameter setting interface of my compilation tool.

My compilation tool also outputs the compiled messages from the Intel cross compiler to VC6 's compiled output window, such as:

Tool program automatically modifies the Intel compiler output message inside the source file name and line number format, can be implemented in the VC6 Compile Information Output window double-click the compilation error message automatically jump to the corresponding source code.

(4) Automatically publish to Edison board after the compilation is completed.

(5) The following is the most important part, the online debugging program

The implementation of on-line debugging is still very complex, no plan to achieve their own, currently in the win to implement the function, and test, and then to run the verification of Linux, in addition to the program as much as possible to output debugging information. If you do not want to step online debugging, it should follow the standard Linux remote debugging method to operate.

By the way, this project has been canceled because of the sudden boredom of programming ...

Developing embedded Linux programs with VC6

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.