CN112231013A - Method for establishing target server after IP address is changed by embedded VxWorks system - Google Patents

Method for establishing target server after IP address is changed by embedded VxWorks system Download PDF

Info

Publication number
CN112231013A
CN112231013A CN202011095530.0A CN202011095530A CN112231013A CN 112231013 A CN112231013 A CN 112231013A CN 202011095530 A CN202011095530 A CN 202011095530A CN 112231013 A CN112231013 A CN 112231013A
Authority
CN
China
Prior art keywords
function
target server
static library
address
establishing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011095530.0A
Other languages
Chinese (zh)
Other versions
CN112231013B (en
Inventor
唐亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tianjin Jinhang Computing Technology Research Institute
Original Assignee
Tianjin Jinhang Computing Technology Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tianjin Jinhang Computing Technology Research Institute filed Critical Tianjin Jinhang Computing Technology Research Institute
Priority to CN202011095530.0A priority Critical patent/CN112231013B/en
Publication of CN112231013A publication Critical patent/CN112231013A/en
Application granted granted Critical
Publication of CN112231013B publication Critical patent/CN112231013B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to a method for establishing a target server after an embedded VxWorks system changes an IP address, and belongs to the field of embedded software development. In the VxWorks integrated development environment, a static library project is created; defining a function in a static library engineering source program; declaring an 'incoming starting parameter' structure variable in a function, and assigning values to the variable; calling a WDB initialization function and a WDB system suspension function; compiling a static library project to generate a static library file; adding the static library into the application software, and calling an entry function of the static library before executing the connection target server. The invention improves the applicability of VxWorks embedded operating system to connect with target server and debugging through network, facilitates the development and debugging of application programs, enhances the support of hardware environment to software development and debugging, can still realize the connection of target server under the condition that the application software changes the IP address of the network card, and has strong feasibility, stability and reliability.

Description

Method for establishing target server after IP address is changed by embedded VxWorks system
Technical Field
The invention belongs to the field of embedded software development, and particularly relates to a method for establishing a target server after an embedded VxWorks system changes an IP address.
Background
The VxWorks operating system is an embedded real-time operating system, and is widely applied to development of application software for navigation, monitoring, command control and the like in the fields of ships, communication, military, aerospace and the like in China. In a VxWorks integrated development environment, application program development and debugging are carried out, and the most effective and convenient mode which is most widely applied is to connect a target server through a network to carry out task tracking and power-off debugging. The debugging method also has certain limitation, namely after the operating system is started, the WDB must be in a ready state, and the IP address of the network card for connecting and debugging cannot be changed in an application program. In an actual environment, the network card IP address is limited by hardware resources, and the complicated network topology relationship in a specific scene is difficult to ensure that the application program of a user does not reset; under the condition, software debugging can be carried out only by modifying the starting setting of the VxWorks operating system, so that the software debugging method is very inconvenient to use, the efficiency of debugging work is influenced, and the ideal condition of keeping the state of the operating system motionless cannot be met.
In order to solve the problem, starting from the principle of WDB initialization in the starting process of the VxWorks operating system, after the VxWorks system is started, the parameters necessary for connecting the target server are set, and then the re-initialization of the WDB is executed, and the method for establishing the target server connection after the IP address of the network card is changed by an application program is provided.
Disclosure of Invention
Technical problem to be solved
The invention aims to solve the technical problem of how to provide a method for establishing a target server after an embedded VxWorks system changes an IP address so as to solve the problem that the target server connection can be established after the IP address of a network card is changed in an application program.
(II) technical scheme
In order to solve the technical problem, the invention provides a method for establishing a target server after an embedded VxWorks system changes an IP address, which comprises the following steps:
s1, creating a static library project in a VxWorks integrated development environment;
s2, defining a function in the static library engineering source program;
s3, declaring an 'incoming starting parameter' structure variable in the function, and assigning and setting the structure variable;
s4, calling a WDB initialization function and a WDB system suspension function;
s5, compiling the static library engineering to generate a static library file;
and S6, adding the static library into the application software, and calling the entry function of the static library before executing the connection target server.
Further, the application software changes the IP address of the network card before the method runs.
Further, the step S1 specifically includes the following steps:
s11, newly building a DKM project in the work path where the working path is located;
s12, selecting a processor and a compiling chain which are the same as the application program in the Build specs option;
s13, selecting gnu as the Build Tool from the Build target option;
and S14, completing the project creation.
Further, the step S2 specifically includes the following steps:
s21, creating a new source file c in the static library engineering source program;
s22, a function is determined in the file, and the parameter is a variable char × addr of the character string type.
Further, the step S3 specifically includes the following steps:
s31, declaring a structural variable of a BOOT _ PARAMS type;
and S32, carrying out assignment setting on the structure variable.
Further, the assignment setting includes assigning a network card address, a network card type, and a network card serial number to the configuration variable.
Further, the step S4 specifically includes the following steps:
s41, after the structure variable is set, the function sequentially executes usrWdbInit () function and wdbSystemSuspend () function;
s42, and the usrWdbReInit function returns.
Further, the step S5 specifically includes the following steps:
s51, executing Build Project in the Project option;
and S52, compiling to generate a static library file.
Further, the step S6 specifically includes the following steps:
s61, selecting a Library attribute page from the application software engineering attributes;
s62, browsing and adding static library files;
s63, recompiling the application software project;
and S64, after the application software runs, executing a usrWdbReInit function, and then performing target server connection operation to complete connection.
(III) advantageous effects
The invention provides a method for establishing a target server after an embedded VxWorks system changes an IP address, which comprises the steps of establishing a static library project and defining an incoming parameter function; declaring a system starting parameter structure and initializing the type of the network card; calling a WDB initialization function and a WDB system suspension function; and generating a static library file by the compiling engineering, adding the static library file into the application engineering, and realizing the connection of the target server under the condition that the IP address of the network card is changed by application software. The invention improves the applicability of VxWorks embedded operating system connection target server and debugging through the network, facilitates the development and debugging of application programs and enhances the support of hardware environment on software development and debugging. By adopting the operation steps, the connection of the target server can be still realized under the condition that the IP address of the network card is changed by application software.
Drawings
FIG. 1 is a flowchart of a method for establishing a target server after changing an IP address according to the present invention;
FIG. 2 is a flowchart illustrating a process for establishing a target server connection according to the present invention.
Detailed Description
In order to make the objects, contents and advantages of the present invention clearer, the following detailed description of the embodiments of the present invention will be made in conjunction with the accompanying drawings and examples.
The invention belongs to a technical method for solving the problem that a target server cannot be connected after a user changes a default IP address of a network card in a starting process under a VxWorks embedded operating system. The invention improves the applicability of VxWorks embedded operating system connection target server and debugging through the network, facilitates the development and debugging of application programs and enhances the support of hardware environment on software development and debugging.
In order to achieve the purpose, the invention adopts the following technical measures:
s1, creating a static library project in a VxWorks integrated development environment;
s2, defining a function in the static library engineering source program;
s3, declaring a structure variable of the 'incoming starting parameter' in the function, and assigning values to the variable;
s4, calling a WDB initialization function and a WDB system suspension function;
s5, compiling the static library engineering to generate a static library file;
and S6, adding the static library into the application software, and calling the entry function of the static library before executing the connection target server.
Through the steps, the problems that the IP address of the network card is changed by application software and the target server is reconnected can be solved.
The invention belongs to a method for reestablishing target server connection after an IP address is changed under an embedded VxWorks operating system. It is characterized in that: firstly, establishing a static library project and defining an incoming parameter function; secondly, declaring a system starting parameter structure and initializing the type of the network card; thirdly, calling a WDB initialization function and a WDB system suspension function; fourthly, the compiling engineering generates a static library file, and the static library file is added into the application engineering, so that the target server can still be connected under the condition that the IP address of the network card is changed by application software.
The invention relates to a method for establishing a target server after an embedded VxWorks system changes an IP address, wherein,
(1) exists as a static library and does not relate to the change of application program functions and architectures;
(2) re-initializing the WDB according to the network card type changed by the IP address;
(3) and after the IP address is changed, calling a function in the static library to complete the function.
Furthermore, the invention is characterized in that: (1) finding out the reason why the target server cannot be connected after the IP address is changed; (2) starting with the WDB initialization process in the starting process of the VxWorks operating system as a principle, a method for re-initializing the WDB of the operating system in a running state is developed; (3) the target server reconnection can be realized after the WDB is reinitialized; (4) after the application software changes the IP address, the initialization of establishing the target server environment can be completed by adding codes into the software, debugging the terminal or running the function in the static library under the telnet terminal.
With reference to fig. 1-2, in order to solve the problem that the application software changes the IP address of the network card and the target server cannot connect in the VxWorks embedded operating system, we solve the problem by establishing a static library project and performing WDB initialization again after the application software starts to change the IP address of the network card, and the contents of the present invention are further described below.
1. Creating a static library project in VxWorks integrated development environment
S11, newly building a DKM project in the works space where the working path is located, and naming usrWdbReInit;
s12, selecting a processor and a compiling chain which are the same as the application program in the Build specs option;
s13, selecting gnu as the Build Tool from the Build target option;
and S14, completing the project creation.
2. In a static library engineering source program, a function is defined
S21, creating a new source file c in the static library engineering source program, wherein the name of the source file c is wdbsrRef.c;
s22, a function is determined in the file, the name of the function is usrWdbReInit, and the parameter is the variable char addr of the character string type.
3. Declaring an 'incoming startup parameter' structure variable in a function, and assigning and setting the structure variable
S31, declaring variable IMPORT BOOT _ PARAMS sysBootParams;
s32, assigning value to sysBootParams structure
strcpy(sysBootParams.ead,addr);
strcpy(sysBootParams.bootDev,"gei");
sysBootParams.unitNum=0;
Wherein, "gei" is a network card type, and in practical application, corresponding names are written according to different network card types. Addr is the network card address. The serial number of the same type of network card is 0.
4. Invoking WDB initialization function and WDB system suspension function
S41, after the setup of the sysBootParams structure is completed, the function sequentially executes usrWdbInit () function and wdbSystemSuspend () function;
s42, and the usrWdbReInit function returns.
5. Compiling static library engineering to generate static library files
S51, executing Build Project in the Project option;
and S52, compiling to generate a usrWdbReInit.a static library file.
6. Adding the static library into the application software, calling the inlet function of the static library before re-executing the connection target server after modifying the IP (Internet protocol)
S61, selecting a Library attribute page from the application software engineering attributes;
s62, selecting Add.
S63, recompiling the application software project;
and S64, after the application software runs, executing a usrWdbReInit function, and then performing target server connection operation to complete connection.
By utilizing the technical scheme and adopting the operation steps, the connection of the target server can be still realized under the condition that the IP address of the network card is changed by application software.
The above description is only a preferred embodiment of the present invention, and it should be noted that, for those skilled in the art, several modifications and variations can be made without departing from the technical principle of the present invention, and these modifications and variations should also be regarded as the protection scope of the present invention.

Claims (9)

1. A method for establishing a target server after an embedded VxWorks system changes an IP address is characterized by comprising the following steps:
s1, creating a static library project in a VxWorks integrated development environment;
s2, defining a function in the static library engineering source program;
s3, declaring an 'incoming starting parameter' structure variable in the function, and assigning and setting the structure variable;
s4, calling a WDB initialization function and a WDB system suspension function;
s5, compiling the static library engineering to generate a static library file;
and S6, adding the static library into the application software, and calling the entry function of the static library before executing the connection target server.
2. The method for establishing the target server after the embedded VxWorks system changes the IP address as claimed in claim 1, wherein the application software changes the IP address of the network card before the method is run.
3. The method for establishing a target server after an embedded VxWorks system changes an IP address according to claim 2, wherein the step S1 specifically comprises the following steps:
s11, newly building a DKM project in the work path where the working path is located;
s12, selecting a processor and a compiling chain which are the same as the application program in the Build specs option;
s13, selecting gnu as the Build Tool from the Build target option;
and S14, completing the project creation.
4. The method for establishing a target server after an embedded VxWorks system changes an IP address according to claim 1, wherein the step S2 specifically comprises the following steps:
s21, creating a new source file c in the static library engineering source program;
s22, a function is determined in the file, and the parameter is a variable char × addr of the character string type.
5. The method for establishing a target server after an embedded VxWorks system changes an IP address according to claim 1, wherein the step S3 specifically comprises the following steps:
s31, declaring a structural variable of a BOOT _ PARAMS type;
and S32, carrying out assignment setting on the structure variable.
6. The method for establishing the target server after the embedded VxWorks system changes the IP address as claimed in claim 5, wherein the assigning setting comprises assigning the network card address, the network card type and the network card serial number to the configuration variable.
7. The method for establishing a target server after changing an IP address according to any one of claims 1 to 6, wherein the step S4 specifically comprises the following steps:
s41, after the structure variable is set, the function sequentially executes usrWdbInit () function and wdbSystemSuspend () function;
s42, and the usrWdbReInit function returns.
8. The method for establishing a target server after the embedded VxWorks system changes the IP address according to claim 7, wherein the step S5 specifically comprises the following steps:
s51, executing Build Project in the Project option;
and S52, compiling to generate a static library file.
9. The method for establishing a target server after the embedded VxWorks system changes the IP address according to claim 8, wherein the step S6 specifically comprises the following steps:
s61, selecting a Library attribute page from the application software engineering attributes;
s62, browsing and adding static library files;
s63, recompiling the application software project;
and S64, after the application software runs, executing a usrWdbReInit function, and then performing target server connection operation to complete connection.
CN202011095530.0A 2020-10-14 2020-10-14 Method for establishing target server after IP address is changed by embedded VxWorks system Active CN112231013B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011095530.0A CN112231013B (en) 2020-10-14 2020-10-14 Method for establishing target server after IP address is changed by embedded VxWorks system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011095530.0A CN112231013B (en) 2020-10-14 2020-10-14 Method for establishing target server after IP address is changed by embedded VxWorks system

Publications (2)

Publication Number Publication Date
CN112231013A true CN112231013A (en) 2021-01-15
CN112231013B CN112231013B (en) 2023-06-02

Family

ID=74112740

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011095530.0A Active CN112231013B (en) 2020-10-14 2020-10-14 Method for establishing target server after IP address is changed by embedded VxWorks system

Country Status (1)

Country Link
CN (1) CN112231013B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655962A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Method for shortening file writing time under VxWorks7 embedded operating system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464697A (en) * 2002-06-28 2003-12-31 华为技术有限公司 Method for adding network port device in BIOS
CN1490720A (en) * 2002-10-17 2004-04-21 深圳市中兴通讯股份有限公司 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server
CN101247266A (en) * 2008-03-21 2008-08-20 深圳国人通信有限公司 Method for processing data in Ethernet
CN103914309A (en) * 2012-12-29 2014-07-09 中国航空工业集团公司第六三一研究所 Method for setting IP (Internet Protocol) and MAC (Media Access Control) addresses based on embedded system platform

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1464697A (en) * 2002-06-28 2003-12-31 华为技术有限公司 Method for adding network port device in BIOS
CN1490720A (en) * 2002-10-17 2004-04-21 深圳市中兴通讯股份有限公司 Start and update method for VxWorks operation system based dynamic host computer configuration protocol server
CN101247266A (en) * 2008-03-21 2008-08-20 深圳国人通信有限公司 Method for processing data in Ethernet
CN103914309A (en) * 2012-12-29 2014-07-09 中国航空工业集团公司第六三一研究所 Method for setting IP (Internet Protocol) and MAC (Media Access Control) addresses based on embedded system platform

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
박 송 화等: "A Design of the Remote Test Tool for Software Based on VxWorks", 《대한임베디드공학회논문지》 *
邓如玉: "基于嵌入式VxWorks无线网络传输关键技术的研究", 《中国优秀硕士学位论文全文数据库 工程科技II辑》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113655962A (en) * 2021-08-18 2021-11-16 天津津航计算技术研究所 Method for shortening file writing time under VxWorks7 embedded operating system

Also Published As

Publication number Publication date
CN112231013B (en) 2023-06-02

Similar Documents

Publication Publication Date Title
CN106843869B (en) Front-end development engineering system and method
CN108055248B (en) Dubbo framework-based remote calling method, server and storage medium
US6874021B1 (en) Techniques for configuring network devices with consistent forms for getting and setting device properties
US8694956B2 (en) PowerShell cmdlets code generating tool for communicating to the web services
CN104636189A (en) Xen-based virtual machine deployment system and Xen-based virtual machine deployment method
US10574724B2 (en) Automatic discovery of management nodes and generation of CLI using HA module
WO2010023139A1 (en) Provisioning virtual resources using name resolution
CN109740765B (en) Machine learning system building method based on Amazon network server
Guan et al. Design and implementation of an embedded web server based on ARM
CN110008044B (en) Method for constructing distributed real-time communication middleware on embedded RTOS
US7331047B2 (en) Deterministic system and method for implementing software distributed between a desktop and a remote device
CN112231013A (en) Method for establishing target server after IP address is changed by embedded VxWorks system
US6263213B1 (en) Component-based control structure for wireless communication
WO2020199597A1 (en) Blockchain node management agent service installation method, electronic apparatus and storage medium
CN108040126B (en) Method and device for initiating HTTP request
US8676842B2 (en) Creating multiple Mbeans from a factory Mbean
CN112925586A (en) Applet routing method, device, computer equipment and storage medium
CN111865978A (en) Method, device, equipment and medium for updating request identifier of micro-service
CN106547537A (en) One kind realizes assemblnig electric power application software method based on QML technologies
CN106844156B (en) WCF communication message interception method in intelligent building integrated management platform system
CN115758334A (en) Cloud application access method and device, electronic equipment and storage medium
CN115061678A (en) Code compiling method and client based on browser proxy service
CN111984679B (en) Access method, device, host, system and medium of hardware acceleration database
CN113918179A (en) Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux
CN112395049A (en) Service server calling method, system, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant