CN112860333A - Program operation method and device of control device and clothes treatment equipment - Google Patents

Program operation method and device of control device and clothes treatment equipment Download PDF

Info

Publication number
CN112860333A
CN112860333A CN201911185153.7A CN201911185153A CN112860333A CN 112860333 A CN112860333 A CN 112860333A CN 201911185153 A CN201911185153 A CN 201911185153A CN 112860333 A CN112860333 A CN 112860333A
Authority
CN
China
Prior art keywords
program
application program
boot
control device
running
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911185153.7A
Other languages
Chinese (zh)
Inventor
官新强
王道河
黄静莉
邢汝佳
孔令钦
田万松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Haier Washing Machine Co Ltd
Haier Smart Home Co Ltd
Original Assignee
Qingdao Haier Washing Machine Co Ltd
Haier Smart Home Co Ltd
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 Qingdao Haier Washing Machine Co Ltd, Haier Smart Home Co Ltd filed Critical Qingdao Haier Washing Machine Co Ltd
Priority to CN201911185153.7A priority Critical patent/CN112860333A/en
Publication of CN112860333A publication Critical patent/CN112860333A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44568Immediately runnable code
    • G06F9/44578Preparing or optimising for loading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44594Unloading

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of single-chip microcomputers, and particularly provides a program running method and device of a control device and clothes processing equipment, aiming at solving the problem that all programs in a Read Only Memory (ROM) can run normally when the storage space of a Random Access Memory (RAM) is small or a part of programs occupies a large storage space. In the program running method of the control device in the embodiment of the invention, each application program is configured with an individual starting program, when a certain application program needs to be run, the control device is initialized by the starting program of the application program to clear all storage spaces of the RAM memory and all the cleared storage spaces are all allocated to the application program for use, so that not only can the hardware environment and the software environment of the control device be configured for the running of the application program, but also sufficient data storage space can be provided for the running of the application program by clearing all the storage spaces of the RAM memory, and the normal running of the application program can be ensured.

Description

Program operation method and device of control device and clothes treatment equipment
Technical Field
The invention relates to the technical field of single-chip microcomputers, in particular to a program running method and device of a control device and clothes treatment equipment.
Background
A Single-Chip Microcomputer (Single-Chip Microcomputer) is a circuit Chip integrating structures such as a processor with a data processing function, a Read-Only Memory (ROM), a Random Access Memory (RAM), and the like, wherein the ROM is used for storing fixed programs, the RAM is used for storing running data generated/used during the running of the programs, and in order to ensure that each program in the ROM can run normally, a data storage area needs to be allocated to each program in the RAM. However, when the storage space of the RAM is small or the storage space occupied by a part of the programs is large, a storage area with sufficient storage space cannot be allocated to all the programs, and a part of the programs cannot operate normally.
Accordingly, there is a need in the art for a new program execution scheme to address the above-mentioned problems.
Disclosure of Invention
In order to overcome the above-mentioned drawbacks, the present invention is proposed to provide a program operating method and apparatus for a control apparatus, and a clothes treating apparatus, which solve or at least partially solve the problem of how to enable all programs in a ROM to operate normally when a RAM storage space is small or a part of a program occupies a large storage space.
In a first aspect, a program execution method of a control device is provided, including: the ROM memory in the control device stores a plurality of application programs and a starting program corresponding to each application program; a RAM memory in the control apparatus stores operation data generated/used when an application program in the ROM memory is operated; when an application program is to be run, a starting program corresponding to the application program carries out initialization processing on the control device so as to clear all storage spaces of the RAM memory and allocate all the storage spaces to the application program for use, and then the application program is run.
The method includes that a ROM memory in the control device stores a plurality of application programs and a starting program corresponding to each application program, and specifically includes: the ROM memory comprises a Boot area and a User area, the Boot area is configured to store Boot applications capable of performing upgrading work on the User area, and the User area is configured to store the User applications and corresponding Boot programs.
When an application program is to be run, a startup program corresponding to the application program performs initialization processing on the control device to clear all storage spaces of the RAM memory and allocate all storage spaces to the application program for use, and then the application program is run, specifically including:
after a control device is started or reset, initializing the control device through a starting program corresponding to the Boot application program to clear all storage spaces of the RAM memory and allocate all the storage spaces to the Boot application program for use;
acquiring a program jump flag bit of a current ROM, and judging whether to run a User application program according to the program jump flag bit and the address of the User area; if so, jumping to a User area, initializing the control device again through a starting program corresponding to the User application program in the User area to clear all storage spaces of the RAM memory and allocate all the storage spaces to the User application program for use, and then running the User application program; and if not, skipping to the Boot area according to the address of the Boot area and running the Boot application program in the Boot area.
Wherein after running the Boot application, the method further comprises: resetting the program jump flag bit according to the address of the User area so as to jump to the User area according to the program jump flag bit and run the User application program in the User area after a control device is started or reset; or, running the User application specifically includes: detecting whether a User application program updating instruction is received or not in real time through the User application program; and if a User application program updating instruction is received, resetting a program jump flag bit according to the address of the Boot area and running a reset interrupt program so as to reset the control device through the reset interrupt program.
The number of the Boot areas is multiple, and each Boot area stores a Boot application program; wherein, the initializing the control device by the Boot application program corresponding to the Boot application program to clear all the storage spaces of the RAM memory and allocate all the storage spaces to the Boot application program for use, further comprises: selecting a Boot application program with the highest running priority according to the running priority of a preset Boot application program; and initializing the control device through a Boot program corresponding to the Boot application program with the highest running priority to clear all storage spaces of the RAM memory and allocate all storage spaces to the Boot application program with the highest running priority for use.
Skipping to a Boot area according to the address of the Boot area and running the Boot application program in the Boot area, specifically comprising: and skipping to a corresponding Boot area according to the address of the Boot area storing the Boot application program with the highest running priority, and running the Boot application program with the highest running priority in the Boot area.
The ROM memory in the control device further stores an interrupt vector table corresponding to each application program, and the application programs are operated; and/or the ROM memory in the control device further stores a ROM memory space allocation program corresponding to each application program;
wherein, the ROM memory in the control device further stores an interrupt vector table corresponding to each application program, and the running of the application program specifically includes: the method comprises the steps of running a main program of a current application program and setting an interrupt flag bit so that the main program can obtain an address of an interrupt handling program of the current application program from an interrupt vector table corresponding to the current application program according to the interrupt selection flag bit after detecting an interrupt signal, and then jumping to the corresponding interrupt handling program according to the address and running the interrupt handling program; and/or the ROM memory in the control device further stores a ROM storage space allocation program corresponding to each application program, and specifically includes: and respectively allocating a ROM storage area for each application program through the corresponding ROM storage space allocation program of each application program.
In a second aspect, a control device is provided, which comprises a processor, a ROM memory and a RAM memory, wherein the ROM memory is used for storing a plurality of application programs and a starting program, an interrupt vector table and a ROM memory allocation program which are respectively corresponding to each application program, and the RAM memory is used for storing running data generated/used when the application programs in the ROM memory run; the ROM memory is also used for storing a program for executing the program running method of the control device, and the processor is configured to execute the program stored in the ROM memory.
In a third aspect, a clothes treating apparatus is provided, which comprises a clothes treating apparatus body and the control device, wherein the control device is arranged on the clothes treating apparatus body.
One or more technical schemes of the invention at least have one or more of the following beneficial effects:
in the technical scheme of implementing the invention, each application program is configured with an individual starting program, when a certain application program needs to be operated, the starting program of the application program is used for carrying out initialization processing on the control device so as to clear all storage spaces of the RAM memory and completely allocate all the cleared storage spaces to the application program for use, so that not only can the hardware environment and the software environment of the control device be configured for the operation of the application program, but also sufficient data storage space can be provided for the operation of the application program by clearing all the storage spaces of the RAM memory, and the normal operation of the application program can be ensured.
Furthermore, each application program is configured with an independent interrupt vector table and a ROM storage space allocation program, so that each application program is completely independent from each other and does not influence each other, and the normal operation of the application programs is further ensured.
Drawings
Embodiments of the invention are described below with reference to the accompanying drawings, in which:
fig. 1 is a flowchart of main steps of a program running method of a control apparatus according to an embodiment of the present invention;
fig. 2 is a flow chart of the main steps of a method for allocating memory space of a RAM memory of a control device according to an embodiment of the invention.
Detailed Description
Some embodiments of the invention are described below with reference to the accompanying drawings in conjunction with a single-chip microcomputer. It should be understood by those skilled in the art that these embodiments are only for explaining the technical principle of the present invention, and are not intended to limit the scope of the present invention. The solution according to the invention can obviously also be applied to control devices having other forms, without departing from the basic principle of the invention.
In the description of the present application, a "processor" may include hardware, software, or a combination of both. The processor may be a central processing unit, a microprocessor, or any other suitable processor. The processor has data and/or signal processing functionality. The processor may be implemented in software, hardware, or a combination thereof. Non-transitory computer readable storage media include any suitable medium that can store program code, such as magnetic disks, hard disks, optical disks, flash memory, read-only memory, random-access memory, and the like. The term "a and/or B" denotes all possible combinations of a and B, such as a alone, B alone or a and B. The term "at least one A or B" or "at least one of A and B" means similar to "A and/or B" and may include only A, only B, or both A and B. The singular forms "a", "an" and "the" may include the plural forms as well. A User application (User application) refers to main computer code that is stored in a User area of the ROM memory and used for implementing functions of the control device, and a Boot application (Bootloader) refers to a program that is stored in the Boot area of the ROM memory and used for controlling the User application in the User area, such as erasing and programming the computer code in the User area (for example, erasing an original User application and then programming a new User application when upgrading the User application).
In the prior art, a Boot area and a User area are arranged in a ROM memory of a control device such as a single chip microcomputer, the Boot area is configured to store a Boot application program capable of performing upgrading work on the User area, and the User area is configured to store the User application program. After the single chip microcomputer is powered on and started or reset, a Boot application program firstly initializes the single chip microcomputer to configure the operating environment required by all application programs stored in a ROM (read only memory), and the operating environment configuration comprises but is not limited to: and respectively allocating storage spaces of the RAM memory for Boot applications, User applications and other applications, so that each application can store operation data generated and/or used by operation in the corresponding RAM storage space during operation. Subsequently, the Boot application will detect whether a User application upgrade instruction is received. If the Boot application program detects a User application program upgrading instruction, the Boot application program can completely erase the User application program in the User area and rewrite a new User application program, and after the erasing and the rewriting are completed, the Boot application program jumps to the User area, and then the new User application program is operated in the User area. If the Boot application program does not detect a User application program upgrading instruction, the single chip microcomputer is initialized and then directly jumps to a User area, and then the User application program is operated in the User area. Further, when the User application program is operated, if the User application program detects a User application program upgrading instruction, the User application program interrupts operation, and the single chip microcomputer immediately jumps to the Boot area after the User application program is interrupted, so that the Boot application program is operated again in the Boot area, and at this time, the operation process of the Boot application program is the same as that of the Boot application program, and is not described herein again.
As can be seen from the above, all the application programs (such as Boot application program, User application program, other application programs, etc.) stored in the ROM memory of the single chip microcomputer share one start program, and when the single chip microcomputer is started or reset, the start program configures the software and hardware environment of the single chip microcomputer according to the operation requirements of all the application programs. Meanwhile, data used when the Boot application program erases and programs the User application program can be stored in the RAM through a Boot program, when the User application program needs to be erased and programmed, the Boot application program can call the data to erase and program the User application program, the data are still stored in the RAM to continuously occupy the storage space of the RAM after the erasing and programming work is finished, and when the storage space of the RAM is small or the storage space occupied by the Boot application program is large, the storage space of the RAM may be insufficient, so that the normal operation of all the application programs cannot be guaranteed. For example, in a certain single chip microcomputer provided by the rassa technology, the storage space of the RAM memory is 2K, the storage space required to be occupied by the database of the Boot application program is 1300B, and the Boot application program itself also occupies at least several hundred bytes of storage space, when the single chip microcomputer is started, the Boot program allocates most of the storage space of the RAM memory to the Boot application program for use, and other application programs almost have no available storage space.
In the embodiment of the invention, each application program (such as a User application program and a Boot application program) is configured with an independent startup program, when a certain application program needs to be run, the startup program of the application program initializes the single chip microcomputer to clear all storage spaces of the RAM memory and completely allocate all the storage spaces after clearing to the application program for use, namely, the startup program can not only configure the hardware environment and the software environment of the control device for the running of the application program, but also provide sufficient running data (running data generated/used during the running of the application program) storage spaces for the running of the application program by clearing all the storage spaces of the RAM memory, thereby ensuring the normal running of the application program.
Referring first to fig. 1, fig. 1 is a flowchart illustrating main steps of a program operating method of a control device such as a single chip microcomputer according to an embodiment of the present invention. In this embodiment, the control device includes a ROM memory that stores a plurality of application programs and a boot program corresponding to each application program, and a RAM memory that stores operation data generated/used when the application programs in the ROM memory are operated. The application program stored in the ROM refers to computer program code written in a computer coding language for the purpose of realizing a certain application of the control apparatus, and for example, the application program may be a system application program, a driver application program, or the like. The starting procedure of the application program refers to preprocessing the hardware configuration and the software configuration of the control device before the application program is run, so that the hardware environment and the software environment of the control device both meet the running requirements of the application program. For example, a stack pointer and a program counter pointer of the single chip microcomputer are initialized, sizes of the stack and the heap are set, and an external Static Random-Access Memory (SRAM) is configured as a data Memory, and the like. In addition, in this embodiment, the start-up program may also clear all the storage spaces of the RAM memory and allocate all the storage spaces after the clearing to the corresponding application program for use, so that the application program may utilize all the storage spaces of the RAM memory to store the operation data required for operation and the operation data generated by operation during operation. As shown in fig. 1, the program running method of the control device in the present embodiment mainly includes the following steps:
step S101: when an application program is to be run, the startup program corresponding to the application program performs initialization processing on the control device to clear all the storage space of the RAM memory and allocate all the storage space to the application program for use.
In an embodiment, the ROM memory may include a Boot area and a User area, the Boot area may be configured to store a Boot application program capable of performing an upgrade operation on the User area, the User area may be configured to store a User application program and a corresponding Boot program, and the Boot program of the Boot application program may be stored in other storage areas of the ROM memory. The following describes a storage space allocation method of the RAM memory in this embodiment with reference to fig. 2 (that is, when an application is to be run, a startup program corresponding to the application performs initialization processing on the control device to clear all storage spaces of the RAM memory and allocate all storage spaces to the application for use). Referring to fig. 2, fig. 2 is a flowchart illustrating the main steps of a method for allocating a storage space of a RAM memory of a control device, such as a single chip microcomputer, according to an embodiment of the present invention. In this embodiment, the method for allocating the storage space of the RAM memory mainly includes the following steps:
step S1011: after the control device is started or reset, the control device is initialized through a Boot program corresponding to the Boot application program so as to clear all storage spaces of the RAM memory and allocate all the storage spaces to the Boot application program for use.
The control device is started, namely the control device is powered on again in a power-off state, and the control device is reset, namely the control device is operated again according to a reset signal in a power-on state. For example, the reset of the single chip microcomputer may be that a reset signal is input at a reset end of the single chip microcomputer, and the single chip microcomputer operates again after detecting the reset signal.
Further, in an embodiment, the number of Boot areas may be multiple, and each Boot area stores a type of Boot application program, in this case, step S1011 may be: after the control device is started or reset, selecting a Boot application program with the highest operation priority according to the operation priority of a preset Boot application program; and initializing the control device by a Boot program for running the Boot application program with the highest priority so as to clear all storage spaces of the RAM and allocate all storage spaces to the Boot application program with the highest running priority for use.
It is to be noted that, although the embodiment of the present invention selects and runs the Boot application according to the running priority of the Boot application, it will be understood by those skilled in the art that the scope of the present invention is obviously not limited to this specific implementation. Without departing from the principle of the present invention, a person skilled in the art may select a Boot application from multiple Boot applications to run by other methods, and such modifications or replacements will fall within the protection scope of the present invention.
Step S1012: and acquiring a program jump flag bit of the current ROM.
The program jump flag bit contains address information of the storage area of the application program in the ROM, and the corresponding storage area can be jumped to according to the address information, so that the corresponding application program can be operated in the storage area. For example, when the program jump flag is a Boot jump flag, the program jump flag includes an address of the Boot area, and the program can jump to the Boot area according to the address. Furthermore, after the program jump flag bit is set, the program jump flag bit is stored in a public storage area, and each application program can access the program jump flag bit.
Step S1013: and judging whether to run the User application program or not according to the program jump flag bit and the address of the User area.
Specifically, if the address information in the program jump flag bit is the same as the address of the User area, it is determined that the User application needs to be run, and then the process may proceed to step S1014; if the address information in the program jump flag is different from the address of the User area, it is determined that the User application does not need to be run, and then the process may proceed to step S1015.
Step S1014: jumping to the User area, and initializing the control device again in the User area through a starting program corresponding to the User application program so as to clear all storage spaces of the RAM memory and allocate all storage spaces to the User application program for use.
Step S1015: no memory space of the RAM memory is allocated to the User application.
In the embodiment, both the Boot application program and the User application program are configured with separate Boot programs, when the Boot application program or the User application program needs to be operated, the single chip microcomputer is initialized through the Boot program corresponding to the Boot application program or the User application program to clear all storage spaces of the RAM memory and all the cleared storage spaces are allocated to the Boot application program or the User application program for use, and sufficient storage spaces of operation data (operation data generated/used during the operation of the application program) are provided for the operation of the Boot application program or the User application program, so that the normal operation of the Boot application program or the User application program is ensured.
Step S102: and running the application program.
In one embodiment, the ROM memory may further store an interrupt vector table corresponding to each application program, the application programs may include a main program and an interrupt handler, and running the application program may include the steps of: the method comprises the steps of firstly running a main program of a current application program and setting an interrupt flag bit, acquiring an address of an interrupt handling program of the current application program from an interrupt vector table of the current application program according to the interrupt flag bit if an interrupt signal is detected in the running process of the main program, then jumping to the corresponding interrupt handling program according to the address, and then running the interrupt handling program.
The main program refers to a main function of the computer program, the interrupt processing program refers to an interrupt function of the computer program, the interrupt vector table refers to a storage space for storing interrupt vectors, the interrupt vectors refer to entry addresses of the interrupt processing program or addresses of a storage area for storing the interrupt processing program, the addresses corresponding to the interrupt processing program can be obtained by inquiring the interrupt vector table, and the interrupt processing program can be jumped to according to the addresses.
In one embodiment, the ROM memory may further store a ROM storage space allocation program corresponding to each application program, and before executing step S101, a ROM storage area may be further allocated to each application program by the ROM storage space allocation program corresponding to each application program, so as to store each application program. In the prior art, all application programs stored in a ROM memory of a control device such as a singlechip share one interrupt vector table and a ROM storage space allocation program, and in the embodiment of the invention, the interrupt vector table and the ROM storage space allocation program are respectively set for each application program, so that each application program is completely independent from each other and does not influence each other, and the normal operation of the application programs is further ensured.
With continuing reference to fig. 2, in the embodiment shown in fig. 2, when the determination result of step S1013 is that the User application needs to be run, step S1016 is further included after step S1014 is executed, where step S1016 specifically is: the User application is run directly in the User area. When the determination result in step S1013 is that the User application does not need to be run, step S1017 is further included after step S1015 is executed, where step S1017 specifically is: and skipping to the Boot area according to the address of the Boot area and running a Boot application program in the Boot area. Further, when the number of Boot areas may be multiple and each Boot area stores a type of Boot application, step S1017 may also be: and skipping to a corresponding Boot area according to the address of the Boot area of the Boot application program with the highest running priority, and running the Boot application program with the highest running priority in the Boot area.
Further, when the User application program is operated, whether a User application program updating instruction is received or not can be detected in real time through the User application program, and whether the Boot application program is operated or not is judged according to a detection result. The User application update command is a command for performing a program update (i.e., erasing an original User application and rewriting a new User application, such as upgrading the User application) on a User application in a User area in the ROM memory.
Specifically, when a User application program updating instruction is detected, it indicates that program updating needs to be performed on a User application program in a ROM memory, at this time, address information in a program jump flag is set as an address of a Boot area and a reset interrupt program is run, after the reset interrupt program is run, all storage spaces of a RAM memory can be allocated to the Boot application program by executing step S1011, and the Boot application program is run by executing steps S1012 to S1017, thereby completing program updating of the User application program. And when the User application program updating instruction is not detected, continuing to run the User application program and detecting whether the User application program updating instruction is received or not in real time through the User application program.
Furthermore, after the Boot application program is completely run, the program jump flag bit can be reset through the Boot application program, so that the User application program can be run after the control device is started or reset.
Specifically, after the Boot application program is completely run, the program jump flag bit is reset according to the address of the User area, so that the User application program can jump to the User area according to the program jump flag bit and run in the User area after the control device is started or reset. Such as the execution of the User application by performing steps S1011 to S1016.
It is to be noted that, although the foregoing embodiments describe each step in a specific sequential order, those skilled in the art will understand that, in order to achieve the effect of the present invention, different steps do not necessarily need to be executed in such an order, and they may be executed simultaneously (in parallel) or in other orders, and these changes are all within the scope of the present invention.
Based on the method embodiment, the invention also provides a control device embodiment. In an embodiment of the control device, the control device may include a processor, a ROM memory and a RAM memory, the ROM memory may store a plurality of application programs and a boot program, an interrupt vector table and a ROM memory allocation program corresponding to each application program, respectively, and the RAM memory may store operation data generated/used when the application programs in the ROM memory are operated; wherein the ROM memory may further store a program for executing the program execution method of the control device of the above-mentioned method embodiment, and the processor may be configured to execute the program in the ROM memory, which includes, but is not limited to, the above-mentioned application program, the startup program, and the program for executing the program execution method of the control device of the above-mentioned method embodiment. In this embodiment, the processor, the ROM memory, the RAM memory, the application program and the start program thereof, the interrupt vector table and the ROM storage space allocation program are respectively the same as those in the above method embodiments, and are not described herein again for brevity of description. For convenience of explanation, only the parts related to the embodiments of the present invention are shown, and details of the specific techniques are not disclosed. The control device may be a control device formed by various electronic devices, and optionally, the control device in the embodiment of the present invention is a single chip microcomputer.
Based on the device embodiment, the invention also provides a clothes treatment device embodiment. In the laundry treating apparatus embodiment, the laundry treating apparatus may include a laundry treating apparatus body and the control device of the above device embodiment, which may be provided on the laundry treating apparatus body. Optionally, in this embodiment, the clothes treating apparatus body may include a clothes washing apparatus and/or a clothes washing and drying machine.
It will be understood by those skilled in the art that all or part of the flow of the method according to the above-described embodiment may be implemented by a computer program, which may be stored in a computer-readable storage medium and used to implement the steps of the above-described embodiments of the method when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying said computer program code, media, usb disk, removable hard disk, magnetic diskette, optical disk, computer memory, read-only memory, random access memory, electrical carrier wave signals, telecommunication signals, software distribution media, etc. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
According to the program running method of the control device, the independent starting program is configured for each application program, when a certain application program needs to be run, the control device is initialized through the starting program of the application program, all storage spaces of the RAM memory are cleared completely, all the cleared storage spaces are all allocated to the application program for use, the hardware environment and the software environment of the control device can be configured for the running of the application program, and sufficient data storage space can be provided for the running of the application program by clearing all the storage spaces of the RAM memory, so that the normal running of the application program is ensured.
So far, the technical solutions of the present invention have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present invention is obviously not limited to these specific embodiments. Equivalent changes or substitutions of related technical features can be made by those skilled in the art without departing from the principle of the invention, and the technical scheme after the changes or substitutions can fall into the protection scope of the invention.

Claims (10)

1. A program execution method of a control apparatus, the method comprising:
the ROM memory in the control device stores a plurality of application programs and a starting program corresponding to each application program;
a RAM memory in the control apparatus stores operation data generated/used when an application program in the ROM memory is operated;
when an application program is to be run, a starting program corresponding to the application program carries out initialization processing on the control device so as to clear all storage spaces of the RAM memory and allocate all the storage spaces to the application program for use, and then the application program is run.
2. The program executing method of the control device according to claim 1, wherein the ROM memory in the control device stores a plurality of application programs and a respective corresponding start-up program for each application program, and specifically includes:
the ROM memory comprises a Boot area and a User area, the Boot area is configured to store Boot applications capable of performing upgrading work on the User area, and the User area is configured to store the User applications and corresponding Boot programs.
3. The program running method of the control device according to claim 2, wherein when an application program is to be run, a startup program corresponding to the application program initializes the control device to clear all memory spaces of the RAM memory and allocate all memory spaces to the application program for use, and then runs the application program, specifically including:
after a control device is started or reset, initializing the control device through a starting program corresponding to the Boot application program to clear all storage spaces of the RAM memory and allocate all the storage spaces to the Boot application program for use;
acquiring a program jump flag bit of a current ROM, and judging whether to run a User application program according to the program jump flag bit and the address of the User area; if so, jumping to a User area, initializing the control device again through a starting program corresponding to the User application program in the User area to clear all storage spaces of the RAM memory and allocate all the storage spaces to the User application program for use, and then running the User application program; and if not, skipping to the Boot area according to the address of the Boot area and running the Boot application program in the Boot area.
4. The program execution method of a control device according to claim 3,
after the Boot application program is run, the method further comprises the following steps: resetting the program jump flag bit according to the address of the User area so as to jump to the User area according to the program jump flag bit and run the User application program in the User area after a control device is started or reset; alternatively, the first and second electrodes may be,
the running of the User application specifically comprises: detecting whether a User application program updating instruction is received or not in real time through the User application program; and if a User application program updating instruction is received, resetting a program jump flag bit according to the address of the Boot area and running a reset interrupt program so as to reset the control device through the reset interrupt program.
5. The program execution method of the control device according to claim 3 or 4, characterized by further comprising: the number of the Boot areas is multiple, and each Boot area stores a Boot application program; wherein the content of the first and second substances,
the initializing the control device by the Boot application program corresponding to the Boot application program to clear all storage spaces of the RAM memory and allocate all storage spaces to the Boot application program for use, further comprising:
selecting a Boot application program with the highest running priority according to the running priority of a preset Boot application program; and initializing the control device through a Boot program corresponding to the Boot application program with the highest running priority to clear all storage spaces of the RAM memory and allocate all storage spaces to the Boot application program with the highest running priority for use.
6. The program running method of the control device according to claim 5, wherein jumping to a Boot area according to an address of the Boot area and running the Boot application program in the Boot area specifically include:
and skipping to a corresponding Boot area according to the address of the Boot area storing the Boot application program with the highest running priority, and running the Boot application program with the highest running priority in the Boot area.
7. The program execution method of the control device according to any one of claims 1 to 4, characterized by further comprising:
the ROM memory in the control device also stores an interrupt vector table corresponding to each application program, and the application programs are operated; and/or the presence of a gas in the gas,
the ROM memory in the control device also stores a ROM memory space allocation program corresponding to each application program.
8. The program execution method of a control device according to claim 7,
the ROM memory in the control device further stores an interrupt vector table corresponding to each application program, and the running of the application program specifically includes: the method comprises the steps of running a main program of a current application program and setting an interrupt flag bit so that the main program can obtain an address of an interrupt handling program of the current application program from an interrupt vector table corresponding to the current application program according to the interrupt selection flag bit after detecting an interrupt signal, and then jumping to the corresponding interrupt handling program according to the address and running the interrupt handling program; and/or the presence of a gas in the gas,
the ROM memory in the control device further stores a ROM storage space allocation program corresponding to each application program, and the method specifically includes: and respectively allocating a ROM storage area for each application program through the corresponding ROM storage space allocation program of each application program.
9. A control device is characterized by comprising a processor, a ROM (read only memory) and a RAM (random access memory), wherein the ROM is used for storing a plurality of application programs and a starting program, an interrupt vector table and a ROM storage space allocation program which are respectively corresponding to each application program, and the RAM is used for storing running data generated/used when the application programs in the ROM are run;
the ROM memory is also used for storing a program for executing a program execution method of the control apparatus according to any one of claims 1 to 8, and the processor is configured to execute the program stored in the ROM memory.
10. A laundry treating apparatus, characterized in that the laundry treating apparatus comprises a laundry treating apparatus body and the control device of claim 9, the control device being provided on the laundry treating apparatus body.
CN201911185153.7A 2019-11-27 2019-11-27 Program operation method and device of control device and clothes treatment equipment Pending CN112860333A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911185153.7A CN112860333A (en) 2019-11-27 2019-11-27 Program operation method and device of control device and clothes treatment equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911185153.7A CN112860333A (en) 2019-11-27 2019-11-27 Program operation method and device of control device and clothes treatment equipment

Publications (1)

Publication Number Publication Date
CN112860333A true CN112860333A (en) 2021-05-28

Family

ID=75984975

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911185153.7A Pending CN112860333A (en) 2019-11-27 2019-11-27 Program operation method and device of control device and clothes treatment equipment

Country Status (1)

Country Link
CN (1) CN112860333A (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020023196A1 (en) * 2000-08-21 2002-02-21 Nec Corporation Program module management system and method thereof and storing medium of management programs of the system
KR20080028167A (en) * 2006-09-26 2008-03-31 엘지전자 주식회사 Data saving apparatus and method thereof, and potable electronic apparatus having that
CN101853181A (en) * 2010-05-11 2010-10-06 中达电通股份有限公司 Subprogram mutual calling method used in embedded system
CN105204899A (en) * 2015-09-17 2015-12-30 浪潮软件集团有限公司 Realization of network-based singlechip firmware upgrading method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20020023196A1 (en) * 2000-08-21 2002-02-21 Nec Corporation Program module management system and method thereof and storing medium of management programs of the system
KR20080028167A (en) * 2006-09-26 2008-03-31 엘지전자 주식회사 Data saving apparatus and method thereof, and potable electronic apparatus having that
CN101853181A (en) * 2010-05-11 2010-10-06 中达电通股份有限公司 Subprogram mutual calling method used in embedded system
CN105204899A (en) * 2015-09-17 2015-12-30 浪潮软件集团有限公司 Realization of network-based singlechip firmware upgrading method

Similar Documents

Publication Publication Date Title
CN110231952B (en) ECU program backup and cyclic upgrade control method and device
US20140325496A1 (en) Apparatus and method for firmware upgrade using usb
US7398521B2 (en) Methods and apparatuses for thread management of multi-threading
JP3372964B2 (en) Computer system
KR100778293B1 (en) Digital tv and upgrade method of bootloader for the same
US6745278B2 (en) Computer capable of rewriting an area of a non-volatile memory with a boot program during self mode operation of the computer
KR20150129692A (en) Boot sequencing for multi boot devices
CN105190570A (en) Memory introspection engine for integrity protection of virtual machines
CN109614126B (en) Embedded system online program upgrading method and device
CN102945173A (en) User program on-line upgrading system and method
WO2012071852A1 (en) Method and apparatus for upgrading bootstrap program
US9542113B2 (en) Apparatuses for securing program code stored in a non-volatile memory
US9037773B2 (en) Methods for processing and addressing data between volatile memory and non-volatile memory in an electronic apparatus
US10552135B1 (en) Reducing a size of an application package
CN112860333A (en) Program operation method and device of control device and clothes treatment equipment
JP2009075797A (en) Portable electronic equipment
CN108228198B (en) Programming method and device
CN105975322A (en) Device and method for program update and microcontroller
KR20070082181A (en) Method for reducing booting time in wireless terminal
US10877743B2 (en) Control apparatus for updating stored program and method for updating program stored in control apparatus
CN109582370B (en) Starting method and device of NOR FLASH embedded equipment
CN115437672A (en) User program updating method, device, equipment and storage medium based on SOC chip
CN111352673B (en) Novel Hook method, storage medium and electronic device
CN112486570B (en) Glibc compatible method for CPUs of different types
KR20000033437A (en) Apparatus for implementing function of bootstrap loader

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination