A method for loading an application program in an embedded system
Through automatic slot identification and parameter configuration of the main processor board in the embedded system, the problems of complex board replacement operation and easy error in parameter configuration in the embedded system are solved, automatic board replacement and application loading are realized, and replacement efficiency and reliability are improved.
Patent Information
- Application Number
- CN202411098899.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-12
- Publication Date
- 2025-10-14
- Estimated Expiration
- 2044-08-12
AI Technical Summary
Replacing the main processor board in an embedded system is complex and parameter configuration is prone to errors. Existing technologies require manual modification, which makes the operation complex and prone to errors.
The microcontroller on the main processor board automatically identifies the slot number and automatically modifies the parameter configuration file and loads the application program according to the slot number, thereby realizing an automated board replacement process.
It realizes the rapid adaptive dynamic modification of the main processor board and the automatic loading of the application program, improves the replacement efficiency and reliability, and reduces the complexity and error rate of manual operation.
Smart Images

Figure CN119065741B_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] An embedded system contains N (N ≥ 2) main processor boards. Each main processor board, aside from different configuration parameters, contains identical hardware modules with identical functionality, performance, and resources. To save costs, the system does not include redundant main processor boards as spares, instead ensuring that each main processor board backs up the other. If a main processor board fails, a functioning main processor board must be inserted into the failed slot in the embedded system's computer chassis. To ensure that the board in that slot can be replaced and function properly, all parameter configuration files and application target code within the board must be manually modified. This manual parameter and target code modification is not only complex and requires specialized operator skills, but also poses the risk of mismatching or missing parameters, making main processor board replacement a significant challenge. 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 easy error in parameter configuration" in the embedded system.
[0005] (2) 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] S1: 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 is loaded and run on a fixed slot number;
[0010] After the main processor board is powered on, the address code 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 code information of the board slot to the main processor through the serial port;
[0011] S2: According to the slot number of the main processor board, various configuration parameter information required for loading the application in the corresponding slot is set, and then the corresponding application is loaded;
[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 code 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 based on 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 application configuration file replacement operation, 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 prescribed 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 present invention also provides an application of the method in the field of communication technology.
[0020] The present invention also provides an application of the method in the field of storage technology.
[0021] (3) 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 and load the corresponding target code, greatly improving 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 with reference to the accompanying drawings and examples.
[0028] The present invention proposes a method for loading an application program in an embedded system. This method automatically modifies the parameter script configuration file of the main processor board in the slot by identifying the slot number of the embedded system's computer chassis and selectively loads the corresponding target code. If any main processor board in the embedded system fails, a functioning main processor board can be installed in the failed slot in the computer chassis. This method automatically and quickly modifies the parameters of the main processor board in the slot and loads the application program in the board without requiring manual parameter modification.
[0029] Only by adopting the solution of the present invention can the problems of "complex operation and error-prone parameter configuration when replacing the main processor board" be perfectly solved. The present invention enables rapid, adaptive, dynamic modification of main processor board parameters within an embedded system computer chassis and automatic loading of application programs, while also improving the reliability of replacing the main processor board within the computer chassis.
[0030] like Figure 1 、 Figure 2 As shown, the present invention proposes a method for loading an application in an embedded system, the steps of which are as follows:
[0031] S1: 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.
[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; when any main processor board is inserted into any dedicated slot, 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 number of transmissions. If the main processor does not receive the card slot address code information fed back by the single-chip microcomputer within the specified number of times, the main processor will give a "slot identification failure" prompt.
[0036] S2: According to the slot number of the main processor board, various configuration parameter information required for loading the application in the corresponding slot is set, and then the corresponding application is loaded;
[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 applications and different configuration files required by all applications.
[0038] If the main processor receives the card slot address code information from the microcontroller within a specified number of times, the main processor card obtains the executable code information and configuration file information required by the application corresponding to the slot information based on the slot information. The main processor card copies the configuration file required by the application loaded in the slot to the corresponding path, replacing the original configuration file information. After the main processor card obtains its own slot information and completes the application configuration file replacement operation, the main processor card 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 to load and run the application.
[0039] In the embedded system composed of the N main processor boards, each main processor board can serve as a backup for 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 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 is loaded and run on a fixed slot number; After the main processor board is powered on, the address code 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 code information of the board slot to the main processor through the serial port; S2: According to the slot number of the main processor board, various configuration parameter information required for loading the application in the corresponding slot is set, and then the corresponding application is loaded; 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 code 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 based on 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 application configuration file replacement operation, 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, wherein 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, wherein 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, wherein If the main processor does not receive the board slot address code information fed back by the microcontroller within the specified number of times, the main processor will give a "slot identification failure" prompt.
5. The method according to claim 1, wherein In the embedded system composed of N main processor boards, each main processor board can serve as a backup for each other.
6. The method according to claim 1, wherein N≥2。 7. The method according to claim 1, wherein The main processor board is located inside the computer chassis of the embedded system.
Citation Information
Patent Citations
Automatic loading method for switching board card configuration file
CN118444989A
Ebedded computer system
CN1622068A