Method for loading application program in embedded system
By automatically detecting and loading the slot number of the main processor board in the embedded system, the problems of complicated board replacement and wrong parameter configuration are solved, automatic board replacement and application loading are realized, and the embedded system is improved reliability and efficiency.
Patent Information
- Application Number
- CN202411098899.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Replacing the main processor board in an embedded system is complicated and the parameter configuration is prone to errors, and requires manual modification of parameters and target codes, resulting in inconvenience and potential errors.
By obtaining the slot number of the main processor board, automatically read and save address encoding information, automatically set and load application configuration parameters and target codes according to the slot number, and automatically detect and configure file replacement using serial communication.
It realizes fast adaptive dynamic modification of the main processor board and automatic application loading, improves the efficiency and reliability of changing the board, and reduces operational complexity and error rate.
Smart Images

Figure CN119065741A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of communication technology and storage technology, and in particular relates to a method for loading an application program in an embedded system. Background Art
[0002] The embedded system contains N (N≧2) main processor boards. Except for different configuration parameter settings, the functions, performance and resources of the hardware modules contained in each main processor board are exactly the same. In order to save costs, the system is not equipped with extra main processor boards as spare parts, so that each main processor board can back up each other. When a main processor board fails, another normal main processor board needs to be inserted into the faulty slot of the embedded system computer chassis. In order to ensure that the board on the slot is replaced and the functions of the original board are realized, it is usually necessary to manually modify all parameter configuration files and application target codes in the board. This method of manually modifying parameters and target codes is not only complicated to operate, but also requires the operator to have certain professional skills. In addition, it is possible to mismatch or miss certain parameters, which brings many inconveniences to the replacement of the main processor board. Summary of the invention
[0003] 1. Technical issues to be resolved
[0004] The invention provides a method for loading an application program in an embedded system, which solves the problem of "complex operation of replacing a main processor board and error-prone parameter configuration" in the embedded system.
[0005] (II) Technical solution
[0006] In order to solve the above technical problems, the present invention provides a method for loading an application program in an embedded system, comprising the following steps:
[0007] S 1 : Get the slot number of the main processor board that loads the current application;
[0008] The embedded system includes N main processor boards, each of which has the same hardware resource configuration, and each of which runs only one embedded application program.
[0009] In the embedded system composed of N main processor boards, each main processor board is installed in its own slot, and a fixed application program is loaded and run on a fixed slot number;
[0010] After the main processor board is powered on, the address coding information of the current board slot is read and saved by the single-chip microcomputer on the main processor board; the main processor on the main processor board sends a slot information query command to the single-chip microcomputer through the serial port, and after receiving the query command, the single-chip microcomputer feeds back the address coding information of the board slot to the main processor through the serial port;
[0011] S 2 : According to the slot number of the main processor board, set various configuration parameter information required for loading the application program in the corresponding slot, and then load the corresponding application program;
[0012] The types, quantities and contents of the files contained in each main processor board are exactly the same, and all of them contain executable codes of all applications and different configuration files required by all applications;
[0013] If the main processor receives the board slot address coding information fed back by the single-chip microcomputer within a specified number of times, the main processor board obtains the executable code information of the application corresponding to the slot information and the configuration file information required by the application according to the slot information; the main processor board copies the configuration file required by the application loaded in the slot to the corresponding path, replacing the original configuration file information content; after the main processor board obtains its own slot information and completes the replacement operation of the application configuration file, the main processor board loads the application configuration script information corresponding to the slot; the script information content includes: application path, communication interface type and configuration information, parameter information required by the application, and instruction code for loading and running the application.
[0014] Preferably, any main processor board is inserted into any dedicated slot, and the corresponding application program can be automatically loaded according to the slot number after the system is powered on.
[0015] Preferably, the main processor of the main processor board sends a slot information query command to the single-chip microcomputer according to a fixed cycle and number of transmissions.
[0016] Preferably, if the main processor does not receive the board slot address coding information fed back by the single-chip microcomputer within a specified number of times, the main processor gives a prompt of "slot identification failure".
[0017] Preferably, in the embedded system composed of N main processor boards, each main processor board can serve as a backup for each other.
[0018] The invention also provides an application of the method in an embedded system.
[0019] The invention also provides an application of the method in the field of communication technology.
[0020] The invention also provides an application of the method in the field of storage technology.
[0021] (III) Beneficial effects
[0022] The advantages of the present invention compared with the prior art are:
[0023] 1. This method can automatically detect the slot number information of the main processor board, automatically and quickly modify the parameter script configuration file of the main processor board according to the slot number information, and select to load the corresponding target code, which greatly improves the efficiency and flexibility of replacing the main processor board;
[0024] 2. This method has the characteristics of low cost, high reliability and stability, and easy implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a schematic diagram of a multi-master processor board;
[0026] Figure 2 It is an overall flow chart of the method of the present invention. DETAILED DESCRIPTION
[0027] In order to make the purpose, content and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the drawings and examples.
[0028] The present invention provides a method for loading an application program in an embedded system. The method can automatically modify the parameter script configuration file of the main processor board in the slot and select to load the corresponding target code by identifying the slot number information of the computer chassis of the embedded system. When any main processor board in the above embedded system fails, other normal main processor boards are installed in the failed slot of the computer chassis, and the parameters in the main processor board in the slot can be dynamically modified and the application program in the board can be loaded automatically and quickly without manual parameter modification operation.
[0029] Only by adopting the solution of the present invention can the problem of "complex operation of replacing the main processor board and error-prone parameter configuration" be perfectly solved. The present invention can realize the rapid adaptive dynamic modification of the parameters of the main processor board in the computer chassis of the embedded system and the automatic loading of the application program, and improve the reliability of replacing the main processor board in the computer chassis.
[0030] like Figure 1 , Figure 2 As shown, the method for loading an application program in an embedded system proposed by the present invention comprises the following steps:
[0031] S 1 : Get the slot number of the main processor board that loads the current application;
[0032] The embedded system computer case contains N (N≧2) main processor boards, each main processor board has the same hardware resource configuration, and each board only runs one embedded application program.
[0033] Among them, in the embedded system composed of N main processor boards, each main processor board is installed in its own slot, and a fixed application is loaded and run on a fixed slot number; any main processor board is inserted into any dedicated slot, and the system can automatically load the corresponding application according to the slot number after power-on.
[0034] Among them, after the main processor board is powered on, the address coding information of the current board slot is read and saved by the single-chip microcomputer on the main processor board; the main processor on the main processor board sends a slot information query command to the single-chip microcomputer through the serial port, and after receiving the query command, the single-chip microcomputer feeds back the address coding information of the board slot to the main processor through the serial port.
[0035] The main processor of the main processor board sends a slot information query command to the single-chip microcomputer according to a fixed cycle and sending times. If the main processor does not receive the board slot address coding information fed back by the single-chip microcomputer within the specified times, the main processor gives a prompt of "slot identification failure".
[0036] S 2 : According to the slot number of the main processor board, set various configuration parameter information required for loading the application program in the corresponding slot, and then load the corresponding application program;
[0037] The types, quantities and contents of the files contained in each main processor board are exactly the same, and all of them contain executable codes of all application programs and different configuration files required by all application programs.
[0038] Among them, if the main processor receives the board slot address coding information fed back by the single-chip microcomputer within the specified number of times, the main processor board can obtain the executable code information of the application corresponding to the slot information and the configuration file information required by the application according to the slot information; the main processor board copies the configuration file required by the application loaded in the slot to the corresponding path, replacing the original configuration file information content; after the main processor board obtains its own slot information and completes the replacement operation of the application configuration file, the main processor board loads the application configuration script information corresponding to the slot. The script information content includes: application path, communication interface type and configuration information, parameter information required by the application, and instruction code for loading and running the application.
[0039] Among them, in the embedded system composed of N main processor boards, each main processor board can back up each other. When any main processor board is inserted into a fixed slot, the application corresponding to the slot can be automatically loaded and run.
[0040] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for loading an application program in an embedded system, characterized in that: The following steps are involved: S1: Get the slot number of the main processor board that loads the current application; The embedded system includes N main processor boards, each of which has the same hardware resource configuration, and each of which runs only one embedded application program. In the embedded system composed of N main processor boards, each main processor board is installed in its own slot, and a fixed application program is loaded and run on a fixed slot number; After the main processor board is powered on, the address coding information of the current board slot is read and saved by the single-chip microcomputer on the main processor board; the main processor on the main processor board sends a slot information query command to the single-chip microcomputer through the serial port, and after receiving the query command, the single-chip microcomputer feeds back the address coding information of the board slot to the main processor through the serial port; S2: according to the slot number of the main processor board, set various configuration parameter information required for loading the application program in the corresponding slot, and then load the corresponding application program; The types, quantities and contents of the files contained in each main processor board are exactly the same, and all of them contain executable codes of all applications and different configuration files required by all applications; If the main processor receives the board slot address coding information fed back by the single-chip microcomputer within a specified number of times, the main processor board obtains the executable code information of the application corresponding to the slot information and the configuration file information required by the application according to the slot information; the main processor board copies the configuration file required by the application loaded in the slot to the corresponding path, replacing the original configuration file information content; after the main processor board obtains its own slot information and completes the replacement operation of the application configuration file, the main processor board loads the application configuration script information corresponding to the slot; the script information content includes: application path, communication interface type and configuration information, parameter information required by the application, and instruction code for loading and running the application.
2. The method according to claim 1, characterized in that Insert any main processor board into any dedicated slot, and the system will automatically load the corresponding application according to the slot number after power-on.
3. The method according to claim 1, characterized in that The main processor of the main processor board sends a slot information query command to the single-chip microcomputer according to a fixed cycle and number of times.
4. The method according to claim 1, characterized in that If the main processor does not receive the board slot address coding information fed back by the microcontroller within the specified number of times, the main processor will give a prompt of "slot identification failed".
5. The method according to claim 1, characterized in that In the embedded system composed of N main processor boards, each main processor board can back up each other.
6. The method according to claim 1, characterized in that N≥2。 7. The method according to claim 1, characterized in that The main processor board is located inside the computer chassis of the embedded system.
8. Application of the method according to any one of claims 1 to 6 in an embedded system.
9. Application of the method according to any one of claims 1 to 6 in the field of communication technology.
10. Application of the method according to any one of claims 1 to 6 in the field of storage technology.
Citation Information
Patent Citations
Self-adaptive loading method for embedded program
CN111459870A
Parameter setting method for standby data storage module of embedded system
CN117149308A
Automatic loading method for switching board card configuration file
CN118444989A
Ebedded computer system
CN1622068A
High-security card slot module
US20150026377A1
