CN104484202B - Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers - Google Patents
Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers Download PDFInfo
- Publication number
- CN104484202B CN104484202B CN201410770668.4A CN201410770668A CN104484202B CN 104484202 B CN104484202 B CN 104484202B CN 201410770668 A CN201410770668 A CN 201410770668A CN 104484202 B CN104484202 B CN 104484202B
- Authority
- CN
- China
- Prior art keywords
- software
- orbit
- code
- eeprom
- prom
- 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
Links
Abstract
Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers, it is related to the in-orbit re-injection technology of aerospace computer software, solving existing 8051 microcontroller software can not change due to there is interrupt vector address in the process of implementation, and then system is the problem of can not realize in-orbit software re-injection, this method is by PROM, EEPROM and RAM unified addressing, and the method remapped using interrupting, application program is set to be positioned at any initial address, in-orbit solidification software is saved in RPOM, can not be changed.The software kit contains notes instruction and data in reception remote measuring and controlling interface software, and writes data into EEPROM function.EEPROM is used to preserve note software data, in-orbit can change;The present invention designs interruption on software and remaps code, jumps to respective application software interrupt vector according to current software version, realizes multiversion software coexisting in 8051 kernel microcontrollers.
Description
Technical field
The present invention relates to the in-orbit re-injection technology of aerospace computer software, and in particular to one kind is applied to 8051 kernel microcontrollers
The in-orbit re-injection method of built-in system software of device.
Background technology
To meet the satellite application demand become increasingly complex, the performance and function of spaceborne computer processor are also constantly being carried
High and enhancing, the high performance processor such as SPARC, 80x86, ARM7, ARM9, PowerPC is increasingly becoming the core of satellite control system
Heart device.These processors provide abnormal flexible configuration mode and provide hardware foundation for the in-orbit renewal of software.
And it is traditional can only be by the way of static linkage based on 8051 microcontroller software systems, interrupt vector on hardware
Address can not also be changed, and cause this kind of system to be not easy to realize in-orbit software re-injection.But the anti-spoke of aerospace level based on 8051 kernels
Still there is its unique advantage in equipment that is highly reliable, needing in-orbit long-term power-up operation according to microcontroller (such as 80C32E):Can
High by property, low in energy consumption, cost is low, and system complexity is low, is generally used for whole star power supply-distribution system, the control of whole star Active thermal control
Device, camera space thermal control controller etc..This kind of system general utility functions are more single, and calculating performance requirement is relatively low, but reliability will
Ask higher, need in-orbit uninterrupted continuous operation until lifetime of satellite termination.
Though this kind of system or unit function are uncomplicated, the ability that should also possess in-orbit renewal software, existed with tackling satellite
The various catastrophic failure situations of rail, such as in-orbit unexpected operating mode modification temperature control strategy, or modification software bug etc., and can not
Interrupt the operation of current function normal code.Simultaneously as the function can realize that remote code injects by remote measuring and controlling interface
And modification, it is to avoid to the repeated disassembled and assembled of unit in software on ground debugging process, the risk of device hardware damage is greatly reduced,
Simplify surface testing flow.
Existing patent of invention《A kind of in-orbit update method of spaceborne computer software》Work(only has been carried out to system update process
Energy property description, it is impossible to realized applied to particular hardware.Existing patent of invention《A kind of in-orbit renewal side of spaceborne plug in software module
Method》Be only applicable to run be loaded with file system and can dynamic load software module operating system, it is impossible to applied to without behaviour
Make 8051 software runtime environments of system.
The content of the invention
The present invention in the process of implementation can not due to there is interrupt vector address to solve existing 8051 microcontroller software
Modification, and then there is provided a kind of space flight insertion for being applied to 8051 microcontrollers the problem of can not realize in-orbit software re-injection for system
The in-orbit re-injection method of formula software.
Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers, this method includes upper note process and cut
Change process;
Upper note process:
Enter system hard reset interrupt vector 0x0000 after system electrification;The interruption performed successively in PROM remaps generation
Reset interrupt processing function in code;The reset interrupt processing function of cure applications software interrupt processing code, removes RAM contents,
And indicate that current software version variable is solidification software;Into cure applications software normal work;
When generation system hardware interrupts, into corresponding system hardware interrupt vector address;And perform interruption and remap
Corresponding interrupt processing code in code, preserves present procedure operation scene, whether judge current software version variable is solidification
Software;If it is, the vectorial code of cure applications software interrupt and cure applications software interrupt processing code are performed, in completion
Disconnected processing;If it is not, then being error condition;Re-injection software instruction sum is received by PROM remote measuring and controlling software interface
According to, EEPROM is write after verification, and by upper note software data verification and write-in EEPROM initial addresses, upper note terminates;
Handoff procedure:
When PROM, which is received, switches to upper note software instruction, by upper note software data verification in EEPROM and with being stored in
Verification in EEPROM and compare, if verification is correct, the upper note software switched in EEPROM, in execution in note application software
The reset interrupt processing code of disconnected processing code, removes RAM, and indicates that current software version variable is upper note software, into upper
Note application software normal work;If check errors, not switch, continue executing with the PROM normal work of cure applications software
Make;
When generation system hardware interrupts, into the system hardware interrupt vector address for being accordingly present in PROM, perform
PROM, which is interrupted, remaps respective interrupt processing function in code, preserves present procedure operation scene, and judge current software version
Whether variable is upper note software, if it is not, then being error condition, if it is, noting application software interrupt vector code on performing;
Interrupt processing code is performed, interrupt processing is completed;Realize software re-injection.
Beneficial effects of the present invention:
First, method of the present invention is empty by 8051 micro-controller program memory spaces and data storage in hardware design
Between unified addressing, solve note software code need in upper note from data space write-in, perform when it is empty from program storage
Between the problem of read, realize the in-orbit modification of software code;
2nd, method of the present invention devises 8051 microcontroller interrupts on software and remaps code, according to current
Software version jumps to respective application software interrupt vector, and solving 8051 kernel microcontroller interrupt vector addresses can not change
The problem of, multiversion software coexisting in 8051 kernel microcontrollers is realized, and then realize the in-orbit re-injection of software.
Brief description of the drawings
Fig. 1 is the hardware of the space flight embedded software in-orbit re-injection method of the present invention for being applied to 8051 microcontrollers
Block diagram;
Fig. 2 is the in-orbit re-injection method hardware tool of the space flight embedded software of the present invention for being applied to 8051 microcontrollers
Body realization principle figure;
Fig. 3 is code the in-orbit re-injection method of the space flight embedded software of the present invention suitable for 8051 microcontrollers
Distribute and redirect schematic diagram in address;
Fig. 4 is address the in-orbit re-injection method of the space flight embedded software of the present invention suitable for 8051 microcontrollers
Schematic diagram is distributed in space;
Fig. 5 is 8051 the in-orbit re-injection method of the space flight embedded software of the present invention suitable for 8051 microcontrollers
Controller register distributes schematic diagram.
Embodiment
Embodiment one, with reference to Fig. 1 to Fig. 3 illustrate present embodiment, it is adaptable to which the space flight of 8051 microcontrollers is embedding
Enter the in-orbit re-injection method of formula software, this method is by PROM, EEPROM and RAM unified addressing, and the side remapped using interrupting
Method, make application program to be positioned at any initial address, so as to realize that solidification and upper note software coexist and any switching laws, enters one
Step realizes the re-injection of any functional software.
Spaceborne computer is by 8051 microcontrollers, random access memory (RAM), programmable read only memory (PROM), and electricity can
Erasable programmable read-only memory (EPROM) (EEPROM) and other peripheral circuits are constituted.Wherein 8051 microcontrollers, RAM, PROM and
EEPROM constitutes spaceborne computer minimum system there is provided the hardware foundation of running software, completes to gather periphery and control electricity
The control on road.In-orbit solidification software is saved in RPOM, can not be changed.The software kit contains in reception remote measuring and controlling interface software
Note instruction and data, and by data (above noting software) write EEPROM function.EEPROM is used to preserve note software data, can
In-orbit change.System block diagram combination Fig. 1.
Because EEPROM can only be write by data space, and program's memory space can only be passed through when program is performed
Read, therefore cancel respectively addressing of 8051 microcontrollers to program storage and data storage in hardware design, make PROM,
EEPROM and RAM unified addressings, so that EEPROM can both be accessed in data space, again can be in program's memory space
Access, software data is to EEPROM write-in when noting in realization, reading when noting software in operation to EERPOM software datas.Tool
Body hardware implementation mode combination Fig. 2, the main distinction with common method be by program and data space read signal nPSEN and
NRD logical ANDs as external bus read signal.
Method described in present embodiment devises interruption on software and remaps code, and the Code location is in 8051
0x0000 at disconnected vector, respective version program is jumped to when hardware interrupts arrive according to software version variate-value (solidification, upper note)
Software interrupt vector, and then enter the interrupt processing function of application software, and return to application software.The code has carried out scene
The operations such as protection, storehouse processing, procedure return address calculating.
In present embodiment in PROM comprising system hardware interrupt vector code, interrupt that to remap code, cure applications soft
Part interrupt vector code, cure applications software interrupt processing code, cure applications program code.Only should comprising upper note in EEPROM
With the vectorial code of software interrupt, upper note application software interrupt processing code, upper note application code.Wherein cure applications software
In comprising processing re-injection remote measuring and controlling instruction and data function.Code address distributes and redirects skeleton diagram, with reference to Fig. 3.
In present embodiment, Software compiler tools chain uses Keil C;System hardware interrupt vector code and interruption replay
Penetrate code and use assembler language, instructed using CSEG AT pseudo-assemblies by system hardware interrupt vector Code location in the prom
0x0000 addresses;Cure applications software (including interrupt vector and interrupt processing) will be solidified using INTVECTOR the link options should
With the positioning of software interrupt vector in the prom, and interrupted reserving sufficient space before for storage system hardware interrupts vector sum
Remap code (can typically reserve 0x200 byte);Instruction code is positioned in PROM using SEGMENTS the link options
(such as should orientate 0x0200~0x3FFF as 16kB PROM);Upper note application software (including interrupt vector and interrupt processing)
Upper note application software interrupt vector is positioned in EEPROM using INTVECTOR the link options and (is generally EEPROM starting points
Location), and before reserve 8 bytes be used for deposit on note software check and;Instruction code is determined using SEGMENTS the link options
Position is in EEPROM;Variable current software version variable need to interruption remap code, cure applications software, on note application software
In be positioned at same memory address, rather than distributed automatically by compiler, so that this three partial software can be accessed correctly.
Described according to above-mentioned steps, automatic running solidification software version after system electrification switches to upper note software by instruction.
Detailed process is:
Enter system hard reset interrupt vector 0x0000 after system electrification;The interruption performed successively in PROM remaps generation
Reset interrupt processing function in code;The reset interrupt processing function of cure applications software interrupt processing code, removes RAM contents,
And indicate that current software version variable is solidification software;Into cure applications software normal work;
When generation system hardware interrupts, into corresponding system hardware interrupt vector address;And perform interruption and remap
Corresponding interrupt processing code in code, preserves present procedure operation scene, whether judge current software version variable is solidification
Software;If it is, the vectorial code of cure applications software interrupt and cure applications software interrupt processing code are performed, in completion
Disconnected processing;If it is not, then being error condition;Re-injection software instruction sum is received by PROM remote measuring and controlling software interface
According to, EEPROM is write after verification, and by upper note software data verification and write-in EEPROM initial addresses, upper note terminates;
When PROM, which is received, switches to upper note software instruction, by upper note software data verification in EEPROM and with being stored in
Verification in EEPROM and compare, if verification is correct, the upper note software switched in EEPROM, in execution in note application software
The reset interrupt processing code of disconnected processing code, removes RAM, and indicates that current software version variable is upper note software, into upper
Note application software normal work;If check errors, not switch, continue executing with the PROM normal work of cure applications software
Make;
When generation system hardware interrupts, into the system hardware interrupt vector address for being accordingly present in PROM, perform
PROM, which is interrupted, remaps respective interrupt processing function in code, preserves present procedure operation scene, and judge current software version
Whether variable is upper note software, if it is not, then being error condition, if it is, noting application software interrupt vector code on performing;
Interrupt processing code is performed, interrupt processing is completed;Realize software re-injection.
Embodiment two, illustrate present embodiment with reference to Fig. 4 and Fig. 5, present embodiment is embodiment one
The described in-orbit re-injection method specific embodiment of the space flight embedded software suitable for 8051 microcontrollers:
8051 microcontrollers use Atmel companies Flouride-resistani acid phesphatase product 80C32E in present embodiment, not comprising ROM in piece and
RAM;PROM uses Harris companies Flouride-resistani acid phesphatase product HS-6664RH, capacity 8kB, 2 common 16kB;EEPROM is public using Atmel
Take charge of product AT28C64B capacity 16kB;SRAM uses Atmel companies Flouride-resistani acid phesphatase product MT5C1008CW, capacity 128kB, but hard
Part design is upper only to use its 1kB capacity.
Unified address distribution is with reference to shown in Fig. 4.
System hardware interrupt vector code, interruption remap code and start reserved 0x0200 spaces in PROM initial addresses;
Cure applications software interrupt vector is positioned at 0x0200, interrupt processing code, the control of application code address 0x0200~
In the range of 0x3FFF;Upper note application software verifies and is stored in EEPROM initial address 0x4000, takes 8 bytes;Upper note application
Software interrupt vector Code location in 0x4008, interrupt processing code, the control of application code address 0x4008~
In the range of 0x7FFF;SRAM takes 0x8000~0x83FF, common 1kB address spaces.
Interrupt to remap on software and be implemented as follows (by taking the processing of external interrupt 0 as an example).
Step 1:System enters normal operating conditions;
Step 2:Produce external interrupt 0, the automatic pop down in return address, PC pointing system hardware interrupts vector address
0x0003;
Step 3:Jump to the interruption of external interrupt 0 and remap code
Step 4:By register ACC, PSW pop down;
Step 5:Obtain triplication redundancy variable " current software version " value;
Step 6:Judge whether " current software version " is solidification software.If solidification software, then step 7, otherwise step
10;
Step 7:Register PSW, ACC are popped;
Step 8:Jump to 0x0203 (interrupt vector address of cure applications software external interrupt 0);
Step 9:Perform cure applications software interrupts processing code, after the completion of return to cure applications software (step 1);
Step 10:Whether judge current software version is upper note software.If upper note software, then step 11, otherwise illustrates
Variable " current software version " is illegal value (not being solidification software, be not also upper note software), carries out step 14;
Step 11:Register PSW, ACC are popped;
Step 12:Jump to 0x400B (above noting the interrupt vector address of application software external interrupt 0);
Step 13:In execution note application software interrupt processing code, after the completion of return on note application software (step 1);
Step 14:Endless loop, waits watchdog reset.
Claims (4)
1. suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers, this method is divided into note process and switching
Process;
Upper note process:
Enter system hard reset interrupt vector 0x0000 after system electrification;The interruption performed successively in PROM is remapped in code
Reset interrupt handles function;The reset interrupt processing function of cure applications software interrupt processing code, removes RAM contents, and mark
Will current software version variable is solidification software;Into cure applications software normal work;
When generation system hardware interrupts, into corresponding system hardware interrupt vector address;And perform interruption and remap code
In corresponding interrupt processing code, preserve present procedure operation scene, whether judge current software version variable is solidification software;
If it is, performing the vectorial code of cure applications software interrupt and cure applications software interrupt processing code, complete at interruption
Reason;If it is not, then being error condition;Re-injection software instruction and data are received by PROM remote measuring and controlling software interface, passed through
EEPROM is write after verification, and by upper note software data verification and write-in EEPROM initial addresses, upper note terminates;
Handoff procedure:
When PROM, which is received, switches to upper note software instruction, by upper note software data verification in EEPROM and with being stored in
Verification in EEPROM and compare, if verification is correct, the upper note software switched in EEPROM, in execution in note application software
The reset interrupt processing code of disconnected processing code, removes RAM, and indicates that current software version variable is upper note software, into upper
Note application software normal work;If check errors, not switch, continue executing with the PROM normal work of cure applications software
Make;
When generation system hardware interrupts, into the system hardware interrupt vector address for being accordingly present in PROM, perform in PROM
It is disconnected to remap respective interrupt processing function in code, present procedure operation scene is preserved, and judge that current software version variable is
No is upper note software, if it is not, then being error condition, if it is, noting application software interrupt vector code on performing;In execution
Disconnected processing code, completes interrupt processing;Realize software re-injection.
2. the in-orbit re-injection method of the space flight embedded software for being applied to 8051 microcontrollers according to claim 1, it is special
Levy and be, this method is also included when EEPROM is received and switched to solidification software instruction, and system is reentered in hardware reset
At disconnected vector 0x0000, PROM software codes are performed, software re-injection is realized.
3. the in-orbit re-injection method of the space flight embedded software for being applied to 8051 microcontrollers according to claim 1, it is special
Levy and be, the PROM is used to store in-orbit solidification software, it is impossible to change, EEPROM is used to store note software data, can be
Rail is changed.
4. the in-orbit re-injection method of the space flight embedded software for being applied to 8051 microcontrollers according to claim 1, it is special
Levy and be, PROM, EEPROM and RAM unified addressing, the method remapped using interruption makes application program to be positioned at
Any initial address, realizes coexisting and any switching laws for solidification software and upper note software, realizes the re-injection of functional software.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410770668.4A CN104484202B (en) | 2014-12-15 | 2014-12-15 | Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410770668.4A CN104484202B (en) | 2014-12-15 | 2014-12-15 | Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104484202A CN104484202A (en) | 2015-04-01 |
CN104484202B true CN104484202B (en) | 2017-07-25 |
Family
ID=52758746
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410770668.4A Active CN104484202B (en) | 2014-12-15 | 2014-12-15 | Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104484202B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105373411B (en) * | 2015-11-03 | 2018-09-28 | 上海无线电设备研究所 | A kind of On-board programming system and design method for spaceborne digital signal processor |
CN108052355B (en) * | 2017-11-22 | 2020-12-15 | 西南电子技术研究所(中国电子科技集团公司第十研究所) | Satellite-borne load unit software on-orbit weight composing method |
CN112346739A (en) * | 2019-08-06 | 2021-02-09 | 珠海格力电器股份有限公司 | Remapping method and device of interrupt vector table, microprocessor and electronic device |
CN111241008B (en) * | 2019-12-31 | 2022-09-23 | 潍柴动力股份有限公司 | Method, device and controller for correcting EEPROM variable and address |
CN112596770B (en) * | 2020-12-24 | 2023-08-18 | 潍柴动力股份有限公司 | Data processing method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102681853A (en) * | 2012-05-17 | 2012-09-19 | 中科方德软件有限公司 | Method and device for realizing 3D (3-Dimensional) screen rotation of desktop of Android operating system by using OpenGL ES (OpenGL for Embedded Systems) |
CN102799502A (en) * | 2012-06-28 | 2012-11-28 | 航天恒星科技有限公司 | On-orbit maintenance method of satellite-borne embedded software |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6834384B2 (en) * | 2001-03-14 | 2004-12-21 | General Instrument Corporation | Methods and apparatus for upgrading firmware in an embedded system |
-
2014
- 2014-12-15 CN CN201410770668.4A patent/CN104484202B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102681853A (en) * | 2012-05-17 | 2012-09-19 | 中科方德软件有限公司 | Method and device for realizing 3D (3-Dimensional) screen rotation of desktop of Android operating system by using OpenGL ES (OpenGL for Embedded Systems) |
CN102799502A (en) * | 2012-06-28 | 2012-11-28 | 航天恒星科技有限公司 | On-orbit maintenance method of satellite-borne embedded software |
Also Published As
Publication number | Publication date |
---|---|
CN104484202A (en) | 2015-04-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104484202B (en) | Suitable for the in-orbit re-injection method of space flight embedded software of 8051 microcontrollers | |
CN102270162B (en) | Fault-tolerant guide method applied to SPARCV8 structure computer | |
US8443423B2 (en) | Secure information processing | |
CN106463179B (en) | Utilize the methods, devices and systems of Memory Controller processing error in data event | |
ES2824830T3 (en) | Software update procedure for an embedded device | |
CN103744754B (en) | A kind of radiation hardening walks abreast board computer system and using method thereof | |
CN107704285B (en) | Multi-version configuration chip, system and method for field programmable gate array | |
US20140304497A1 (en) | Electronic device having function of booting operating system by bootloader, method of performing the same function, and storage medium | |
US9720699B2 (en) | Efficient RAM usage in computing devices | |
CN102117243A (en) | Method for high efficiently debugging by using software breakpoint in Flash memory | |
CN103150125A (en) | Method for prolonging service life of power-down protection date buffer memory and smart card | |
US20150286544A1 (en) | Fault tolerance in a multi-core circuit | |
CN108763146A (en) | High-reliability on-satellite computer based on normally-powered working mode | |
CN103927130A (en) | Uniform internal and external memory architecture based on MMU (memory management unit) | |
CN101872306A (en) | Embedded system for realizing software updating and software backup and implementation method thereof | |
CN109885466B (en) | Simulation method, system and medium for processor C8000 | |
CN102467626A (en) | Computer system data protection device and method | |
CN102736013A (en) | Idle state test method of system-on-chip (SoC), system and test device | |
CN101599024B (en) | Device, system and method for switching and booting codes in double memory area | |
CN102609282A (en) | Execution method for NAND flash curing codes | |
US20140025870A1 (en) | Computer reprogramming method, data storage medium and motor vehicle computer | |
CN105068969A (en) | Single event effect protection system and method for digital signal processing platform architecture | |
KR20140135796A (en) | Microcontroller with context switch | |
CN109783266B (en) | Multimode redundancy and data maintenance system for space computer boot sector | |
CN105573924A (en) | Simulation system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |