CN107729085A - A kind of On-board software dynamic loading method for supporting address to redirect - Google Patents
A kind of On-board software dynamic loading method for supporting address to redirect Download PDFInfo
- Publication number
- CN107729085A CN107729085A CN201710996603.5A CN201710996603A CN107729085A CN 107729085 A CN107729085 A CN 107729085A CN 201710996603 A CN201710996603 A CN 201710996603A CN 107729085 A CN107729085 A CN 107729085A
- Authority
- CN
- China
- Prior art keywords
- program
- address
- board software
- component
- attribute
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
- G06F9/44526—Plug-ins; Add-ons
Abstract
The invention provides a kind of On-board software dynamic loading method for supporting address to redirect, and can realize that simple, highly reliable and redundancy On-board software address redirects loading method.Step 1: write embedded software link profile;Step 2: internal memory detects when program starts;Step 3: On-board software global property componentization:Be the attribute that can change by all global properties, including with initial value and the attribute without initial value, be packaged into the attribute of a component, the component is referred to as program component;Step 4: program component instantiates:The initial address preserved by obtaining in global register, the program component defined in step 3 is mapped in the internal memory initial address of health, realizes the instantiation of program component;Step 5: by whole program compiling link formed can programming binary program file;Step 6: finally normal start in binary file programming to target device, will be powered up.
Description
Technical field
The present invention relates to a kind of On-board software dynamic loading method for supporting address to redirect, belong to spacecraft embedded software
Part realizes technical field.
Background technology
For many embedded satellite-borne computer equipments in spacecraft, internal memory (SRAM) is the direct load of running software
Body, and internal memory has not maintenanceability and not replaceability mostly.And the processor that many spaceborne computer equipment use at present
Not memory management unit (MMU), the memory address that program uses after compiling link, during variables access is physically
Location, therefore after physical damage occurs for some address of device memory (being powered back up rear failure still can not recover), software is visited
When asking this address, it can all make a mistake.It was found that after memory failure, ground typically takes the processing of switching alternate device work to arrange
Apply, i.e., current main part computer subsequently can not normal use.Because ram region failure causes single part of computer failure to whole
It is undoubtedly very big loss for spacecraft.
In the prior art, Publication No. CN106873990A patent discloses a kind of embedded system RAM damages mould
Multi partition bootstrap technique under formula, this method, which consolidates program to deposit, is divided into two parts, and a part deposits normal startup program, another
Part storage lightweight startup program.The memory address space of two parts program operation is different.When RAM failures cause normally to start
During program operation failure, start the operation of lightweight startup program.Publication No. CN104461657A patent discloses a kind of embedding
Embedded system switches starter, and device includes processor, switching signal generation module, master backup solidification memory etc..The dress
Put for when solidifying memory power-up, bootstrap to be read from solidification memory, when solidifying memory power-off, from backup
Memory reads bootstrap.Also Publication No. CN10288049A patent discloses a kind of embedded multisystem self-starting
Method, it is characterised in that comprising an individually designed self-start circuit and a timer, after system power-up, timer starts
Work, self-start circuit output chip choose first memory, and processor is loaded into bootstrap, system from first memory
Initialized, the Off Timer if starting successfully.If timer then before, self-start circuit does not receive correct state
Signal, self-start circuit output chip choose second memory, and processor is loaded into bootstrap, system from second memory
Initialized.
The above method is primarily present problems with:
(1) need to design the operation that corresponding hardware circuit coordinates completion Failure elimination, and in some embedded systems,
The problems such as needing to consider cost, power consumption, volume.
(2) memory address space to break down is random, and master backup program runs address space phase in the above method
With, stand-by program can not equally be run after failure.Active and standby program address space is different, if defective space and active and standby program
Address space is overlapping, the situation that will also cause active and standby program can not all run.
Therefore, this paper presents a kind of On-board software dynamic loading method for supporting address to redirect, this method to combine soft
Part component technology, the global property of whole spaceborne program is packaged into special-purpose member, the process original instantiated by component
The physical address used after this On-board software compiling link is changed into logical address, so as to realize dynamic mapping, in On-board software
The memory address of failure can be skipped during load operating after completion internal memory health examination, without being affected.
The content of the invention
The invention provides a kind of On-board software dynamic loading method for supporting address to redirect, can realize simple, high
Reliable and redundancy On-board software address redirects loading method, and using software component technology, chain is compiled using embedded software
The rule connect, after the physical damage for solving some address of internal memory or certain regional address, program can not normal load operation ask
Topic.
A kind of On-board software dynamic loading method for supporting address to redirect, comprises the following steps:
Step 1: write On-board software link profile:Define On-board software program text sections and data sections are placed in ROM
In, bss sections are placed in RAM, and define address and the size of the memory headroom of On-board software program operation;
Step 2: internal memory detects:Program detects when starting since the initial address of the memory headroom, finds one section of company
Continue the memory address space that correct, enough programs use, and the initial address of the memory address space is stored in the overall situation and posted
In storage;
Step 3: program component instantiates:It is the category that can be changed by global property all in On-board software first
Property is packaged into the attribute of a component, and the component is referred to as program component;Then preserved in the global register is obtained
Beginning address, by described program component mapping to the initial address, realize the instantiation of program component;
Step 4: by after instantiation program component compiling link formed can programming binary program file;
Step 5: finally normal start in binary program file programming to target device, will be powered up.
Beneficial effects of the present invention:
The present invention combines software component technology, and the global property of whole spaceborne program is packaged into special-purpose member, passes through structure
The physical address that the process of part instantiation to use after script On-board software compiling link is changed into logical address, so as to realize
Dynamic mapping, the memory address of failure can be skipped after internal memory health examination is completed in On-board software load operating, without by
Any influence.
Brief description of the drawings
Fig. 1 is the schematic diagram that the present invention generates executable program using address reorientation method.
Internal memory testing mechanism flow chart when Fig. 2 starts for the present invention.
Fig. 3 is the structure chart of the component in the present invention.
Fig. 4 is the memory address space layout after memory address dynamic mapping of the present invention.
Embodiment
As shown in Figure 1, the invention provides it is a kind of support address redirect On-board software dynamic loading method, below
Developed simultaneously embodiment with reference to accompanying drawing, the present invention will be described in detail.
The On-board software dynamic loading method step that the support address of the present invention redirects is as follows:
Step 1:By taking the exploitation of certain On-board software as an example, its program code text section 28K Bytes, data data sections 16K
Bytes, bss section 36K Bytes, stack segment use 32K Bytes.After comprehensive statistics, it is contemplated that internal memory is no more than using space
128K Bytes.Assuming that its RAM initial address is 0x40000000, size is 1M Bytes, and its memory address damaged is
0x400000FC
Step 2:Internal memory detection program is write using assembler language, the detection program is when whole program starts, completion pair
CPU is initialized, and detection process detects since internal memory initial address, and it is empty to find one section of address that program uses continuous enough
Between, as program needs to use 128K byte spaces, then follow-up 128K byte spaces are respectively written into since initial address
0x55555555 and 0xAAAAAAAA condition codes and reading are judged, after space detection is correct, by the internal memory in the space
Initial value is all set to 0, and the initial address in this correct space of detection is stored in global register.If the space
There is mistake in individual address, then skips the wrong address, since next 32 byte is to its address, continues to detect 128K bytes
Address space, so circulation, until finding one section of continuous correctly 128K byte space, when detection initial address and detection
When length sum exceedes RAM maximum address, program need to enter endless loop and wait dog to sting the machine of cutting.
Its testing process starts since the 0x40000000 of address to 128K length as shown in Fig. 2 after program startup
Ram space is detected, and mistake is found when detecting address 0x400000FC, and now program reinitializes detection address and length
Degree, is detected since the 0x40000100 of address to the ram space of 128K length, by address 0x40000100 after detecting successfully
Preserve into the global register of processor.
Step 3:On-board software global property componentization:
(a) attribute is encapsulated:By global property all in original programming, (attribute that can be changed, including band are first
The be worth and attribute without initial value), such as global variable, global array, global pointer, global component etc. are packaged into a component
Attribute, for example struct AppComponent are defined as, wherein including n attribute, 32 integer attribute a, single-precision floating points
Attribute b, double-precision floating point attribute c, unsigned int pointer attribute d and unsigned int array attribute e (128 elements) etc..
Wherein a, b, c, d have initial value requirement, and initial assignment operation is carried out to it in the initialization interface realized in (b).
(b) initialization interface is write:Interface shape is generally void AppComponentInit (void).In the interface
Assignment operation is carried out to a, b, c, d attribute of AppComponent components, the interface needs to be adjusted before procedure subject operation
With realizing the function of initializing of program component.
(c) issuing interface:Issuing interface is write, by issuing interface, returns to the pointer for pointing to AppComponent examples,
Global property a, b, c, d, the e originally defined can be accessed by the pointer.
The program component of definition is mapped on obtained healthy internal memory initial address 0x40000100, realizes program component
Instantiation.
Step 4:The engineering that finishes will finally be write and be compiled link, form executable program;
Step 5:After programming is into target device, power-up operation.
Claims (4)
1. a kind of On-board software dynamic loading method for supporting address to redirect, it is characterised in that comprise the following steps:
Step 1: write On-board software link profile:Define On-board software program text sections and data sections be placed in ROM,
Bss sections are placed in RAM, and define address and the size of the memory headroom of On-board software program operation;
Step 2: internal memory detects:Program detects when starting since the initial address of the memory headroom, is finding one section continuously just
The memory address space that true, enough programs use, and the initial address of the memory address space is stored in global register
In;
Step 3: program component instantiates:The attribute that global property all in On-board software can be changed first is equal
The attribute of a component is packaged into, the component is referred to as program component;Then the starting point preserved in the global register is obtained
Location, by described program component mapping to the initial address, realize the instantiation of program component;
Step 4: by after instantiation program component compiling link formed can programming binary program file;
Step 5: finally normal start in binary program file programming to target device, will be powered up.
A kind of 2. On-board software dynamic loading method for supporting address to redirect as claimed in claim 1, it is characterised in that step
The rapid one On-board software link profile write is divided into three sections:Program segment, the data segment with initial value and the number for not assigning initial value
According to section.
3. a kind of On-board software dynamic loading method for supporting address to redirect as claimed in claim 1 or 2, its feature exist
In internal memory detection program is write using assembler language in step 2.
4. a kind of On-board software dynamic loading method for supporting address to redirect as claimed in claim 1 or 2, its feature exist
In described program component includes structure attribute, initialization interface, issuing interface;Wherein:
Structure attribute:Including global variable, global array, global pointer, global component;
Initialization interface:Assignment is carried out to the attribute for having initial value requirement in program component, that is, initialized;
Issuing interface:The interface for accessing attribute in this program component is provided.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710996603.5A CN107729085A (en) | 2017-10-19 | 2017-10-19 | A kind of On-board software dynamic loading method for supporting address to redirect |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710996603.5A CN107729085A (en) | 2017-10-19 | 2017-10-19 | A kind of On-board software dynamic loading method for supporting address to redirect |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107729085A true CN107729085A (en) | 2018-02-23 |
Family
ID=61213339
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710996603.5A Pending CN107729085A (en) | 2017-10-19 | 2017-10-19 | A kind of On-board software dynamic loading method for supporting address to redirect |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107729085A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108845935A (en) * | 2018-05-30 | 2018-11-20 | 武汉高仕达电气有限公司 | A kind of embedded software test method and system |
CN109388511A (en) * | 2018-09-14 | 2019-02-26 | 联想(北京)有限公司 | A kind of information processing method, electronic equipment and computer storage medium |
CN109901117A (en) * | 2019-03-13 | 2019-06-18 | 苏州理工雷科传感技术有限公司 | A kind of radar method for restarting and device |
CN110908664A (en) * | 2019-09-29 | 2020-03-24 | 惠州蓄能发电有限公司 | Embedded card program processing method and device, computer equipment and storage medium |
CN112328319A (en) * | 2020-09-30 | 2021-02-05 | 北京空间飞行器总体设计部 | Satellite-borne APP dynamic loading method supporting RAM file system |
WO2023206859A1 (en) * | 2022-04-24 | 2023-11-02 | 苏州睿芯集成电路科技有限公司 | Memory state recovery method for no-mmu environment in emulated cpu chip acceleration |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030046673A1 (en) * | 2001-06-29 | 2003-03-06 | Microsoft Corporation | Linktime recognition of alternative implementations of programmed functionality |
CN101441566A (en) * | 2008-11-18 | 2009-05-27 | 腾讯科技(深圳)有限公司 | Embedded type platform and method for dynamically linking program on the same |
CN101470619A (en) * | 2007-12-29 | 2009-07-01 | 安凯(广州)软件技术有限公司 | Application program dynamic loading method based on microkernel operating system |
CN101661397A (en) * | 2008-08-29 | 2010-03-03 | 宇龙计算机通信科技(深圳)有限公司 | Method for realizing dynamic loading of program and method and equipment for generating mapping file |
CN106873990A (en) * | 2017-01-23 | 2017-06-20 | 北京空间飞行器总体设计部 | Multi partition bootstrap technique under embedded system RAM defective patterns |
-
2017
- 2017-10-19 CN CN201710996603.5A patent/CN107729085A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20030046673A1 (en) * | 2001-06-29 | 2003-03-06 | Microsoft Corporation | Linktime recognition of alternative implementations of programmed functionality |
CN101470619A (en) * | 2007-12-29 | 2009-07-01 | 安凯(广州)软件技术有限公司 | Application program dynamic loading method based on microkernel operating system |
CN101661397A (en) * | 2008-08-29 | 2010-03-03 | 宇龙计算机通信科技(深圳)有限公司 | Method for realizing dynamic loading of program and method and equipment for generating mapping file |
CN101441566A (en) * | 2008-11-18 | 2009-05-27 | 腾讯科技(深圳)有限公司 | Embedded type platform and method for dynamically linking program on the same |
CN106873990A (en) * | 2017-01-23 | 2017-06-20 | 北京空间飞行器总体设计部 | Multi partition bootstrap technique under embedded system RAM defective patterns |
Cited By (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108845935A (en) * | 2018-05-30 | 2018-11-20 | 武汉高仕达电气有限公司 | A kind of embedded software test method and system |
CN109388511A (en) * | 2018-09-14 | 2019-02-26 | 联想(北京)有限公司 | A kind of information processing method, electronic equipment and computer storage medium |
CN109388511B (en) * | 2018-09-14 | 2021-05-18 | 联想(北京)有限公司 | Information processing method, electronic equipment and computer storage medium |
CN109901117A (en) * | 2019-03-13 | 2019-06-18 | 苏州理工雷科传感技术有限公司 | A kind of radar method for restarting and device |
CN110908664A (en) * | 2019-09-29 | 2020-03-24 | 惠州蓄能发电有限公司 | Embedded card program processing method and device, computer equipment and storage medium |
CN110908664B (en) * | 2019-09-29 | 2023-12-05 | 惠州蓄能发电有限公司 | Method, device, computer equipment and storage medium for processing embedded card program |
CN112328319A (en) * | 2020-09-30 | 2021-02-05 | 北京空间飞行器总体设计部 | Satellite-borne APP dynamic loading method supporting RAM file system |
WO2023206859A1 (en) * | 2022-04-24 | 2023-11-02 | 苏州睿芯集成电路科技有限公司 | Memory state recovery method for no-mmu environment in emulated cpu chip acceleration |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107729085A (en) | A kind of On-board software dynamic loading method for supporting address to redirect | |
US7698594B2 (en) | Reconfigurable processor and reconfiguration method executed by the reconfigurable processor | |
Shirvani et al. | PADded cache: a new fault-tolerance technique for cache memories | |
US7797693B1 (en) | NAND mobile devices capable of updating firmware or software in a manner analogous to NOR mobile devices | |
CN101063948B (en) | Soft error location and sensitivity detection for programmable devices | |
US9990205B2 (en) | System on chip and verification method thereof | |
EP3161639B1 (en) | Techniques for handling errors in persistent memory | |
CN105659208A (en) | Data processing apparatus and method for processing a plurality of threads | |
US8732413B2 (en) | Method and system for preloading page using control flow | |
US20040143719A1 (en) | System and method for testing for memory errors in a computer system | |
KR970071285A (en) | Method and apparatus for maintaining cache continuity in RAID controller with redundant cache | |
CN103019873A (en) | Replacing method and device for storage fault unit and data storage system | |
CN110574045A (en) | Graph matching for optimized deep network processing | |
CN106873990A (en) | Multi partition bootstrap technique under embedded system RAM defective patterns | |
US6742145B2 (en) | Method of de-allocating multiple processor cores for an L2 correctable error | |
KR101141487B1 (en) | Enabling an integrated memory controller to transparently work with defective memory devices | |
US20220197746A1 (en) | Combination bios with a/b recovery | |
WO1998019242A1 (en) | Data processor and data processing system | |
US9652416B2 (en) | Storage device for performing in-storage computing operations, method of operation the same, and system including the same | |
US7747915B2 (en) | System and method for improving the yield of integrated circuits containing memory | |
CN104657233A (en) | Backup restoration method and system for BIOS (Basic Input Output System) boot block in X86 system | |
US9910767B2 (en) | Leveraging instruction RAM as a data RAM extension during use of a modified Harvard architecture processor | |
US20210034446A1 (en) | Host system and computing system including the host system | |
CN103793283A (en) | Terminal fault handling method and terminal fault handling device | |
US5210758A (en) | Means and method for detecting and correcting microinstruction errors |
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 | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20180223 |
|
WD01 | Invention patent application deemed withdrawn after publication |