Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to realize source code compilation in Tool

2025-02-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article is to share with you the content of how to implement source compilation in Tool. Xiaobian thinks it is quite practical, so share it with everyone for reference. Let's follow Xiaobian and have a look.

When compiling VxWorks Image with VIP, you may encounter situations where certain components are not optional or even found.

This is because the IDE tool (Tornado/Workbench) did not find the corresponding library file.

Wind River provides many components in VxWorks, some of which only provide source code, mainly components related to connectivity, security and management, such as Wind River Firewall, Wind River IPsec and IKE, Wind River Mobile IP, and CRYSTPTO in the above figure. To invoke them in VxWorks, you need to compile the source code into libraries first. There are also components that provide both source code and library files, but for some reason may need to modify the source code, or adjust parameters, which also requires recompiling the source code.

VxWorks 5.x

In VxWorks 5.x, to compile the source code, you first need to call $(WIND_BASE)/host/$(WIND_HOST_TYPE)/bin/torVars.bat in the Host system command line tool to set the VxWorks environment variables, and then run the make command in the $(TGT_DIR)/src directory.

Make parameters usually include CPU and TOOL

However, in VxWorks5.x, the compiler diab is still sold separately, and most users do not install it, so the value of TOOL can only be the compiler gnu, and it does not matter whether it is written or not. The CPU value, depending on what target is used, can be obtained from its BSP makefile

VxWorks 6.1-6.6

With VxWorks 6, many more components are available. In addition to using the command line, Workbench provides User-Defined Projects to compile source code for VxWorks 6.1-6.6.

Create a User-Defined Project and select VxWorks as the Target operating system.

Then set the location of Project to the folder where VxWorks is located

The most important thing is to fill in the Build command according to the target situation

CPU value, also refer to the target BSP makefile; and at this time TOOL, generally gnu and diab are optional, according to the actual needs of the project to decide. There are a few more parameters.

comp-xxx indicates the scope of the library, comp-kernel indicates that this is a kernel library, which is also the default value; comp-usr indicates that this is a user mode library, that is, for RTP

FEATURE_SET indicates which platform needs to be selected according to the actual situation, for example FEATURE_SET=pne, but most users only install one platform, so this parameter does not need to be filled in. Common platforms include pne, pid, pad, pcd, and gpp, which does not contain source code, so there is no need to compile again.

Platform for Network Equipment

Platform for Industrial Devices

Platform for Automotive Devices

Platform for Consumer Devices

General Purpose Platform

VXBUILD indicates whether it is configured in SMP mode. If it is not filled in, it means UP. Therefore, if it is filled in, it can only be VXBUILD=SMP.

ADDED_CFLAGS represents C compilation options, if you want to use more options, generally use the += symbol, such as ADDED_CFLAGS+=-g

ADDED_C++FLAGS indicates compilation options for C++

To clean an existing library, clean rule is TARGET=rclean.

VxWorks 6.7-6.9

As of VxWorks 6.7, Wind River no longer recommends using the command line or User-Defined Project, as this would destroy the library files that come with the system. Instead, it provides a very powerful project: VxWorks Source Build Project. Using this VSB, required components and parameters can be customized graphically, and the compiled library is stored separately. Therefore, a variety of different libraries can be compiled for different CPUs or BSPs.

When creating VSB, you can choose to be based on a certain BSP or a certain CPU. When compiling based on BSP, the compilation tools are optimized specifically for BSP to provide better performance and smaller code size. When compiled based on a CPU, the resulting library can be used to support all BSPs for that CPU.

After VSB is created, it can be configured according to actual requirements. such as enable CRYPTO assemblies

Add FIREWALL component

Then compile the project, but the higher version of VxWorks contains a bit more components, the compilation time will be some long, generally more than 30 minutes

After VSB compilation is complete, new library files are available in the VSB directory. At this point, you need to create new VIPs to use these new library files. The new VIP is not based on a BSP like the previous project, but on the VSB project.

In the new VIP, you can see that the previous CRYSTTO has become optional, and the FIREWALL component has been added.

Of course, there is also a situation where certain components cannot be used in VIP, that is, no installation (in fact, no purchase), such as VxWorks 5.5 with only two CDs installed or VxWorks 6.x ^_^with gpp.

Thank you for reading! About "Tool how to achieve source code compilation" this article is shared here, I hope the above content can be of some help to everyone, so that we can learn more knowledge, if you think the article is good, you can share it to let more people see it!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report