CN112231013B - 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
CN112231013B
CN112231013B CN202011095530.0A CN202011095530A CN112231013B CN 112231013 B CN112231013 B CN 112231013B CN 202011095530 A CN202011095530 A CN 202011095530A CN 112231013 B CN112231013 B CN 112231013B
Authority
CN
China
Prior art keywords
function
static library
target server
engineering
address
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.)
Active
Application number
CN202011095530.0A
Other languages
Chinese (zh)
Other versions
CN112231013A (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

Abstract

The invention relates to a method for establishing a target server after an IP address is changed by an embedded VxWorks system, belonging 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 a structural variable of an 'afferent starting parameter' in the function, and assigning values to the variable; invoking a WDB initialization function and a WDB system suspension function; compiling static library engineering to generate a static library file; the static library is added to the application software, and the entry function of the static library is called before the connection target server is executed. The invention improves the applicability of connecting the VxWorks embedded operating system with the target server, and debugging through a network, is convenient for development and debugging of application programs, enhances the support of hardware environment on software development and debugging, and can still realize the connection of the target server under the condition that the application software changes the IP address of the network card.

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 used for developing application software such as navigation, monitoring, command control and the like in the fields of ships, communication, military, aerospace and the like in China. In the VxWorks integrated development environment, application program development and debugging are carried out, and the most effective and convenient mode with the most extensive application is task tracking and power-off debugging through network connection target server. The debugging method has a certain limit that the WDB must be in ready state after the operating system is started, and the IP address of the network card connected for debugging cannot be changed in the application program. In an actual environment, the network interface is limited by hardware resources, and complex network topological relations in a specific scene are difficult to ensure that the application program of a user does not reset the IP address of the network card; under the condition, software debugging can be performed only by modifying the start-up setting of the VxWorks operating system, so that the software debugging is inconvenient to use, the efficiency of debugging work is affected, and the ideal condition of keeping the state of the operating system still 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 starting of the VxWorks operating system is completed, setting parameters necessary for connecting a target server, and further performing the re-initialization of the WDB, a method for realizing that after an application program changes the IP address of a network card, the target server connection can be established is provided.
Disclosure of Invention
First, the technical problem to be solved
The invention aims to provide a method for establishing a target server after an IP address is changed by an embedded VxWorks system, 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 problems, 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 a static library engineering source program;
s3, declaring a structural variable of an 'afferent starting parameter' in the function, and performing assignment setting on the structural variable;
s4, calling a WDB initialization function and a WDB system suspension function;
s5, compiling static library engineering to generate a static library file;
s6, adding the static library into the application software, and calling an entry function of the static library before executing the connection target server.
Further, the application software alters the IP address of the network card before the method is run.
Further, the step S1 specifically includes the following steps:
s11, creating a DKM engineering in a work space where a working path is located;
s12, selecting a processor and a compiling chain which are the same as those of the application program from the built specs option;
s13, selecting gnu as a Build Tool in a Build target option;
s14, finishing engineering creation.
Further, the step S2 specifically includes the following steps:
s21, creating a source file c in a static library engineering source program;
s22, determining a function in the file, wherein the parameter is a variable char of the character string type.
Further, the step S3 specifically includes the following steps:
s31, declaring a BOOT_PARAMS type structural variable;
s32, performing assignment setting on the structural variable.
Further, the assigning setting includes assigning the network card address, the network card type, and the network card serial number to the structure variable.
Further, the step S4 specifically includes the following steps:
s41, after the configuration variable is set, the function sequentially executes a usrWdbInit () function and a wrSystemSuspend () function;
s42, the usrWdbReInit function returns.
Further, the step S5 specifically includes the following steps:
s51, executing a Build Project in the engineering option;
s52, compiling is completed, and a static library file is generated.
Further, the step S6 specifically includes the following steps:
s61, selecting a Library attribute page from application software engineering attributes;
s62, browsing and adding static library files;
s63, recompiling the application software engineering;
s64, after the application software is operated, the usrWdbReInit function is executed, and then the target server connection operation is carried out, so that the connection can be completed.
(III) beneficial effects
The invention provides a method for establishing a target server after an IP address is changed by an embedded VxWorks system, a static library engineering is established, and an incoming parameter function is defined; declaring a system start parameter structure and initializing the type of the network card; invoking a WDB initialization function and a WDB system suspension function; the compiling engineering generates a static library file and adds the static library file into the application engineering, so that the target server can be still connected under the condition that the application software changes the IP address of the network card. The invention improves the applicability of the VxWorks embedded operating system to be connected with the target server and debugged through the network, facilitates the development and debugging of application programs, and enhances the support of the hardware environment to the software development and debugging. By adopting the operation steps, the connection of the target server can be realized under the condition that the application software changes the IP address of the network card, and the technical method is proved to have strong technical feasibility, stability and reliability by practical verification, and can realize the functions that the VxWorks embedded operation system changes the IP address of the network card in application and the target server establishes connection.
Drawings
FIG. 1 is a flow chart of a method for establishing a target server after changing an IP address;
FIG. 2 is a flow chart for solving the problem of establishing a target server connection according to the present invention.
Detailed Description
To make the objects, contents and advantages of the present invention more apparent, the following detailed description of the present invention will be given with reference to 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 the VxWorks embedded operating system to be connected with the target server and debugged through the network, facilitates the development and debugging of application programs, and enhances the support of the hardware environment to the software development and debugging.
In order to achieve the above object, the present invention adopts the following technical measures:
s1, creating a static library project in a VxWorks integrated development environment;
s2, defining a function in a static library engineering source program;
s3, declaring a structural variable of an 'afferent 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 static library engineering to generate a static library file;
s6, adding the static library into the application software, and calling an entry function of the static library before executing the connection target server.
Through the steps, the problem that the application software changes the IP address of the network card and reconnects the target server can be solved.
The invention belongs to a method for reestablishing a target server connection after changing an IP address under an embedded VxWorks operating system. The method is characterized in that: firstly, establishing a static library engineering 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; fourth, the compiling engineering generates a static library file and adds the static library file into the application engineering, so that the target server can be still connected under the condition that the application software changes the IP address of the network card.
The invention relates to a method for establishing a target server after an embedded VxWorks system changes an IP address, wherein,
(1) Exist as a static library, not involving application functionality and architectural changes;
(2) Re-initializing 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.
Further, the invention is characterized in that: (1) Finding out the reason that the target server cannot be connected after changing the IP address; (2) Starting from the principle of the initialization process of the WDB in the starting process of the VxWorks operating system, a method for re-initializing the WDB under the running state of the operating system is developed; (3) The WDB is initialized again, and then target server reconnection can be realized; (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 functions in a static library under the telnet terminal.
1-2, in order to solve the problem that in a VxWorks embedded operating system, application software changes the IP address of a network card and a target server cannot be connected, static library engineering is established, after the application software starts to change the IP address of the network card, WDB initialization is performed again to solve the problem, and the invention is further described below.
1. In the VxWorks integrated development environment, a static library engineering is created
S11, creating a DKM engineering in a work space where a working path is located, and naming usrWdbReInit;
s12, selecting a processor and a compiling chain which are the same as those of the application program from the built specs option;
s13, selecting gnu as a Build Tool in a Build target option;
s14, finishing engineering creation.
2. In a static library engineering source program, a function is defined
S21, creating a source file c in a static library engineering source program, wherein the source file c is named as wdbUsrDef;
s22, defining a function in the file, wherein the function name usrWdbReInit, and the parameter is a variable char_addr of the character string type.
3. Declaring "incoming start parameter" structure variables in the function and assigning settings to the structure variables
S31, declaring a variable IMPORT BOOT_ PARAMS sysBootParams;
s32, assigning and setting the sysBootParams structure
strcpy(sysBootParams.ead,addr);
strcpy(sysBootParams.bootDev,"gei");
sysBootParams.unitNum=0;
The "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 sysBootParams structure is set, the function sequentially executes a usrWdbInit () function and a wrSystemSuspend () function;
s42, the usrWdbReInit function returns.
5. Compiling static library engineering to generate static library files
S51, executing a Build Project in the engineering option;
s52, compiling is completed, and a usrWdbReInit.a static library file is generated.
6. Adding the static library into the application software, and calling an entry function of the static library before re-executing the connection target server after modifying the IP
S61, selecting a Library attribute page from application software engineering attributes;
s62, selecting Add..A. - > Add full qualified library file, and browsing and adding a usrWdbReInit.a file;
s63, recompiling the application software engineering;
s64, after the application software is operated, the usrWdbReInit function is executed, and then the target server connection operation is carried out, so that the connection can be completed.
By utilizing the technical scheme, the operation steps can still realize the connection of the target server under the condition that the application software changes the network card IP address, and the technical method is proved to have strong technical feasibility, is stable and reliable by practical verification, and can realize the functions that the VxWorks embedded operation system changes the network card IP address in application and the target server establishes connection.
The foregoing is merely a preferred embodiment of the present invention, and it should be noted that modifications and variations could be made by those skilled in the art without departing from the technical principles of the present invention, and such modifications and variations should also be regarded as being within the scope of the invention.

Claims (3)

1. A method for establishing a target server after an embedded VxWorks system changes an IP address is realized, which is characterized by comprising the following steps:
step S1, creating a static library project in a VxWorks integrated development environment;
step S2, defining a function in a static library engineering source program;
s3, declaring a structural variable of an 'afferent starting parameter' in the function, and performing assignment setting on the structural variable;
s4, calling a WDB initialization function and a WDB system suspension function;
s5, compiling static library engineering to generate a static library file;
s6, adding the static library into the application software, and calling an entry function of the static library before executing the connection target server;
the step S3 specifically includes the following steps:
s31, declaring a BOOT_PARAMS type structural variable;
s32, performing assignment setting on the structural variable;
the assignment setting comprises assigning the network card address, the network card type and the network card serial number to the structural variable;
the step S4 specifically includes the following steps:
s41, after the configuration variable is set, the function sequentially executes a usrWdbInit () function and a wrSystemSuspend () function;
s42, returning a usrWdbReIni function;
the step S5 specifically includes the following steps:
s51, executing a Build Project in the engineering option;
s52, compiling is completed, and a static library file is generated;
the step S6 specifically includes the following steps:
s61, selecting a Library attribute page from application software engineering attributes;
s62, browsing and adding static library files;
s63, recompiling the application software engineering;
s64, after the application software is operated, the usrWdbReInit function is executed, and then the target server connection operation is carried out, so that the connection can be completed.
2. The method for establishing a target server after the embedded VxWorks system changes the IP address according to claim 1, wherein the step S1 specifically includes the following steps:
s11, creating a DKM engineering in a work space where a working path is located;
s12, selecting a processor and a compiling chain which are the same as those of the application program from the built specs option;
s13, selecting gnu as a Build Tool in a Build target option;
s14, finishing engineering creation.
3. The method for establishing a target server after the embedded VxWorks system changes the IP address according to claim 1, wherein the step S2 specifically includes the following steps:
s21, creating a source file c in a static library engineering source program;
s22, determining a function in the file, wherein the parameter is a variable char of the character string type.
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 CN112231013A (en) 2021-01-15
CN112231013B true 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)

Families Citing this family (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.《대한임베디드공학회논문지》.2012,正文第135-142页. *
基于嵌入式VxWorks无线网络传输关键技术的研究;邓如玉;《中国优秀硕士学位论文全文数据库 工程科技II辑》;20091115;全文 *

Also Published As

Publication number Publication date
CN112231013A (en) 2021-01-15

Similar Documents

Publication Publication Date Title
CN106843869B (en) Front-end development engineering system and method
RU2658190C2 (en) Controlling runtime access to application programming interfaces
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
US8694956B2 (en) PowerShell cmdlets code generating tool for communicating to the web services
CN107577609B (en) Embedded system dynamic module debugging system based on host end dynamic link
CN112286656B (en) Applet simulation method, apparatus, electronic device, and computer-readable storage medium
CN112231013B (en) Method for establishing target server after IP address is changed by embedded VxWorks system
CN114185551B (en) Applet compiling method, applet running method and device and storage medium
EP4209894A1 (en) Cloud code development system, method, and apparatus, device, and storage medium
CN1627254A (en) Method for debuging embedded system and equipment
CN110795141A (en) Training task submitting method, device, equipment and medium
US20050114644A1 (en) Deterministic system and method for implementing software distributed between a desktop and a remote device
CN111367804B (en) Method for realizing front-end cooperative debugging based on cloud computing and network programming
US8676842B2 (en) Creating multiple Mbeans from a factory Mbean
CN114115964B (en) Hot updating method and device for Unity, computing equipment and computer-readable storage medium
CN109460280B (en) Method and terminal for running program
CN113918179A (en) Method and system for automatically installing OS (operating system) by cooperation of host and intelligent network card under Linux
CN113360249A (en) Qemu virtual machine operation method based on ARM64
CN112416245B (en) Storage volume management method based on multi-architecture container cloud platform and related components
CN112445607B (en) Method and device for executing method function by application program
CN114443052A (en) Dynamic specialization method and device during IL instruction operation
CN111611148B (en) Compatibility concurrent test method and system for iOS system application software
Scherfke Mosaik documentation
CN110971665A (en) Management method, system, equipment and storage medium for interfacing multi-type storage

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