CN109324838B - Execution method and execution device of single chip microcomputer program and terminal - Google Patents
Execution method and execution device of single chip microcomputer program and terminal Download PDFInfo
- Publication number
- CN109324838B CN109324838B CN201811012747.3A CN201811012747A CN109324838B CN 109324838 B CN109324838 B CN 109324838B CN 201811012747 A CN201811012747 A CN 201811012747A CN 109324838 B CN109324838 B CN 109324838B
- Authority
- CN
- China
- Prior art keywords
- target resource
- chip microcomputer
- file
- resource object
- absolute address
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44568—Immediately runnable code
- G06F9/44573—Execute-in-place [XIP]
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
- G06F9/4482—Procedural
- G06F9/4484—Executing subprograms
- G06F9/4486—Formation of subprogram jump address
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 application is applicable to the technical field of computers, and provides an execution method, an execution device, a terminal and a computer readable storage medium of a single chip microcomputer program, wherein the execution method comprises the following steps: acquiring a target resource object; the target resource objects are arranged to generate a target resource file; reading an absolute address of the target resource object from a target resource file; and controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object. The method and the device can improve the execution efficiency of the single chip microcomputer program.
Description
Technical Field
The present application belongs to the field of computer technologies, and in particular, to an execution method, an execution apparatus, a terminal, and a computer-readable storage medium for a single chip microcomputer program.
Background
A Single Chip Microcomputer (Single Chip Microcomputer) is abbreviated as a Single Chip Microcomputer, and refers to a Microcomputer integrated on one Chip, and various functional components (such as a CPU, a memory, an interface circuit, and the like) of the Microcomputer are manufactured on one integrated Chip to form a complete Microcomputer. The single chip microcomputer program is an instruction sequence used for instructing the single chip microcomputer to complete a specific function, and the execution process of the single chip microcomputer program may involve the calling of a plurality of resource files.
However, the size is limited, the storage space of the single chip is limited, and the related resource files generally need to be stored in an external storage device, for example, a Trans-flash Card (TF Card). In the process of executing the program of the single chip microcomputer, the time for reading the external resources is long, so that the single chip microcomputer is blocked and even crashed, and the execution efficiency of the program of the single chip microcomputer is not high.
Disclosure of Invention
In view of this, the present application provides a method, an apparatus, a terminal and a computer readable storage medium for executing a single chip microcomputer program, so as to solve the problem in the prior art that the execution efficiency of the single chip microcomputer program is not high.
A first aspect of the present application provides an execution method of a single chip microcomputer program, where the execution method includes:
acquiring a target resource object;
arranging the target resource objects to generate a target resource file, wherein the target resource file comprises an absolute address of the target resource object;
reading an absolute address of the target resource object from the target resource file;
and controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object.
Based on the first aspect, in a first possible implementation manner, the sorting the target resource object to generate the target resource file specifically includes:
acquiring an initial resource file in the target resource object, wherein the initial resource file is used for storing the identifier and the storage path of the resource object associated with the single chip microcomputer program;
and converting the initial resource file into a target resource file, wherein the target resource file is used for indicating an absolute address of the target resource object, and the absolute address is obtained based on the identifier and the storage path.
Based on the first aspect, in a second possible implementation manner, the converting the initial resource file into a target resource file includes:
reading first data stored in the initial resource file, wherein the first data comprises identification data and storage path data;
converting the first data into second data in a specified format, and generating an intermediate file for storing the second data;
and generating a target resource file based on the intermediate file.
Based on the first aspect, in a third possible implementation manner, the generating a target resource file based on the intermediate file includes:
checking the intermediate file;
and if the verification is passed, generating a target resource file based on the intermediate file.
Based on the first aspect, in a fourth possible implementation manner, the initial resource file includes a file in an Excel format.
Based on the first aspect, in a fifth possible implementation manner, the resource objects in the target resource file are connected by a linked list.
Based on the first aspect, in a sixth possible implementation manner, after controlling the single chip microcomputer program to jump to the absolute address and executing an operation corresponding to the target resource object, the method further includes:
and controlling the single chip microcomputer program to jump to the absolute address of the next resource object connected with the target resource object through a linked list, and executing the operation corresponding to the next resource object.
A second aspect of the present application provides an execution device of a single chip microcomputer program, the execution device including:
a resource object obtaining unit for obtaining a target resource object;
the resource file generating unit is used for sorting the target resource objects acquired by the resource object acquiring unit to generate target resource files, wherein the target resource files comprise absolute addresses of the target resource objects;
an absolute address reading unit, configured to read an absolute address of the target resource object from the target resource file generated by the resource file generating unit;
and the control unit is used for controlling the single chip microcomputer program to jump to the absolute address read by the absolute address reading unit and executing the operation corresponding to the target resource object.
In a first possible implementation manner of the second aspect, the executing apparatus further includes:
and the resource file acquisition unit is used for acquiring an initial resource file in the target resource object, wherein the initial resource file is used for storing the identifier and the storage path of the resource object associated with the single-chip microcomputer program.
And the resource file conversion unit is used for converting the initial resource file acquired by the resource file acquisition unit into a target resource file, wherein the target resource file is used for indicating an absolute address of the target resource object, and the absolute address is obtained based on the identifier and the storage path.
In a second possible implementation manner of the second aspect, the executing apparatus further includes:
and the data reading unit is used for reading first data stored in the initial resource file, wherein the first data comprises identification data and storage path data.
And the intermediate file generating unit is used for converting the first data read by the data reading unit into second data in a specified format and generating an intermediate file for storing the second data.
The resource file conversion unit is further configured to generate a target resource file based on the intermediate file generated by the intermediate file generation unit.
In a third possible implementation manner of the second aspect, the execution unit further includes:
the file verifying unit is used for verifying the intermediate file generated by the intermediate file generating unit;
the resource file conversion unit is further configured to generate a target resource file based on the intermediate file checked by the file checking unit.
In a fourth possible implementation manner of the second aspect, the initial resource file includes a file in an Excel format.
In a fifth possible implementation manner of the second aspect, the resource objects in the target resource file are connected by a linked list.
In a sixth possible implementation manner of the second aspect, the control unit is further configured to: and after controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object, controlling the single chip microcomputer program to jump to the absolute address of the next resource object connected with the target resource object through a linked list and executing the operation corresponding to the next resource object.
A third aspect of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the execution method of the single chip microcomputer program when executing the computer program.
A fourth aspect of the present application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the execution method of the one-chip microcomputer program according to any one of the above.
Compared with the prior art, the beneficial effect that this application exists is:
the method comprises the steps of obtaining target resource objects and sorting the obtained target resource objects to generate target resource files; reading the absolute address of the target resource object from the target resource file; controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object; the problem that the execution efficiency of the singlechip program in the prior art is low is solved, namely, the singlechip program can directly read the absolute address of the target resource object from the generated target resource file when the target resource object needs to be called in the execution process, so that the searching and reading time of the resource object can be reduced, and the execution efficiency of the singlechip program is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
Fig. 1 is a flowchart illustrating an implementation of a method for executing a single-chip microcomputer program according to an embodiment of the present disclosure;
FIG. 2 is a flowchart of an implementation of step 102 in the embodiment shown in FIG. 1 according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an execution device of a single chip microcomputer program provided in an embodiment of the present application;
fig. 4 is a schematic diagram of a terminal provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
The single chip microcomputer program is also an application program stored in the single chip microcomputer, the single chip microcomputer realizes a specific function depending on the single chip microcomputer program, and the execution process of the single chip microcomputer program may involve the calling of a large number of resource objects and the skipping of the program, so that the framework of the single chip microcomputer program directly influences the execution efficiency of the single chip microcomputer program. The application is applied to a single chip microcomputer, and provides an execution method of a single chip microcomputer program.
To make the objects, technical solutions and advantages of the present application more clear, the following description is made by way of specific embodiments with reference to the accompanying drawings.
Referring to fig. 1, it shows an implementation flowchart of an execution method of a single chip microcomputer program provided in the embodiment of the present application, and details are as follows:
in step 101, a target resource object is obtained.
In the embodiment of the application, a main program of the single chip microcomputer is executed first, the main program of the single chip microcomputer can be stored in a Flash Memory (Flash Memory) of the single chip microcomputer, and the single chip microcomputer has the control right of a central processing unit when the main program runs. During the operation of the main program, the resource object stored in the external storage device may be called, for example, when a trigger instruction from a user or other predefined trigger event is received, in response to the trigger instruction or the trigger event, the main program calls the menu data in the resource file stored in the storage device TF card and performs the corresponding operation.
In the embodiment of the application, the target resource object represents a resource object which is stored in an external storage space and needs to be called by a main program of the single chip microcomputer in response to an operation instruction of a user or a predefined trigger event. The target resource object may be menu data or may be an independently executable application. Specifically, the identifier of the target resource object may be obtained.
It should be noted that, in the embodiment of the present application, the single chip microcomputer program includes a main program of the single chip microcomputer, and a function, an application program, and other resource objects that are called in an operation process of the main program.
In step 102, the target resource object is arranged to generate a target resource file, wherein the target resource file includes an absolute address of the target resource object.
In the embodiment of the application, the acquired target resource objects are sorted to generate the target resource file. Specifically, the target resource objects can be sequenced according to the calling sequence of the target resource objects in the main program; the storage information of the target resource object can be obtained, and the absolute address of the target resource object can be obtained based on the storage information. The finally generated target resource file is a file which is sequenced and can directly indicate the absolute address of the currently required target resource object. The absolute address is the absolute position of the file and the resource on the network or the local; the target resource object is represented as an absolute position in the target resource file in the embodiment of the application, that is, the corresponding target resource file can be found in the target resource file through the absolute position.
In step 103, the absolute address of the target resource object is read from the target resource file.
In the embodiment of the application, the currently required target resource object can be conveniently located according to the generated target resource file, and after the main program locates the target resource object, the main program reads the absolute address of the target resource object, so that the main program can directly jump to the absolute address and continue to execute the next operation.
In the embodiment of the present application, the absolute address refers to an address directly pointing to a specific storage unit of the memory.
In one application scenario, the absolute address of the target resource object in the target resource file may be accessed by defining an absolute macro, for example, the macro defined therein may be used to access the absolute address with "# include < absacc.h >".
In another application scenario, an absolute address may be read by adding _ at _ const after the data definition, e.g., "data structure link list _ at _0x 40" may specify that the linked list (list) structure starts from absolute address 40 h.
In step 104, the single chip microcomputer program is controlled to jump to the absolute address, and the operation corresponding to the target resource object is executed.
In the embodiment of the application, after the absolute address corresponding to the target resource object is read from the target resource file, the single chip microcomputer program is controlled to jump to the absolute address, the information of the target resource object can be directly obtained, and the operation corresponding to the target resource object is executed.
In an application scenario, it is assumed that a function of a single chip microcomputer program is to perform dynamic menu display according to an operation instruction of a user, dynamic menu information is stored in an external TF card, the single chip microcomputer program responds to the operation instruction of the user after being started, an absolute address of a menu corresponding to the operation instruction in a target resource file is read, and the menu information is directly read from the absolute address and displayed. Because the menu is directly read by the absolute address, the process of searching and addressing from massive data information in the resource file is avoided, the resource reading time is saved, and the execution speed of the singlechip program is improved.
According to the method, the target resource file is generated by acquiring the target resource object and arranging the acquired target resource object; reading the absolute address of the target resource object from the target resource file; controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object; the problem that the execution efficiency of the singlechip program in the prior art is low is solved, namely, the singlechip program can directly read the absolute address of the target resource object from the generated target resource file when the target resource object needs to be called in the execution process, so that the searching and reading time of the resource object can be reduced, and the execution efficiency of the singlechip program is improved.
Fig. 2 shows a flowchart of an implementation of step 102 in the embodiment shown in fig. 1, which is provided in the present application, and is detailed as follows:
in step 201, an initial resource file in the target resource object is obtained.
In the embodiment of the application, an initial resource file is preset in a target resource object, and the initial resource file is used for storing the identifier and the storage path of the resource object associated with the single chip microcomputer program; for modification, updating or expansion, the initial resource file may be in a content format or a file format, for example, an Excel table is used to record the identification and storage path of the resource object.
It should be noted that the format of the initial resource file may be defined according to actual needs, for example, the format may be Word format, Excel format, or other formats; in this embodiment, in order to improve the convenience of reading, the initial resource file is a file in an Excel format, for example, an xml file, in which a resource object is recorded in each row, and each parameter of the resource object, including a function name and a storage address, is recorded in the column content of the row where the resource object is located. This also facilitates the programmer modifying, updating, or extending the initial resource file.
In step 202, the initial resource file is converted into a target resource file.
In this embodiment of the present application, the target resource file is configured to indicate an absolute address of the target resource object, where the absolute address is obtained based on the identifier and the storage path. The initial resource file is convenient for developers to modify, update or expand, so that the initial resource file can be described and recorded by a format or language with better readability; however, the language is usually difficult to be read or identified directly by the single chip program, so the initial resource file needs to be converted into a file that can be read and identified directly by the single chip program, that is, the initial resource file needs to be converted into the target resource file.
Optionally, the step 202 may be implemented by:
step 2021, reading first data stored in the initial resource file, where the first data includes identification data and storage path data.
Step 2022, converting the first data into second data in a specified format, and generating an intermediate file for storing the second data.
Step 2023, generating a target resource file based on the intermediate file.
In the embodiment of the application, in order to enable the single chip microcomputer program to directly read and identify the resource object identifier and the storage path recorded in the initial resource file, the data in the initial resource file can be converted into the data directly identified and read by the single chip microcomputer program through a pre-designed conversion program or a pre-designed compiler program, wherein the file for storing the data directly identified and read by the single chip microcomputer program is a target resource file.
In this embodiment, in order to improve the accuracy of the operation of the program of the single chip microcomputer, the initial resource file is first converted into an intermediate file, and the intermediate file is checked, for example, whether data loss exists in the intermediate file is verified. To increase the verification speed, the intermediate file may have a fixed format, for example, identifying the menu by means of double quotation marks, dividing the different information content by means of commas as delimiters.
In this embodiment, if the check passes, which indicates that the initial resource file is recorded without errors, the target resource file that can be directly read by the single chip microcomputer program may be further generated based on the intermediate file that passes the check.
Optionally, the resource objects in the target resource file are connected by a linked list.
In order to further improve the execution speed of the single chip microcomputer program, the resource objects in the target resource file can be sorted and connected through the linked list, that is, the absolute address of the next resource object can be stored in each resource object, and the single chip microcomputer program can continue to jump and execute the next corresponding operation according to the address direction of the linked list after the single chip microcomputer program executes the operation.
Optionally, after controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object, the method further includes:
and controlling the single chip microcomputer program to jump to the absolute address of the next resource object connected with the target resource object through a linked list, and executing the operation corresponding to the next resource object.
In the embodiment of the present application, since the resource objects in the target resource file are connected by the linked list, after the current absolute address performs the operation corresponding to the current resource object, the single chip microcomputer program can directly jump to the absolute address of the next resource object pointed in the current resource object to perform the operation corresponding to the next resource object. Of course, the resource object in the target resource file may also instruct the single chip microcomputer program to return to execute the operation corresponding to the main program in a linked list manner.
According to the method, the target resource file is generated by acquiring the target resource object and arranging the acquired target resource object; reading the absolute address of the target resource object from the target resource file; controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object; the problem that the execution efficiency of the singlechip program in the prior art is low is solved, namely, the singlechip program can directly read the absolute address of the target resource object from the generated target resource file when the target resource object needs to be called in the execution process, so that the searching and reading time of the resource object can be reduced, and the execution efficiency of the singlechip program is improved.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The following are apparatus embodiments of the present application, and for details not described in detail therein, reference may be made to the corresponding method embodiments described above.
Fig. 3 shows a schematic structural diagram of an execution device of a single chip microcomputer program provided in the embodiment of the present application, and for convenience of description, only parts related to the embodiment of the present application are shown, which are detailed as follows:
as shown in fig. 3, the execution device 3 of the one-chip microcomputer program includes: a resource object acquisition unit 31, a resource file generation unit 32, an absolute address reading unit 33, and a control unit 34.
A resource object obtaining unit 31, configured to obtain a target resource object.
The resource file generating unit 32 is configured to arrange the target resource object obtained by the resource object obtaining unit to generate a target resource file, where the target resource file includes an absolute address of the target resource object.
An absolute address reading unit 33, configured to read an absolute address of the target resource object from the target resource file generated by the resource file generating unit.
And a control unit 34, configured to control the single chip microcomputer program to jump to the absolute address read by the absolute address reading unit 33, and execute an operation corresponding to the target resource object.
Optionally, the execution device 3 of the single chip microcomputer program further includes:
and the resource file acquisition unit is used for acquiring an initial resource file in the target resource object, wherein the initial resource file is used for storing the identifier and the storage path of the resource object associated with the single-chip microcomputer program.
And the resource file conversion unit is used for converting the initial resource file acquired by the resource file acquisition unit into a target resource file, wherein the target resource file is used for indicating an absolute address of the target resource object, and the absolute address is obtained based on the identifier and the storage path.
Optionally, the execution device 3 of the single chip microcomputer program further includes:
a data reading unit, configured to read first data stored in the initial resource file, where the first data includes identification data and storage path data;
an intermediate file generating unit, configured to convert the first data read by the data reading unit into second data in a specified format, and generate an intermediate file for storing the second data;
the resource file conversion unit is further configured to generate a target resource file based on the intermediate file generated by the intermediate file generation unit.
Optionally, the executing device 3 of the single chip microcomputer program further includes:
the file verification unit is used for verifying the intermediate file generated by the intermediate file generation unit;
the resource file conversion unit is further configured to generate a target resource file based on the intermediate file checked by the file checking unit.
Optionally, the initial resource file acquired by the resource file acquiring unit is a file in an Excel format.
Optionally, the resource objects in the target resource file generated by the resource file conversion unit are connected by a linked list.
Optionally, the control unit 34 is further configured to, after controlling the single chip microcomputer program to jump to the absolute address and execute an operation corresponding to the target resource object, control the single chip microcomputer program to jump to an absolute address of a next resource object connected to the target resource object through a linked list and execute an operation corresponding to the next resource object.
According to the method, the target resource file is generated by acquiring the target resource object and arranging the acquired target resource object; reading the absolute address of the target resource object from the target resource file; controlling the single chip microcomputer program to jump to the absolute address and executing the operation corresponding to the target resource object; the problem that the execution efficiency of the singlechip program in the prior art is low is solved, namely, the singlechip program can directly read the absolute address of the target resource object from the generated target resource file when the target resource object needs to be called in the execution process, so that the searching and reading time of the resource object can be reduced, and the execution efficiency of the singlechip program is improved.
Fig. 4 is a schematic diagram of a terminal according to an embodiment of the present application. As shown in fig. 4, the terminal 4 of this embodiment includes: a processor 40, a memory 41 and a computer program 42 stored in said memory 41 and executable on said processor 40. When the processor 40 executes the computer program 42, the steps in the execution method embodiments of the above-mentioned respective one-chip programs, such as steps 101 to 104 shown in fig. 1, are implemented. Alternatively, the processor 40, when executing the computer program 42, implements the functions of the modules/units in the above-mentioned device embodiments, such as the functions of the units 31 to 34 shown in fig. 3.
Illustratively, the computer program 42 may be partitioned into one or more modules/units that are stored in the memory 41 and executed by the processor 40 to accomplish the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing specific functions, which are used to describe the execution of the computer program 42 in the terminal 4. For example, the computer program 42 may be divided into a resource object obtaining unit, a resource file generating unit, an absolute address reading unit and a control unit, and the specific functions of each unit are as follows:
a resource object obtaining unit for obtaining a target resource object;
the resource file generating unit is used for arranging the target resource objects acquired by the resource object acquiring unit to generate target resource files, wherein the target resource files comprise absolute addresses of the target resource objects;
an absolute address reading unit, configured to read an absolute address of the target resource object from the target resource file generated by the resource file generating unit;
and the control unit is used for controlling the singlechip program to jump to the absolute address read by the absolute address reading unit and executing the operation corresponding to the target resource object.
The terminal 4 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal may include, but is not limited to, a processor 40, a memory 41. Those skilled in the art will appreciate that fig. 4 is only an example of a terminal 4 and does not constitute a limitation of terminal 4 and may include more or less components than those shown, or some components in combination, or different components, for example, the terminal may also include input output devices, network access devices, buses, etc.
The Processor 40 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 41 may be an internal storage unit of the terminal 4, such as a hard disk or a memory of the terminal 4. The memory 41 may also be an external storage device of the terminal 4, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) and the like provided on the terminal 4. Further, the memory 41 may also include both an internal storage unit and an external storage device of the terminal 4. The memory 41 is used for storing the computer program and other programs and data required by the terminal. The memory 41 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above 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 the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain other components which may be suitably increased or decreased as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media which may not include electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.
Claims (10)
1. An execution method of a single chip microcomputer program is characterized by comprising the following steps:
acquiring a target resource object; the target resource object represents a resource object which is stored in an external storage space and needs to be called by a main program of the single chip microcomputer in response to an operation instruction of a user or a predefined trigger event;
arranging the target resource object to generate a target resource file, wherein the target resource file comprises an absolute address of the target resource object;
reading an absolute address of the target resource object from the target resource file;
and when a target resource object needs to be called, controlling the single chip microcomputer program to directly jump to the absolute address, directly reading information from the absolute address and displaying the information, and executing operation corresponding to the target resource object.
2. The method for executing the single-chip microcomputer program according to claim 1, wherein the sorting the target resource object to generate the target resource file specifically includes:
acquiring an initial resource file in the target resource object, wherein the initial resource file is used for storing the identifier and the storage path of the resource object associated with the single chip microcomputer program;
and converting the initial resource file into a target resource file, wherein the target resource file is used for indicating an absolute address of the target resource object, and the absolute address is obtained based on the identifier and the storage path.
3. The method for executing the single-chip microcomputer program according to claim 2, wherein the converting the initial resource file into the target resource file comprises:
reading first data stored in the initial resource file, wherein the first data comprises identification data and storage path data;
converting the first data into second data in a specified format, and generating an intermediate file for storing the second data;
and generating a target resource file based on the intermediate file.
4. The method for executing the single-chip microcomputer program according to claim 3, wherein the generating a target resource file based on the intermediate file includes:
checking the intermediate file;
and if the verification is passed, generating a target resource file based on the intermediate file.
5. The method for executing the single-chip microcomputer program according to any one of claims 2 to 4, wherein the initial resource file comprises a file in an Excel format or a Word format.
6. The method for executing the single-chip microcomputer program according to claim 5, wherein the resource objects in the target resource file are connected by a linked list.
7. The method for executing the single-chip microcomputer program according to claim 6, further comprising, after controlling the single-chip microcomputer program to jump to the absolute address and execute an operation corresponding to the target resource object:
and controlling the single chip microcomputer program to jump to the absolute address of the next resource object connected with the target resource object through a linked list, and executing the operation corresponding to the next resource object.
8. An execution device of a single chip microcomputer program is characterized in that the execution device comprises:
a resource object obtaining unit for obtaining a target resource object; the target resource object represents a resource object which is stored in an external storage space and needs to be called by a main program of the single chip microcomputer in response to an operation instruction of a user or a predefined trigger event;
the resource file generating unit is used for arranging the target resource objects acquired by the resource object acquiring unit to generate target resource files, wherein the target resource files comprise absolute addresses of the target resource objects;
an absolute address reading unit, configured to read an absolute address of the target resource object from the target resource file generated by the resource file generating unit;
and the control unit is used for controlling the single chip microcomputer program to directly jump to the absolute address read by the absolute address reading unit when a target resource object needs to be called, directly reading information from the absolute address and displaying the information, and executing operation corresponding to the target resource object.
9. A terminal comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the method for executing a single-chip microcomputer program according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of execution of the one-chip microcomputer program according to any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811012747.3A CN109324838B (en) | 2018-08-31 | 2018-08-31 | Execution method and execution device of single chip microcomputer program and terminal |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201811012747.3A CN109324838B (en) | 2018-08-31 | 2018-08-31 | Execution method and execution device of single chip microcomputer program and terminal |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN109324838A CN109324838A (en) | 2019-02-12 |
| CN109324838B true CN109324838B (en) | 2022-05-10 |
Family
ID=65264193
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201811012747.3A Active CN109324838B (en) | 2018-08-31 | 2018-08-31 | Execution method and execution device of single chip microcomputer program and terminal |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN109324838B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111538488B (en) * | 2020-04-17 | 2023-05-02 | 荏原冷热系统(中国)有限公司 | Method and device for generating single-chip microcomputer driver |
| CN112882423B (en) * | 2021-01-26 | 2021-10-15 | 深圳市航顺芯片技术研发有限公司 | Singlechip, singlechip control method and device, intelligent terminal and storage medium |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1222985A (en) * | 1996-05-03 | 1999-07-14 | 艾利森电话股份有限公司 | Method relating to handling of conditional jumps in multi-stage pipeline arrangement |
| CN101673214A (en) * | 2009-10-26 | 2010-03-17 | 上海交通大学 | Subdivision information collection system and collection method thereof |
| CN101763273A (en) * | 2008-12-26 | 2010-06-30 | 上海闻泰电子科技有限公司 | Method for dynamically loading code into extended memory of embedded type system |
| CN102354281A (en) * | 2011-07-11 | 2012-02-15 | 中国科学院深圳先进技术研究院 | Kernel device in wireless sensor network and implementation method thereof |
| CN104035793A (en) * | 2014-05-22 | 2014-09-10 | 浙江大学 | In-application wireless programming method based on single-chip microcomputer |
| CN105224305A (en) * | 2014-07-01 | 2016-01-06 | 华为技术有限公司 | Function call path decoding method, Apparatus and system |
| CN106095416A (en) * | 2016-06-01 | 2016-11-09 | 腾讯科技(深圳)有限公司 | A kind of in the application redirect processing method, device and intelligent terminal |
| CN106874054A (en) * | 2017-03-06 | 2017-06-20 | 四川天邑康和通信股份有限公司 | A kind of repeater inner module program on-line upgrading method and system |
| CN108241516A (en) * | 2018-02-09 | 2018-07-03 | 深圳科立讯通信有限公司 | Embedded system program loading method, device, computer equipment and storage medium |
Family Cites Families (19)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7114042B2 (en) * | 2003-05-22 | 2006-09-26 | International Business Machines Corporation | Method to provide atomic update primitives in an asymmetric heterogeneous multiprocessor environment |
| US7882339B2 (en) * | 2005-06-23 | 2011-02-01 | Intel Corporation | Primitives to enhance thread-level speculation |
| US7886141B2 (en) * | 2007-10-27 | 2011-02-08 | Asix Electronics Corporation | Method and systems for advanced reprogrammable boot codes and in-application programming of embedded microprocessor systems |
| CN101625643B (en) * | 2009-05-08 | 2012-01-04 | 四川和芯微电子股份有限公司 | Address mapping method of 8051 single chip |
| CN101615128B (en) * | 2009-07-31 | 2012-05-23 | 北京华环电子股份有限公司 | Online upgrade method and device of singlechip |
| CN103077056B (en) * | 2012-12-31 | 2015-12-23 | 中国电子科技集团公司第十五研究所 | Use the Bootlorder implementation method of a small amount of ROM resource |
| CN104714846B (en) * | 2013-12-17 | 2018-06-05 | 华为技术有限公司 | Method for processing resource, operating system and equipment |
| CN103744709B (en) * | 2014-01-23 | 2017-02-15 | 华为技术有限公司 | patch loading method and device |
| US20150261535A1 (en) * | 2014-03-11 | 2015-09-17 | Cavium, Inc. | Method and apparatus for low latency exchange of data between a processor and coprocessor |
| CN105224370B (en) * | 2015-10-21 | 2019-03-08 | 安一恒通(北京)科技有限公司 | A kind of method and apparatus of loading ELF document |
| CN105259834B (en) * | 2015-10-28 | 2017-09-12 | 华中科技大学 | A kind of data in mobile phone acquisition controller of firmware restructural |
| CN105700427A (en) * | 2016-01-13 | 2016-06-22 | 武汉合康动力技术有限公司 | Correction method of single chip microcomputer program fleet |
| CN107885540A (en) * | 2016-09-28 | 2018-04-06 | 腾讯科技(深圳)有限公司 | A kind of method, apparatus and terminal of loading application programs static resource |
| CN107729352B (en) * | 2017-08-30 | 2020-07-31 | 深圳壹账通智能科技有限公司 | Page resource loading method and terminal equipment |
| CN107729040A (en) * | 2017-09-28 | 2018-02-23 | 郑州云海信息技术有限公司 | A kind of IAP method and system of single-chip microcomputer |
| CN107894920A (en) * | 2017-11-09 | 2018-04-10 | 广东欧珀移动通信有限公司 | Resource allocation method and Related product |
| CN108108094A (en) * | 2017-12-12 | 2018-06-01 | 深圳和而泰数据资源与云技术有限公司 | A kind of information processing method, terminal and computer-readable medium |
| CN108268039A (en) * | 2018-01-19 | 2018-07-10 | 广东美的智能机器人有限公司 | The paths planning method and system of mobile robot |
| CN108459885A (en) * | 2018-03-26 | 2018-08-28 | 深圳市元征科技股份有限公司 | A kind of method and its microcontroller of resource dispersion load |
-
2018
- 2018-08-31 CN CN201811012747.3A patent/CN109324838B/en active Active
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1222985A (en) * | 1996-05-03 | 1999-07-14 | 艾利森电话股份有限公司 | Method relating to handling of conditional jumps in multi-stage pipeline arrangement |
| CN101763273A (en) * | 2008-12-26 | 2010-06-30 | 上海闻泰电子科技有限公司 | Method for dynamically loading code into extended memory of embedded type system |
| CN101673214A (en) * | 2009-10-26 | 2010-03-17 | 上海交通大学 | Subdivision information collection system and collection method thereof |
| CN102354281A (en) * | 2011-07-11 | 2012-02-15 | 中国科学院深圳先进技术研究院 | Kernel device in wireless sensor network and implementation method thereof |
| CN104035793A (en) * | 2014-05-22 | 2014-09-10 | 浙江大学 | In-application wireless programming method based on single-chip microcomputer |
| CN105224305A (en) * | 2014-07-01 | 2016-01-06 | 华为技术有限公司 | Function call path decoding method, Apparatus and system |
| CN106095416A (en) * | 2016-06-01 | 2016-11-09 | 腾讯科技(深圳)有限公司 | A kind of in the application redirect processing method, device and intelligent terminal |
| CN106874054A (en) * | 2017-03-06 | 2017-06-20 | 四川天邑康和通信股份有限公司 | A kind of repeater inner module program on-line upgrading method and system |
| CN108241516A (en) * | 2018-02-09 | 2018-07-03 | 深圳科立讯通信有限公司 | Embedded system program loading method, device, computer equipment and storage medium |
Also Published As
| Publication number | Publication date |
|---|---|
| CN109324838A (en) | 2019-02-12 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109542399B (en) | Software development method and device, terminal equipment and computer readable storage medium | |
| CN111782216B (en) | Page generation method, server and storage medium | |
| CN108388598B (en) | Electronic device, data storage method, and storage medium | |
| CN111104421A (en) | Data query method and device based on data interface standard configuration | |
| CN107239392B (en) | Test method, test device, test terminal and storage medium | |
| CN106843842B (en) | Method and device for updating application program configuration file | |
| CN108334609B (en) | Method, device, equipment and storage medium for realizing JSON format data access in Oracle | |
| CN107506181A (en) | Business processing, data processing method, device and electronic equipment | |
| CN109885614B (en) | Data synchronization method and device | |
| CN112765023A (en) | Test case generation method and device | |
| CN110968339B (en) | Method and device for front-end building tool and electronic equipment | |
| CN111143446A (en) | Data structure conversion processing method and device of data object and electronic equipment | |
| CN113609128B (en) | Method, device, terminal equipment and storage medium for generating database entity class | |
| CN109542398B (en) | Business system generation method and device and computer readable storage medium | |
| CN110750440A (en) | Data testing method and terminal equipment | |
| CN109408035B (en) | Flow configuration method, storage medium and server of business system | |
| CN109324838B (en) | Execution method and execution device of single chip microcomputer program and terminal | |
| CN116303542A (en) | SQL sentence execution method and device, computer equipment and storage medium | |
| CN113407254B (en) | Form generation method and device, electronic equipment and storage medium | |
| CN113760237A (en) | Compiling address updating method and device, terminal equipment and readable storage medium | |
| CN113296827A (en) | Method and device for converting different languages and terminal equipment | |
| CN118427088A (en) | Method, device, equipment and storage medium for evaluating code content | |
| CN112733510A (en) | Financial certificate generation method, device, equipment and computer readable storage medium | |
| CN117271004A (en) | Document report generation method, device, equipment and storage medium | |
| CN114756140B (en) | Method, device, electronic device and storage medium for inputting rare characters |
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 | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |