WO2008041337A1 - Information processing device, information processing method, information processing program and computer readable recording medium - Google Patents

Information processing device, information processing method, information processing program and computer readable recording medium Download PDF

Info

Publication number
WO2008041337A1
WO2008041337A1 PCT/JP2006/319881 JP2006319881W WO2008041337A1 WO 2008041337 A1 WO2008041337 A1 WO 2008041337A1 JP 2006319881 W JP2006319881 W JP 2006319881W WO 2008041337 A1 WO2008041337 A1 WO 2008041337A1
Authority
WO
WIPO (PCT)
Prior art keywords
program
update
area
execution
information processing
Prior art date
Application number
PCT/JP2006/319881
Other languages
French (fr)
Japanese (ja)
Inventor
Junji Okuda
Original Assignee
Pioneer Corporation
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 Pioneer Corporation filed Critical Pioneer Corporation
Priority to JP2008537391A priority Critical patent/JP5016604B2/en
Priority to PCT/JP2006/319881 priority patent/WO2008041337A1/en
Publication of WO2008041337A1 publication Critical patent/WO2008041337A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading

Definitions

  • Information processing apparatus information processing method, information processing program, and computer-readable recording medium
  • the present invention relates to an information processing apparatus capable of executing and updating a program to be executed, an information processing method, an information processing program, and a computer-readable recording medium.
  • the use of the present invention is not limited to the information processing apparatus, the information processing method, the information processing program, and the computer-readable recording medium described above. Background art
  • FIG. 1 is an explanatory diagram showing the outline of program update in the program execution microcomputer.
  • a program update system 100 includes a program execution microcomputer 101, an update program transmission side microcomputer 102, a flash memory 103, and power.
  • the program execution microcomputer 101 includes a buffer area 110, a program area 111, an IPL (Initial Program Loader) area 112, and a Vector area 113.
  • IPL Initial Program Loader
  • the noffer area 110 temporarily stores an update program transmitted from an update program transmission side microcomputer 102 described later.
  • the update program is, for example, a program for updating a program to be executed by the program execution microcomputer 101 that is transmitted from the update program transmission side microcomputer 102 to the buffer area 110 by communication between microcomputers.
  • the update program temporarily stored in the buffer area 110 is copied (copied) to the program area 111 by referring to a CPU (Central Processing Unit) power (not shown), which will be described later.
  • the programs a, b, and c stored in the program area 111 to be described later are configured to be updated by being copied to the program area 111 of the update program.
  • the program area 111 stores programs a, b, and c to be executed by the program execution microcomputer 101.
  • the program area 111 includes an A area 121 that stores the program a, a B area 122 that stores the program b, and a C area 123 that stores the program c.
  • Each program a, b, c may be configured to be read and executed by a CPU (not shown), for example.
  • the programs a, b, and c are executed by a CPU (not shown) referring to the addresses of the programs a, b, and c stored in the Vector area 113 described later.
  • a CPU not shown
  • FIG. 1 three areas (A area 121, B area 122, and C area 123) have been described.
  • the number of areas and the number of programs to be executed are not limited to this.
  • the IPL area 112 is an area for storing a program that is first executed by a CPU (not shown) at the time of reset start. Specifically, for example, the IPL area 112 copies the update program temporarily stored in the buffer area 110 to the program area 111 or executes each program a, b, c stored in the program area 111. Save the program that determines whether to do it.
  • the Vector area 113 stores an address of a program to be executed by the program execution microcomputer 101 when an event occurs. Specifically, for example, a CPU (not shown) reads the address of the program stored in the IPL area 112 with reference to the Vector area 113 at the time of reset start. In addition, for example, during normal startup, a CPU (not shown) reads the addresses of the programs a, b, and c stored in the program area 111 with reference to the Vector area 113.
  • the update program transmission side microcomputer 102 sends an update program for programs a, b, and c to be executed by the program execution microcomputer 101 to the program execution microcomputer 101. Send. Specifically, for example, the update program transmission side microcomputer 102 reads the update program stored in the flash memory 103 and transmits the read update program to the program execution microcomputer 101.
  • the flash memory 103 is a recording medium that can store various data.
  • the flash memory 103 stores update programs for programs a, b, and c to be executed by the program execution microcomputer 101. Specifically, for example, the flash memory 103 outputs the stored update program to the update program transmission side microcomputer 102.
  • Patent Document 1 Japanese Patent Application Laid-Open No. 2004-118369
  • the address of the program to be executed stored in the Vector area is Program placement by default setting As an example, V ⁇ cannot be changed, lacks versatility, and cannot efficiently use the capacity of the program area.
  • an information processing apparatus that executes an execution target program stored in a program execution area.
  • Update program input means for receiving an input of an update program for the execution target program, temporary storage means for temporarily storing the update program input by the update program input means in a temporary storage area, and the temporary storage
  • a determination means for determining whether or not the update program temporarily stored by the means is excessive or deficient; and, as a result of the determination by the determination means, if the update program is insufficient, the program execution area Generating means for generating update information indicating that the preparation for updating the execution target program stored in is completed, and Update information storage means for storing update information generated Te Niyotsu the update information storage area, and wherein the obtaining Bei a.
  • an information processing method for executing an execution target program stored in a program execution area, and inputs an update program to the execution target program.
  • a generation process for generating update information indicating completion, and update information generated by the generation process Update information storing step of storing the presence area, characterized in that it comprises a.
  • an information processing program according to claim 9 causes a computer to execute the information processing method according to claim 8.
  • a computer-readable recording medium according to the invention of claim 10 records the information processing program according to claim 9. Brief Description of Drawings
  • FIG. 1 is an explanatory diagram showing an outline of program update in a program execution microcomputer.
  • FIG. 2 is a block diagram showing an example of a functional configuration of the information processing apparatus according to the present embodiment.
  • FIG. 3 is a flowchart showing the contents of processing of the information processing apparatus according to the present embodiment.
  • FIG. 4 is a block diagram showing an example of a hardware configuration of a one-chip microcomputer that works on the present embodiment.
  • FIG. 5 is an explanatory diagram showing an outline of updating the execution target program in the one-chip microcomputer which is helpful in the present embodiment.
  • FIG. 6 is an explanatory diagram showing a program stored in an effective program area that is helpful in the present embodiment.
  • FIG. 7 is a flowchart showing a procedure for accepting an update program in the one-chip microcomputer, which is useful in this embodiment.
  • FIG. 8 is a flowchart showing a start-up process procedure of the one-chip microcomputer which is useful in the present embodiment.
  • FIG. 9 is a flowchart showing a procedure of interrupt processing (step S812 in FIG. 8) in the one-chip microcomputer that works on the present embodiment.
  • FIG. 2 is a block diagram showing an example of a functional configuration of the information processing apparatus that works according to the present embodiment.
  • an information processing apparatus 200 that executes an execution target program stored in a program execution area includes an update program input unit 201, a temporary storage unit 202, a determination unit 203, and a generation unit 204.
  • the update information storage unit 205, the restart information input unit 206, the determination unit 207, the update unit 208, and the execution unit 209 are also configured.
  • the update program input unit 201 receives an input of an update program for the execution target program.
  • the input of the update program may be an external device force input that can be transmitted by an update program (not shown).
  • the update program is copied (copied) to a program execution area assigned to a memory area (not shown) in the information processing apparatus 200, for example, and becomes an execution target program.
  • the update program may include a virtual initial startup program executed by the initial startup program when executed as the execution target program.
  • the virtual initial startup program is stored in a virtual program area included in the program execution area and executed by the initial startup program.
  • the initial activation program is, for example, a program that is activated when the information processing apparatus 100 is restarted.
  • the update program input unit 201 determines that the update program is excessive or insufficient as a result of determination by the determination unit 203 described later, the update program input unit 201 takes the update program output source. It is also possible to accept the input of the update program by making an acquisition request.
  • Temporary storage unit 202 temporarily stores the update program input by update program input unit 201 in the temporary storage area. Specifically, for example, the temporary storage unit 202 temporarily stores the update program in an area where data can be temporarily stored, such as a buffer area allocated to a memory area (not shown) in the information processing apparatus 200. A little.
  • the determination unit 203 determines whether or not the update program temporarily stored by the temporary storage unit 202 is sufficient. Specifically, for example, the determination unit 203 may determine whether or not all of the update programs that are divided and input multiple times are temporarily stored in the temporary storage area.
  • the generation unit 204 when there is no excess or deficiency in the update program, displays update information indicating that preparation for updating the execution target program stored in the program execution area has been completed.
  • the update information may be information indicating that the update preparation is completed, instead of indicating that the update preparation of the execution target program is completed.
  • the update information storage unit 205 stores the update information generated by the generation unit 204 in the update information storage area. Specifically, for example, the update information storage unit 205 stores the update information in an update information storage area allocated to a memory area (not shown) in the information processing apparatus 200. Note that the update information storage unit 205 may store information indicating that the update preparation is completed, instead of the update information indicating that the generation unit 204 has completed the update preparation.
  • the restart information input unit 206 receives input of restart information related to restart of the own device.
  • the restart information may be input, for example, a reset start processing request.
  • the determination unit 207 updates the update program by starting the initial startup program stored in the initial startup program storage area and referring to the update information. Determine if preparation is complete. Specifically, for example, the determination unit 207 allocates a memory area (not shown) in the information processing apparatus 200. The configuration is such that the initial startup program saved in the assigned initial startup program storage area is started.
  • the update unit 208 updates the execution target program by copying the update program to the program execution area.
  • the update of the execution target program may be configured to overwrite the execution target program with the update program stored by the temporary storage unit 202 when the update preparation is completed.
  • the update unit 208 uses the virtual initial activation program included in the update program to store the virtual program storage area included in the program execution area.
  • the virtual initial startup program will also be overwritten.
  • the update unit 208 may update the execution target program into an executable format by verifying the update program copied to the program execution area.
  • the verification of the update program may be configured to confirm whether or not the update program has been copied without excess or deficiency as the execution target program.
  • the execution unit 209 executes the execution target program stored in the program execution area when the update preparation is not completed as a result of the determination by the determination unit 207. Specifically, for example, the execution unit 209 executes the execution target program stored in the program execution area in accordance with the execution of the virtual initial activation program. That is, the execution unit 209 executes the program to be executed by the virtual initial startup program executed by the startup of the initial startup program stored in the initial startup program storage area if the update preparation is completed. Can do.
  • the initial activation program is activated when the re-operation information is input, and determines whether or not the power to complete the update preparation is complete.
  • the program to be executed is updated using the update program.
  • the initial startup program has been prepared for update.
  • the initial startup program is stored in the virtual program storage area and executed by executing the virtual initial startup program. Will be allowed to.
  • the information processing apparatus 200 is configured to update the virtual initial activation program stored in the virtual program storage area together with the execution target program.
  • the information processing apparatus 200 can execute the execution target program by causing the virtual initial startup program to be executed by the initial startup program.
  • the information processing apparatus 200 stores the virtual initial startup program in the virtual program storage area, thereby updating the execution target program without updating the initial startup program. Can be updated or executed reliably. In other words, even if a failure occurs in the update process due to a power failure or the like during the update of the execution target program, the execution target program is updated or re-executed by executing the initial startup program again when the power is restored. Can be done.
  • FIG. 3 is a flowchart showing the contents of the processing of the information processing apparatus that is relevant to the present embodiment.
  • the update program input unit 201 determines whether or not the input of the update program has been accepted (step S30 Do)
  • step S301 When input of the update program is accepted in step S301 (step S301: Yes), the temporary storage unit 202 temporarily saves the update program input in step S301 in the temporary storage area. (Step S302).
  • step S301 If the input of the update program is not accepted in step S301 (step S301: No), the process proceeds to step S306 and the reactivation information input unit 206 performs the reactivation information. It is determined whether or not an input is accepted (step S306).
  • step S303 determines whether or not the update program temporarily stored in step S302 is excessive or insufficient.
  • the generation unit 204 generates update information based on the result determined in step S303 (step S304). For example, if there is no excess or deficiency in the update program as a result of the determination in step S303, the update information is stored in the program execution area. This is information indicating that preparation for updating the stored execution target program has been completed. In addition, the update information may be information indicating that the update preparation is completed and that the update preparation is complete when the update program is determined to be excessive or insufficient as a result of the determination in step S303, for example.
  • the update information storage unit 205 stores the update information generated in step S304 in the update information storage area (step S305).
  • the restart information input unit 206 determines whether or not the input of restart information is accepted (step S306).
  • the restart information may be, for example, a reset start processing request.
  • step S306 If the restart information input is accepted in step S306 (step S306: Yes), the determination unit 207 activates the initial startup program stored in the initial startup program storage area. By referring to the update information, it is determined whether or not update preparation is completed (step S307).
  • step S306 If the restart information is not accepted in step S306 (step S306: No), the process returns to step S301 and the process is repeated.
  • step S307 when the update preparation is completed (step S307: Yes), the update unit 208 updates the execution target program by copying the update program to the program execution area ( Step S308). Then, the execution unit 209 executes the updated execution target program in step S308 (step S309), and ends the series of processes.
  • step S307 If the update preparation is not completed in step S307 (step S307: No), the process proceeds to step S309, where the execution unit 209 saves the execution target stored in the program execution area. Run the program (step S309). Then, a series of processing ends.
  • steps S307 to S309 if the update preparation is completed, the updated execution target program is executed after updating the execution target program. If the update preparation is not completed, the execution target program stored in the program execution area is executed without updating the execution target program.
  • the update program stored in the temporary storage unit. Since the execution target program is updated by the program, it is possible to update the execution target program without preparing a dedicated external device.
  • the initial startup program need not be updated. Therefore, even if a power failure occurs during the update, the device can be started up by the initial startup program after recovery.
  • the execution target program can be updated or executed by the initial startup program even after the power failure is recovered.
  • the update when restart information is input after recovery from a power failure, the update is in progress due to a power failure, so the update can be continued or re-executed by the initial startup program. it can.
  • the virtual target startup program can be executed by the initial startup program, and the execution target program can be executed.
  • the execution target program is executed by the virtual initial startup program, it is possible to design a highly versatile execution target program arrangement and to improve the efficiency of using the program execution area. Can do.
  • the execution target program is executed by the virtual initial startup program that is updated together with the execution target program. Therefore, the virtual initial startup program is not limited to the arrangement limited by the initial startup program. An arrangement with a set degree of freedom can be realized.
  • the execution target program is updated to an executable format by verifying the update program, so that the execution target program can be accurately updated.
  • FIG. 4 is a block diagram showing an example of a hardware configuration of a one-chip microcomputer that is useful in this embodiment.
  • the one-chip microcomputer 400 includes a CPU 401, a flash ROM 402, RA
  • M (Random Access Memory) 403 and input / output iZF (interface) 404 are provided. Each component 401 to 404 is connected by a bus 410.
  • the CPU 401 controls the entire one-chip microcomputer 400. Specifically, for example, the CPU 401 may be configured to read a program recorded in the flash ROM 402 and execute the program read using the RAM 403 as a work area.
  • the flash ROM 402 records various programs such as a boot program and an execution target program to be executed. The details will be described with reference to FIG. 5.
  • the flash RAM 402 is, for example, a nonvolatile semiconductor memory in which various programs are recorded in a rewritable manner and data is not lost even when the power is turned off.
  • the RAM 403 is used as a work area for the CPU 401.
  • the RAM 403 is a work area for executing a program read by the CPU 401, which may be a semiconductor memory capable of writing and reading data at any time.
  • the input / output IZF 404 is connected to an external device (not shown) and functions as an interface between the one-chip microcomputer 400 and the CPU 401.
  • the input / output I / F 404 is further connected to a communication network such as the Internet via wired or wireless communication, and also functions as an interface between the communication network and the CPU 401.
  • the input / output IZF 404 is used for updating the execution target program recorded in the flash ROM 402 by means of communication between microcomputers from a microcomputer connected to the outside of the one-chip microcomputer 400. It is also possible to accept program input.
  • the update program input unit 201 and the restart information input unit 206 are temporarily stored in the storage unit 202 and the determination unit 203 by the input / output IZF 404.
  • the generation unit 204, the update information storage unit 205, the determination unit 207, the update unit 208, and the execution unit 209 realize their functions by the CPU 401 executing various programs recorded in the flash ROM 402 and RAM 403.
  • FIG. 5 is an explanatory diagram showing an outline of updating the execution target program in the one-chip microcomputer that works on the present embodiment.
  • the program update system 500 includes a one-chip microcomputer 400, an update program transmission side microcomputer 502, a flash memory 503, and power.
  • the flash ROM 402 shown in FIG. 4 in the one-chip microcomputer 400 has an effective program information storage area 510, an empty area 511, an update program storage area 512, an effective program area 513, and a 0 ⁇ area 514.
  • the Vector area 515 is composed of force.
  • the effective program information storage area 510 is an area for storing update information indicating that the execution target program update preparation recorded in the effective program area 513 to be described later has been completed.
  • the update information is updated when there is no excess or deficiency in the update program that is divided and input multiple times from the update program transmission side microcomputer 502 in the update program storage area 512 described later. Information indicating that preparation has been completed may be used.
  • the update information may be information indicating that the update preparation is completed instead of indicating that the preparation for update of the execution target program is completed, for example.
  • the free area 511 is an unused area of the flash ROM 402 in the present embodiment, and can be changed according to the initial setting.
  • the update program storage area 512 is an update program transmission side microcomputer 502 described later. This is an area for temporarily storing the update program to be transmitted.
  • the update program is, for example, a program for updating the execution target program that is input from the update program transmission-side microcomputer 502 via the input / output IZF 404 (not shown) through the communication between the microcomputers and is the execution target of the one-chip microcomputer 400.
  • the update program is copied to the effective program area 513 when the update information stored in the effective program information storage area 510 is referred to by the CPU 401 (not shown) and the update preparation is completed (for example, Copied).
  • the update program is overwritten and saved on the execution target program by the CPU 401, for example, and the execution target program is updated.
  • the configuration is such that the execution target program is updated with reference to the update information, it is possible to prevent the execution target program from being updated while the update program is incomplete and causing a malfunction. it can.
  • the temporary storage of the update program is stopped due to some failure, such as a power failure, the program to be executed in the halfway state is not updated by the update program at the time when it was stopped by the reset start. You can return to the previous step and start temporarily saving the update program.
  • the update program may include a virtual initial startup program executed by the initial startup program when executed as the execution target program.
  • the initial startup program is, for example, a program that is started when restarting (reset start)
  • the effective program area 513 is an area for storing an execution target program to be executed by the one-chip microcomputer 400. Details will be described with reference to FIG. 6, but a plurality of execution target programs stored in the effective program area 513 may be read and executed by the CPU 401 (not shown)! /.
  • the CPU 401 may update the execution target program into an executable format by verifying the copied update program. Specifically, for example, the verification of the update program is performed by checking whether the update program has been copied as an execution target program without excess or deficiency. The structure to confirm may be sufficient.
  • the IPL area 514 is an area for storing an initial startup program that is first executed by the CPU 401 (not shown) at the start of reset. Specifically, for example, the IPL area 514 copies the update program temporarily stored in the update program storage area 512 to the valid program area 513, or each execution target program stored in the valid program area 513. Save the program that determines whether to run.
  • the Vector area 515 stores the address of a program to be executed by the one-chip microcomputer 400 when an event occurs. Specifically, for example, the CPU 401 (not shown) reads the program address stored in the IPL area 514 with reference to the Vector area 515 at the time of reset start. For example, the CPU 401 may read the address of each execution target program stored in the effective program area 513 with reference to the Vector area 515 at normal startup.
  • the update program transmission side microcomputer 502 transmits an update program for the execution target program to be executed by the one-chip microcomputer 400 to the one-chip microcomputer 400. Specifically, for example, the update program transmission side microcomputer 502 reads the update program stored in the flash memory 5003 and transmits the read update program to the on-chip microcomputer 400.
  • the flash memory 503 is a recording medium that can store various data.
  • the flash memory 503 stores an update program for an execution target program to be executed by the one-chip microcomputer 400. Specifically, for example, the flash memory 503 outputs the stored update program to the update program transmission side microcomputer 502.
  • FIG. Fig. 6 shows the programs stored in the effective program area that is useful in this embodiment. It is explanatory drawing shown.
  • an effective program area 513 includes a virtual vector area 601 for storing a virtual initial startup program, an execution target program area 602 for storing execution target programs a, b, and c to be executed, Power is also composed.
  • the virtual initial activation program stored in the virtual vector area 601 is read by the CPU 401 (not shown) when the normal activation is performed at the reset start.
  • the virtual initial startup program is, for example, a program that executes the execution target programs a, b, and c that are executed at normal startup.
  • the execution target programs a, b stored in the execution target program area 602 for the CPU 401 are executed.
  • c address may be specified.
  • the CPU 401 when reset is started, the CPU 401 refers to the Vector area 515 and reads the address of the program stored in the IPL area 514, thereby copying the update program (update the execution target program). ) Or, execute the execution target program.
  • the CPU 401 selects copy of the update program or execution of the execution target program based on the update information stored in the valid program information storage area 510, and executes the execution target.
  • the address of the virtual vector area 601 is read with reference to the vector area 515.
  • the CPU 401 may execute the execution target programs a, b, and c whose addresses are specified by the virtual initial activation program stored in the virtual vector area 601.
  • FIG. 7 is a flowchart showing a procedure for accepting an update program in the one-chip microcomputer, which is useful in this embodiment.
  • the program update preparation completion notification is sent from the update program transmission side microcomputer 502 to the one-chip microcomputer 400 when the update program transmission side microcomputer 502 acquires the update program from the flash memory 503 or other external device, for example. May be
  • step S701 after waiting for acceptance of the program update preparation completion notice (step S701: Yes), the one-chip microcomputer 400 shifts to the program update mode (step S702), and the CPU 401 Then, the update program storage area 512 is initialized (step S703).
  • the update program storage area 512 can be initialized by, for example, making the update program storage area 512 free, that is, if there is halfway data in the update program storage area 512 It is good to do.
  • step S704 when the update program storage area 512 is initialized in step S703 by the input / output IZF404, an acceptance notification is output to the update program transmission side microcomputer 502 (step S704).
  • the input / output IZF 404 receives the update program data output from the update program transmission side microcomputer 502 in response to the acceptance notification output in step S704 (step S705). ).
  • the input / output IZF 404 outputs a packet reception completion notification to the update program transmitting side microcomputer 502 for the update program data received in step S705 (step S706).
  • it is determined whether or not all the update programs have been received by the input / output IZF 404 (step S707). For example, if it is determined whether or not all the update programs have been received, the flag added to the last update program data received in step S705 is determined to have been received. The configuration to do, too.
  • step S707 If all the update programs are received in step S707 (step S707: Yes), the CPU 401 confirms the checksum of the update program temporarily stored in the update program storage area 512. (Step S708).
  • the checksum can be, for example, to determine whether all update programs received in packets divided into multiple times have been temporarily stored in the update program storage area 512! /.
  • step S707 If all the update programs are not received in step S707 (step S707: No), the process returns to step S705 and the process is repeated.
  • step S709 when the checksum is confirmed in step S708, the CPU 401 writes that the update program is ready in the valid program information storage area 510 (step S709).
  • the update program preparation completion state is written, for example, by storing update information indicating that preparation for update of the execution target program is completed in the valid program information storage area 510.
  • step S708 it is assumed that an error is requested again from the update program transmission side microcomputer 502 as an error.
  • a shutdown request is output to the update program transmission side microcomputer 502 by the input / output IZF 404 (step S710). Thereafter, the input / output I / F 404 receives a shutdown completion notification in response to the shutdown request in step S710 from the update program transmission side microcomputer 502 (step S711), and ends a series of update program acceptance processing.
  • FIG. 8 is a flowchart showing the start-up processing procedure of the one-chip microcomputer which is useful for this embodiment.
  • a reset start is accepted by the input / output IZF 404 (step S801).
  • the CPU 401 activates the IPL stored in the IPL area 514 (step S802) and refers to the valid program information storage area 510 (step S803).
  • the CPU 401 determines from the update information in the valid program information storage area 510 referred to in step S803 whether or not the update program preparation has been completed (step S804).
  • the update program preparation for example, it is written that the update program preparation completion state is written in the effective program information storage area 510 (for example, step S709 shown in FIG. 7). Good.
  • step S804 when the update program preparation is completed (step S80 4: Yes), the CPU 401 starts the copy program (step S805).
  • the copy program may be, for example, a program that overwrites and saves an update program temporarily stored in the update program storage area 512 with various programs such as an execution target program stored in the effective program area 513.
  • step S806: No After waiting for the copy by the copy program activated in step S805 to end (step S806: No), if it ends (step S806: Yes), the CPU 401 writes the effective program area 513.
  • the copied program is verified (step S807).
  • the verification of the program may be, for example, a configuration in which it is confirmed whether or not the update program has been copied as an execution target program without excess or deficiency.
  • step S807 After verifying the program in step S807, the CPU 401 writes that the program is in a normal activation state in the valid program information storage area 510 (step S808), and returns to step S801. Repeat the process.
  • step S804 If the update program preparation is not completed in step S804 (step S804: No), the CPU 401 normally writes to the valid program information storage area 510 referenced in step S803. Determine whether or not it is running Tape S809).
  • step S809 if it is in the normal activation state (step S809: Yes), the CPU 401 activates the program in the valid program area 513 (step S810).
  • the CPU 401 when the program in the effective program area 513 is activated, the CPU 401 reads the address of the virtual vector area 601 with reference to the vector area 515. Then, the CPU 401 executes the execution target programs a, b, and c whose addresses are specified by the virtual initial activation program stored in the virtual vector area 601.
  • step S809 when it is not in the normal activation state (step S809: No), the process returns to step S801 and is repeated.
  • step S811 it is determined by the input / output IZF 404 whether or not the interrupt process has been accepted. If interrupt processing is accepted in step S811 (step S811: Yes), the CPU 401 performs interrupt processing (step S812) and determines whether or not the program has ended (step S813). Details of the interrupt processing will be described later in FIG.
  • step S811 If interrupt processing is not accepted in step S811 (step S811: No), the process proceeds to step S813 to determine whether or not the program has ended (step S813).
  • step S813 If the program ends in step S813 (step S813: Yes), the process returns to step S801 to repeat the process. If the program does not end in step S813 (step S813: No), the process returns to step S810 to repeat the process.
  • FIG. 9 is a flowchart showing the procedure of interrupt processing (step S812 in FIG. 8) in the one-chip microcomputer, which is useful for this embodiment.
  • the CPU 401 refers to the virtual vector area 601 (step S901).
  • step S902 the CPU 401 activates the virtual initial activation program stored in the virtual vector area 601 referred to in step S901, and executes the program area 60 to be executed. Refer to 2 (step S902).
  • step S903 the CPU 401 activates the program to be executed from the programs stored in the execution target program area 602 referred to in step S902 (step S903), and the series of interrupt processing ends.
  • the execution target program is updated by the update program stored in the update program storage area. It is possible to update the execution target program appropriately without preparing it.
  • the effective program area including the virtual vector area is updated without rewriting the vector area, even if a power failure occurs during the update, the one-chip microcomputer will not Can be started normally, and the effective program area can be used efficiently.
  • the information processing method described in the present embodiment can be realized by executing a prepared program on a computer such as a personal computer or a workstation.
  • This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed when the recording medium force is also read by the computer.
  • the program may be a transmission medium that can be distributed through a network such as the Internet.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

In an information processing device (200), which executes an execution subject program stored at a program execution area, an updating program input unit (201) receives an input of an updating program for the execution subject program. A temporary saving unit (202) temporarily stores the input updating program at a temporary saving area. A judging unit (203) judges whether the temporarily saved updating program is excessive or insufficient and a generating unit (204) generates updating information indicative of completion of an updating preparation for the execution subject program saved at the program execution area in the case that the judged result shows that the updating program is neither excessive nor insufficient. Further, an updating information saving unit (205) saves the generated updating information at an updating information saving area.

Description

情報処理装置、情報処理方法、情報処理プログラムおよびコンピュータ に読み取り可能な記録媒体  Information processing apparatus, information processing method, information processing program, and computer-readable recording medium
技術分野  Technical field
[0001] この発明は、実行対象となるプログラムの実行および更新が可能な情報処理装置、 情報処理方法、情報処理プログラムおよびコンピュータに読み取り可能な記録媒体 に関する。ただし、この発明の利用は、上述した情報処理装置、情報処理方法、情 報処理プログラムおよびコンピュータに読み取り可能な記録媒体には限られない。 背景技術  The present invention relates to an information processing apparatus capable of executing and updating a program to be executed, an information processing method, an information processing program, and a computer-readable recording medium. However, the use of the present invention is not limited to the information processing apparatus, the information processing method, the information processing program, and the computer-readable recording medium described above. Background art
[0002] 従来より、一つのマイコン (マイクロコンピュータ)における制御プログラムを更新する 際には、データ設定器などの外部機器を使用して、データの更新をおこなっている。 近年では、制御プログラムの更新の際に、他のマイコン力も割り込み処理によって更 新エラーを起こさないようにするため、制御プログラムの更新中に、他のマイコンから の割り込み処理を禁止する提案がされている (たとえば、下記特許文献 1参照。 ) o Conventionally, when updating a control program in one microcomputer (microcomputer), data is updated using an external device such as a data setting device. In recent years, there has been a proposal to prohibit interrupt processing from other microcomputers during control program update in order to prevent other microcomputers from causing update errors due to interrupt processing when the control program is updated. (For example, see Patent Document 1 below.) O
[0003] ここで、図 1を用いて、実行対象となるプログラムが実行可能に保存されたプロダラ ム実行マイコン (マイクロコンピュータ)におけるプログラムの更新の概要について説 明する。図 1は、プログラム実行マイコンにおけるプログラムの更新の概要について示 す説明図である。 [0003] Here, an outline of program update in a program execution microcomputer (microcomputer) in which a program to be executed is stored so as to be executable will be described with reference to FIG. Fig. 1 is an explanatory diagram showing the outline of program update in the program execution microcomputer.
[0004] 図 1において、プログラム更新システム 100は、プログラム実行マイコン 101と、更新 用プログラム送信側マイコン 102と、フラッシュメモリ 103と、力も構成されている。  In FIG. 1, a program update system 100 includes a program execution microcomputer 101, an update program transmission side microcomputer 102, a flash memory 103, and power.
[0005] プログラム実行マイコン 101は、バッファ領域 110と、プログラム領域 111と、 IPL (ln itial Program Loader)領域 112と、 Vector領域 113と、から構成されている。  The program execution microcomputer 101 includes a buffer area 110, a program area 111, an IPL (Initial Program Loader) area 112, and a Vector area 113.
[0006] ノッファ領域 110は、後述する更新用プログラム送信側マイコン 102から送信される 更新用プログラムを一時的に保存する。更新用プログラムは、たとえば、マイコン間通 信によって更新用プログラム送信側マイコン 102からバッファ領域 110に送信され、 プログラム実行マイコン 101の実行対象となるプログラムの更新用のプログラムである [0007] バッファ領域 110に一時保存された更新用プログラムは、図示しない CPU (Centr al Processing Unit)力 後述する IPL領域 112を参照することによって、プロダラ ム領域 111に複製 (コピー)される。換言すれば、後述するプログラム領域 111に保 存されたプログラム a, b, cは、更新用プログラムのプログラム領域 111に複製される ことによって更新がおこなわれる構成である。 [0006] The noffer area 110 temporarily stores an update program transmitted from an update program transmission side microcomputer 102 described later. The update program is, for example, a program for updating a program to be executed by the program execution microcomputer 101 that is transmitted from the update program transmission side microcomputer 102 to the buffer area 110 by communication between microcomputers. [0007] The update program temporarily stored in the buffer area 110 is copied (copied) to the program area 111 by referring to a CPU (Central Processing Unit) power (not shown), which will be described later. In other words, the programs a, b, and c stored in the program area 111 to be described later are configured to be updated by being copied to the program area 111 of the update program.
[0008] プログラム領域 111は、プログラム実行マイコン 101の実行対象となるプログラム a, b, cを保存する。具体的には、たとえば、プログラム領域 111は、プログラム aを保存 する A領域 121と、プログラム bを保存する B領域 122と、プログラム cを保存する C領 域 123と、力 構成されている。  [0008] The program area 111 stores programs a, b, and c to be executed by the program execution microcomputer 101. Specifically, for example, the program area 111 includes an A area 121 that stores the program a, a B area 122 that stores the program b, and a C area 123 that stores the program c.
[0009] 各プログラム a, b, cは、たとえば、図示しない CPUによって読み込まれて実行され る構成でもよい。具体的には、たとえば、プログラム a, b, cは、図示しない CPUが、 後述する Vector領域 113に格納された、プログラム a, b, cのアドレスを参照すること によって実行される。なお、図 1の説明では、 3つの領域 (A領域 121, B領域 122, C 領域 123)を用いて説明したが、領域の数量および実行対象となるプログラムの数は これに限るものではない。  [0009] Each program a, b, c may be configured to be read and executed by a CPU (not shown), for example. Specifically, for example, the programs a, b, and c are executed by a CPU (not shown) referring to the addresses of the programs a, b, and c stored in the Vector area 113 described later. In the description of FIG. 1, three areas (A area 121, B area 122, and C area 123) have been described. However, the number of areas and the number of programs to be executed are not limited to this.
[0010] IPL領域 112は、リセットスタート時に図示しない CPUによって最初に実行されるプ ログラムを保存する領域である。具体的には、たとえば、 IPL領域 112は、バッファ領 域 110に一時保存された更新用プログラムをプログラム領域 111に複製するか、プロ グラム領域 111に保存された各プログラム a, b, cを実行するかを決定するプログラム を保存する。  [0010] The IPL area 112 is an area for storing a program that is first executed by a CPU (not shown) at the time of reset start. Specifically, for example, the IPL area 112 copies the update program temporarily stored in the buffer area 110 to the program area 111 or executes each program a, b, c stored in the program area 111. Save the program that determines whether to do it.
[0011] Vector領域 113は、イベント発生時にプログラム実行マイコン 101の実行対象とな るプログラムのアドレスを格納する。具体的には、たとえば、図示しない CPUは、リセ ットスタート時には、 Vector領域 113を参照して IPL領域 112に保存されたプロダラ ムのアドレスを読み込む。また、図示しない CPUは、たとえば、通常起動時には、 Ve ctor領域 113を参照してプログラム領域 111に保存された各プログラム a, b, cのアド レスを読み込む。  [0011] The Vector area 113 stores an address of a program to be executed by the program execution microcomputer 101 when an event occurs. Specifically, for example, a CPU (not shown) reads the address of the program stored in the IPL area 112 with reference to the Vector area 113 at the time of reset start. In addition, for example, during normal startup, a CPU (not shown) reads the addresses of the programs a, b, and c stored in the program area 111 with reference to the Vector area 113.
[0012] 更新用プログラム送信側マイコン 102は、プログラム実行マイコン 101に対して、プ ログラム実行マイコン 101の実行対象となるプログラム a, b, cの更新用プログラムを 送信する。具体的には、たとえば、更新用プログラム送信側マイコン 102は、フラッシ ュメモリ 103が保存している更新用プログラムを読み込んで、読み込んだ更新用プロ グラムをプログラム実行マイコン 101に送信する。 [0012] The update program transmission side microcomputer 102 sends an update program for programs a, b, and c to be executed by the program execution microcomputer 101 to the program execution microcomputer 101. Send. Specifically, for example, the update program transmission side microcomputer 102 reads the update program stored in the flash memory 103 and transmits the read update program to the program execution microcomputer 101.
[0013] フラッシュメモリ 103は、各種データを保存することができる記録媒体で、図 1では、 プログラム実行マイコン 101の実行対象となるプログラム a, b, cの更新用プログラム を保存する。具体的には、たとえば、フラッシュメモリ 103は、更新用プログラム送信 側マイコン 102に対して、保存している更新用プログラムを出力する。  The flash memory 103 is a recording medium that can store various data. In FIG. 1, the flash memory 103 stores update programs for programs a, b, and c to be executed by the program execution microcomputer 101. Specifically, for example, the flash memory 103 outputs the stored update program to the update program transmission side microcomputer 102.
[0014] 特許文献 1 :特開 2004— 118369号公報  Patent Document 1: Japanese Patent Application Laid-Open No. 2004-118369
発明の開示  Disclosure of the invention
発明が解決しょうとする課題  Problems to be solved by the invention
[0015] し力しながら、上記従来技術では、マイコンにおける制御プログラムを更新する場合 、更新専用の外部機器が必要となるため、マイコンの利用者は、更新専用の外部機 器を用意する負担が生じてしまうという問題が一例として挙げられる。  [0015] However, in the above-described conventional technology, when updating the control program in the microcomputer, an external device dedicated for updating is required, and therefore the user of the microcomputer is burdened with preparing an external device dedicated for updating. The problem that it occurs is an example.
[0016] また、更新専用の外部機器を有するマイコンの製造元などで、制御プログラムを更 新する場合、マイコンの利用者は、製造元に対するマイコンの送付や受け取りに関す る手間が発生するばかりか、更新に要する時間を浪費してしまうという問題が一例とし て挙げられる。  [0016] In addition, when updating a control program at a manufacturer of a microcomputer having an external device dedicated for updating, the user of the microcomputer is not only troublesome about sending and receiving the microcomputer to the manufacturer, but also updating. An example is the problem of wasting the time required for this.
[0017] 一方、更新専用の外部機器を用いずに、マイコン間通信などによって受信される更 新用プログラムによって、実行対象となるプログラムを更新する場合、書き換え (複製 )の途中に電源障害などによって更新動作が中断されると、マイコンが起動できなく なってしまうという問題が一例として挙げられる。  [0017] On the other hand, when a program to be executed is updated by an update program received by communication between microcomputers without using an external device dedicated to update, due to a power failure or the like during rewriting (duplication) An example is the problem that if the update operation is interrupted, the microcomputer will not start.
[0018] 特に、 Vector領域に格納された、実行対象となるプログラムのアドレスを書き換える 場合、書き換えの途中で更新動作が中断されると、中断復旧後の起動時に Vector 領域を参照できないため、マイコンが起動できなくなってしまうという問題が一例とし て挙げられる。  [0018] In particular, when rewriting the address of the program to be executed, which is stored in the Vector area, if the update operation is interrupted during the rewriting, the Vector area cannot be referenced at startup after recovery from interruption. An example is the problem of being unable to start up.
[0019] また、 Vector領域に格納された、実行対象となるプログラムのアドレスを書き換えず に、実行対象となるプログラムだけを更新する場合、 Vector領域に格納された、実行 対象となるプログラムのアドレスが固定されるため、初期設定によるプログラムの配置 を変更できず、汎用性に欠けるとともにプログラム領域の容量を効率的に使用できな Vヽと 、う問題が一例として挙げられる。 [0019] When only the program to be executed is updated without rewriting the address of the program to be executed stored in the Vector area, the address of the program to be executed stored in the Vector area is Program placement by default setting As an example, V ヽ cannot be changed, lacks versatility, and cannot efficiently use the capacity of the program area.
課題を解決するための手段  Means for solving the problem
[0020] 上述した課題を解決し、 目的を達成するため、請求項 1の発明にかかる情報処理 装置は、プログラム実行領域に保存された実行対象プログラムを実行する情報処理 装置にお 、て、前記実行対象プログラムに対する更新用プログラムの入力を受け付 ける更新用プログラム入力手段と、前記更新用プログラム入力手段によって入力され た更新用プログラムを一時保存領域に一時保存する一時保存手段と、前記一時保 存手段によって一時保存された更新用プログラムに過不足がないか否かを判定する 判定手段と、前記判定手段によって判定された結果、前記更新用プログラムに過不 足がな 、場合、前記プログラム実行領域に保存された前記実行対象プログラムの更 新準備が完了した旨を示す更新情報を生成する生成手段と、前記生成手段によつ て生成された更新情報を更新情報保存領域に保存する更新情報保存手段と、を備 えることを特徴とする。  In order to solve the above-described problems and achieve the object, an information processing apparatus according to claim 1 is an information processing apparatus that executes an execution target program stored in a program execution area. Update program input means for receiving an input of an update program for the execution target program, temporary storage means for temporarily storing the update program input by the update program input means in a temporary storage area, and the temporary storage A determination means for determining whether or not the update program temporarily stored by the means is excessive or deficient; and, as a result of the determination by the determination means, if the update program is insufficient, the program execution area Generating means for generating update information indicating that the preparation for updating the execution target program stored in is completed, and Update information storage means for storing update information generated Te Niyotsu the update information storage area, and wherein the obtaining Bei a.
[0021] また、請求項 8の発明にかかる情報処理方法は、プログラム実行領域に保存された 実行対象プログラムを実行する情報処理方法にぉ 、て、前記実行対象プログラムに 対する更新用プログラムの入力を受け付ける更新用プログラム入力工程と、前記更 新用プログラム入力工程によって入力された更新用プログラムを一時保存領域に一 時保存する一時保存工程と、前記一時保存工程によって一時保存された更新用プ ログラムに過不足がないか否かを判定する判定工程と、前記判定工程によって判定 された結果、前記更新用プログラムに過不足がない場合、前記プログラム実行領域 に保存された前記実行対象プログラムの更新準備が完了した旨を示す更新情報を 生成する生成工程と、前記生成工程によって生成された更新情報を更新情報保存 領域に保存する更新情報保存工程と、を含むことを特徴とする。  [0021] Further, an information processing method according to the invention of claim 8 is an information processing method for executing an execution target program stored in a program execution area, and inputs an update program to the execution target program. The update program input process to be received, the temporary storage process for temporarily storing the update program input in the update program input process in the temporary storage area, and the update program temporarily stored in the temporary storage process If there is no excess or deficiency in the update program as a result of the determination in the determination step for determining whether or not there is an excess or deficiency, and the determination result in the determination step, an update preparation for the execution target program stored in the program execution area A generation process for generating update information indicating completion, and update information generated by the generation process Update information storing step of storing the presence area, characterized in that it comprises a.
[0022] また、請求項 9の発明に力かる情報処理プログラムは、請求項 8に記載の情報処理 方法をコンピュータに実行させることを特徴とする。  [0022] Further, an information processing program according to claim 9 causes a computer to execute the information processing method according to claim 8.
[0023] また、請求項 10の発明にかかるコンピュータに読み取り可能な記録媒体は、請求 項 9に記載の情報処理プログラムを記録したことを特徴とする。 図面の簡単な説明 [0023] A computer-readable recording medium according to the invention of claim 10 records the information processing program according to claim 9. Brief Description of Drawings
[0024] [図 1]図 1は、プログラム実行マイコンにおけるプログラムの更新の概要について示す 説明図である。  FIG. 1 is an explanatory diagram showing an outline of program update in a program execution microcomputer.
[図 2]図 2は、本実施の形態にかかる情報処理装置の機能的構成の一例を示すプロ ック図である。  FIG. 2 is a block diagram showing an example of a functional configuration of the information processing apparatus according to the present embodiment.
[図 3]図 3は、本実施の形態にかかる情報処理装置の処理の内容を示すフローチヤ ートである。  FIG. 3 is a flowchart showing the contents of processing of the information processing apparatus according to the present embodiment.
[図 4]図 4は、本実施例に力かるワンチップマイコンのハードウェア構成の一例を示す ブロック図である。  [FIG. 4] FIG. 4 is a block diagram showing an example of a hardware configuration of a one-chip microcomputer that works on the present embodiment.
[図 5]図 5は、本実施例に力かるワンチップマイコンにおける実行対象プログラムの更 新の概要を示す説明図である。  [FIG. 5] FIG. 5 is an explanatory diagram showing an outline of updating the execution target program in the one-chip microcomputer which is helpful in the present embodiment.
[図 6]図 6は、本実施例に力かる有効プログラム領域に保存されるプログラムについて 示す説明図である。  [FIG. 6] FIG. 6 is an explanatory diagram showing a program stored in an effective program area that is helpful in the present embodiment.
[図 7]図 7は、本実施例に力かるワンチップマイコンにおける更新用プログラムの受け 付け処理手順を示すフローチャートである。  [FIG. 7] FIG. 7 is a flowchart showing a procedure for accepting an update program in the one-chip microcomputer, which is useful in this embodiment.
[図 8]図 8は、本実施例に力かるワンチップマイコンの起動処理手順を示すフローチヤ ートである。  [FIG. 8] FIG. 8 is a flowchart showing a start-up process procedure of the one-chip microcomputer which is useful in the present embodiment.
[図 9]図 9は、本実施例に力かるワンチップマイコンにおける割り込み処理(図 8のステ ップ S812)手順を示すフローチャートである。  [FIG. 9] FIG. 9 is a flowchart showing a procedure of interrupt processing (step S812 in FIG. 8) in the one-chip microcomputer that works on the present embodiment.
符号の説明  Explanation of symbols
[0025] 200 情報処理装置 [0025] 200 Information processing apparatus
201 更新用プログラム入力部  201 Program input part for update
202 一時保存部  202 Temporary storage
203 判定部  203 Judgment part
204 生成部  204 generator
205 更新情報保存部  205 Update information storage
206 再稼働情報入力部  206 Re-operation information input section
207 判断部 208 更新部 207 Judgment part 208 Update Department
209 実行部  209 execution unit
発明を実施するための最良の形態  BEST MODE FOR CARRYING OUT THE INVENTION
[0026] 以下に添付図面を参照して、この発明にかかる情報処理装置、情報処理方法、情 報処理プログラムおよびコンピュータに読み取り可能な記録媒体の好適な実施の形 態を詳細に説明する。 Hereinafter, preferred embodiments of an information processing apparatus, an information processing method, an information processing program, and a computer-readable recording medium according to the present invention will be described in detail with reference to the accompanying drawings.
[0027] (実施の形態) [Embodiment]
(情報処理装置の機能的構成)  (Functional configuration of information processing device)
図 2を用いて、本実施の形態にかかる情報処理装置の機能的構成について説明 する。図 2は、本実施の形態に力かる情報処理装置の機能的構成の一例を示すプロ ック図である。  The functional configuration of the information processing apparatus according to the present embodiment will be described with reference to FIG. FIG. 2 is a block diagram showing an example of a functional configuration of the information processing apparatus that works according to the present embodiment.
[0028] 図 2において、プログラム実行領域に保存された実行対象プログラムを実行する情 報処理装置 200は、更新用プログラム入力部 201と、一時保存部 202と、判定部 20 3と、生成部 204と、更新情報保存部 205と、再稼働情報入力部 206と、判断部 207 と、更新部 208と、実行部 209と、力も構成されている。  In FIG. 2, an information processing apparatus 200 that executes an execution target program stored in a program execution area includes an update program input unit 201, a temporary storage unit 202, a determination unit 203, and a generation unit 204. The update information storage unit 205, the restart information input unit 206, the determination unit 207, the update unit 208, and the execution unit 209 are also configured.
[0029] 更新用プログラム入力部 201は、実行対象プログラムに対する更新用プログラムの 入力を受け付ける。具体的には、たとえば、更新用プログラムの入力は、図示しない 更新用プログラムが送信可能な外部装置力 入力を受け付けることとしてもよい。  The update program input unit 201 receives an input of an update program for the execution target program. Specifically, for example, the input of the update program may be an external device force input that can be transmitted by an update program (not shown).
[0030] 更新用プログラムは、たとえば、情報処理装置 200における不図示のメモリ領域な どに割り当てられたプログラム実行領域に複製 (コピー)されて実行対象プログラムと なる。また、更新用プログラムは、実行対象プログラムとして実行される際に、初期起 動プログラムによって実行される仮想初期起動プログラムを含む構成でもよい。具体 的には、たとえば、仮想初期起動プログラムは、プログラム実行領域が備える仮想プ ログラム領域に保存され、初期起動プログラムによって実行される。ここで、初期起動 プログラムは、たとえば、情報処理装置 100の再稼働の際に起動されるプログラムで ある。  The update program is copied (copied) to a program execution area assigned to a memory area (not shown) in the information processing apparatus 200, for example, and becomes an execution target program. Further, the update program may include a virtual initial startup program executed by the initial startup program when executed as the execution target program. Specifically, for example, the virtual initial startup program is stored in a virtual program area included in the program execution area and executed by the initial startup program. Here, the initial activation program is, for example, a program that is activated when the information processing apparatus 100 is restarted.
[0031] さらに、更新用プログラム入力部 201は、後述する判定部 203によって判定された 結果、更新用プログラムに過不足がある場合、更新用プログラムの出力元に対して取 得要求をおこなうことによって更新用プログラムの入力を受け付けることとしてもよい。 [0031] Further, when the update program input unit 201 determines that the update program is excessive or insufficient as a result of determination by the determination unit 203 described later, the update program input unit 201 takes the update program output source. It is also possible to accept the input of the update program by making an acquisition request.
[0032] 一時保存部 202は、更新用プログラム入力部 201によって入力された更新用プロ グラムを一時保存領域に一時保存する。具体的には、たとえば、一時保存部 202は 、情報処理装置 200における不図示のメモリ領域などに割り当てられたバッファ領域 など、データの一時保存が可能な領域に更新用プログラムを一時保存することとして ちょい。  Temporary storage unit 202 temporarily stores the update program input by update program input unit 201 in the temporary storage area. Specifically, for example, the temporary storage unit 202 temporarily stores the update program in an area where data can be temporarily stored, such as a buffer area allocated to a memory area (not shown) in the information processing apparatus 200. A little.
[0033] 判定部 203は、一時保存部 202によって一時保存された更新用プログラムに過不 足がないか否かを判定する。具体的には、たとえば、判定部 203は、複数回に分割さ れて入力される更新用プログラムが、すべて一時保存領域に一時保存された力否か を判定することとしてもよい。  The determination unit 203 determines whether or not the update program temporarily stored by the temporary storage unit 202 is sufficient. Specifically, for example, the determination unit 203 may determine whether or not all of the update programs that are divided and input multiple times are temporarily stored in the temporary storage area.
[0034] 生成部 204は、判定部 203によって判定された結果、更新用プログラムに過不足が な 、場合、プログラム実行領域に保存された実行対象プログラムの更新準備が完了 した旨を示す更新情報を生成する。更新情報は、たとえば、実行対象プログラムの更 新準備が完了した旨を示す代わりに、更新準備が完了して 、な 、旨を示す情報であ つてもよい。  [0034] As a result of the determination by the determination unit 203, the generation unit 204, when there is no excess or deficiency in the update program, displays update information indicating that preparation for updating the execution target program stored in the program execution area has been completed. Generate. For example, the update information may be information indicating that the update preparation is completed, instead of indicating that the update preparation of the execution target program is completed.
[0035] 更新情報保存部 205は、生成部 204によって生成された更新情報を更新情報保 存領域に保存する。具体的には、たとえば、更新情報保存部 205は、情報処理装置 200における不図示のメモリ領域などに割り当てられた更新情報保存領域に更新情 報を保存する。なお、更新情報保存部 205は、生成部 204によって更新準備が完了 した旨を示す更新情報の代わりに、更新準備が完了して 、な 、旨を示す情報を保存 していてもよい。  The update information storage unit 205 stores the update information generated by the generation unit 204 in the update information storage area. Specifically, for example, the update information storage unit 205 stores the update information in an update information storage area allocated to a memory area (not shown) in the information processing apparatus 200. Note that the update information storage unit 205 may store information indicating that the update preparation is completed, instead of the update information indicating that the generation unit 204 has completed the update preparation.
[0036] 再稼働情報入力部 206は、自装置の再稼働に関する再稼働情報の入力を受け付 ける。再稼働情報の入力は、たとえば、リセットスタートの処理要求などの入力であつ てもよい。  [0036] The restart information input unit 206 receives input of restart information related to restart of the own device. The restart information may be input, for example, a reset start processing request.
[0037] 判断部 207は、再稼働情報入力部 206によって再稼働情報が入力された場合、初 期起動プログラム保存領域に保存された初期起動プログラムを起動させて更新情報 を参照することによって、更新準備が完了しているか否かを判断する。具体的には、 たとえば、判断部 207は、情報処理装置 200における不図示のメモリ領域などに割り 当てられた初期起動プログラム保存領域に保存された初期起動プログラムを起動さ せる構成である。 [0037] When the restart information is input by the restart information input unit 206, the determination unit 207 updates the update program by starting the initial startup program stored in the initial startup program storage area and referring to the update information. Determine if preparation is complete. Specifically, for example, the determination unit 207 allocates a memory area (not shown) in the information processing apparatus 200. The configuration is such that the initial startup program saved in the assigned initial startup program storage area is started.
[0038] 更新部 208は、判断部 207によって判断された結果、更新準備が完了している場 合、更新用プログラムをプログラム実行領域に複製することによって実行対象プログ ラムを更新する。具体的には、たとえば、実行対象プログラムの更新は、更新準備が 完了している場合、一時保存部 202によって保存された更新用プログラムを実行対 象プログラムに対して上書き保存する構成でもよい。  [0038] When the determination by the determination unit 207 indicates that update preparation is complete, the update unit 208 updates the execution target program by copying the update program to the program execution area. Specifically, for example, the update of the execution target program may be configured to overwrite the execution target program with the update program stored by the temporary storage unit 202 when the update preparation is completed.
[0039] また、更新部 208は、たとえば、更新用プログラムを実行対象プログラムに上書きす る際、更新用プログラムに含まれる仮想初期起動プログラムを用いて、プログラム実 行領域が備える仮想プログラム保存領域の仮想初期起動プログラムもあわせて上書 さすることとなる。  [0039] Further, for example, when the update unit 208 overwrites the execution target program with the update program, the update unit 208 uses the virtual initial activation program included in the update program to store the virtual program storage area included in the program execution area. The virtual initial startup program will also be overwritten.
[0040] また、更新部 208は、プログラム実行領域に複製した更新用プログラムを検証する ことによって、実行対象プログラムを実行可能な形式に更新することとしてもよい。具 体的には、たとえば、更新用プログラムの検証は、更新用プログラムが実行対象プロ グラムとして過不足なく複製された力否かを確認する構成でもよい。  [0040] The update unit 208 may update the execution target program into an executable format by verifying the update program copied to the program execution area. Specifically, for example, the verification of the update program may be configured to confirm whether or not the update program has been copied without excess or deficiency as the execution target program.
[0041] 実行部 209は、判断部 207によって判断された結果、更新準備が完了していない 場合、プログラム実行領域に保存された実行対象プログラムを実行する。具体的に は、たとえば、実行部 209は、仮想初期起動プログラムの実行にしたがって、プロダラ ム実行領域に保存された実行対象プログラムを実行する。すなわち、実行部 209は、 更新準備が完了して 、な 、場合、初期起動プログラム保存領域に保存された初期起 動プログラムの起動によって実行される仮想初期起動プログラムによって、実行対象 プログラムを実行することができる。  The execution unit 209 executes the execution target program stored in the program execution area when the update preparation is not completed as a result of the determination by the determination unit 207. Specifically, for example, the execution unit 209 executes the execution target program stored in the program execution area in accordance with the execution of the virtual initial activation program. That is, the execution unit 209 executes the program to be executed by the virtual initial startup program executed by the startup of the initial startup program stored in the initial startup program storage area if the update preparation is completed. Can do.
[0042] 換言すれば、初期起動プログラムは、再稼働情報が入力されると起動して、更新準 備が完了している力否かを判断させる。そして、初期起動プログラムは、判断の結果 、更新準備が完了している場合は、更新用プログラムを用いて、実行対象プログラム を更新させることとなる。一方、初期起動プログラムは、判断の結果、更新準備が完 了して 、な 、場合は、仮想プログラム保存領域に保存されて 、る仮想初期起動プロ グラムを実行させることにより、実行対象プログラムを実行させることとなる。 [0043] このように、情報処理装置 200は、実行対象プログラムを更新する場合、仮想プロ グラム保存領域に保存された仮想初期起動プログラムを、実行対象プログラムとあわ せて更新する構成である。また、情報処理装置 200は、初期起動プログラムによって 仮想初期起動プログラムを実行させることによって、実行対象プログラムを実行するこ とがでさる。 In other words, the initial activation program is activated when the re-operation information is input, and determines whether or not the power to complete the update preparation is complete. When the initial startup program is determined to be ready for update as a result of the determination, the program to be executed is updated using the update program. On the other hand, as a result of the determination, the initial startup program has been prepared for update. In this case, the initial startup program is stored in the virtual program storage area and executed by executing the virtual initial startup program. Will be allowed to. As described above, when updating the execution target program, the information processing apparatus 200 is configured to update the virtual initial activation program stored in the virtual program storage area together with the execution target program. In addition, the information processing apparatus 200 can execute the execution target program by causing the virtual initial startup program to be executed by the initial startup program.
[0044] したがって、情報処理装置 200は、仮想プログラム保存領域に仮想初期起動プロ グラムを保存することによって、実行対象プログラムを更新する際に初期起動プログ ラムを更新しなくても、実行対象プログラムの更新あるいは実行を確実におこなうこと ができる。換言すれば、実行対象プログラムの更新中に、電源障害などに起因して 更新処理に不具合が発生しても、電源復旧時には、再度初期起動プログラムの実行 によって、実行対象プログラムの更新ある 、は実行をおこなうことができる。  [0044] Therefore, the information processing apparatus 200 stores the virtual initial startup program in the virtual program storage area, thereby updating the execution target program without updating the initial startup program. Can be updated or executed reliably. In other words, even if a failure occurs in the update process due to a power failure or the like during the update of the execution target program, the execution target program is updated or re-executed by executing the initial startup program again when the power is restored. Can be done.
[0045] (情報処理装置 200の処理の内容)  [0045] (Contents of processing of information processing device 200)
つぎに、図 3を用いて本実施の形態に力かる情報処理装置 200の処理の内容につ いて説明する。図 3は、本実施の形態に力かる情報処理装置の処理の内容を示すフ ローチャートである。図 3のフローチャートにおいて、まず、更新用プログラム入力部 2 01によって、更新用プログラムの入力を受け付けたか否かを判断する (ステップ S30 D o  Next, the contents of the processing of the information processing apparatus 200 that is useful for the present embodiment will be described with reference to FIG. FIG. 3 is a flowchart showing the contents of the processing of the information processing apparatus that is relevant to the present embodiment. In the flowchart of FIG. 3, first, the update program input unit 201 determines whether or not the input of the update program has been accepted (step S30 Do)
[0046] ステップ S301にお 、て、更新用プログラムの入力を受け付けた場合 (ステップ S30 l :Yes)は、一時保存部 202によって、一時保存領域にステップ S301において入力 された更新用プログラムを一時保存する (ステップ S302)。  [0046] When input of the update program is accepted in step S301 (step S301: Yes), the temporary storage unit 202 temporarily saves the update program input in step S301 in the temporary storage area. (Step S302).
[0047] また、ステップ S301にお 、て、更新用プログラムの入力を受け付けな 、場合 (ステ ップ S301 :No)は、ステップ S306へ移行して、再稼働情報入力部 206によって、再 稼働情報の入力を受け付けたか否かを判断する (ステップ S306)。  [0047] If the input of the update program is not accepted in step S301 (step S301: No), the process proceeds to step S306 and the reactivation information input unit 206 performs the reactivation information. It is determined whether or not an input is accepted (step S306).
[0048] つぎに、判定部 203によって、ステップ S302において一時保存された更新用プロ グラムに過不足がな 、か否かを判定する(ステップ S303)。  Next, the determination unit 203 determines whether or not the update program temporarily stored in step S302 is excessive or insufficient (step S303).
[0049] そして、生成部 204によって、ステップ S303において判定された結果に基づいて、 更新情報を生成する (ステップ S304)。更新情報は、たとえば、ステップ S303におい て判定された結果、更新用プログラムに過不足がない場合、プログラム実行領域に 保存された実行対象プログラムの更新準備が完了した旨を示す情報である。また、 更新情報は、たとえば、ステップ S303において判定された結果、更新用プログラム に過不足がある場合、更新準備が完了して!/、な!、旨を示す情報であってもよ 、。 [0049] Then, the generation unit 204 generates update information based on the result determined in step S303 (step S304). For example, if there is no excess or deficiency in the update program as a result of the determination in step S303, the update information is stored in the program execution area. This is information indicating that preparation for updating the stored execution target program has been completed. In addition, the update information may be information indicating that the update preparation is completed and that the update preparation is complete when the update program is determined to be excessive or insufficient as a result of the determination in step S303, for example.
[0050] つづいて、更新情報保存部 205によって、更新情報保存領域にステップ S304に ぉ 、て生成された更新情報を保存する (ステップ S305)。 Subsequently, the update information storage unit 205 stores the update information generated in step S304 in the update information storage area (step S305).
[0051] つぎに、再稼働情報入力部 206によって、再稼働情報の入力を受け付けた力否か を判断する (ステップ S306)。再稼働情報は、たとえば、リセットスタートの処理要求 などであってもよい。 [0051] Next, the restart information input unit 206 determines whether or not the input of restart information is accepted (step S306). The restart information may be, for example, a reset start processing request.
[0052] ステップ S306にお 、て、再稼働情報の入力を受け付けた場合 (ステップ S306: Ye s)は、判断部 207によって、初期起動プログラム保存領域に保存された初期起動プ ログラムを起動させて更新情報を参照することによって、更新準備が完了しているか 否かを判断する (ステップ S307)。  [0052] If the restart information input is accepted in step S306 (step S306: Yes), the determination unit 207 activates the initial startup program stored in the initial startup program storage area. By referring to the update information, it is determined whether or not update preparation is completed (step S307).
[0053] また、ステップ S306にお 、て、再稼働情報の入力を受け付けな 、場合 (ステップ S 306 : No)は、ステップ S301に戻って処理を繰り返す。  [0053] If the restart information is not accepted in step S306 (step S306: No), the process returns to step S301 and the process is repeated.
[0054] ステップ S307において、更新準備が完了している場合 (ステップ S307 : Yes)は、 更新部 208によって、更新用プログラムをプログラム実行領域に複製することによつ て実行対象プログラムを更新する (ステップ S308)。そして、実行部 209によって、ス テツプ S308にお 、て更新された実行対象プログラムを実行して (ステップ S309)、 一連の処理を終了する。  In step S307, when the update preparation is completed (step S307: Yes), the update unit 208 updates the execution target program by copying the update program to the program execution area ( Step S308). Then, the execution unit 209 executes the updated execution target program in step S308 (step S309), and ends the series of processes.
[0055] また、ステップ S 307において、更新準備が完了していない場合 (ステップ S 307 : N o)は、ステップ S309へ移行して、実行部 209によって、プログラム実行領域に保存さ れた実行対象プログラムを実行する (ステップ S309)。そして、一連の処理を終了す る。  [0055] If the update preparation is not completed in step S307 (step S307: No), the process proceeds to step S309, where the execution unit 209 saves the execution target stored in the program execution area. Run the program (step S309). Then, a series of processing ends.
[0056] 換言すれば、ステップ S307〜ステップ S309では、更新準備が完了している場合 は、実行対象プログラムを更新してから、更新した実行対象プログラムを実行する。ま た、更新準備が完了していない場合は、実行対象プログラムを更新せずに、プロダラ ム実行領域に保存されて 、る実行対象プログラムを実行することとしてもょ 、。  In other words, in steps S307 to S309, if the update preparation is completed, the updated execution target program is executed after updating the execution target program. If the update preparation is not completed, the execution target program stored in the program execution area is executed without updating the execution target program.
[0057] 以上説明したように、本実施の形態によれば、一時保存部に保存された更新用プ ログラムによって実行対象プログラムを更新するため、専用の外部機器を用意しなく ても実行対象プログラムの更新をおこなうことができる。 [0057] As described above, according to the present embodiment, the update program stored in the temporary storage unit. Since the execution target program is updated by the program, it is possible to update the execution target program without preparing a dedicated external device.
[0058] また、本実施の形態によれば、更新用プログラムの更新準備が完了してから、実行 対象プログラムを更新するため、更新用プログラムの入力途中に電源障害などが発 生しても、実行対象プログラムに対する弊害の防止を図ることができる。  [0058] Further, according to the present embodiment, since the execution target program is updated after the update program is prepared for update, even if a power failure occurs during the input of the update program, It is possible to prevent harmful effects on the execution target program.
[0059] また、本実施の形態によれば、仮想初期起動プログラムを含む更新用プログラムに よって実行対象プログラムを更新するため、初期起動プログラムの更新をしなくてもよ い。したがって、更新途中に電源障害などが発生しても、復旧後には初期起動プログ ラムによって自装置を起動することができる。  [0059] Further, according to the present embodiment, since the execution target program is updated by the update program including the virtual initial startup program, the initial startup program need not be updated. Therefore, even if a power failure occurs during the update, the device can be started up by the initial startup program after recovery.
[0060] すなわち、本実施の形態によれば、電源障害の復旧後であっても、初期起動プロ グラムによって実行対象プログラムの更新あるいは実行をおこなうことができる。具体 的には、たとえば、本実施の形態によれば、電源障害の復旧後に再稼働情報が入力 されると、電源障害によって更新途中であるため、初期起動プログラムによって更新 を継続あるいはやり直しすることができる。また、本実施の形態によれば、電源障害が あっても更新が終了していれば、初期起動プログラムによって仮想初期起動プロダラ ムを実行させて、実行対象プログラムを実行することができる。  That is, according to the present embodiment, the execution target program can be updated or executed by the initial startup program even after the power failure is recovered. Specifically, for example, according to the present embodiment, when restart information is input after recovery from a power failure, the update is in progress due to a power failure, so the update can be continued or re-executed by the initial startup program. it can. Further, according to the present embodiment, if the update is completed even if there is a power failure, the virtual target startup program can be executed by the initial startup program, and the execution target program can be executed.
[0061] くわえて、実行対象プログラムは、仮想初期起動プログラムによって実行されること となるため、汎用性に富んだ実行対象プログラムの配置を設計でき、プログラム実行 領域の利用の効率ィ匕を図ることができる。換言すれば、初期起動プログラムの代わり に、実行対象プログラムとあわせて更新される仮想初期起動プログラムによって、実 行対象プログラムを実行するため、初期起動プログラムによって制限される配置では なぐ仮想初期起動プログラムに設定される自由度のある配置を実現できる。  [0061] In addition, since the execution target program is executed by the virtual initial startup program, it is possible to design a highly versatile execution target program arrangement and to improve the efficiency of using the program execution area. Can do. In other words, instead of the initial startup program, the execution target program is executed by the virtual initial startup program that is updated together with the execution target program. Therefore, the virtual initial startup program is not limited to the arrangement limited by the initial startup program. An arrangement with a set degree of freedom can be realized.
[0062] また、本実施の形態によれば、更新用プログラムを検証することによって、実行対象 プログラムを実行可能な形式に更新するため、的確な実行対象プログラムの更新を 図ることができる。  [0062] Further, according to the present embodiment, the execution target program is updated to an executable format by verifying the update program, so that the execution target program can be accurately updated.
実施例  Example
[0063] 以下に、本発明の実施例について説明する。本実施例では、たとえば、フラッシュ ROM (Read Only Memorv)内蔵のワンチップマイコンによって、本発明の情報 処理装置を実施した場合の一例について説明する。 [0063] Examples of the present invention will be described below. In this embodiment, for example, a one-chip microcomputer with a built-in flash ROM (Read Only Memorv) An example when the processing apparatus is implemented will be described.
[0064] (ワンチップマイコンのハードウェア構成)  [0064] (Hardware configuration of one-chip microcomputer)
まず、図 4を用いて、本実施例に力かるワンチップマイコンのハードウェア構成につ いて説明する。図 4は、本実施例に力かるワンチップマイコンのハードウェア構成の一 例を示すブロック図である。  First, the hardware configuration of the one-chip microcomputer that works on this embodiment will be described with reference to FIG. FIG. 4 is a block diagram showing an example of a hardware configuration of a one-chip microcomputer that is useful in this embodiment.
[0065] 図 4において、ワンチップマイコン 400は、 CPU401と、フラッシュ ROM402と、 RAIn FIG. 4, the one-chip microcomputer 400 includes a CPU 401, a flash ROM 402, RA
M (Random Access Memory) 403と、入出力 iZF (インターフェース) 404と、を 備えている。また、各構成部 401〜404は、バス 410によってそれぞれ接続されてい る。 M (Random Access Memory) 403 and input / output iZF (interface) 404 are provided. Each component 401 to 404 is connected by a bus 410.
[0066] まず、 CPU401はワンチップマイコン 400の全体の制御を司る。具体的には、たと えば、 CPU401は、フラッシュ ROM402に記録されたプログラムを読み込み、 RAM 403をワークエリアとして読み込んだプログラムを実行する構成でもよい。  First, the CPU 401 controls the entire one-chip microcomputer 400. Specifically, for example, the CPU 401 may be configured to read a program recorded in the flash ROM 402 and execute the program read using the RAM 403 as a work area.
[0067] フラッシュ ROM402は、ブートプログラムや実行対象となる実行対象プログラムなど の各種プログラムを記録している。詳細は図 5を用いて説明する力 フラッシュ RAM 402は、たとえば、各種プログラムを書き換え可能に記録し、電源を切ってもデータが 消えな 、不揮発性半導体メモリなどである。  The flash ROM 402 records various programs such as a boot program and an execution target program to be executed. The details will be described with reference to FIG. 5. The flash RAM 402 is, for example, a nonvolatile semiconductor memory in which various programs are recorded in a rewritable manner and data is not lost even when the power is turned off.
[0068] RAM403は、 CPU401のワークエリアとして使用される。具体的には、たとえば、 R AM403は、データの書き込みと読み出しが随時可能な半導体メモリでもよぐ CPU 401によって読み込まれたプログラムを実行するためのワークエリアとなる。  The RAM 403 is used as a work area for the CPU 401. Specifically, for example, the RAM 403 is a work area for executing a program read by the CPU 401, which may be a semiconductor memory capable of writing and reading data at any time.
[0069] 入出力 IZF404は、図示しない外部機器に接続され、ワンチップマイコン 400と CP U401とのインターフェースとして機能する。入出力 I/F404は、さらに、有線あるい は無線などを介してインターネットなどの通信網に接続され、この通信網と CPU401 とのインターフェースとしても機能する。  The input / output IZF 404 is connected to an external device (not shown) and functions as an interface between the one-chip microcomputer 400 and the CPU 401. The input / output I / F 404 is further connected to a communication network such as the Internet via wired or wireless communication, and also functions as an interface between the communication network and the CPU 401.
[0070] また、詳細は図 5に後述するが、入出力 IZF404は、ワンチップマイコン 400の外 部に接続されたマイコンから、マイコン間通信によってフラッシュ ROM402に記録さ れた実行対象プログラムに対する更新用プログラムの入力を受け付けることとしてもよ い。  [0070] Although details will be described later with reference to FIG. 5, the input / output IZF 404 is used for updating the execution target program recorded in the flash ROM 402 by means of communication between microcomputers from a microcomputer connected to the outside of the one-chip microcomputer 400. It is also possible to accept program input.
[0071] なお、図 4では説明を省略した力 本実施例に力かるワンチップマイコン 400は、 C PU401、フラッシュ ROM402、 RAM403、入出力 I/F404のほかに、タイマ、 LC D (Liquid Crystal Display)ドライノく、 MMU (Memory Management Unit) 、 DMAC (Direct Memory Access Contoroller)、 Α/Ό (Analog/Digital) コンバータなどの周辺機能を備えて 、てもよ 、。 Note that the power omitted in FIG. 4 is explained. In addition to PU401, flash ROM402, RAM403, input / output I / F404, timer, LCD (Liquid Crystal Display), MMU (Memory Management Unit), DMAC (Direct Memory Access Controller), Α / Ό (Analog / Digital) ) Peripheral functions such as a converter are also available.
[0072] なお、実施の形態に力かる情報処理装置 200の機能的構成のうち、更新用プログ ラム入力部 201や再稼働情報入力部 206は入出力 IZF404によって、一時保存部 202や判定部 203や生成部 204や更新情報保存部 205や判断部 207や更新部 20 8や実行部 209は CPU401がフラッシュ ROM402や RAM403に記録された各種プ ログラムを実行することによって、それぞれその機能を実現する。  Of the functional configuration of the information processing apparatus 200 according to the embodiment, the update program input unit 201 and the restart information input unit 206 are temporarily stored in the storage unit 202 and the determination unit 203 by the input / output IZF 404. The generation unit 204, the update information storage unit 205, the determination unit 207, the update unit 208, and the execution unit 209 realize their functions by the CPU 401 executing various programs recorded in the flash ROM 402 and RAM 403.
[0073] (ワンチップマイコン 400における実行対象プログラムの更新の概要)  [0073] (Overview of update of execution target program in one-chip microcomputer 400)
つぎに、図 5を用いて、本実施例に力かるワンチップマイコン 400における実行対 象プログラムの更新の概要について説明する。図 5は、本実施例に力かるワンチップ マイコンにおける実行対象プログラムの更新の概要を示す説明図である。  Next, the outline of the update of the execution target program in the one-chip microcomputer 400, which is useful in the present embodiment, will be described with reference to FIG. FIG. 5 is an explanatory diagram showing an outline of updating the execution target program in the one-chip microcomputer that works on the present embodiment.
[0074] 図 5において、プログラム更新システム 500は、ワンチップマイコン 400と、更新用プ ログラム送信側マイコン 502と、フラッシュメモリ 503と、力も構成されている。  In FIG. 5, the program update system 500 includes a one-chip microcomputer 400, an update program transmission side microcomputer 502, a flash memory 503, and power.
[0075] ワンチップマイコン 400における図 4に示したフラッシュ ROM402は、有効プログラ ム情報保存領域 510と、空き領域 511と、更新用プログラム保存領域 512と、有効プ ログラム領域 513と、 0^領域514と、 Vector領域 515と、力 構成されている。  [0075] The flash ROM 402 shown in FIG. 4 in the one-chip microcomputer 400 has an effective program information storage area 510, an empty area 511, an update program storage area 512, an effective program area 513, and a 0 ^ area 514. The Vector area 515 is composed of force.
[0076] 有効プログラム情報保存領域 510は、後述する有効プログラム領域 513に記録さ れた実行対象プログラムの更新準備が完了した旨を示す更新情報を保存する領域 である。具体的には、たとえば、更新情報は、後述する更新用プログラム保存領域 51 2に、更新用プログラム送信側マイコン 502から複数回に分割されて入力される更新 用プログラムに過不足がない場合、更新準備が完了したこととする情報でもよい。  The effective program information storage area 510 is an area for storing update information indicating that the execution target program update preparation recorded in the effective program area 513 to be described later has been completed. Specifically, for example, the update information is updated when there is no excess or deficiency in the update program that is divided and input multiple times from the update program transmission side microcomputer 502 in the update program storage area 512 described later. Information indicating that preparation has been completed may be used.
[0077] また、更新情報は、たとえば、実行対象プログラムの更新準備が完了した旨を示す 代わりに、更新準備が完了して!/、な!、旨を示す情報であってもよ 、。  Further, the update information may be information indicating that the update preparation is completed instead of indicating that the preparation for update of the execution target program is completed, for example.
[0078] 空き領域 511は、本実施例におけるフラッシュ ROM402の未使用領域であり、初 期設定によって変更することができる。  The free area 511 is an unused area of the flash ROM 402 in the present embodiment, and can be changed according to the initial setting.
[0079] 更新用プログラム保存領域 512は、後述する更新用プログラム送信側マイコン 502 力 送信される更新用プログラムを一時的に保存する領域である。更新用プログラム は、たとえば、マイコン間通信によって更新用プログラム送信側マイコン 502から図示 しない入出力 IZF404を介して入力され、ワンチップマイコン 400の実行対象となる 実行対象プログラムの更新用のプログラムである。 The update program storage area 512 is an update program transmission side microcomputer 502 described later. This is an area for temporarily storing the update program to be transmitted. The update program is, for example, a program for updating the execution target program that is input from the update program transmission-side microcomputer 502 via the input / output IZF 404 (not shown) through the communication between the microcomputers and is the execution target of the one-chip microcomputer 400.
[0080] また、更新用プログラムは、たとえば、図示しない CPU401によって有効プログラム 情報保存領域 510に保存された更新情報が参照されて更新準備が完了している場 合に、有効プログラム領域 513に複製 (コピー)される。換言すれば、更新用プロダラ ムは、たとえば、 CPU401によって実行対象プログラムに対して上書き保存され、そ の実行対象プログラムが更新されることとなる。  [0080] The update program is copied to the effective program area 513 when the update information stored in the effective program information storage area 510 is referred to by the CPU 401 (not shown) and the update preparation is completed (for example, Copied). In other words, the update program is overwritten and saved on the execution target program by the CPU 401, for example, and the execution target program is updated.
[0081] このように、更新情報を参照して実行対象プログラムの更新をおこなう構成とすれば 、更新用プログラムが不完全な状態で実行対象プログラムを更新して不具合を引き 起こすことを防ぐことができる。すなわち、電源障害など、何らかの障害によって更新 用プログラムの一時保存がストップしてしまった場合、リセットスタートによってストップ した時点の更新用プログラムによって中途半端な状態の実行対象プログラムの更新 はおこなわずに、一つ前の手順に戻って、更新用プログラムの一時保存を開始する ことができる。  As described above, if the configuration is such that the execution target program is updated with reference to the update information, it is possible to prevent the execution target program from being updated while the update program is incomplete and causing a malfunction. it can. In other words, if the temporary storage of the update program is stopped due to some failure, such as a power failure, the program to be executed in the halfway state is not updated by the update program at the time when it was stopped by the reset start. You can return to the previous step and start temporarily saving the update program.
[0082] また、更新用プログラムは、実行対象プログラムとして実行される際に、初期起動プ ログラムによって実行される仮想初期起動プログラムを含む構成でもよい。初期起動 プログラムは、たとえば、再稼働(リセットスタート)の際に起動されるプログラムである  [0082] The update program may include a virtual initial startup program executed by the initial startup program when executed as the execution target program. The initial startup program is, for example, a program that is started when restarting (reset start)
[0083] 有効プログラム領域 513は、ワンチップマイコン 400の実行対象となる実行対象プ ログラムを保存する領域である。詳細は図 6を用いて説明するが、有効プログラム領 域 513に保存された実行対象プログラムは、複数でもよぐ図示しない CPU401に読 み込まれて実行されることとしてもよ!/、。 The effective program area 513 is an area for storing an execution target program to be executed by the one-chip microcomputer 400. Details will be described with reference to FIG. 6, but a plurality of execution target programs stored in the effective program area 513 may be read and executed by the CPU 401 (not shown)! /.
[0084] また、有効プログラム領域 513に更新用プログラムが複製された場合、 CPU401は 、複製された更新用プログラムを検証することによって、実行対象プログラムを実行可 能な形式に更新することとしてもよい。具体的には、たとえば、更新用プログラムの検 証は、更新用プログラムが実行対象プログラムとして過不足なく複製されたか否かを 確認する構成でもよい。 [0084] When the update program is copied to the valid program area 513, the CPU 401 may update the execution target program into an executable format by verifying the copied update program. . Specifically, for example, the verification of the update program is performed by checking whether the update program has been copied as an execution target program without excess or deficiency. The structure to confirm may be sufficient.
[0085] IPL領域 514は、リセットスタート時に図示しない CPU401によって最初に実行され る初期起動プログラムを保存する領域である。具体的には、たとえば、 IPL領域 514 は、更新用プログラム保存領域 512に一時保存された更新用プログラムを有効プロ グラム領域 513に複製するか、有効プログラム領域 513に保存された各実行対象プ ログラムを実行するかを決定するプログラムを保存する。  [0085] The IPL area 514 is an area for storing an initial startup program that is first executed by the CPU 401 (not shown) at the start of reset. Specifically, for example, the IPL area 514 copies the update program temporarily stored in the update program storage area 512 to the valid program area 513, or each execution target program stored in the valid program area 513. Save the program that determines whether to run.
[0086] Vector領域 515は、イベント発生時にワンチップマイコン 400の実行対象となるプ ログラムのアドレスを格納する。具体的には、たとえば、図示しない CPU401は、リセ ットスタート時には、 Vector領域 515を参照して IPL領域 514に保存されたプロダラ ムのアドレスを読み込む。また、 CPU401は、たとえば、通常起動時には、 Vector領 域 515を参照して有効プログラム領域 513に保存された各実行対象プログラムのアド レスを読み込むこととしてもよ 、。  [0086] The Vector area 515 stores the address of a program to be executed by the one-chip microcomputer 400 when an event occurs. Specifically, for example, the CPU 401 (not shown) reads the program address stored in the IPL area 514 with reference to the Vector area 515 at the time of reset start. For example, the CPU 401 may read the address of each execution target program stored in the effective program area 513 with reference to the Vector area 515 at normal startup.
[0087] このように、 IPL領域 514および Vector領域 515に保存されたデータは、更新用プ ログラムによって書き換えをおこなわな 、ため、更新用プログラムの一時保存中や、 実行対象プログラムの更新中に障害が発生しても、リセットスタートによって、 CPU40 1が IPL領域 514および Vector領域 515に保存されたデータを参照すれば、ワンチ ップマイコン 400の動作を正常に再開することができる。  [0087] As described above, the data stored in the IPL area 514 and the Vector area 515 is not rewritten by the update program. Therefore, a failure occurs during the temporary storage of the update program or the update of the execution target program. Even if this occurs, if the CPU 401 refers to the data stored in the IPL area 514 and the Vector area 515 by reset start, the operation of the one-chip microcomputer 400 can be resumed normally.
[0088] 更新用プログラム送信側マイコン 502は、ワンチップマイコン 400に対して、ワンチッ プマイコン 400の実行対象となる実行対象プログラムの更新用プログラムを送信する 。具体的には、たとえば、更新用プログラム送信側マイコン 502は、フラッシュメモリ 5 03が保存して 、る更新用プログラムを読み込んで、読み込んだ更新用プログラムを ヮンチップマイコン 400に送信する。  The update program transmission side microcomputer 502 transmits an update program for the execution target program to be executed by the one-chip microcomputer 400 to the one-chip microcomputer 400. Specifically, for example, the update program transmission side microcomputer 502 reads the update program stored in the flash memory 5003 and transmits the read update program to the on-chip microcomputer 400.
[0089] フラッシュメモリ 503は、各種データを保存することができる記録媒体で、図 5では、 ワンチップマイコン 400の実行対象となる実行対象プログラムの更新用プログラムを 保存する。具体的には、たとえば、フラッシュメモリ 503は、更新用プログラム送信側 マイコン 502に対して、保存している更新用プログラムを出力する。  The flash memory 503 is a recording medium that can store various data. In FIG. 5, the flash memory 503 stores an update program for an execution target program to be executed by the one-chip microcomputer 400. Specifically, for example, the flash memory 503 outputs the stored update program to the update program transmission side microcomputer 502.
[0090] ここで、図 6を用いて、有効プログラム領域 513に保存されるプログラムについて説 明する。図 6は、本実施例に力かる有効プログラム領域に保存されるプログラムにつ いて示す説明図である。 Here, the program stored in the effective program area 513 will be described with reference to FIG. Fig. 6 shows the programs stored in the effective program area that is useful in this embodiment. It is explanatory drawing shown.
[0091] 図 6において、有効プログラム領域 513は、仮想初期起動プログラムを保存する仮 想 Vector領域 601と、実行対象となる実行対象プログラム a, b, cを保存する実行対 象プログラム領域 602と、力も構成されている。  In FIG. 6, an effective program area 513 includes a virtual vector area 601 for storing a virtual initial startup program, an execution target program area 602 for storing execution target programs a, b, and c to be executed, Power is also composed.
[0092] 仮想 Vector領域 601に保存された仮想初期起動プログラムは、リセットスタート時 に、通常起動である場合に図示しない CPU401によって読み込まれる。仮想初期起 動プログラムは、たとえば、通常起動時に実行対象となる実行対象プログラム a, b, c を実行させるプログラムで、 CPU401に対して、実行対象プログラム領域 602に保存 された実行対象プログラム a, b, cのアドレスを指定する構成でもよい。  The virtual initial activation program stored in the virtual vector area 601 is read by the CPU 401 (not shown) when the normal activation is performed at the reset start. The virtual initial startup program is, for example, a program that executes the execution target programs a, b, and c that are executed at normal startup. The execution target programs a, b stored in the execution target program area 602 for the CPU 401 are executed. , c address may be specified.
[0093] 具体的には、たとえば、 CPU401は、リセットスタート時に、 Vector領域 515を参照 して IPL領域 514に保存されたプログラムのアドレスを読み込むことによって、更新用 プログラムの複製 (実行対象プログラムの更新)、あるいは、実行対象プログラムを実 行する。  Specifically, for example, when reset is started, the CPU 401 refers to the Vector area 515 and reads the address of the program stored in the IPL area 514, thereby copying the update program (update the execution target program). ) Or, execute the execution target program.
[0094] より具体的には、たとえば、 CPU401は、有効プログラム情報保存領域 510に保存 された更新情報に基づいて、更新用プログラムの複製、あるいは、実行対象プロダラ ムの実行を選択し、実行対象プログラムを実行する場合、 Vector領域 515を参照し て、仮想 Vector領域 601のアドレスを読み込む。  [0094] More specifically, for example, the CPU 401 selects copy of the update program or execution of the execution target program based on the update information stored in the valid program information storage area 510, and executes the execution target. When executing the program, the address of the virtual vector area 601 is read with reference to the vector area 515.
[0095] そして、 CPU401は、仮想 Vector領域 601に保存された仮想初期起動プログラム によってアドレスが指定される実行対象プログラム a, b, cを実行することとしてもよい  Then, the CPU 401 may execute the execution target programs a, b, and c whose addresses are specified by the virtual initial activation program stored in the virtual vector area 601.
[0096] このように、 IPL領域 514および Vector領域 515は更新せずに、有効プログラム領 域 513における仮想初期起動プログラムを保存する仮想 Vector領域 601および実 行対象プログラム領域 602を更新することで、実行対象プログラム a, b, cの配置に関 する制限を最小限に抑制することができる。 In this way, by updating the virtual vector area 601 and the execution target program area 602 for storing the virtual initial activation program in the effective program area 513 without updating the IPL area 514 and the vector area 515, Limitations on the placement of the execution target programs a, b, and c can be minimized.
[0097] 換言すれば、たとえば、図 1に示すように、仮想初期起動プログラムがないと、 Vect or領域 113を更新しない場合は、各実行対象プログラム a, b, cを保存する領域に余 裕を持たせた配置としなければならない。一方で、 Vector領域 113を更新用プログ ラムによって更新する場合は、プログラムの更新中に電源障害などが発生すると、 Ve ctor領域 113に不具合が発生してしまい、プログラム実行マイコン 101が動作しなく なってしまう。 In other words, for example, as shown in FIG. 1, if there is no virtual initial activation program, if the vector area 113 is not updated, there is a surplus in the area for storing each execution target program a, b, c. Must be arranged with On the other hand, when the vector area 113 is updated by the update program, if a power failure occurs during the program update, Ve A malfunction occurs in the ctor area 113, and the program execution microcomputer 101 does not operate.
[0098] (ワンチップマイコン 400の処理の内容) [0098] (Processing content of one-chip microcomputer 400)
つぎに、図 7〜図 9を用いて、本実施例にかかるワンチップマイコン 400の処理の内 容について説明する。図 7は、本実施例に力かるワンチップマイコンにおける更新用 プログラムの受け付け処理手順を示すフローチャートである。図 7のフローチャートに おいて、まず、入出力 IZF404によって、更新用プログラム送信側マイコン 502から プログラム更新準備完了通知を受け付けた力否かを判断する (ステップ S701)。プロ グラム更新準備完了通知は、たとえば、更新用プログラム送信側マイコン 502がフラ ッシュメモリ 503やその他外部機器から更新用プログラムを取得した場合、更新用プ ログラム送信側マイコン 502からワンチップマイコン 400に送信されることとしてもよい  Next, the processing contents of the one-chip microcomputer 400 according to the present embodiment will be described with reference to FIGS. FIG. 7 is a flowchart showing a procedure for accepting an update program in the one-chip microcomputer, which is useful in this embodiment. In the flowchart of FIG. 7, first, it is determined by the input / output IZF 404 whether or not the program update preparation completion notification has been received from the update program transmission side microcomputer 502 (step S701). The program update preparation completion notification is sent from the update program transmission side microcomputer 502 to the one-chip microcomputer 400 when the update program transmission side microcomputer 502 acquires the update program from the flash memory 503 or other external device, for example. May be
[0099] ステップ S701において、プログラム更新準備完了通知を受け付けるのを待って、 受け付けた場合 (ステップ S701 : Yes)は、ワンチップマイコン 400は、プログラム更 新モードへ移行し (ステップ S702)、 CPU401によって、更新用プログラム保存領域 512を初期化する (ステップ S 703)。更新用プログラム保存領域 512の初期化は、た とえば、更新用プログラム保存領域 512の容量を空きとすることでもよぐすなわち、 更新用プログラム保存領域 512に中途半端なデータがあった場合は消去することと してちよい。 [0099] In step S701, after waiting for acceptance of the program update preparation completion notice (step S701: Yes), the one-chip microcomputer 400 shifts to the program update mode (step S702), and the CPU 401 Then, the update program storage area 512 is initialized (step S703). The update program storage area 512 can be initialized by, for example, making the update program storage area 512 free, that is, if there is halfway data in the update program storage area 512 It is good to do.
[0100] つぎに、入出力 IZF404によって、ステップ S703において更新用プログラム保存 領域 512が初期化されたら、更新用プログラム送信側マイコン 502に対して、受け入 れ可能通知を出力する (ステップ S 704)。  [0100] Next, when the update program storage area 512 is initialized in step S703 by the input / output IZF404, an acceptance notification is output to the update program transmission side microcomputer 502 (step S704). .
[0101] そして、入出力 IZF404によって、ステップ S 704において出力された受け入れ可 能通知に応じて更新用プログラム送信側マイコン 502から出力される、更新用プログ ラムのデータをパケット受信する (ステップ S 705)。 [0101] Then, the input / output IZF 404 receives the update program data output from the update program transmission side microcomputer 502 in response to the acceptance notification output in step S704 (step S705). ).
[0102] つぎに、入出力 IZF404によって、ステップ S705においてパケット受信された更新 用プログラムのデータについて、更新用プログラム送信側マイコン 502に対して、パ ケット受信完了通知を出力する (ステップ S 706)。 [0103] つづいて、入出力 IZF404によって、更新用プログラムをすベて受信したか否かを 判断する (ステップ S 707)。更新用プログラムをすベて受信した力否かの判断は、た とえば、ステップ S705においてパケット受信される最後の更新用プログラムのデータ に付与されるフラグを受信した場合に、すべて受信したと判断する構成でもよ 、。 Next, the input / output IZF 404 outputs a packet reception completion notification to the update program transmitting side microcomputer 502 for the update program data received in step S705 (step S706). [0103] Next, it is determined whether or not all the update programs have been received by the input / output IZF 404 (step S707). For example, if it is determined whether or not all the update programs have been received, the flag added to the last update program data received in step S705 is determined to have been received. The configuration to do, too.
[0104] ステップ S707にお 、て、更新用プログラムをすベて受信した場合 (ステップ S707: Yes)は、 CPU401によって、更新用プログラム保存領域 512に一時保存される更新 用プログラムのチェックサムを確認する(ステップ S708)。チェックサムは、たとえば、 複数回に分割されてパケット受信される更新用プログラムが、すべて更新用プロダラ ム保存領域 512に一時保存されたか否かを判定することとしてもよ!/、。  [0104] If all the update programs are received in step S707 (step S707: Yes), the CPU 401 confirms the checksum of the update program temporarily stored in the update program storage area 512. (Step S708). The checksum can be, for example, to determine whether all update programs received in packets divided into multiple times have been temporarily stored in the update program storage area 512! /.
[0105] また、ステップ S 707にお 、て、更新用プログラムをすベて受信しな 、場合 (ステツ プ S707 :No) ίま、ステップ S705に戻って処理を繰り返す。  [0105] If all the update programs are not received in step S707 (step S707: No), the process returns to step S705 and the process is repeated.
[0106] つぎに、ステップ S708においてチェックサムを確認したら、 CPU401によって、有 効プログラム情報保存領域 510に更新用プログラム準備完了状態であることを書き 込む (ステップ S709)。更新用プログラム準備完了状態の書き込みは、たとえば、実 行対象プログラムの更新準備が完了した旨を示す更新情報を有効プログラム情報保 存領域 510に保存することである。  Next, when the checksum is confirmed in step S708, the CPU 401 writes that the update program is ready in the valid program information storage area 510 (step S709). The update program preparation completion state is written, for example, by storing update information indicating that preparation for update of the execution target program is completed in the valid program information storage area 510.
[0107] なお、図 7のフローチャートでは説明を省略する力 ステップ S708においてチェック サムが確認できない場合は、エラーとして、再度更新用プログラム送信側マイコン 50 2に対して、更新用プログラムを要求することとしてもよ!/、。  [0107] It should be noted that if the checksum cannot be confirmed in step S708, it is assumed that an error is requested again from the update program transmission side microcomputer 502 as an error. Moyo! /
[0108] そして、入出力 IZF404によって、更新用プログラム送信側マイコン 502に対して シャットダウン要求を出力する (ステップ S710)。その後、入出力 I/F404によって、 更新用プログラム送信側マイコン 502からステップ S710におけるシャットダウン要求 に応じたシャットダウン完了通知を受信して (ステップ S711)、一連の更新用プロダラ ムの受け付け処理を終了する。  Then, a shutdown request is output to the update program transmission side microcomputer 502 by the input / output IZF 404 (step S710). Thereafter, the input / output I / F 404 receives a shutdown completion notification in response to the shutdown request in step S710 from the update program transmission side microcomputer 502 (step S711), and ends a series of update program acceptance processing.
[0109] つづいて、図 8を用いて、本実施例に力かるワンチップマイコン 400の起動処理手 順について説明する。図 8は、本実施例に力かるワンチップマイコンの起動処理手順 を示すフローチャートである。図 8のフローチャートにおいて、まず、入出力 IZF404 によって、リセットスタートを受け付ける(ステップ S801)。 [0110] ステップ S801において、リセットスタートを受け付けると、 CPU401によって、 IPL 領域 514に保存された IPLを起動して (ステップ S802)、有効プログラム情報保存領 域 510を参照する(ステップ S803)。 [0109] Next, the startup processing procedure of the one-chip microcomputer 400, which is useful for the present embodiment, will be described with reference to FIG. FIG. 8 is a flowchart showing the start-up processing procedure of the one-chip microcomputer which is useful for this embodiment. In the flowchart of FIG. 8, first, a reset start is accepted by the input / output IZF 404 (step S801). [0110] When a reset start is accepted in step S801, the CPU 401 activates the IPL stored in the IPL area 514 (step S802) and refers to the valid program information storage area 510 (step S803).
[0111] そして、 CPU401によって、ステップ S803において参照された有効プログラム情報 保存領域 510の更新情報より、更新用プログラム準備は完了しているか否かを判断 する (ステップ S804)。更新用プログラム準備は、たとえば、有効プログラム情報保存 領域 510に更新用プログラム準備完了状態であることが書き込まれている(たとえば 、図 7に示したステップ S 709)力否かを判断することとしてもよい。  Then, the CPU 401 determines from the update information in the valid program information storage area 510 referred to in step S803 whether or not the update program preparation has been completed (step S804). In the update program preparation, for example, it is written that the update program preparation completion state is written in the effective program information storage area 510 (for example, step S709 shown in FIG. 7). Good.
[0112] ステップ S804において、更新用プログラム準備が完了している場合 (ステップ S80 4 : Yes)は、 CPU401によって、コピープログラムを起動させる(ステップ S805)。コピ 一プログラムは、たとえば、更新用プログラム保存領域 512に一時保存された更新用 プログラムを有効プログラム領域 513に保存された実行対象プログラムなど各種プロ グラムに上書き保存するプログラムでもよ 、。  In step S804, when the update program preparation is completed (step S80 4: Yes), the CPU 401 starts the copy program (step S805). The copy program may be, for example, a program that overwrites and saves an update program temporarily stored in the update program storage area 512 with various programs such as an execution target program stored in the effective program area 513.
[0113] そして、ステップ S805において起動されたコピープログラムによるコピーが終了す るのを待って(ステップ S806 :No)、終了した場合 (ステップ S806 :Yes)は、 CPU4 01によって、有効プログラム領域 513にコピーされたプログラムを検証する (ステップ S807)。プログラムの検証は、たとえば、更新用プログラムが実行対象プログラムとし て過不足なくコピーされた力否かを確認する構成でもよい。  [0113] Then, after waiting for the copy by the copy program activated in step S805 to end (step S806: No), if it ends (step S806: Yes), the CPU 401 writes the effective program area 513. The copied program is verified (step S807). The verification of the program may be, for example, a configuration in which it is confirmed whether or not the update program has been copied as an execution target program without excess or deficiency.
[0114] そして、ステップ S807においてプログラムの検証をおこなったら、 CPU401によつ て、有効プログラム情報保存領域 510に通常起動状態であることを書き込んで (ステ ップ S 808)、ステップ S 801へ戻って処理を繰り返す。  [0114] Then, after verifying the program in step S807, the CPU 401 writes that the program is in a normal activation state in the valid program information storage area 510 (step S808), and returns to step S801. Repeat the process.
[0115] なお、図 8のフローチャートでは説明を省略する力 ステップ S807においてプログ ラムの検証の結果、実行対象プログラムとして過不足なくコピーされて 、な 、場合は 、エラーとして、更新用プログラム保存領域 512からのコピーを再度おこなうこととして ちょい。  [0115] It should be noted that the description omitted in the flowchart of FIG. 8 As a result of verifying the program in step S807, the program to be executed is copied without excess or deficiency. You can copy it from again.
[0116] また、ステップ S804において、更新用プログラム準備が完了していない場合 (ステ ップ S804 :No)は、 CPU401によって、ステップ S803において参照された有効プロ グラム情報保存領域 510への書き込みが通常起動状態であるか否かを判断する (ス テツプ S809)。 [0116] If the update program preparation is not completed in step S804 (step S804: No), the CPU 401 normally writes to the valid program information storage area 510 referenced in step S803. Determine whether or not it is running Tape S809).
[0117] ステップ S809において、通常起動状態である場合 (ステップ S809 : Yes)は、 CPU 401によって、有効プログラム領域 513のプログラムを起動させる(ステップ S810)。  [0117] In step S809, if it is in the normal activation state (step S809: Yes), the CPU 401 activates the program in the valid program area 513 (step S810).
[0118] 具体的には、たとえば、有効プログラム領域 513のプログラムの起動は、 CPU401 によって、 Vector領域 515を参照して、仮想 Vector領域 601のアドレスを読み込む 。そして、 CPU401によって、仮想 Vector領域 601に保存された仮想初期起動プロ グラムによってアドレスが指定される実行対象プログラム a, b, cを実行することとして ちょい。  Specifically, for example, when the program in the effective program area 513 is activated, the CPU 401 reads the address of the virtual vector area 601 with reference to the vector area 515. Then, the CPU 401 executes the execution target programs a, b, and c whose addresses are specified by the virtual initial activation program stored in the virtual vector area 601.
[0119] また、ステップ S809において、通常起動状態でない場合 (ステップ S809 : No)は、 ステップ S801へ戻って処理を繰り返す。  [0119] Further, in step S809, when it is not in the normal activation state (step S809: No), the process returns to step S801 and is repeated.
[0120] つぎに、入出力 IZF404によって、割り込み処理を受け付けた力否かを判断する( ステップ S811)。ステップ S811において、割り込み処理を受け付けた場合 (ステップ S811 :Yes)は、 CPU401によって、割り込み処理をおこなって(ステップ S812)、プ ログラムが終了した力否かを判断する (ステップ S813)。なお、割り込み処理の詳細 は、図 9に後述する。  [0120] Next, it is determined by the input / output IZF 404 whether or not the interrupt process has been accepted (step S811). If interrupt processing is accepted in step S811 (step S811: Yes), the CPU 401 performs interrupt processing (step S812) and determines whether or not the program has ended (step S813). Details of the interrupt processing will be described later in FIG.
[0121] また、ステップ S811において、割り込み処理を受け付けない場合 (ステップ S811: No)は、ステップ S813へ移行して、プログラムが終了した力否かを判断する(ステツ プ S813)。  [0121] If interrupt processing is not accepted in step S811 (step S811: No), the process proceeds to step S813 to determine whether or not the program has ended (step S813).
[0122] ステップ S813において、プログラムが終了した場合 (ステップ S813 : Yes)は、ステ ップ S801へ戻って処理を繰り返す。また、ステップ S813において、プログラムが終 了しない場合 (ステップ S813 :No)は、ステップ S810へ戻って処理を繰り返す。  [0122] If the program ends in step S813 (step S813: Yes), the process returns to step S801 to repeat the process. If the program does not end in step S813 (step S813: No), the process returns to step S810 to repeat the process.
[0123] つぎに、図 9を用いて、本実施例に力かるワンチップマイコン 400における割り込み 処理(図 8のステップ S812)手順について説明する。図 9は、本実施例に力かるワン チップマイコンにおける割り込み処理(図 8のステップ S812)手順を示すフローチヤ ートである。図 9のフローチャートにおいて、まず、 CPU401によって、仮想 Vector領 域 601を参照する(ステップ S 901)。  Next, the procedure of interrupt processing (step S812 in FIG. 8) in the one-chip microcomputer 400, which is useful in the present embodiment, will be described with reference to FIG. FIG. 9 is a flowchart showing the procedure of interrupt processing (step S812 in FIG. 8) in the one-chip microcomputer, which is useful for this embodiment. In the flowchart of FIG. 9, first, the CPU 401 refers to the virtual vector area 601 (step S901).
[0124] つぎに、 CPU401によって、ステップ S901において参照された仮想 Vector領域 6 01に保存された仮想初期起動プログラムを起動させて、実行対象プログラム領域 60 2を参照する (ステップ S902)。 [0124] Next, the CPU 401 activates the virtual initial activation program stored in the virtual vector area 601 referred to in step S901, and executes the program area 60 to be executed. Refer to 2 (step S902).
[0125] そして、 CPU401によって、ステップ S902において参照された実行対象プログラム 領域 602に保存されたプログラムの中から実行対象となるプログラムを起動させて (ス テツプ S903)、一連の割り込み処理を終了する。 Then, the CPU 401 activates the program to be executed from the programs stored in the execution target program area 602 referred to in step S902 (step S903), and the series of interrupt processing ends.
[0126] 以上説明したように、本実施例に力かるワンチップマイコンによれば、更新用プログ ラム保存領域に保存された更新用プログラムによって実行対象プログラムを更新する ため、更新専用の外部機器を用意することなぐ適切に実行対象プログラムを更新す ることがでさる。 [0126] As described above, according to the one-chip microcomputer that works with the present embodiment, the execution target program is updated by the update program stored in the update program storage area. It is possible to update the execution target program appropriately without preparing it.
[0127] また、有効プログラム情報保存領域に更新用プログラム準備完了状態であることが 書き込まれてから、実行対象プログラムを更新する構成であるため、更新用プロダラ ム準備完了状態となる前に電源障害などが発生しても、復旧後にはワンチップマイコ ンは正常に起動することができる。  [0127] In addition, since the program to be executed is updated after the update program ready state is written in the valid program information storage area, a power failure occurs before the update program ready state is entered. Even if this occurs, the one-chip microcomputer can start up normally after recovery.
[0128] さらに、 Vector領域の書き換えをおこなわずに、仮想 Vector領域を含む有効プロ グラム領域を更新する構成であるため、更新途中に電源障害などが発生しても、復 旧後にはワンチップマイコンは正常に起動することができ、有効プログラム領域の効 率的な利用を図ることができる。  [0128] Furthermore, since the effective program area including the virtual vector area is updated without rewriting the vector area, even if a power failure occurs during the update, the one-chip microcomputer will not Can be started normally, and the effective program area can be used efficiently.
[0129] なお、本実施の形態で説明した情報処理方法は、あら力じめ用意されたプログラム をパーソナル 'コンピュータやワークステーションなどのコンピュータで実行することに より実現することができる。このプログラムは、ハードディスク、フレキシブルディスク、 CD-ROM, MO、 DVDなどのコンピュータで読み取り可能な記録媒体に記録され 、コンピュータによって記録媒体力も読み出されることによって実行される。またこの プログラムは、インターネットなどのネットワークを介して配布することが可能な伝送媒 体であってもよい。  Note that the information processing method described in the present embodiment can be realized by executing a prepared program on a computer such as a personal computer or a workstation. This program is recorded on a computer-readable recording medium such as a hard disk, a flexible disk, a CD-ROM, an MO, and a DVD, and is executed when the recording medium force is also read by the computer. The program may be a transmission medium that can be distributed through a network such as the Internet.

Claims

請求の範囲 The scope of the claims
[1] プログラム実行領域に保存された実行対象プログラムを実行する情報処理装置に おいて、  [1] In an information processing apparatus that executes an execution target program stored in a program execution area,
前記実行対象プログラムに対する更新用プログラムの入力を受け付ける更新用プ ログラム入力手段と、  An update program input means for receiving an input of an update program for the execution target program;
前記更新用プログラム入力手段によって入力された更新用プログラムを一時保存 領域に一時保存する一時保存手段と、  Temporary storage means for temporarily storing the update program input by the update program input means in a temporary storage area;
前記一時保存手段によって一時保存された更新用プログラムに過不足がないか否 かを判定する判定手段と、  Determining means for determining whether or not the update program temporarily stored by the temporary storage means is excessive or deficient;
前記判定手段によって判定された結果、前記更新用プログラムに過不足がな 、場 合、前記プログラム実行領域に保存された前記実行対象プログラムの更新準備が完 了した旨を示す更新情報を生成する生成手段と、  As a result of the determination by the determination means, if there is no excess or deficiency in the update program, generation that generates update information indicating that preparation for updating the execution target program stored in the program execution area is completed Means,
前記生成手段によって生成された更新情報を更新情報保存領域に保存する更新 情報保存手段と、  Update information storage means for storing the update information generated by the generation means in an update information storage area;
を備えることを特徴とする情報処理装置。  An information processing apparatus comprising:
[2] 前記更新用プログラム入力手段は、  [2] The update program input means includes:
さらに、前記判定手段によって判定された結果、前記更新用プログラムに過不足が ある場合、当該更新用プログラムの出力元に対して取得要求をおこなうことによって 当該更新用プログラムの入力を受け付けることを特徴とする請求項 1に記載の情報 処理装置。  Further, when the update program is determined to be excessive or deficient as a result of the determination, the update program accepts an input by making an acquisition request to the output source of the update program. The information processing apparatus according to claim 1.
[3] 自装置の再稼働に関する再稼働情報の入力を受け付ける再稼働情報入力手段と 前記再稼働情報入力手段によって再稼働情報が入力された場合、初期起動プロ グラム保存領域に保存された初期起動プログラムを起動させて、前記更新情報を参 照することによって前記更新準備が完了しているか否かを判断する判断手段と、 前記判断手段によって判断された結果、前記更新準備が完了している場合、前記 更新用プログラムを前記プログラム実行領域に複製することによって前記実行対象 プログラムを更新する更新手段と、 を備えることを特徴とする請求項 1または 2に記載の情報処理装置。 [3] Reactivation information input means for accepting input of reactivation information related to the restart of the own device, and when the reactivation information is input by the reactivation information input means, the initial activation stored in the initial activation program storage area A determination unit that determines whether or not the update preparation is completed by starting a program and referring to the update information; and when the update preparation is completed as a result of the determination by the determination unit Updating means for updating the execution target program by copying the update program to the program execution area; The information processing apparatus according to claim 1, further comprising:
[4] 前記更新手段は、 [4] The updating means includes:
前記プログラム実行領域に複製した前記更新用プログラムを検証することによって 、前記実行対象プログラムを実行可能な形式に更新することを特徴とする請求項 3に 記載の情報処理装置。  4. The information processing apparatus according to claim 3, wherein the update target program is updated to an executable format by verifying the update program copied to the program execution area.
[5] 前記判断手段によって判断された結果、前記更新準備が完了していない場合、前 記プログラム実行領域に保存された前記実行対象プログラムを実行する実行手段を 有することを特徴とする請求項 3に記載の情報処理装置。  [5] The execution means for executing the execution target program stored in the program execution area when the update preparation is not completed as a result of the determination by the determination means. The information processing apparatus described in 1.
[6] 前記更新用プログラムは、前記実行対象プログラムとして実行される際に、前記初 期起動プログラムによって実行される仮想初期起動プログラムを含み、  [6] The update program includes a virtual initial startup program executed by the initial startup program when executed as the execution target program,
前記実行手段は、  The execution means includes
前記仮想初期起動プログラムの実行にしたがって、前記プログラム実行領域に保 存された前記実行対象プログラムを実行することを特徴とする請求項 3に記載の情報 処理装置。  4. The information processing apparatus according to claim 3, wherein the execution target program stored in the program execution area is executed in accordance with the execution of the virtual initial activation program.
[7] 前記プログラム実行領域は、前記仮想初期起動プログラムを保存する仮想プロダラ ム保存領域を備え、  [7] The program execution area includes a virtual program storage area for storing the virtual initial startup program,
前記更新手段は、  The updating means includes
前記前記仮想初期起動プログラムを、前記仮想プログラム保存領域に複製すること によって、前記実行対象プログラムを更新することを特徴とする請求項 6に記載の情 報処理装置。  7. The information processing apparatus according to claim 6, wherein the execution target program is updated by copying the virtual initial activation program to the virtual program storage area.
[8] プログラム実行領域に保存された実行対象プログラムを実行する情報処理方法に おいて、  [8] In an information processing method for executing an execution target program stored in a program execution area,
前記実行対象プログラムに対する更新用プログラムの入力を受け付ける更新用プ ログラム入力工程と、  An update program input step for receiving an input of an update program for the execution target program;
前記更新用プログラム入力工程によって入力された更新用プログラムを一時保存 領域に一時保存する一時保存工程と、  A temporary storage step of temporarily storing the update program input in the update program input step in the temporary storage area;
前記一時保存工程によって一時保存された更新用プログラムに過不足がないか否 かを判定する判定工程と、 前記判定工程によって判定された結果、前記更新用プログラムに過不足がな 、場 合、前記プログラム実行領域に保存された前記実行対象プログラムの更新準備が完 了した旨を示す更新情報を生成する生成工程と、 A determination step of determining whether or not the update program temporarily stored in the temporary storage step is excessive or deficient; As a result of the determination in the determination step, if there is no excess or deficiency in the update program, generation that generates update information indicating that preparation for updating the execution target program stored in the program execution area is completed Process,
前記生成工程によって生成された更新情報を更新情報保存領域に保存する更新 情報保存工程と、  An update information storage step for storing the update information generated by the generation step in an update information storage area;
を含むことを特徴とする情報処理方法。  An information processing method comprising:
[9] 請求項 8に記載の情報処理方法をコンピュータに実行させることを特徴とする情報 処理プログラム。  [9] An information processing program causing a computer to execute the information processing method according to claim 8.
[10] 請求項 9に記載の情報処理プログラムを記録したことを特徴とするコンピュータに読 み取り可能な記録媒体。  [10] A computer-readable recording medium in which the information processing program according to claim 9 is recorded.
PCT/JP2006/319881 2006-10-04 2006-10-04 Information processing device, information processing method, information processing program and computer readable recording medium WO2008041337A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2008537391A JP5016604B2 (en) 2006-10-04 2006-10-04 Information processing apparatus and information processing method
PCT/JP2006/319881 WO2008041337A1 (en) 2006-10-04 2006-10-04 Information processing device, information processing method, information processing program and computer readable recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2006/319881 WO2008041337A1 (en) 2006-10-04 2006-10-04 Information processing device, information processing method, information processing program and computer readable recording medium

Publications (1)

Publication Number Publication Date
WO2008041337A1 true WO2008041337A1 (en) 2008-04-10

Family

ID=39268205

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2006/319881 WO2008041337A1 (en) 2006-10-04 2006-10-04 Information processing device, information processing method, information processing program and computer readable recording medium

Country Status (2)

Country Link
JP (1) JP5016604B2 (en)
WO (1) WO2008041337A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020017315A (en) * 2019-10-21 2020-01-30 パナソニックIpマネジメント株式会社 Control method and communication device using the same

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09238213A (en) * 1996-02-29 1997-09-09 Ricoh Co Ltd Communication equipment
WO1997038367A1 (en) * 1996-04-11 1997-10-16 Hitachi, Ltd. Disk drive and computer
JP2002244877A (en) * 2001-02-19 2002-08-30 Nec Corp Printer device and program updating method for the same
JP2005332228A (en) * 2004-05-20 2005-12-02 Nec Engineering Ltd Program switching controller
JP2006060355A (en) * 2004-08-18 2006-03-02 Matsushita Electric Ind Co Ltd Update system and method for equipment program

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2002007128A (en) * 2000-06-19 2002-01-11 Nec Soft Ltd Module distribution and preservation system and module distribution and preservation method
JP2002063044A (en) * 2000-08-21 2002-02-28 Matsushita Electric Ind Co Ltd Arithmetic unit and program-rewriting method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09238213A (en) * 1996-02-29 1997-09-09 Ricoh Co Ltd Communication equipment
WO1997038367A1 (en) * 1996-04-11 1997-10-16 Hitachi, Ltd. Disk drive and computer
JP2002244877A (en) * 2001-02-19 2002-08-30 Nec Corp Printer device and program updating method for the same
JP2005332228A (en) * 2004-05-20 2005-12-02 Nec Engineering Ltd Program switching controller
JP2006060355A (en) * 2004-08-18 2006-03-02 Matsushita Electric Ind Co Ltd Update system and method for equipment program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2020017315A (en) * 2019-10-21 2020-01-30 パナソニックIpマネジメント株式会社 Control method and communication device using the same

Also Published As

Publication number Publication date
JP5016604B2 (en) 2012-09-05
JPWO2008041337A1 (en) 2010-02-04

Similar Documents

Publication Publication Date Title
JP5431111B2 (en) Information processing apparatus and system setting method
KR100584338B1 (en) Method and system for updating software
CN109189445A (en) A kind of method of internet of things equipment program upgrading
CN112947977A (en) Software online upgrading method and system
JP2005157528A (en) Memory device
JP2004046453A (en) Single chip microcomputer and boot sector switching method
CN115145650A (en) Information processing apparatus, storage medium, and information processing method
JP2002244877A (en) Printer device and program updating method for the same
JP5747680B2 (en) Information processing apparatus, image forming apparatus, and program
WO2008041337A1 (en) Information processing device, information processing method, information processing program and computer readable recording medium
JP5080318B2 (en) Image processing apparatus and access control method
JPH10269075A (en) Method for updating operation control information, and data processor using the same
JP2002189609A (en) System and method for updating software adapted to accident
JP2004220575A (en) Interface circuit of card type memory, asic carrying its circuit and image forming apparatus carrying asic
JP2015215684A (en) Information processing apparatus and information processing program
JP5895609B2 (en) Information processing apparatus, image forming apparatus, and program
JP2021089643A (en) Electronic control apparatus and electronic control method
JP2003271420A (en) Electronic control device
JP5418348B2 (en) Information processing apparatus and karaoke apparatus
JP2001344156A (en) Device with flash memory and data rewriting method
JP2013004043A (en) Information processing device, image forming apparatus, and program
JP2005032014A (en) Data processor, starting program for data processor, and starting method for data processor
JP7491765B2 (en) Firmware update system and firmware update method
JP7291541B2 (en) Control device and monitoring method
JP2005078336A (en) Image forming apparatus and program rewriting method for image forming apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 06811221

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 2008537391

Country of ref document: JP

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 06811221

Country of ref document: EP

Kind code of ref document: A1