Photo machine control system, method and equipment based on RT-Thread driving framework and storage medium

Through the modular design based on the RT-Thread driver framework, problems such as single functions and closed system in the existing photo machine firmware development mode are solved, and a more flexible and maintainable firmware development and update process is achieved, improving user experience and system performance.

CN119974793AActive Publication Date: 2025-05-13GUANGZHOU SENYANG ELECTRONIC TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510058687.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-14
Publication Date
2025-05-13
Estimated Expiration
2045-01-14

AI Technical Summary

Technical Problem

The existing photo machine firmware development model has problems such as single functions, closed system, hardware dependence, slow updates, difficulty in debugging and testing, and lack of modularity, which is difficult to meet the needs of diverse users.

Method used

Design a photo machine control system based on the RT-Thread driver framework, and realizes modular design, dynamic configuration and rapid deployment through integration modules, function division modules, configuration modules, project reconstruction and compilation modules, firmware download and deployment modules, and functional testing and debugging modules.

Benefits of technology

It improves firmware flexibility and maintainability, supports independent updates and replacement of specific functional modules, shortens the time from firmware development to deployment, meets the market's demand for rapid response and instant repair, and improves user experience and system performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119974793A_ABST
    Figure CN119974793A_ABST
Patent Text Reader

Abstract

The invention discloses a photo machine control system, method and equipment based on an RT-Thread driving framework and a storage medium, and aims to effectively coordinate the operation of each module through RTOS multi-task and real-time processing capability and an integrated module, guarantee efficient management of tasks, resources and communication, and improve the efficiency of photo machine control. The function division module refines functions of a photo machine into independent parts such as printing head control and develops exclusive firmware to achieve standardization, the configuration module is combined with an env menu function of an RT-Thread system through a user interface and provides a customizable configuration interface, and the project reconstruction and compiling module completes assembly, reconstruction and compiling according to dynamic operation codes selected by a user. The firmware downloading and deploying module realizes a complete deploying process from transmission to burning, the function testing and debugging module ensures normal functions and assists verification, and the system improves the flexibility and efficiency of photo machine firmware development, can meet diversified user requirements, and shows considerable application potential and development prospects in the photo machine industry.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of development and testing of firmware for a photo machine, and more specifically, to a photo machine control system, method, device and storage medium based on an RT-Thread driver framework. Background Art

[0002] In the current photo printer market, existing firmware development solutions usually focus on implementing several basic and key functional modules. Among them, the high-precision printing function ensures the clarity and fineness of the image output, and can accurately restore every detail of the design draft; the professional color management system can achieve accurate color matching and presentation, whether it is bright advertising images or realistic works of art, it can achieve satisfactory color effects; support for special printing media has expanded the application scope of photo printers, enabling them to print on different materials such as vinyl, silk, canvas, etc.

[0003] However, with the continuous development of the market and the increasing diversification of user needs, this traditional development model has gradually exposed many problems. Although mainstream photo printer products already have relatively complete main function codes, they still face many challenges in actual application scenarios. On the one hand, the continuous increase in media types and the great richness of color choices have led to an explosive growth in the market's derivative demand for photo printers. For example, in the field of advertising production, different promotional scenarios may require the use of different printing media, from waterproof and sun-proof materials for outdoor billboards to special textured paper for indoor posters, which also puts higher requirements on the compatibility and adaptability of ink cartridges. At the same time, when printing in specific environments such as high temperature and high humidity workshop environments or low temperature and dry exhibition venues, , requiring the printer to automatically adjust printing parameters to ensure the stability of printing quality. In addition, users have higher expectations for the accuracy of information feedback during the printing process. They hope to be able to understand detailed information such as nozzle status, ink remaining, printing progress, etc. in real time and accurately. Faced with these complex and changing needs, the product development team can often only respond by continuously stacking and adding new functions based on the existing main code. However, this approach causes each firmware update to become an extremely long and complicated process, involving a lot of code debugging, compatibility testing and other work, which not only consumes a lot of manpower, material resources and time costs, but also easily introduces new problems and hidden dangers, seriously affecting the renewal speed and market competitiveness of printer products.

[0004] Therefore, the existing technology has problems such as single function, closed system, hardware dependence, slow update, difficult debugging and testing, lack of modularity, and difficulty in meeting diverse needs. Summary of the invention

[0005] In order to overcome the above technical problems in the prior art, the present invention designs a photo machine control system, method, device and storage medium based on the RT-Thread driver framework, which can effectively solve the above technical problems.

[0006] In order to solve the above technical problems, the technical solution of the present invention is as follows:

[0007] The photo machine control system based on the RT-Thread driver framework includes:

[0008] Integration module, used to utilize the multi-tasking and real-time processing capabilities of RTOS, coordinate the operation of various modules, and implement task scheduling, resource management, and communication mechanisms;

[0009] A function division module is used to divide the functions of the photo machine into independent modules and develop specific firmware for each module, wherein the firmware realizes the encapsulation of functions and the standardization of interfaces;

[0010] The configuration module is used to provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs;

[0011] A project reconstruction and compilation module is used to dynamically configure the firmware code and compile and generate the firmware to run according to the user's selection, including automatically assembling modular code fragments, and automatically reconstructing the project code, compiling and running the firmware;

[0012] A firmware download and deployment module, used to download the generated firmware code to the memory of the printer and deploy it, including implementing the transmission, verification and burning procedures of the firmware;

[0013] The functional testing and debugging module is used to perform functional testing on the deployed printer to ensure that the selected modules work properly, and provides debugging tools and test cases to assist users in functional verification.

[0014] Preferably, the functional division module includes:

[0015] Function division unit, used to divide the functions of the printer into independent modules, including print head control, color management and media feeding;

[0016] A firmware development unit, used to develop specific firmware for each module to achieve function encapsulation and interface standardization;

[0017] The module selection unit is used to select corresponding functional modules according to user needs and add them to the system construction.

[0018] Preferably, the configuration module includes:

[0019] A user interface unit, used for providing menu options for users to select required functional modules;

[0020] The configuration interface unit is used to utilize the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs.

[0021] Preferably, the project reconstruction compilation module includes:

[0022] A code dynamic configuration unit, used to dynamically configure the firmware code according to the user's selection;

[0023] The compiling and generating unit is used to compile, generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project codes, compiling and running firmware.

[0024] Preferably, the firmware download deployment module includes:

[0025] A firmware transmission unit, used for downloading the generated firmware code into the memory of the photo machine;

[0026] The verification and burning unit is used to verify and burn the firmware.

[0027] Preferably, the functional testing and debugging module includes:

[0028] Functional testing unit, used to perform functional testing on the deployed photo machine to ensure that the selected modules are working properly;

[0029] The debugging tool providing unit is used to provide debugging tools and test cases to assist users in functional verification.

[0030] The photo machine control method based on the RT-Thread driver framework includes the following steps:

[0031] S1: Use the multi-tasking and real-time processing capabilities of RTOS to coordinate the operation of each module and implement task scheduling, resource management and communication mechanisms;

[0032] S2: Divide the functions of the printer into independent modules, including print head control, color management and media feeding, and develop specific firmware for each module to achieve functional encapsulation and interface standardization;

[0033] S3: Provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs;

[0034] S4: user selection, dynamically configure firmware code and compile to generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project code, compiling and running firmware;

[0035] S5: downloading the generated firmware code to the memory of the printer and deploying it, including implementing the firmware transmission, verification and burning procedures;

[0036] S6: Perform functional tests on the deployed photo machine to ensure that the selected modules work properly, and provide debugging tools and test cases to assist users in functional verification.

[0037] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the photo machine control method based on the RT-Thread driving framework as described above are implemented.

[0038] An electronic device includes a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the photo machine control method based on the RT-Thread driving framework as described above are implemented.

[0039] Compared with the prior art, the beneficial effects of the present invention are as follows: the system of the present invention divides the functions of the photo printer into independent modules, such as print head control, color management and media feeding, etc., through modular design, and quickly customizes and expands functions according to user needs, thereby improving the flexibility and maintainability of the firmware. Compared with traditional firmware, the modular design allows specific functional modules to be updated and replaced independently, avoiding the impact on the entire system and thus speeding up the speed of functional iteration. The system adopts the multi-tasking and real-time processing capabilities of RTOS, realizes efficient coordination of task scheduling, resource management and communication mechanisms, ensures the stable operation of the system under high load, improves the overall performance and reliability, and solves the stability problems that may occur in existing firmware in complex printing tasks. In addition, the present invention provides a user-friendly interface through the configuration module, and uses Users can select and customize functional modules according to their needs, breaking the closed nature of traditional firmware, allowing users to perform personalized configuration, and improving user experience. In terms of firmware updates, the present invention supports dynamic configuration and rapid deployment. By automatically assembling modular code fragments and reconstructing project codes, the time from firmware development to deployment is significantly shortened, meeting the market's demand for rapid response and instant repair, and solving the problem of slow existing firmware update cycles. In terms of debugging and testing, the system provides a functional testing and debugging module, providing users with debugging tools and test cases, simplifying the debugging process, and enabling developers to perform functional verification more efficiently, reducing the time to locate problems, and improving testing efficiency. Finally, the system reduces the risk of data leakage and energy waste through the security features of RTOS and optimized printing processes. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived based on the provided drawings without paying any creative work.

[0041] Figure 1 This is the structure diagram of the photo machine control system based on the RT-Thread driver framework;

[0042] Figure 2 This is a step diagram of the photo machine control method based on the RT-Thread driver framework;

[0043] Figure 3 This is the network structure diagram of the photo machine;

[0044] Figure 4 It is a modular program flow chart of the present invention;

[0045] Figure 5A flowchart of the firmware generation and testing process of the present invention;

[0046] Figure 6 This is a flow chart of the functional testing procedure of the present invention;

[0047] Figure 7 Selecting a page map for the menu of the present invention;

[0048] Figure 8 Configuring firmware code for the present invention to generate a result graph;

[0049] Fig. 9 This is the MSH information interaction diagram of the present invention. DETAILED DESCRIPTION

[0050] The drawings are for illustrative purposes only and should not be construed as limiting the present patent;

[0051] In order to better illustrate the present embodiment, some parts in the drawings may be omitted, enlarged or reduced, and do not represent the size of the actual product;

[0052] It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.

[0053] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0054] Example 1

[0055] The photo machine control system based on RT-Thread driver framework, such as Figure 1 As shown, including:

[0056] Integration module, used to utilize the multi-tasking and real-time processing capabilities of RTOS, coordinate the operation of various modules, and implement task scheduling, resource management, and communication mechanisms;

[0057] A function division module is used to divide the functions of the photo machine into independent modules and develop specific firmware for each module, wherein the firmware realizes the encapsulation of functions and the standardization of interfaces;

[0058] The configuration module is used to provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs;

[0059] A project reconstruction and compilation module is used to dynamically configure the firmware code and compile and generate the firmware to run according to the user's selection, including automatically assembling modular code fragments, and automatically reconstructing the project code, compiling and running the firmware;

[0060] A firmware download and deployment module, used to download the generated firmware code to the memory of the printer and deploy it, including implementing the transmission, verification and burning procedures of the firmware;

[0061] The functional testing and debugging module is used to perform functional testing on the deployed printer to ensure that the selected modules work properly, and provides debugging tools and test cases to assist users in functional verification.

[0062] like Figure 3-6 As shown in the figure, after the printer is started, the RTOS in the integrated module starts working immediately. For example, when processing multiple printing tasks, the RTOS will reasonably allocate CPU resources according to the priority and time requirements of the tasks. For example, when there are urgent small-size advertising screen printing tasks and regular large-size poster printing tasks at the same time, the RTOS will ensure that the print head control module and data transmission module of the urgent task have priority to obtain sufficient CPU time slices to ensure their rapid completion, while also preventing the large-size poster printing task from being stagnant for a long time. By dynamically adjusting resource allocation, efficient multi-tasking processing is achieved, ensuring the stable and coordinated operation of each module, and realizing task scheduling, resource management and communication mechanisms.

[0063] The functional division unit clearly divides the functions of the photo printer into independent modules such as print head control, color management, and media feeding. For example, in the print head control module, different control sub-modules are developed for different types of nozzles, such as piezoelectric nozzles and thermal bubble nozzles, to achieve precise ink droplet ejection control.

[0064] The firmware development unit develops specific firmware for each module. Taking the color management module as an example, the development team develops firmware that can accurately restore colors based on different color standards, such as CMYK, Adobe RGB, and color calibration algorithms, and realizes the encapsulation of functions and standardization of interfaces to ensure seamless connection between different modules.

[0065] The module selection unit selects the required functional modules through the configuration interface according to its own needs. For example, if you often need to print on special materials, you can choose a media feeding module optimized for vinyl and canvas materials, as well as a high-precision print head control module and a professional color management module. However, the less commonly used special effects printing function modules are not selected, thus realizing the customized construction of the system.

[0066] On the operation panel of the photo printer, the user interface unit provides intuitive menu options. The menus are presented in a clear classification form, such as "Print Function", "Media Settings", "System Settings", etc. Under the "Print Function" menu, there are sub-options such as "Print Accuracy Selection" and "Print Speed ​​Settings"; in the "Media Settings" menu, various supported media types are listed, and the thickness, water absorption and other parameters of each medium can be further set. Users can easily select the required functional modules through the touch screen or buttons.

[0067] The configuration interface unit utilizes the RT-Thread system env menu function. In the configuration interface, users can see a detailed introduction and recommended configuration of each functional module. For example, for the color management module, the configuration interface will display the currently selected color standard, color calibration history, and recommended calibration cycle. Users can adjust and customize according to actual needs, such as selecting a wide color gamut color standard that is more suitable for printing artworks, and fine-tuning color parameters according to the effect of printed samples to achieve personalized functional configuration.

[0068] According to the selection used, the code dynamic configuration unit will automatically identify and extract the corresponding module code. For example, when the user selects a specific print head control module and color management module, the unit will filter out the relevant code of these two modules from the code library and perform preliminary combination and configuration based on the dependencies and interface specifications between the modules.

[0069] The compilation generation unit then compiles the configured code. During the compilation process, it automatically handles the links and optimizations between modules. For example, targeted optimizations will be performed on the print head control module and data transmission module that interact frequently to reduce data transmission delays and error rates, and ultimately generate firmware that can run on the printer. The entire process is fast and efficient, achieving dynamic configuration and compilation.

[0070] The firmware code generated by the firmware transmission unit is transmitted to the memory of the printer through the JLINK kit. During the transmission process, a reliable checksum and retransmission mechanism is adopted. For example, if a data error is detected during the transmission process, the firmware transmission unit will automatically request the retransmission of the erroneous data block to ensure the integrity of the firmware code.

[0071] The verification and burning unit verifies and burns the firmware transferred to the memory. The verification and burning unit will check the integrity and compatibility of the firmware, such as checking whether the version number of the firmware is compatible with the hardware of the printer, and whether the file size and checksum of the firmware are correct. After confirmation, the firmware will be burned to the designated storage area, and a self-test will be performed after the burning is completed to ensure that the printer can start and run the new firmware normally.

[0072] After the new firmware is deployed on the printer, the functional test unit will automatically run a series of test cases. For example, for the print head control module, a nozzle inkjet test will be performed to check whether the ink droplet size, jetting frequency and jetting angle meet the standards; for the color management module, a standard color test sample will be printed, and the color accuracy and color uniformity of the printed sample will be tested by a color measuring instrument; for the media feeding module, a feeding test will be performed on media of different materials to check whether the media feeding speed and positioning accuracy meet the requirements to ensure that the selected module is working properly.

[0073] When the debugging tool provider unit finds a problem, it will provide technicians with a wealth of debugging tools and test cases. For example, it provides a real-time system log viewing function, so that technicians can view the operating status and error information of each module; it also provides a test tool for simulated printing tasks, so that technicians can simulate printing under different parameter settings, quickly locate the problem, and repair it by modifying the corresponding module code or configuration parameters.

[0074] The functional division module includes:

[0075] Function division unit, used to divide the functions of the printer into independent modules, including print head control, color management and media feeding;

[0076] A firmware development unit, used to develop specific firmware for each module to achieve function encapsulation and interface standardization;

[0077] The module selection unit is used to select corresponding functional modules according to user needs and add them to the system construction.

[0078] The configuration module includes:

[0079] A user interface unit, used for providing menu options for users to select required functional modules;

[0080] The configuration interface unit is used to utilize the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs.

[0081] The project reconstruction compilation module includes:

[0082] A code dynamic configuration unit, used to dynamically configure the firmware code according to the user's selection;

[0083] The compiling and generating unit is used to compile, generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project codes, compiling and running firmware.

[0084] The firmware download deployment module includes:

[0085] A firmware transmission unit, used for downloading the generated firmware code into the memory of the photo machine;

[0086] The verification and burning unit is used to verify and burn the firmware.

[0087] The functional testing and debugging module includes:

[0088] Functional testing unit, used to perform functional testing on the deployed photo machine to ensure that the selected modules are working properly;

[0089] The debugging tool providing unit is used to provide debugging tools and test cases to assist users in functional verification.

[0090] Example 2

[0091] The photo machine control method based on RT-Thread driver framework, such as Figure 2 As shown, the following steps are included:

[0092] S1: Use the multi-tasking and real-time processing capabilities of RTOS to coordinate the operation of each module and implement task scheduling, resource management and communication mechanisms;

[0093] S2: Divide the functions of the printer into independent modules, including print head control, color management and media feeding, and develop specific firmware for each module to achieve functional encapsulation and interface standardization;

[0094] S3: Provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs;

[0095] S4: user selection, dynamically configure firmware code and compile to generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project code, compiling and running firmware;

[0096] S5: downloading the generated firmware code to the memory of the printer and deploying it, including implementing the firmware transmission, verification and burning procedures;

[0097] S6: Perform functional tests on the deployed photo machine to ensure that the selected modules work properly, and provide debugging tools and test cases to assist users in functional verification.

[0098] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the photo machine control method based on the RT-Thread driving framework as described above are implemented.

[0099] An electronic device includes a processor and a memory, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the photo machine control method based on the RT-Thread driving framework as described above are implemented.

[0100] When the printer is started, the capabilities of RTOS are utilized to enable multiple modules such as print task management, nozzle control, and color calibration to work together. For example, when there are multiple poster printing tasks at the same time, RTOS allocates resources reasonably to ensure that each task is carried out in an orderly manner, and other tasks will not be stuck due to a certain task occupying too many resources.

[0101] The functions of the photo printer are divided into independent modules and specific firmware is developed. For example, for the color management module, the developers develop precise color calibration and conversion algorithms based on the company's commonly used CMYK color mode and specific color preferences, realize function encapsulation and interface standardization, and ensure the accuracy and stability of color output.

[0102] Through the user interface of the photo printer, menu options such as "print accuracy setting", "color mode selection", and "media type adaptation" are displayed to the user. According to the poster design requirements, the user uses the RT-Thread system env menu function to enter the configuration interface, select a high-precision print head control module and a color management module suitable for advertising color expression, and customize related parameters such as print resolution, color saturation, etc.

[0103] Based on the user's selection, the system automatically extracts code snippets of the corresponding modules from the code library, assembles and reconstructs the project code, compiles and generates firmware suitable for this task, and downloads it to the printer memory. During the transmission process, strict verification is performed to ensure that the code is complete and correct before burning.

[0104] Perform a functional test on the deployed printer, print a test poster, check whether the color is accurate, the image is clear, the media feed is smooth, etc. If a problem is found, the technician can use the provided debugging tools and test cases to quickly locate the problem, such as color deviation caused by nozzle blockage, or incorrect parameter setting of the media feed motor, and make corresponding adjustments and repairs to ensure that the printer can meet business needs.

[0105] Overall technical solution implementation process

[0106] 1. Equipment and function selection of photo machine:

[0107] The UI displays the options according to production requirements, and selects the required functional modules. For example, if the photo machine solution requires brushless DC motor control values, then the MTR3A module, use the RT-Thread env tool to enter the configuration menu, and check the required device functions. The device is combined into a unique 7-bit identification character by type, version, and number. For example, the third servo control motor module of the photo machine: MTR3A03, the analysis is as follows:

[0108] MTR: Photo machine motor equipment, the first 3 characters are the type of equipment.

[0109] 1: BLDC motor, the 4th character is the subclass: Class 1 - Servo motor; Class 2 - DC motor; Class 3 - BLDC motor; Class 4 - ...;

[0110] A: Function version A. The fifth character is the code iteration version.

[0111] 03: The third motor, the 6th + 7th characters are the device serial number (decimal).

[0112] You can directly select the device through the ENV menu to quickly build the system code. For example, Figure 7 As shown:

[0113] The ENV menu will open the corresponding selection macro in the rtconfig.h file according to the configuration code in the Kconfig file.

[0114]

[0115]

[0116] 2. Modular function code:

[0117] Each device has a function .c file, which depends on the selection macro generated by the menu to decide whether to add it to the project's build system. The internal function code of the file also depends on the macro selection to decide whether it is valid code.

[0118] / *Modularization case of photo machine motor equipment* /

[0119] #include "rtconfig.h"

[0120] / / Access and select macros that are already enabled

[0121] #ifdefined(DEVDRV_MTR3A)

[0122] / / If the menu is configured with MTR3A, all the following codes are turned on

[0123] / *Expand the function code of the motor, keep the external interfaces of MTR1, 2, and 3 consistent, and then insert the module into the project* /

[0124] #endif

[0125] 3. Build the photo machine code:

[0126] The modular code construction of the photo machine relies on the Sconstruct mechanism. After the menu is saved, it will add all the folder files under the open option to the system construction according to the sconscript text written in Python language. You only need to classify different motor devices into modules according to the identifier and quickly insert them into the project.

[0127]

[0128] 4. Code Generation:

[0129] After configuring the linker file and cross-compilation environment, use scons in the RT-Thread env tool to dynamically generate or configure the firmware code directly, such as Figure 8 shown.

[0130] 5. Firmware download and deployment:

[0131] The generated firmware code is transmitted to the printer through the JLINK kit and stored in the non-volatile memory. Since the JLINK kit supports command line control, it can achieve fully automated debugging technology. By editing the bat file, a series of command line operations such as opening JFLASH, burning bin files, and starting APP are added to the bat file.

[0132] / *Control firmware burning and running through bat* /

[0133] cd / d"C:\Program Files\SEGGER\JLink"

[0134] JFlash.exe

[0135] -openprjC:\Desktop\JFLASH_project\1.jflash-openE:\rtthread.bin,0x00000000-auto-startapp-exit

[0136] 6. System initialization:

[0137] When the printer starts, RTOS initializes the system environment and loads necessary drivers and services.

[0138] 7. Modular test cases:

[0139] RT-Thread provides a dedicated test framework that can receive the name of the test case, function reference, initialization function, cleanup function, and priority as parameters, and register the test case internally, such as:

[0140]

[0141]

[0142] This way, when the unit test framework runs, it will find all test cases registered with UTEST_TC_EXPORT and execute them in the specified order. 8. Functional debugging:

[0143] Use MSH (Module Shell) provided by RT-Thread to execute and manage modules in the printer firmware, including loading, unloading, and querying the status of printer modules. Users can enter various commands through the MSH command line to interact with the RT-Thread system to monitor and control the system, such as Fig. 9 shown.

[0144] By registering the test cases in advance and entering the module test symbol in the shell, rt-thread will find the corresponding printer test cases and execute them in sequence. Users can view the printer test return results and quickly debug through MSH.

[0145] The same or similar reference numerals correspond to the same or similar components;

[0146] The terms used in the drawings to describe positional relationships are only used for illustrative purposes and should not be construed as limiting this patent;

[0147] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not limitations on the implementation methods of the present invention. For ordinary technicians in the relevant field, other different forms of changes or modifications can be made on the basis of the above description. It is not necessary and impossible to list all the implementation methods here. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the claims of the present invention.

Claims

1. The photo machine control system based on RT-Thread driver framework is characterized by: include: Integration module, used to utilize the multi-tasking and real-time processing capabilities of RTOS, coordinate the operation of various modules, and implement task scheduling, resource management, and communication mechanisms; A function division module is used to divide the functions of the photo machine into independent modules and develop specific firmware for each module, wherein the firmware realizes the encapsulation of functions and the standardization of interfaces; The configuration module is used to provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs; A project reconstruction and compilation module is used to dynamically configure the firmware code and compile and generate the firmware to run according to the user's selection, including automatically assembling modular code fragments, and automatically reconstructing the project code, compiling and running the firmware; A firmware download and deployment module, used to download the generated firmware code to the memory of the printer and deploy it, including implementing the transmission, verification and burning procedures of the firmware; The functional testing and debugging module is used to perform functional testing on the deployed printer to ensure that the selected modules work properly, and provides debugging tools and test cases to assist users in functional verification.

2. According to the RT-Thread driver framework-based photo machine control system of claim 1, it is characterized in that: The functional division module includes: Function division unit, used to divide the functions of the printer into independent modules, including print head control, color management and media feeding; A firmware development unit, used to develop specific firmware for each module to achieve function encapsulation and interface standardization; The module selection unit is used to select corresponding functional modules according to user needs and add them to the system construction.

3. The photo machine control system based on the RT-Thread driving framework according to claim 1 is characterized in that: The configuration module includes: A user interface unit, used for providing menu options for users to select required functional modules; The configuration interface unit is used to utilize the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs.

4. The photo machine control system based on the RT-Thread driving framework according to claim 1 is characterized in that: The project reconstruction compilation module includes: A code dynamic configuration unit, used to dynamically configure the firmware code according to the user's selection; The compiling and generating unit is used to compile, generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project codes, compiling and running firmware.

5. The photo machine control system based on the RT-Thread driving framework according to claim 1 is characterized in that: The firmware download deployment module includes: A firmware transmission unit, used for downloading the generated firmware code into the memory of the photo machine; The verification and burning unit is used to verify and burn the firmware.

6. The photo machine control system based on the RT-Thread driving framework according to claim 1 is characterized in that: The functional testing and debugging module includes: Functional testing unit, used to perform functional testing on the deployed photo machine to ensure that the selected modules are working properly; The debugging tool providing unit is used to provide debugging tools and test cases to assist users in functional verification.

7. A photo machine control method based on the RT-Thread driver framework, based on the photo machine control system according to any one of claims 1 to 6, characterized in that: The following steps are involved: S1: Use the multi-tasking and real-time processing capabilities of RTOS to coordinate the operation of each module and implement task scheduling, resource management and communication mechanisms; S2: Divide the functions of the printer into independent modules, including print head control, color management and media feeding, and develop specific firmware for each module to achieve functional encapsulation and interface standardization; S3: Provide menu options through the user interface to allow users to select the required functional modules, and use the RT-Thread system env menu function to implement the configuration interface, allowing users to select and customize functional modules according to their needs; S4: user selection, dynamically configure firmware code and compile to generate and run the firmware, including automatically assembling modular code fragments, and automatically reconstructing project code, compiling and running firmware; S5: downloading the generated firmware code to the memory of the printer and deploying it, including implementing the firmware transmission, verification and burning procedures; S6: Perform functional tests on the deployed photo machine to ensure that the selected modules work properly, and provide debugging tools and test cases to assist users in functional verification.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to claim 7 is implemented.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a computer program executable on the processor, and when the computer program is executed by the processor, the method according to claim 7 is implemented.

Citation Information

Patent Citations

  • Industrial control program development platform and method

    WO2024140416A1