1. Scope of Use
This document is intended for users who migrate C + + projects under the Realevo-ide development environment and should be familiar with using the Realevo-ide development environment and have the basic knowledge of C + + language programming.
2. Preparatory work2.1 Environment Preparation
prior to use, an integrated development kit with wing-FAI information development should be installed, as firewall software or anti-virus software installed on the system may affect the use of integrated development software, so please turn off Windows Firewall on your computer before using this kit and anti-virus software .
because subsequent operations need to be displayed on the emulator, so before the next chapter operation, please complete the configuration of the mini2440 simulator and start, the specific configuration steps please refer to the figure 2-1 "mini2440 simulator configuration start."
2.2 Resource Preparation
before porting C + + engineering, the relevant C + + engineering source code should be obtained from the customer or by other means, and ensure the correctness of the project source code. This technical note resource preparation is shown in 2-1.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402151607151 "/>
Figure 2-1 Resource Preparation
which: Mini2440_base file for this transplant relies on the base project, C + + project source code files for the transplant of the project source.
3. Technology implementation3.1 Import Base Project
Double-click 650) this.width=650; "Width=" "height=" "style=" WIDTH:48PX;HEIGHT:39PX; "src="/HTTP/ img.blog.csdn.net/20170402151611723 "/> open realevo-ide software, select Menu" File-import ", Popup interface 3-1 is shown.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402151625255 "/>
Figure 3-1 Import Project
Click "Next" to pop up the 3-2 display.
650) this.width=650; "width=" 499 "height=" 598 "style=" WIDTH:468PX;HEIGHT:584PX; "src=" http://img.blog.csdn.net/ 20170402151634245 "/>
Figure 3-2 Import Mini2440_base Project
Click "Finish" to complete the import of Mini2440_base project.
3.2 New C++_app project
Create a new C++_app project, as shown in step 3-3 (when creating a new C + + project, check the option in Figure 3-3, step Fifth).
650) this.width=650; "Width=" 851 "height=" 656 "style=" width:599px;height:534px; "src=" http://img.blog.csdn.net/ 20170402152133169 "/>
Figure 3-3 New C++_app Project
Click "Next", pop up as shown in Figure 3-4 interface.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152231452 "/>
Figure 3-4 Base Project selection
Click "Finish" to complete the creation of the C++_app project.
3.3 Importing source files for C++_app projects
Delete the C++_app.cpp file from the C++_app project, and then import the source file shown in Figure 2-1 into the SRC directory, as shown in 3-5 (you can copy and paste directly).
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152319765 "/>
Figure 3-5 Importing C++_app project source files
3.4 Configuring C++_app Engineering
Select C++_app Project, right click on the project Select "properities" option, set the C++_app project header file path, 3-6 (this time the C + + project relies on more header files, the actual migration process with the actual circumstances prevail).
650) this.width=650; "Width=" 594 "height=" 496 "style=" WIDTH:580PX;HEIGHT:484PX; "src=" http://img.blog.csdn.net/ 20170402152414407 "/>
Figure 3-6 Configuring the header file path
Click "Apply", then target device creation, 3-7 (this migration is demonstrated on the mini2440 simulator, the actual porting process is subject to actual conditions).
650) this.width=650; "Width=" 620 "height=" 506 "style=" width:598px;height:490px; "src=" http://img.blog.csdn.net/ 20170402152448967 "/>
Figure 3-7 Setting the target machine IP
Click "Apply" to make the dependent library settings, steps 3-8 is shown.
650) this.width=650; "Width=" 620 "height=" 506 "style=" WIDTH:601PX;HEIGHT:493PX; "src=" http://img.blog.csdn.net/ 20170402152523405 "/>
Figure 3-8 Dependent Library Settings
Note: In this case C++_app engineering needs to rely on glib246.so,xcore.so,proxy.so, the actual situation according to the migration needs to select the dependent library files.
3.5 Compiling and uploading
After the configuration is complete, compile the C++_app project, as shown in action 3-9.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152603831 "/>
Figure 3-9 Compiling the project
Once the compilation is complete, upload the project as shown in Operation 3-10.
650) this.width=650; "Width=" 668 "height=" 674 "style=" width:623px;height:658px; "src=" http://img.blog.csdn.net/ 20170402152638894 "/>
Figure 3-10 Uploading the project
3.6 Simulation run on simulator
Execute the file uploaded in section 3.5, as shown in Operation 3-11.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152713051 "/>
Figure 3-11 Executing the target program
You can get the results shown in 3-12.
650) this.width=650; "Width=" 728 "height=" 131 "style=" width:711px;height:121px; "src=" http://img.blog.csdn.net/ 20170402152719469 "/>
Figure 3-12 Program execution Results
4. Summary of errors in porting4.1 Reference header file Error
In the compile phase, you may encounter an error that the header file cannot find the path, as shown in 4-1.
650) this.width=650; "Width=" 727 "height=" "style=" width:702px;height:72px; "src=" http://img.blog.csdn.net/ 20170402152821391 "/>
Figure 4-1 Header file path error
The method for solving this kind of problem is to modify the project properties, and add the corresponding header file path, as shown in 4-2. Note When you add a header file path, do not copy the header file, just add the appropriate header file path correctly.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152831646 "/>
Figure 4-2 Adding a header file path
4.2 Symbol Lookup
in the execution phase, you encounter an error that cannot find the symbol, as shown in 4-3.
650) this.width=650; "src=" http://img.blog.csdn.net/20170402152849506 "/>
Figure 4-3 Symbol Error
These issues are summarized for the following reasons:
1. struct Not defined
2. variables are defined
3. function Not defined
The workaround is to: Sourceinsight or realevo-ide Global Search, where the symbol definition is found , if it is not defined, implement the symbol according to the semantics or the definition in its original context. definition, if it is already defined, it is possible that the file was not added to the compilation.
because C + + there is a method overload in the compiler, so there is a naming shredding rule for this type of problem solution reference C + + The compiler's naming shredding rules.
5. Summary
This document introduces the process of porting C + + engineering under Sylixos, and introduces the problems that may arise during the migration process and the thinking of solving the corresponding problems.
6. References
the Realevo-ide APP User Guide
the Linux Engineering porting to Sylixos Technical notes
about the Information for C + + naming adornments:
http://hipercomer.blog.51cto.com/4415661/855223
Http://blog.sina.com.cn/s/blog_67ae19eb0101aygx.html
Porting C + + engineering under Sylixos