Multi-application development method and device based on RTOS operating system
Through the multi-application development method based on the RTOS operating system, using AWTK and Jerryscript engines to support JavaScript development, the problem that traditional POS machines cannot install multiple applications is solved, and the flexible installation, uninstallation and upgrade of applications is realized, reducing development difficulty and cost. Improve application integration efficiency.
Patent Information
- Application Number
- CN202411075422.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-08-07
AI Technical Summary
Traditional POS machines cannot install multiple applications, and it is difficult to develop applications, long cycles and high cost. Users cannot customize functions at will, and they need to reintegrate application software through manufacturers to respond to business needs. The process is complex and time-consuming.
Using a multi-application development method based on RTOS operating system, the AWTK engine, Jerryscript engine, desktop manager and application market are compiled and packaged through the GNU compiler suite, generate system.bin files, and use the AWTK engine to apply the xml required for the application. Files, js files, and picture files are packaged to generate app.bin, which supports JavaScript language development, and realizes installation, uninstallation and upgrade of multiple applications.
It simplifies the application development process, reduces the development difficulty and cycle, allows users to install and delete applications as they wish, and improves the efficiency and user experience of application integration.
Smart Images

Figure CN118585211B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a multi-application development method and device based on an RTOS operating system. Background Art
[0002] Traditional POS machines are all single-application machines, and the applications in the POS machines are all built-in by the POS manufacturers when they leave the factory. That is, the built-in applications cannot be uninstalled or deleted by the seller or the end user. The built-in applications can only be deleted by flashing the machine after the POS manufacturer provides new software. On the other hand, traditional POS machines cannot install software at will, which greatly limits the scope of use of traditional POS machines.
[0003] Traditional POS machine application development is basically developed in C language. Although C language has many advantages, such as good performance, good compatibility, and direct access to hardware, it also has obvious defects, such as pointer and memory management, high code complexity, etc., which makes application development difficult and takes a long time, resulting in high development costs. With the changes of the times, more and more application developers are looking for simpler languages to develop applications, such as JAVA, JavaScript and other languages, and more and more practitioners are using these simple languages for development.
[0004] Based on this, traditional POS machines have the following obvious defects:
[0005] 1. Unable to respond to users' new business needs in a timely manner, the application software must be reintegrated through the manufacturer, which is a complicated and time-consuming process.
[0006] 2. End users cannot customize the functions they want at will. They must be developed and built in by the manufacturer.
[0007] 3. Development and application are difficult, time-consuming and expensive. Summary of the invention
[0008] The present application provides a multi-application development method and device based on an RTOS operating system, so as to solve the problem that the existing RTOS operating system cannot install multiple applications.
[0009] On the one hand, the present application provides a multi-application development method based on an RTOS operating system, comprising:
[0010] Compile and package the AWTK engine, Jerryscript engine, desktop manager and application market through the GNU compiler suite to generate the system.bin file;
[0011] Use the AWTK engine to compile and package the xml files, js files, and image files required by each application to generate each app.bin;
[0012] Pack multiple app.bin files into fat.img files containing multiple applications, burn the fat.img files and system.bin files containing multiple applications into a POS machine with an RTOS operating system, or upload multiple app.bin files to an application market server.
[0013] On the other hand, the present application provides a multi-application development device based on an RTOS operating system, for a POS machine having an RTOS operating system, comprising:
[0014] The first compiling unit is used to compile and package the AWTK engine, Jerryscript engine, desktop manager and application market through the GNU compiler suite to generate a system.bin file;
[0015] The first packaging unit is used to compile and package the xml files, js files, and image files required by each application through the AWTK engine to generate each app.bin;
[0016] A prefabrication unit is used to package multiple app.bin files into a fat.img file containing multiple applications, and burn the fat.img file containing multiple applications and the system.bin file into a POS machine with an RTOS operating system; or,
[0017] The upload unit is used to upload multiple app.bin files to the application market server.
[0018] The multi-application development method and device based on the RTOS operating system provided in the present application support the development of JS language by using Jerryscript engine and AWTK engine, and then generate resource data (data data) by compiling all pictures, XML (describing image elements and coordinates, etc.) and JS files used in developing APP, and finally generate an APP.bin through GCC compilation, which is burned into the flash of the POS machine through the burning tool, thereby realizing the development of multiple applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0020] Figure 1 A flowchart of a multi-application development method based on an RTOS operating system provided by an embodiment of the present invention;
[0021] Figure 2is a flowchart of step S120 provided in an embodiment of the present invention;
[0022] Figure 3 This is a flow chart of a client downloading and installing an App through an application market provided by an embodiment of the present invention;
[0023] Figure 4 is a flowchart of step S120 provided in an embodiment of the present invention;
[0024] Figure 5 A structural diagram of a multi-application development device based on an RTOS operating system provided by an embodiment of the present invention;
[0025] Figure 6 It is a structural diagram of the first packaging unit 120 provided in an embodiment of the present invention.
[0026] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0027] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0028] First, the technical terms involved in the present invention are explained:
[0029] First, in the embodiment of the present invention, the platform needs to support JavaScript language development application program. JavaScript syntax is very simple and easy to learn and understand. JavaScript is an interpreted language and can be run directly without compilation, which is very convenient for development and debugging.
[0030] Secondly, in the embodiments of the present invention, the platform needs to support application installation, uninstallation and upgrading. When a user develops an application, there is no need to integrate or burn in the application through the manufacturer. Instead, the user only needs to package the multiple applications to be developed through a unique tool and generate a bin file and upload it to the server. The client can then install the required applications through the application market, which is very convenient. In this way, multiple applications can be loaded, run, installed and deleted on traditional POS machines.
[0031] JS is a lightweight, interpreted or just-in-time compiled programming language with function priority. To support JS, an engine that supports JS is required, such as the V8 engine, SpiderMonkey engine, etc. Supporting this engine requires a large amount of RAM, ROM and a powerful CPU to support it. However, the ROM, RAM space and CPU main frequency of the existing single-chip POS are very limited and are not enough to support such a large engine.
[0032] The present invention has been modified on the original basis. The present invention has developed a desktop manager for displaying installed application icons. Then we realize the loading and running of multiple applications by dynamically loading resources. The process is as follows: Figure 3 .
[0033] An embodiment of the present invention provides a multi-application development method based on an RTOS operating system. The development application of the embodiment of the present invention uses a relatively simple language, and users can develop the applications they want at will without having to build in or burn in the application by the manufacturer. They only need to download and install through the application store.
[0034] Example 1
[0035] Figure 1 A flowchart of a multi-application development method based on an RTOS operating system provided by an embodiment of the present invention is shown in FIG. Figure 1 The present invention provides a multi-application development method based on an RTOS operating system, comprising:
[0036] Step S110, compile and package the AWTK engine, Jerryscript engine and .c file through the GNU compiler suite to generate a system.bin file;
[0037] The present invention uses a more streamlined JS engine and a Jerryscript engine in the case where the existing single-chip POS resources are relatively limited. The engine can run on devices with a ROM greater than 200K and a RAM greater than 64K. The existing single-chip POS can fully meet this demand. In terms of GUI, the present invention uses an AWTK engine, which provides a powerful, efficient, reliable, easy-to-use, and cool GUI engine that can easily produce cool effects, and supports cross-platform synchronous development. In terms of development language, the GUI engine supports C language development and can also support JS language development. If JS language is used for development, a JS engine is required to support the GUI engine. The present invention uses Jerryscript and AWTK engines to support users to use JS language to develop their own acquiring applications.
[0038] Step S120, compile and package the xml files, js files, and picture files required by multiple applications through the AWTK engine to generate fat.img containing multiple applications;
[0039] Step S130, burning the fat.img and system.bin files containing multiple applications into the POS machine with the RTOS operating system.
[0040] The existing AWTK engine supports the development of single applications in JS language. Users compile the AWTK engine, Jerryscript engine, all images used by the APP, XML (describing image elements and coordinates, etc.), and resource data (data) generated by JS files through GCC to generate an APP.bin file and burn it into flash. The existing development method does not support the installation of new applications through the application market, nor does it support uninstallation.
[0041] The multi-application development method based on the RTOS operating system provided in the embodiment of the present invention is to compile the AWTK engine, Jerryscript engine, desktop manager, and application market together to generate a file called system.bin. The xml files, image files, and js files used by the user to develop the application are packaged and generated to be called APP.bin. Multiple APP.bins can be packaged into fat.img and burned in through tools, or multiple app.bins can be uploaded to the TMS server (which can also be understood as the application market server), and then the application market client in the system.bin can download and install the app on the TMS server.
[0042] Figure 2 and Figure 4 It is a flowchart of step S120 provided in an embodiment of the present invention.
[0043] like Figure 2 and 4 As shown, in step S120 of the embodiment of the present invention, generating fat.img containing multiple applications includes:
[0044] Step S1201, compile the xml files, js files, and picture files required by multiple applications through the AWTK engine to generate corresponding data resource files;
[0045] Step S1202, packaging each data resource file to generate each application;
[0046] Step S1203: Pack the multiple applications to generate a fat.img file containing the multiple applications.
[0047] Figure 3This is a flowchart of a client downloading and installing an App through an application market provided by an embodiment of the present invention.
[0048] like Figure 3 As shown, the embodiment of the present invention burns the developed single-chip microcomputer POS client program into the flash, and downloads and installs the above JS_APP.bin through the developed application market application. The specific steps are as follows:
[0049] 1. Use the AWTK GUI tool to convert all xml files, image files, js files and other files used in the developed desktop manager application and application market application into data files that can be recognized by AWTK GUI.
[0050] 2. Use GCC to compile the above data files, AWTK GUI, Jerryscript engine and other .c files to generate a .bin file (system.bin), and use the tool to burn it into the specified location of the flash of the MCU POS machine.
[0051] 3. The system runs, starts the AWTK GUI and Jerryscript engine, loads the above data into the AWTK GUI resource manager and enters the desktop manager application.
[0052] 4. Enter the application market through the desktop manager. The application market obtains all JS APP information that needs to be installed on the TMS server through the http protocol, and displays these JS APPs that need to be installed in the application market in a list.
[0053] 5. Download the JS APP that the user wants to install from the TMS server to the external file system of the microcontroller POS machine through the http protocol.
[0054] 6. Use the SHA256 algorithm to verify the signature of the JS APP file downloaded above.
[0055] 7. Copy the JS APP file downloaded to the external file system to the built-in file system of the MCU POS machine.
[0056] 8. Read the contents of the JS APP copied to the built-in file system into the memory of the MCU POS machine and load it into the resource manager of the AWTK GUI engine.
[0057] The application market notifies the desktop manager to update the UI to display the JS APP copied to the built-in file system.
[0058] Specifically, the method for installing and loading multiple applications includes:
[0059] Obtain the list of JS APPs that need to be installed on the server through the network interface; parse the download URL and download the JS APP to the external file system;
[0060] Calculate the hash of the JS APP and verify the signature of the JS APP; copy the JS APP to the built-in file system;
[0061] Parse JS APP data and load the XML, icon, js and other file data in JS APP into AWTK resource manager;
[0062] Manage multiple applications through the desktop manager, and remove the resources of the current foreground application from the AWTK resource manager when starting a new application.
[0063] The multi-application development method based on the RTOS operating system provided by the embodiment of the present invention supports the development of application programs in the JavaScript language. The syntax of JavaScript is very simple and easy to learn and understand. JavaScript is an interpreted language and can be directly run without compilation, which is very convenient for development and debugging. It also greatly reduces the difficulty of program development and shortens the development cycle.
[0064] The multi-application development method based on the RTOS operating system provided by the embodiment of the present invention supports application installation, uninstallation and upgrade. When a user develops an application, it does not need to be integrated and burned in by the manufacturer. It only needs to package the application developed by the user through a unique tool to generate a bin file and upload it to the server. Then the client can install the required application through the application market, which is very convenient. In this way, the loading, running, installation and deletion of multiple applications can be realized in the traditional POS machine. The application installation, upgrade and uninstallation functions supported by the present invention make it more convenient for users to develop the application programs they want and improve the efficiency of application integration.
[0065] When the user uses it, burn the developed MCU POS client program into the flash, and download and install the above JS_APP.bin through the developed application market application. The specific steps are as follows:
[0066] 1. Use the AWTK GUI tool to convert all xml files, image files, js files and other files used in the developed desktop manager application and application market application into data files that can be recognized by AWTK GUI.
[0067] 2. Use GCC to compile the above data files, AWTK GUI, Jerryscript engine and other .c files to generate a .bin file (system.bin), and use the tool to burn it into the specified location of the flash of the MCU POS machine.
[0068] 3. The system runs, starts the AWTK GUI and Jerryscript engine, loads the above data into the AWTK GUI resource manager and enters the desktop manager application.
[0069] 4. Enter the application market through the desktop manager. The application market obtains all JS APP information that needs to be installed on the TMS server through the http protocol, and displays these JS APPs that need to be installed in the application market in a list.
[0070] 5. Download the JS APP that the user wants to install from the TMS server to the external file system of the microcontroller POS machine through the http protocol.
[0071] 6. Use the SHA256 algorithm to verify the signature of the JS APP file downloaded above.
[0072] 7. Copy the JS APP file downloaded to the external file system to the built-in file system of the MCU POS machine.
[0073] 8. Read the contents of the JS APP copied to the built-in file system into the memory of the MCU POS machine and load it into the resource manager of the AWTK GUI engine.
[0074] The application market notifies the desktop manager to update the UI to display the JS APP copied to the built-in file system.
[0075] Figure 5 A structural diagram of a multi-application development device based on an RTOS operating system provided by an embodiment of the present invention, see Figure 5 The present invention provides a multi-application development device based on an RTOS operating system, which is used for a POS machine having an RTOS operating system, comprising:
[0076] The first compiling unit 110 is used to compile and package the AWTK engine, the Jerryscript engine and the .c file through the GNU compiler suite to generate a system.bin file;
[0077] The first packaging unit 120 is used to compile and package the xml files, js files and picture files required by multiple applications through the AWTK engine to generate a fat.img file containing multiple applications;
[0078] The prefabrication unit 130 is used to package multiple app.bin files to generate a fat.img file containing multiple applications, and burn the fat.img file containing multiple applications and the system.bin file into a POS machine having an RTOS operating system; or,
[0079] The uploading unit 140 is used to upload multiple app.bin files to the application market server.
[0080] Figure 6 is a structural diagram of the first packaging unit 120 provided in an embodiment of the present invention, see Figure 6 , the first packaging unit 120 provided in the embodiment of the present invention includes:
[0081] The second compiling unit 1201 is used to compile the xml files, js files and picture files required by multiple applications through the AWTK engine to generate corresponding data resource files;
[0082] The second packaging unit 1202 is used to package each data resource file to generate each application;
[0083] The third packaging unit 1203 is used to package the multiple applications to generate a fat.img file containing the multiple applications.
[0084] The multi-application development device based on the RTOS operating system provided by the embodiment of the present invention supports the development of application programs in the JavaScript language. The syntax of JavaScript is very simple and easy to learn and understand. JavaScript is an interpreted language and can be directly run without compilation, which is very convenient for development and debugging. It also greatly reduces the difficulty of program development and shortens the development cycle.
[0085] The multi-application development method based on the RTOS operating system provided by the embodiment of the present invention supports application installation, uninstallation and upgrade. When a user develops an application, it does not need to be integrated and burned in by the manufacturer. It only needs to package the application developed by the user through a unique tool to generate a bin file and upload it to the server. Then the client can install the required application through the application market, which is very convenient. In this way, the loading, running, installation and deletion of multiple applications can be realized in the traditional POS machine. The application installation, upgrade and uninstallation functions supported by the present invention make it more convenient for users to develop the application programs they want and improve the efficiency of application integration.
[0086] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A multi-application development method based on RTOS operating system, characterized in that: include: Compile and package the AWTK engine, Jerryscript engine, desktop manager and application market through the GNU compiler suite to generate the system.bin file; Use the AWTK engine to compile and package the xml files, js files, and image files required by each application to generate each app.bin; Pack multiple app.bin files into fat.img files containing multiple applications, burn the fat.img files and system.bin files containing multiple applications into a POS machine with an RTOS operating system or upload multiple app.bin files to an application market server; The generating of fat.img containing multiple applications includes: Compile the xml files, js files, and image files required by multiple applications through the AWTK engine to generate corresponding data resource files; Package each data resource file to generate each application; Packing the multiple applications to generate a fat.img file containing the multiple applications; Burn the developed MCU POS client program into the flash, and download and install JS_APP.bin through the developed application market application. The specific steps are as follows: (1) Use the AWTK GUI tool to convert all the XML files, image files, and JS files used by the developed desktop manager application and application market application into data files that can be recognized by the AWTK GUI; (2) Use GCC to compile the data file, AWTK GUI, Jerryscript engine and .c file to generate the system.bin file, and use the tool to burn it into the flash specified location of the MCU POS machine; (3) The system runs, starts the AWTK GUI and the Jerryscript engine, loads the data into the AWTK GUI resource manager and enters the desktop manager application; (4) Enter the application market through the desktop manager. The application market obtains all the JS APP information that needs to be installed from the TMS server through the http protocol, and displays these JS APPs that need to be installed in the application market in the form of a list; (5) Download the JS APP that the user wants to install from the TMS server to the external file system of the single-chip POS machine through the http protocol; (6) Use the SHA256 algorithm to verify the signature of the downloaded JS APP file; (7) Copy the JS APP file downloaded to the external file system to the built-in file system of the MCU POS machine; (8) Read the contents of the JS APP copied to the built-in file system into the memory of the MCU POS machine and load it into the resource manager of the AWTK GUI engine.
2. A multi-application development device based on RTOS operating system, used for a POS machine with RTOS operating system, characterized in that: include: The first compiling unit is used to compile and package the AWTK engine, Jerryscript engine, desktop manager and application market through the GNU compiler suite to generate a system.bin file; The first packaging unit is used to compile and package the xml files, js files, and image files required by each application through the AWTK engine to generate each app.bin; A prefabrication unit is used to package multiple app.bin files into a fat.img file containing multiple applications, and burn the fat.img file containing multiple applications and the system.bin file into a POS machine with an RTOS operating system; or, The upload unit is used to upload multiple app.bin files to the application market server; The packaging unit comprises: The second compiling unit is used to compile the xml files, js files and picture files required by multiple applications through the AWTK engine to generate corresponding data resource files; The second packaging unit is used to package each data resource file to generate each application; A third packaging unit, used for packaging the multiple applications to generate a fat.img file containing the multiple applications; Burn the developed MCU POS client program into the flash, and download and install JS_APP.bin through the developed application market application. The specific steps are as follows: (1) Use the AWTK GUI tool to convert all the XML files, image files, and JS files used by the developed desktop manager application and application market application into data files that can be recognized by the AWTK GUI; (2) Use GCC to compile the data file, AWTK GUI, Jerryscript engine and .c file to generate the system.bin file, and use the tool to burn it into the flash specified location of the MCU POS machine; (3) The system runs, starts the AWTK GUI and the Jerryscript engine, loads the data into the AWTK GUI resource manager and enters the desktop manager application; (4) Enter the application market through the desktop manager. The application market obtains all the JS APP information that needs to be installed from the TMS server through the http protocol, and displays these JS APPs that need to be installed in the application market in the form of a list; (5) Download the JS APP that the user wants to install from the TMS server to the external file system of the single-chip POS machine through the http protocol; (6) Use the SHA256 algorithm to verify the signature of the downloaded JS APP file; (7) Copy the JS APP file downloaded to the external file system to the built-in file system of the MCU POS machine; (8) Read the contents of the JS APP copied to the built-in file system into the memory of the MCU POS machine and load it into the resource manager of the AWTK GUI engine.
Citation Information
Patent Citations
Update method and system for web hybrid application
CN105577813A
Internet of Things intelligent gateway device and construction method thereof
CN111683005A
Application development method and system based on freeRTOS embedded system and medium
CN117348876A
Method and system for realizing RTOS (Real Time Operating System) embedded with QuickJS engine
CN117411906A
Method of running network application based on POS payment terminal, terminal and non-volatile readable storage medium
US20190377621A1
