1.1 What is Velt
The full name of Velt is Visual Embedlinuxtools, a Visual Studio plug-in similar to Visual gdb, which assists in the completion of Linux development. Using this plugin, you will be able to develop Linux applications (including compilation and debugging) in the IDE of Visual Studio, as well as compile uboot and Linux kernels, and locate the source code correctly based on the error information at compile time. The current version is 0.1.4 and only supports vs2013. This plugin can be downloaded from the CSDN download channel (http://download.csdn.net/detail/lights_joy/8429771). Here are the basic features:
Support x86 Linux, HiSilicon HI3516/HI3520,MINGW These platforms, provide project templates for these several platforms.
Completes the compilation of the Uboot and automatically navigates to the appropriate file location based on the compiled error information.
Complete the compilation of the Linux kernel and automatically navigate to the appropriate file location based on the compiled error information.
Complete the configuration of the Linux kernel under vs.
Compile the Linux application without using Makefile.
Use makefile for the development of Linux applications.
Use SSH to connect to the target machine and debug the application with GDB.
Use Telnet to connect to the target machine and debug the application with GDB.
Integrated Linux Endpoints (Poderosa) in VS, supports ssh/telnet/com, automatically exports vs variables as variables in bash, such as ProjectDir, when the terminal is opened.
The basic principle of 1.2 velt
The velt itself does not contain any compilation tools, it does only the work of VS2013 this front-end and the different GNU compiler connection, the real compilation and debugging is still done by the cross-compiling tool!
When compiling the code, Velt uses a method of remote compilation, when VS is compiling, Velt uses SSH to log on to the Linux host system to compile, and then analyzes the information generated during the compilation, converting it to the information that the VS can recognize. This way, VS will be able to correctly locate the file in the IDE where the error occurred!
Velt relies on the shared directory capabilities of the Linux samba or virtual machines to share the project files, and does not support compiling files with SCP after uploading them to Linux.
In debugging this piece, Velt currently only supports debugging of Linux under the console application, and can only use GDB, does not support gdbserver, the structure of its debug engine is:
As shown, Velt runs two auxiliary programs on the Windows side. One is remoteconsole, the main function of this program is to display the remote program output, and accept the user input to the remote. The other is the Python interpreter, which is used to complete the ssh/telnet/com connection and is responsible for invoking GDB on the remote Linux. These two applications run only when debugging is started and do not normally use it.
When you start the Project debug, the VC debug engine will load RemoteConsole.exe, because this is a Windows local program, so vs can load normally. When the VC engine starts, the Velt extension will receive this event and invoke its own debug engine, which in this debug engine will connect through the network Remoteconsole to control GDB's operation and receive GDB's events to be reflected in the IDE.
1.3 Development environment
The following is a typical embedded development environment configuration:
Host development Environment:
System: WIN8 64-bit
Development tools: vs2013 + velt-0.1.4
Virtual machine: Vmware workstation-11.0.
To compile the host development environment:
The system of virtual machines is used for the provision of various services in cross-compiling and embedded development.
Operating system: RHEL-6.3, This virtual machine is for development only, regardless of its security configuration.
Development tools: GCC, cross-compilation tool chain under different platforms.
System services: Enable TFTP, Samba, FTP, SSH
Target machine: The platform you want to use, such as a platform such as sea-think, TI, Adi, or a virtual machine's Linux.
Connection mode: telnet/ssh/com
Debug mode: Gdb/gdbserver
1.4 Directory Sharing
First, share the Windows directory with VMware's shared directory functionality to Linux, such as F:\work, and the directory you see under Linux is/mnt/hgfs/share/work.
Next, the directory under Linux is shared with the Samba service to Windows, such as/work, which is mapped to z:\ under Windows, it is important to note that Samba's account number and the account we use to SSH in after us should be consistent to avoid unnecessary interference due to permissions issues.
When developing Uboot and Linux kernels, the code can only be placed on Linux virtual hard disks, not on Windows systems, because they need to use symbolic links and are case sensitive.
In general application development, if you do not use symbolic links, you only need to put the code in the Windows directory, which can speed up the code analysis of vs.
1.5 SDF File location
Because VS2013 browsing information is placed in an SDF file, and the project file may be placed in the shared directory of the virtual machine, the path to the SDF file needs to be changed, and it must be guaranteed to be on a hard disk that is directly managed by Windows, or it will slow down when compiling large projects.
1.6 Velt Installation
Start installing the Velt plugin below:
1, untie the Velt compressed package, put in a directory, such as my directory is:
F:\projects\src\gdb2012\EmbedLinux
This directory should avoid spaces with Chinese file names!
2. Add an environment variable called Embedlinux_root in the environment variable:
Notice the trailing slash at the end of the path.
3. Install the Embedlinux.installer-0.1.4.vsix under the release directory:
You should be able to see this plugin in the VS Help message after the installation is complete:
You can also see it in extensions and updates in tools, such as:
4. Copy all files under the Msbuild\platforms directory to:
C:\Program Files (x86) \msbuild\microsoft.cpp\v4.0\v120\platforms
5. Open the New Project window of VS to see the newly added three platforms:
The installation is complete!
Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.
Development of UBOOT platform with vs2013+velt-0.1.4 for embedded development