A configuration method, device, equipment and storage medium for an application development environment
By simulating display and input devices through SDL, and configuring the application development environment with LittlevGL, it solves the problems of high embedded application development costs and low debugging efficiency, and achieves efficient application development and portability.
Patent Information
- Application Number
- CN202011092725.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-10-13
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2040-10-13
AI Technical Summary
When developing embedded applications based on LittlevGL, existing technologies are costly, difficult, and debugging inefficient. In particular, they need to rely on MCU development boards for transplanting and debugging display and touch drivers.
Use SDL to simulate preset external devices, obtain simulated device information, and use LittlevGL to configure the application development environment, reducing dependence on the MCU development board, achieving decoupling of driver issues, supporting single-step debugging and breakpoint debugging, and shortening the development cycle. .
It reduces the cost and difficulty of application development based on LittlevGL, improves development efficiency, and provides application portability, allowing applications developed on computer equipment to run on MCU development boards.
Smart Images

Figure CN112199087B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a configuration method, device, equipment and storage medium for an application development environment. Background Art
[0002] RT-Thread, the full name is Real Time-Thread. As the name implies, it is an embedded real-time multi-threaded operating system. One of its basic properties is to support multi-tasking, allowing multiple tasks to run simultaneously. At the same time, RT-Thread has the characteristics of high real-time performance, small resource occupation, low power consumption, and fast startup, which is very suitable for resource-constrained platforms. Among them, LittlevGL can be ported on RT-Thread. Here, LittlevGL (abbreviated as LVGL) is an embedded open source graphics library with easy-to-use components, good graphics effects, and low memory usage.
[0003] In the current related solutions, the LVGL graphics library supports display and interaction, and RT-Thread is required to port the display and touch drivers to the corresponding microcontroller unit (MCU). Although LVGL-based applications can be developed on MCU development boards, the cost is high and the difficulty is high. For example, for different MCU development boards, RT-Thread needs to be ported first, and a display screen needs to be equipped and the corresponding display driver needs to be ported. In addition, if the developed application needs to interact, it is also necessary to add the corresponding input external devices (referred to as peripherals) and port the corresponding peripheral drivers. In addition, when debugging the application, if there is a driver problem, it will be difficult to debug and solve it, resulting in low development efficiency. Summary of the invention
[0004] The present application proposes a configuration method, device, equipment and storage medium for an application development environment, which can reduce the application development cost based on LVGL, and cooperate with SDL to improve development efficiency. At the same time, the applications developed based on the application development environment are also portable.
[0005] To achieve the above purpose, the technical solution of this application is implemented as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for configuring an application development environment, which is applied to a computer device, wherein the computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, and the method comprises:
[0007] Simulating a preset external device through SDL to obtain simulated device information; wherein the preset external device at least includes a display device and an input device;
[0008] Based on the simulated device information, the application development environment is configured using an embedded open source graphics library LVGL.
[0009] In a second aspect, an embodiment of the present application provides a configuration device for an application development environment, which is applied to a computer device, wherein the computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, and the configuration device for the application development environment includes: a simulation unit and a configuration unit; wherein,
[0010] The simulation unit is configured to simulate the preset external device through SDL to obtain simulated device information; wherein the preset external device at least includes a display device and an input device;
[0011] The configuration unit is configured to configure the application development environment based on the simulation device information using an embedded open source graphics library LVGL.
[0012] In a third aspect, an embodiment of the present application provides a computer device, wherein the computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, and the computer device comprises: a memory and a processor; wherein:
[0013] The memory is used to store executable instructions that can be run on the processor;
[0014] The processor is used to execute the method as described in the first aspect when running the executable instructions.
[0015] In a fourth aspect, an embodiment of the present application provides a computer storage medium, wherein the computer storage medium stores a configuration program for an application development environment, and when the configuration program for the application development environment is executed by at least one processor, the method described in the first aspect is implemented.
[0016] The configuration method, device, equipment and storage medium of an application development environment provided in the embodiment of the present application are applied to a computer device, which is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL. The preset external device is simulated by SDL to obtain simulated device information; wherein, the preset external device includes at least a display device and an input device; based on the simulated device information, the application development environment is configured using the embedded open source graphics library LVGL. In this way, by simulating the display device and the input device through SDL simulation, it is no longer dependent on the MCU development board, and the application development cost based on LVGL can be reduced; and in conjunction with SDL, there is no need to transplant the peripheral driver of the MCU development board, so as to achieve decoupling from the driver problem, and the application based on LVGL can be single-step debugged and breakpoint debugged, which can speed up the debugging speed, and at the same time, it is no longer necessary to repeatedly burn the MCU development board program to develop and debug through human eye observation results, and it can also shorten the development cycle, reduce the development difficulty, and thus improve the development efficiency; in addition, the application developed based on the application development environment is also portable, and the application developed on the computer device can be transplanted to the MCU development board for operation, which has strong applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 A flowchart of a method for configuring an application development environment provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of the structure of an event queue provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a structure for reading event data from an event queue into a preset type structure provided in an embodiment of the present application;
[0020] Figure 4 A detailed flowchart of a configuration method for an application development environment provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of the structure of a configuration device for an application development environment provided in an embodiment of the present application;
[0022] Figure 6 A schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. It is understood that the specific embodiments described herein are only used to explain the related applications, rather than to limit the applications. It should also be noted that, for the convenience of description, only the parts related to the related applications are shown in the accompanying drawings.
[0024] RT-Thread is an open source real-time operating system (RTOS) developed mainly by the Chinese open source community. A real-time thread operating system is not just a single real-time operating system kernel, it is also a complete application system that includes various components related to real-time and embedded systems: Transmission Control Protocol / Internet Protocol (TCP / IP) protocol stack, Standard C Library (libc) interface, graphical user interface, etc. Here, RT-Thread, as an embedded real-time multi-threaded operating system, allows multiple tasks to run simultaneously. At the same time, RT-Thread has the characteristics of high real-time performance, small resource occupation, low power consumption, and fast startup, which is very suitable for occasions with limited resources (such as cost and power consumption).
[0025] In addition, LittlevGL, as a free open source graphics library, can provide everything you need to create an embedded graphical user interface (GUI), with easy-to-use graphic elements, beautiful visual effects, and low memory usage. In other words, LVGL is an embedded open source graphics library whose components are easy to use, have good graphics effects, and low memory usage.
[0026] At present, RT-Thread has ported LVGL GUI. You can select LittlevGL2RTT in the system packages in the RT-Thread online packages, and then update it to run LVGL on RT-Thread. Here, LittlevGL2RTT is the LittlevGL intermediate framework layer made in RT-Thread version 3.0 and above. The purpose is to seamlessly embed the Liquid Crystal Display (LCD) framework of RT-Thread without the need for developers to port. Specifically, first run menuconfig in env; then enter the RT-Thread online packages->systempackages directory; then open LittlevGL2RTT, select version as the latest version, open demo and save and exit menuconfig; finally, execute pkgs--update to update the LittlevGL2RTT package to the board support package (BoardSupport Package, BSP) directory, and you can run LVGL on RT-Thread.
[0027] It should be understood that the LVGL graphics library can support display and interaction, so RT-Thread needs to port the display driver and touch driver on the corresponding MCU platform. At this time, RT-Thread needs to be started first, and then LVGL needs to perform the following steps to initialize. The details are as follows,
[0028] (1) Call the initialization function (lv_init) to initialize LVGL-related libraries, including memory, file system, animation, group, style, display system, input device processing mechanism, etc.
[0029] (2) Allocate a display buffer (display_buffer) to store display content. The space can be smaller than the screen. When displaying, the content of the buffer is sent to the display.
[0030] (3) Register the display driver (display_driver), set the buffer in display_driver to display_buffer, and then set the refresh callback function (flush_cb), which draws the display content to the screen row by row according to the pixels.
[0031] (4) Register the input driver (input_driver) and set the input device data reading callback function (read_cb). For a mouse or touch screen, the callback function will periodically read the (x, y) coordinates of the contact point and status information such as lift and press.
[0032] (5) RT-Thread maintains the LVGL tick thread, which periodically informs LVGL of the passage of time through the lv_tick_inc function. The tick is used for the operation of the LVGL main task, animation, etc. Here, tick is the relative time unit of the system, also called the system time base, which comes from the periodic interrupt (output pulse) of the timer. One interrupt represents a tick, which can also be called a "clock tick" or a tick.
[0033] (6) RT-Thread maintains the task thread of LVGL. This thread periodically passes the lv_task_handler function, which can make all high- and low-priority tasks in LVGL, user-registered tasks, etc. be called periodically.
[0034] In this way, LVGL can be ported based on RT-Thread on the corresponding MCU platform, and then GUI applications can be developed using the components, layouts, events, tasks and other mechanisms supported by LVGL.
[0035] However, although the current related technical solutions can develop LVGL-based applications on MCU development boards, the cost is high and the difficulty is high.
[0036] (1) For different MCU development boards, RT-Thread needs to be ported first; the MCU development board also needs to be equipped with an LCD display, and the corresponding display driver needs to be ported. These basic tasks are essential;
[0037] (2) If the LVGL application requires interaction, the MCU development board also needs to add corresponding input peripherals and port the corresponding peripheral drivers;
[0038] (3) When debugging LVGL applications, since application development strongly relies on the stability of the underlying hardware and drivers, if there is a driver problem, it will be difficult to debug and solve it.
[0039] Based on this, the embodiment of the present application provides a configuration method of an application development environment, which is applied to a computer device, which is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL. The basic idea of the method is: simulate the preset external device through SDL to obtain simulated device information; wherein, the preset external device includes at least a display device and an input device; based on the simulated device information, the application development environment is configured using LVGL. In this way, by simulating the display device and the input device through SDL simulation, it is no longer dependent on the MCU development board, and the application development cost based on LVGL can be reduced; and in conjunction with SDL, there is no need to transplant the peripheral driver of the MCU development board, and decoupling from the driver problem is achieved, and the application based on LVGL can be single-step debugged and breakpoint debugged, which can speed up the debugging speed, and at the same time, it is no longer necessary to repeatedly burn the MCU development board program to develop and debug through human eye observation results, and it can also shorten the development cycle, reduce the development difficulty, and thus improve the development efficiency; in addition, the application developed based on the application development environment is also portable, and the application developed on the computer device can be transplanted to the MCU development board for operation, which has strong applicability.
[0040] The embodiments of the present application will be described in detail below with reference to the accompanying drawings.
[0041] In one embodiment of the present application, see Figure 1 , which shows a flow chart of a configuration method of an application development environment provided by an embodiment of the present application. Figure 1 As shown, the method may include:
[0042] S101: Simulate a preset external device through SDL to obtain simulated device information; wherein the preset external device at least includes a display device and an input device.
[0043] S102: Based on the simulation device information, configure the application development environment using LVGL.
[0044] It should be noted that the configuration method of the application development environment of the embodiment of the present application is applied to a computer device, in which a preset operating system is installed. Here, the computer device can be a personal computer (PC), such as a desktop, an all-in-one computer, a laptop, a tablet computer, etc., without any limitation.
[0045] It should also be noted that the preset operating system mainly refers to mainstream PC operating systems such as Windows operating system, Linux operating system, etc. In the embodiment of the present application, the preset operating system can also support SDL, and LVGL is based on SDL emulation external devices and is built on RT-Thread.
[0046] Among them, SDL can be called the Simple Direct Media Layer, which is an open source cross-platform multimedia development library that can support mainstream operating systems such as Windows and Linux. SDL provides several functions for controlling images, sounds, and input and output, allowing developers to develop application software across multiple platforms (Windows, Linux, etc.) using the same or similar code. In other words, SDL completes basic functions in a streamlined way, which can greatly simplify the code required to control images, sounds, input and output, etc. Here, SDL can structurally repackage libraries of different operating systems into the same functions, and then provide the same interface to the outside world.
[0047] LVGL is the abbreviation of LittlevGL. As a free open source embedded GUI library, it has the characteristics of exquisite interface, low resource consumption, high portability, etc. It can provide a variety of components and animation effects, and occupies little memory. It supports PC operating system, external storage and graphics processor (Graphics Processing Unit, GPU). Only a single frame buffer device can present advanced visual effects.
[0048] Thus, in the embodiment of the present application, for a computer device, LVGL simulates running on the computer device through preset external devices (such as display devices, input devices, etc.) simulated by the SDL cross-platform library, and then, according to the simulated device information obtained, relevant applications can be developed. In this way, by simulating the integrated development environment through SDL, it is no longer dependent on the MCU development board, and the application development cost based on LVGL can be reduced; and in conjunction with SDL, there is no need to transplant the peripheral driver of the development board, so as to achieve decoupling from the driver problem, and at the same time, there is no need to repeatedly burn the MCU development board program to develop and debug through human eye observation results, which can speed up the debugging speed, shorten the development cycle, reduce the development difficulty, and thus improve the development efficiency; in addition, the developed application is also portable, and the application developed on the computer device can be transplanted to the MCU development board for operation.
[0049] It is understandable that LVGL runs on RT-Thread. In some embodiments, for S101, simulating a preset external device through SDL to obtain simulated device information may include:
[0050] Transplanting the embedded real-time multi-threaded operating system RT-Thread to the preset operating system;
[0051] Based on the RT-Thread, the display device is simulated through SDL to obtain display device simulation information; or,
[0052] Based on the RT-Thread, the input device is simulated through SDL to obtain input device simulation information.
[0053] That is to say, the embodiment of the present application transplants RT-Thread to the PC operating system, and then simulates the preset external devices based on SDL, and LVGL directly uses the simulated external devices to build an application development environment for application development.
[0054] It should be noted that there is a simulator folder under the RT-Thread board support package (BSP) directory. The simulator can be used to simulate the integrated development environment to implement RT-Thread. Specifically, the scons compilation tool is used to generate an integrated development environment (Visual Studio, VS) project to support debugging and development in VS.
[0055] Here, BSP is a layer between the motherboard hardware and the driver layer program in the operating system. It is generally considered to be a part of the operating system. It mainly implements support for the operating system and provides a function package for the upper-level driver to access the hardware device registers so that it can run better on the hardware motherboard. VS is a basically complete development tool set, which includes most of the tools needed in the entire software life cycle, such as Unified Modeling Language (UML) tools, code management tools, Integrated Development Environment (IDE), etc.
[0056] Specifically, the startup process of RT-Thread on a computer device is as follows:
[0057] (1) startup.c contains the main function, which starts the RTOS through rtthread_startup;
[0058] (2) rtthread_startup will call rt_hw_board_init to initialize the board, mainly by applying for a piece of memory through dynamic memory allocation (malloc) to initialize the static random-access memory (SARM);
[0059] (3) Call rt_system_timer_init to initialize the system timer;
[0060] (4) Call rt_thread_idle_init to initialize the idle thread and start running;
[0061] (5) Call rt_application_init to initialize application-related work;
[0062] (6) Call rt_system_scheduler_start to start the scheduler.
[0063] Among them, rt_application_init is the key to this process. In this process, platform-related initialization will be performed. For example, the finsh terminal is initialized to interact with RT-Thread; sdcard is initialized to simulate peripheral storage; the operation of flash is simulated by opening, closing, reading, writing, and controlling the file sd.bin; and finally, the preset external devices are initialized based on SDL.
[0064] Further, in some embodiments, for S102, configuring the application development environment using LVGL based on the simulated device information may include:
[0065] Controlling the LVGL to obtain the display device simulation information through a refresh callback function, and configuring the application development environment according to the obtained display device simulation information; or,
[0066] The LVGL is controlled to obtain the input device simulation information through an input callback function, and the application development environment is configured according to the obtained input device simulation information.
[0067] It should be noted that LVGL is ported to RT-Thread. In addition, LVGL can simulate the display device simulation information or input device simulation information simulated by SDL on the PC, mainly through the driver registration function (such as refresh callback function, input callback function, etc.) to obtain device information. Among them, the refresh callback function is registered in the display driver, and the input callback function is registered in the input driver.
[0068] In this way, based on RT-Thread, the display device is simulated through SDL to obtain display device simulation information; then, based on the display device simulation information, the application development environment of the embodiment of the present application can be built through LVGL. Alternatively, based on RT-Thread, the input device is simulated through SDL to obtain input device simulation information; then, based on the input device simulation information, the application development environment of the embodiment of the present application can also be built through LVGL. At this time, application development based on this application development environment can improve development efficiency, and the developed application is also portable.
[0069] It should also be noted that the preset external device can be an external display device, which can be referred to as a display peripheral, that is, the display device of the embodiment of the present application; it can also be an external input device, which can be referred to as an input peripheral, that is, the input device of the embodiment of the present application.
[0070] The following describes the specific scenarios of simulation development and application under these two peripherals.
[0071] In a possible implementation, when the external device is preset as a display device, for the case of building a display device by SDL simulation, in addition to simulating the display device through SDL to obtain display device simulation information, the method may also include: initializing resources required by the display device; looping rendering data when a refresh event is received; and releasing the resources when an exit event is received.
[0072] The resources here may include windows (SDL_Window), renderers (SDL_Renderer), textures (SDL_Texture) and framebuffers (framebuffer). The loop rendering data here may include: first setting the texture data through SDL_UpdateTexture(); then copying the texture to the renderer through SDL_RenderCopy(); and finally displaying it through SDL_RenderPresent().
[0073] It should also be noted that for SDL simulation, you first need to create the SDL main thread sdl_refr, in which all SDL-related tasks are processed; then in the sdl_refr thread, initialize the Video system through the SDL_Init function, which will initialize the thread and event management mechanisms; and select a suitable video device (SDL_VideoDevice). If the computer device is running the Windows operating system, select the definition of the Windows video device driver, which just reflects the cross-platform characteristics of SDL. Then initialize the video driver according to VideoInit() of SDL_VideoDevice.
[0074] Thus, when simulating a display device through SDL, it is necessary to initialize the SDL_Window, SDL_Renderer, SDL_Texture, and framebuffer required by the display device. Among them, SDL_Window contains various properties that a window should contain, and sets its title, position, height, width, etc.; SDL_Renderer contains various properties that a renderer should contain, and sets its rendering window, rendering device, rendering flag (using software rendering or hardware rendering), etc.; SDL_Texture contains various properties of a texture, and sets its target renderer, texture format, texture height and width, etc.; framebuffer is a frame buffer, and the space size is defined as MONITOR_HOR_RES*MONITOR_VER_RES*sizeof(uint32_t), where MONITOR_HOR_RES is the horizontal resolution and MONITOR_VER_RES is the vertical resolution.
[0075] Then continue the refresh task. The flag of the refresh flag function (sdl_refr_qry) can determine whether a real refresh is needed at present. Sdl_refr_qry is set periodically by lvgl display. If a real refresh is needed at present, the data is rendered in a loop. Specifically, the texture data is first set through SDL_UpdateTexture(), the texture is copied to the renderer through SDL_RenderCopy(), and finally displayed through SDL_RenderPresent(). Until the SDL_QUIT event is received (for example, when the user clicks the close button in the upper right corner of the window, the event type is SDL_QUIT), the refresh task will be stopped at this time, and resources such as SDL_Window, SDL_Renderer, SDL_Texture, and framebuffer will be released.
[0076] Furthermore, after SDL simulates and builds a display device, LVGL can use the simulated display device to simulate running on a computer device, and obtain relevant device information through a callback function, so as to develop an application based on LVGL. That is, in some embodiments, controlling the LVGL to obtain the display device simulation information through a refresh callback function may include:
[0077] Set a refresh callback function to copy the display content included in the area to be refreshed to the preset frame buffer according to pixels;
[0078] When the current demand is a refresh demand, the SDL is controlled to execute a refresh task so as to draw and display the display content in the preset frame buffer according to pixels.
[0079] Furthermore, in some embodiments, the method may further include: setting a refresh flag function; wherein the refresh flag function is used to indicate whether the current demand is a refresh demand.
[0080] It should be noted that the refresh callback function can be represented by flush_cb. The refresh callback function is registered in the display driver (display_driver), mainly interacts with the display device, and can copy the display content included in the area to be refreshed to the framebuffer according to pixels; the refresh callback function must finally call lv_disp_flush_ready to notify the graphics library that it is currently ready to refresh.
[0081] It should also be noted that the refresh flag function can be represented by sdl_refr_qry, that is, sdl_refr_qry is used to indicate whether a refresh task is currently required. In the embodiment of the present application, the display content to be displayed is copied to the framebuffer allocated by SDL, and then sdl_refr_qry is set, so that SDL can perform a refresh task.
[0082] In another possible implementation, when the external device is preset as an input device, the input device may be a mouse device, a keyboard device, etc. In the case of building an input device by SDL simulation, in addition to simulating the input device by SDL to obtain input device simulation information, the method may further include: when an SDL event is received, determining a type corresponding to the received event, and saving the input information of the input device.
[0083] It can be understood that in SDL, when an event is received, the received event needs to be placed in an event queue, wherein the event queue is used to store event data for each placed event. In other words, the event queue mechanism is implemented by SDL itself, and is used to obtain input information of peripherals and cache it in the event queue.
[0084] However, the input information required by LVGL is obtained from the event data cached in the event queue. In some embodiments, the input device simulation information is input into LVGL, which may include:
[0085] Obtaining an event queue in the SDL; wherein the event queue is used to store event data for each received event;
[0086] An event is read from the bottom of the event queue, and event data corresponding to the read event is placed in a structure of a preset type, so as to provide the event data to LVGL as input information of the input device.
[0087] That is to say, in SDL, when an event is received, the received event needs to be placed in the event queue; then, an event is read from the bottom of the event queue, and the event data corresponding to the read event is placed in a structure of a preset type, so that the obtained event data can be provided to LVGL as input information of the input device.
[0088] Furthermore, in some embodiments, obtaining the event queue in the SDL may include:
[0089] In SDL, if the received event is a mouse type event, the state information and click position information of the mouse device are saved in the event queue, so as to provide the state information and click position information of the mouse device to LVGL as input information of the mouse device;
[0090] If the received event is a keyboard type event, saving the state information and key value information of the keyboard device in the event queue, so as to provide the state information and key value information of the keyboard device to LVGL as input information of the keyboard device;
[0091] The state information includes pressing state information and lifting state information.
[0092] It should be noted that in SDL, whenever an event occurs, the event will be placed in the event queue, which stores the event data for each event that occurs. Figure 2 As shown, it shows a schematic diagram of the structure of an event queue provided by an embodiment of the present application. Figure 2In the program, first you click the mouse button (mousebutton), which places an SDL_MouseButtonEvent in the event queue; then you move the mouse (mouse), which places an SDL_MouseMotionEvent in the event queue; then you press a key on the keyboard (keyboard), which places an SDL_KeyboardEvent in the event queue.
[0093] In addition, the function of SDL_PollEvent() is to take an event from the bottom of the event queue and paste the event data into a structure of a preset type (specifically, it can refer to the SDL_Event type). Figure 3 As shown, from Figure 2 At the bottom of the event queue shown, the event data of "SDL_MouseButtonEvent" is pasted into a structure of type SDL_Event, so as to provide the event data to LVGL as input information of the mouse device.
[0094] It should also be noted that if the currently received event is a mouse type event, then the mouse pressing and lifting status information and the mouse clicking position information can be saved, and this information is used as the input information of the LVGL pointer type peripheral; if the currently received event is a keyboard type event, then the keyboard pressing and lifting status information and the keyboard key value information can be saved, and this information is used as the input information of the LVGL keyboard type peripheral.
[0095] Furthermore, after SDL simulates and builds the input device, LVGL can use the simulated input device to simulate running on the computer device, and obtain relevant device information through the callback function, so as to develop an application based on LVGL. That is, in some embodiments, controlling the LVGL to obtain the input device simulation information through the input callback function may include:
[0096] An input callback function is set to read the input information of the input device according to a preset period and respond to events.
[0097] Furthermore, the setting of the input callback function to read the input information of the input device according to a preset period and perform event response may include:
[0098] If the input device is a mouse device, the state information and click position information of the mouse device are read through the input callback function, and an event response is performed on the mouse device according to the state information and click position information of the mouse device;
[0099] If the input device is a keyboard device, the state information and key value information of the keyboard device are read through the input callback function, and an event response is performed on the keyboard device according to the state information and key value information of the keyboard device.
[0100] It should be noted that the input callback function can be represented by read_cb. The input callback function is registered in the input driver (input_driver), and periodically calls back to report the input information of the input device; when there is no extra data, it will directly return null. In addition, the input information reported is different for different input devices.
[0101] It should also be noted that if the input device is a mouse device, that is, when registering a pointer type peripheral, the input callback function can read the pressed and lifted state information and click position information of the SDL emulated mouse device. If the input device is a keyboard device, that is, when registering a keyboard type peripheral, the input callback function can read the pressed and lifted state information and key value information of the SDL emulated keyboard device.
[0102] In addition, if you use a keyboard, you need to add it to a group. In a group, only one object must be in focus to receive key presses. For example, if a text box is in focus, the keyboard input key value can be sent and inserted into the text box. An input device can only send to one group, but a group can receive information from multiple input devices.
[0103] After completing the above steps, you can develop applications based on LVGL. Use the controls provided by LVGL to draw the user interface (UI), and register the event processing function of the control through lv_obj_set_event_cb. When the control is clicked or dragged, various types of events will be generated. The event processing function of the control can perform corresponding processing according to different events to interact with the user.
[0104] This embodiment provides a configuration method for an application development environment, which is applied to a computer device, which is installed with a preset operating system, and the preset operating system supports SDL. The preset external device is simulated by SDL to obtain simulated device information; wherein, the preset external device includes at least a display device and an input device; based on the simulated device information, the application development environment is configured using LVGL. In this way, by simulating the display device and the input device through SDL simulation, it is no longer dependent on the MCU development board, and the application development cost based on LVGL can be reduced; and in conjunction with SDL, there is no need to transplant the peripheral driver of the MCU development board, and decoupling from the driver problem is achieved, and the LVGL-based application can be single-step debugged and breakpoint debugged, which can speed up the debugging speed, and at the same time, it is no longer necessary to repeatedly burn the MCU development board program to develop and debug through human eye observation results, and it can also shorten the development cycle, reduce the development difficulty, and thus improve the development efficiency; in addition, the application developed based on the application development environment is also portable, and the application developed on the computer device can be transplanted to the MCU development board for operation, which has strong applicability.
[0105] In another embodiment of the present application, see Figure 4 , which shows a detailed flow chart of a configuration method of an application development environment provided by an embodiment of the present application. Figure 4 As shown, the detailed process may include:
[0106] S401: Port RT-Thread to the preset operating system.
[0107] It should be noted that the configuration method of the application development environment of the embodiment of the present application is applied to a computer device, in which a preset operating system is installed. The preset operating system mainly refers to mainstream PC operating systems such as Windows operating system and Linux operating system.
[0108] It should also be noted that the configuration method of the application development environment of the embodiment of the present application adopts the SDL platform simulation idea, which can port RT-Thread to the PC operating system, and then simulate the external display device (i.e., display device) and external input device (i.e., input device) based on SDL, and LVGL directly uses the simulated peripherals for application development.
[0109] Among them, RT-Thread provides a simulator in the BSP directory to support running on Windows operating systems. Here, the scons compilation tool is used to generate a VS project to support debugging and development in VS. Specifically, the startup process of RT-Thread on a computer device is as follows:
[0110] (1) startup.c contains the main function, which starts the RTOS through rtthread_startup;
[0111] (2) rtthread_startup will call rt_hw_board_init to initialize the board, mainly by malloc a piece of memory to initialize SRAM;
[0112] (3) Call rt_system_timer_init to initialize the system timer;
[0113] (4) Call rt_thread_idle_init to initialize the idle thread and start running;
[0114] (5) Call rt_application_init to initialize application-related work;
[0115] (6) Call rt_system_scheduler_start to start the scheduler.
[0116] It should be noted that rt_application_init is the key to this process. In this process, platform-related initialization will be performed. For example, the finsh terminal is initialized to interact with RT-Thread; sdcard is initialized to simulate peripheral storage; the operation of flash is simulated by opening, closing, reading, writing, and controlling the file sd.bin; and finally, the display device and input device are initialized based on SDL.
[0117] S402: Building simulated display devices and input devices based on SDL.
[0118] It should be noted that SDL is an open source cross-platform multimedia development library that supports mainstream operating systems including Windows and Linux. Here, basic functions are completed in a streamlined manner, which greatly simplifies the code required to control images, sounds, input and output, etc. In addition, SDL is structurally packaging libraries of different operating systems into the same functions and providing the same interface to the outside world.
[0119] Specifically, SDL's simulation steps for display devices and input devices are as follows:
[0120] (1) Create the SDL main thread sdl_refr, in which all SDL-related tasks are processed;
[0121] (2) In the sdl_refr thread, the Video system is first initialized through the SDL_Init function, which will initialize the thread and event management mechanisms; and select a suitable SDL_VideoDevice. If the computer device is running the Windows operating system, the definition of the Windows video device driver is selected, which reflects the cross-platform feature of SDL. Then initialize the video driver according to VideoInit() of SDL_VideoDevice;
[0122] (3) Initialize the SDL_Window, SDL_Renderer, SDL_Texture, and framebuffer required by the display device. Among them, SDL_Window contains various properties that a window should contain, and sets its title, position, height, width, etc.; SDL_Renderer contains various properties that a renderer should contain, and sets its rendering window, rendering device, rendering flag (using software rendering or hardware rendering), etc.; SDL_Texture contains various properties of a texture, and sets its target renderer, texture format, texture height and width, etc.; framebuffer is a frame buffer, and the size of the space is defined as MONITOR_HOR_RES*MONITOR_VER_RES*sizeof(uint32_t), where MONITOR_HOR_RES is the horizontal resolution and MONITOR_VER_RES is the vertical resolution;
[0123] (4) Continue to perform refresh tasks and event processing tasks until receiving the SDL_QUIT event (such as when the user clicks the close button in the upper right corner of the window, the event type will be SDL_QUIT), then stop the refresh task and release resources such as SDL_Window, SDL_Renderer, SDL_Texture, framebuffer, etc.;
[0124] (5) In the refresh task, the sdl_refr_qry flag determines whether a real refresh is needed. The sdl_refr_qry flag can be set periodically by the LVGL display. If a real refresh is needed, the data is rendered in a loop, including: first setting the texture data through SDL_UpdateTexture, then copying the texture to the renderer through SDL_RenderCopy(), and finally displaying it through SDL_RenderPresent();
[0125] (6) In the event processing task, when an SDL event is received, determine what type of event the current event is and save the current peripheral input information.
[0126] In SDL, whenever an event occurs, it is placed in an event queue. The event queue stores event data for each event that occurs. So if the user clicks the mouse button, moves the mouse, and then presses a key on the keyboard, the event queue will look like this: Figure 2 shown.
[0127] In addition, the function of SDL_PollEvent() is to take an event from the bottom of the event queue and paste its event data into a structure of type SDL_Event. Figure 3 As shown, from Figure 2 At the bottom of the event queue shown, the event data of "SDL_MouseButtonEvent" is pasted into a structure of type SDL_Event, so as to provide the event data to LVGL as input information of the mouse device.
[0128] If the current event is a mouse type event, the mouse press and release status information and the mouse click position information are saved. This information can be used as input information for LVGL pointer type peripherals.
[0129] If the current event is a keyboard type event, the keyboard's pressed and lifted status information and the keyboard's key value information are saved, and this information is used as the input information of the LVGL keyboard type peripheral.
[0130] S403: LVGL uses the simulated display device and input device to configure the application development environment and develops the application on the computer device.
[0131] It should be noted that LVGL is a free open source graphics library that can provide a variety of components and animation effects, occupy little memory, support operating systems, external storage and GPUs, and can present advanced visual effects with only a single frame buffer device.
[0132] In the embodiment of the present application, LVGL simulates running on the PC through the display device and input device simulated by the SDL cross-platform library, and mainly obtains device information through the driver registration function. Specifically,
[0133] (1) Set the flush_cb refresh callback function of display_driver.
[0134] The refresh callback function is registered in the display_driver and mainly interacts with the display to copy the display content of the area to be refreshed to the display buffer at the pixel level. The function must finally call lv_disp_flush_ready to notify the graphics library that it is currently ready to refresh.
[0135] In the embodiment of the present application, the display content to be displayed is copied to the framebuffer allocated by SDL, and sdl_refr_qry is set so that SDL performs the real refresh task.
[0136] (2) The read_cb input callback function of the device input_driver.
[0137] The input callback function is registered to input_driver and periodically calls back to report the input information of the input device. When there is no extra data, it will directly return empty. The input information reported is different for different input devices.
[0138] When registering a pointer type peripheral, the input callback function can read the pressed and lifted status information and click position information of the SDL emulated input device (mouse);
[0139] When registering a keyboard type peripheral, the input callback function can read the pressed and lifted status information and key value information of the SDL emulated input device (keyboard);
[0140] In addition, if you use a keyboard type peripheral, you need to add it to a group. In a group, there must be only one control (object) in focus to receive key presses. For example, if a text box is in focus, the input key value of the keyboard can be sent and inserted into the text box. An input device can only send to one group, but a group can receive information from multiple input devices.
[0141] After completing the above steps, you can develop applications based on LVGL. Use the controls provided by LVGL to draw the UI, and register the event processing function of the control through lv_obj_set_event_cb. When the control is clicked or dragged, various types of events will be generated. The event processing function of the control can perform corresponding processing according to different events to interact with the user.
[0142] In short, the embodiments of the present application can realize the development of LVGL applications based on RT-Thread on computer devices, with low development cost and fast debugging speed, and application development no longer depends on the MCU development board, thereby improving the development speed; in addition, the embodiments of the present application can use SDL to simulate display devices and input devices, and in addition to providing a large number of services, the application programming interface (API) is relatively simple and can be as close to the local hardware as possible.
[0143] It should also be noted that when adding a new external device, it is only necessary to simulate the external device based on the event mechanism in SDL first, and then LVGL can obtain the input information of the external device by registering a callback function to perform corresponding processing.
[0144] In addition, in the embodiment of the present application, SDL can be cross-platform supported, and is stable, simple, flexible, and has supported mainstream PC operating systems such as Windows and Linux. When porting RT-Thread to PC operating systems such as Windows and Linux, LVGL registers external devices simulated by SDL, and LVGL applications can be developed on these PC operating systems. In this way, application developers can flexibly use their respective PC development platforms to enhance the experience of application developers. In addition, in addition to providing video services (including simulated display devices and input devices), SDL can also provide audio (Audio) services. At this time, SDL can simulate Audio devices and simulate the opening and playback of audio drivers; thus, SDL simulated Audio devices can be used in applications to increase audio effects.
[0145] The technical solution of the embodiment of the present application can produce the following beneficial effects:
[0146] (1) By simulating display devices and input devices through SDL, there is no need to rely on MCU development board hardware and drivers, which reduces the cost of LVGL application development;
[0147] (2) The SDL simulation platform can be used in conjunction with the integrated development environment to perform single-step debugging and breakpoint debugging on LVGL applications, and real-time data of various variables and RAM can be observed, which speeds up debugging;
[0148] (3) Use the SDL simulation platform in conjunction with the integrated development environment, eliminating the need to repeatedly burn the MCU development board and perform development and debugging by observing the results with the human eye, which can also reduce the development cycle and ease the development difficulty;
[0149] (4) Applications developed by LVGL are portable. Applications developed on computer devices can be easily ported to MCU development boards for running.
[0150] This embodiment provides a configuration method for an application development environment. The specific implementation of the aforementioned embodiment is described in detail through the above embodiment. It can be seen that through the technical solution of the aforementioned embodiment, the display device and input device are simulated by SDL, and it is no longer dependent on the MCU development board, which can reduce the application development cost based on LVGL; and in conjunction with SDL, it can also shorten the development cycle and improve development efficiency; in addition, the LVGL application developed based on the application development environment is also portable, and the application developed on the computer device can be transplanted to the MCU development board for operation, and has strong applicability.
[0151] In another embodiment of the present application, based on the same inventive concept as the above embodiment, see Figure 5 , which shows a schematic diagram of the composition structure of a configuration device 50 for an application development environment provided in an embodiment of the present application. Figure 5 As shown, the configuration device 50 of the application development environment may include: a simulation unit 501 and a configuration unit 502; wherein,
[0152] The simulation unit 501 is configured to simulate the preset external device through SDL to obtain simulated device information; wherein the preset external device at least includes a display device and an input device;
[0153] The configuration unit 502 is configured to configure the application development environment using LVGL based on the simulation device information.
[0154] Among them, the configuration device 50 of the application development environment is applied to a computer device, which is installed with a preset operating system, and the preset operating system supports SDL, and LVGL is based on SDL to simulate external devices and is built on RT-Thread.
[0155] In some embodiments, see Figure 5 , the configuration device 50 of the application development environment may further include a transplantation unit 503 configured to transplant RT-Thread to a preset operating system;
[0156] The simulation unit 501 is specifically configured to simulate the display device through SDL based on the RT-Thread to obtain display device simulation information; or, based on the RT-Thread, simulate the input device through SDL to obtain input device simulation information.
[0157] In some embodiments, the configuration unit 502 is specifically configured to control LVGL to obtain the display device simulation information through a refresh callback function, and configure the application development environment according to the obtained display device simulation information; or, control LVGL to obtain the input device simulation information through an input callback function, and configure the application development environment according to the obtained input device simulation information; wherein, LVGL is ported in RT-Thread.
[0158] In some embodiments, the configuration unit 502 is further configured to set a refresh callback function to copy the display content included in the area to be refreshed to a preset frame buffer pixel by pixel; and when the current demand is a refresh demand, control SDL to perform a refresh task to draw and display the display content in the preset frame buffer pixel by pixel.
[0159] In some embodiments, the configuration unit 502 is further configured to set a refresh flag function; wherein the refresh flag function is used to indicate whether the current demand is a refresh demand.
[0160] In some embodiments, the configuration unit 502 is further configured to set an input callback function to read the input information of the input device according to a preset period and perform an event response.
[0161] In some embodiments, see Figure 5 The configuration device 50 of the application development environment may further include an acquisition unit 504 and a reading unit 505, wherein:
[0162] The acquisition unit 504 is configured to acquire an event queue in the SDL; wherein the event queue is used to store event data for each received event;
[0163] The reading unit 505 is configured to read an event from the bottom of the event queue, and place event data corresponding to the read event into a structure of a preset type, so as to provide the event data to LVGL as input information of the input device.
[0164] In some embodiments, the acquisition unit 504 is specifically configured to, in the SDL, save the status information and click position information of the mouse device in the event queue if the received event is a mouse type event; and save the status information and key value information of the keyboard device in the event queue if the received event is a keyboard type event; wherein the status information includes press status information and lift status information.
[0165] In some embodiments, the configuration unit 502 is specifically configured to, if the input device is a mouse device, read the status information and click position information of the mouse device through the input callback function, and respond to events of the mouse device according to the status information and click position information of the mouse device; and if the input device is a keyboard device, read the status information and key value information of the keyboard device through the input callback function, and respond to events of the keyboard device according to the status information and key value information of the keyboard device.
[0166] In some embodiments, the preset operating system includes at least: a Windows operating system or a Linux operating system.
[0167] It can be understood that in this embodiment, a "unit" can be a part of a circuit, a part of a processor, a part of a program or software, etc., and of course it can also be a module, or it can be non-modular. Moreover, the components in this embodiment can be integrated into a processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional module.
[0168] If the integrated unit is implemented in the form of a software function module and is not sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this embodiment is essentially or the part that contributes to the prior art or the whole or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform all or part of the steps of the method described in this embodiment. The aforementioned storage medium includes: U disk, mobile hard disk, read only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0169] In another embodiment of the present application, this embodiment provides a computer storage medium, which stores a configuration program of an application development environment, and when the configuration program of the application development environment is executed by at least one processor, the method described in any one of the aforementioned embodiments is implemented.
[0170] The configuration device 50 and the computer storage medium based on the above application development environment are shown in FIG. Figure 6 , which shows a hardware structure diagram of a computer device 60 provided in an embodiment of the present application. Figure 6 As shown, the computer device 60 may include: a communication interface 601, a memory 602 and a processor 603; each component is coupled together via a bus system 604. It is understood that the bus system 604 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 604 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, Figure 6 Various buses are labeled as bus system 604. Among them, the communication interface 601 is used for receiving and sending signals in the process of sending and receiving information between other external network elements;
[0171] A memory 602, used to store a computer program that can be run on the processor 603;
[0172] The processor 603 is configured to execute, when running the computer program:
[0173] Simulating a preset external device through SDL to obtain simulated device information; wherein the preset external device at least includes a display device and an input device;
[0174] Based on the simulated device information, the application development environment is configured using LVGL.
[0175] It can be understood that the memory 602 in the embodiment of the present application can be a volatile memory or a non-volatile memory, or can include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus random access memory (DRRAM). The memory 602 of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0176] The processor 603 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the hardware integrated logic circuit or software instructions in the processor 603. The above processor 603 may be a general processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The methods, steps and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general processor may be a microprocessor or the processor may also be any conventional processor, etc. The steps of the method disclosed in the embodiments of the present application can be directly embodied as a hardware decoding processor to be executed, or the hardware and software modules in the decoding processor are combined and executed. The software module can be located in a mature storage medium in the field such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory 602, and the processor 603 reads the information in the memory 602 and completes the steps of the above method in combination with its hardware.
[0177] It is understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, the processing unit may be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (DSP), digital signal processing devices (DSPD), programmable logic devices (PLD), field programmable gate arrays (FPGA), general purpose processors, controllers, microcontrollers, microprocessors, other electronic units for performing the functions described in the present application, or a combination thereof.
[0178] For software implementation, the techniques described herein can be implemented by modules (e.g., procedures, functions, etc.) that perform the functions described herein. The software code can be stored in a memory and executed by a processor. The memory can be implemented in the processor or outside the processor.
[0179] Optionally, as another embodiment, the processor 603 is further configured to execute the steps of the method described in any one of the aforementioned embodiments when running the computer program.
[0180] It should be noted that, in this application, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0181] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0182] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0183] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0184] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0185] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for configuring an application development environment, characterized in that: Applied to a computer device, the computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, the method comprises: Transplanting the embedded real-time multi-threaded operating system RT-Thread to the preset operating system; Based on the RT-Thread, the preset external device is simulated through SDL to obtain simulated device information; wherein the preset external device includes at least a display device and an input device; Based on the simulated device information, the application development environment is configured using an embedded open source graphics library LVGL; wherein the LVGL is transplanted into the RT-Thread.
2. The method according to claim 1, characterized in that The method of simulating the preset external device through SDL to obtain simulated device information includes: Based on the RT-Thread, the display device is simulated through SDL to obtain display device simulation information; or, Based on the RT-Thread, the input device is simulated through SDL to obtain input device simulation information.
3. The method according to claim 2, characterized in that The configuring the application development environment by using LVGL based on the simulated device information includes: Controlling the LVGL to obtain the display device simulation information through a refresh callback function, and configuring the application development environment according to the obtained display device simulation information; or, The LVGL is controlled to obtain the input device simulation information through an input callback function, and the application development environment is configured according to the obtained input device simulation information.
4. The method according to claim 3, characterized in that The controlling the LVGL to obtain the display device simulation information through a refresh callback function includes: Set a refresh callback function to copy the display content included in the area to be refreshed to the preset frame buffer according to pixels; When the current demand is a refresh demand, the SDL is controlled to execute a refresh task so as to draw and display the display content in the preset frame buffer according to pixels.
5. The method according to claim 4, characterized in that The method further comprises: A refresh flag function is set; wherein the refresh flag function is used to indicate whether the current demand is a refresh demand.
6. The method according to claim 3, characterized in that The controlling the LVGL to obtain the input device simulation information through an input callback function includes: An input callback function is set to read the input information of the input device according to a preset period and respond to events.
7. The method according to claim 6, characterized in that The method further comprises: Obtaining an event queue in the SDL; wherein the event queue is used to store event data for each received event; An event is read from the bottom of the event queue, and event data corresponding to the read event is placed in a structure of a preset type, so as to provide the event data to LVGL as input information of the input device.
8. The method according to claim 7, characterized in that The obtaining of the event queue in the SDL comprises: In the SDL, if the received event is a mouse type event, the state information and click position information of the mouse device are saved in the event queue; If the received event is a keyboard type event, then saving the state information and key value information of the keyboard device in the event queue; The state information includes pressing state information and lifting state information.
9. The method according to claim 6, characterized in that The setting of the input callback function, reading the input information of the input device according to a preset period and performing event response, includes: If the input device is a mouse device, the state information and click position information of the mouse device are read through the input callback function, and an event response is performed on the mouse device according to the state information and click position information of the mouse device; If the input device is a keyboard device, the state information and key value information of the keyboard device are read through the input callback function, and an event response is performed on the keyboard device according to the state information and key value information of the keyboard device.
10. The method according to any one of claims 1 to 9, characterized in that: The preset operating system includes at least: a Windows operating system or a Linux operating system.
11. A configuration device for an application development environment, characterized in that: Applied to a computer device, the computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, and the configuration device of the application development environment includes: a transplantation unit, a simulation unit and a configuration unit; wherein, The transplantation unit is configured to transplant RT-Thread to a preset operating system; The simulation unit is configured to simulate the preset external device through SDL based on the RT-Thread to obtain simulated device information; wherein the preset external device includes at least a display device and an input device; The configuration unit is configured to configure the application development environment based on the simulation device information using an embedded open source graphics library LVGL; wherein the LVGL is transplanted into the RT-Thread.
12. A computer device, characterized in that: The computer device is installed with a preset operating system, and the preset operating system supports a cross-platform multimedia library SDL, and the computer device includes: a memory and a processor; wherein, The memory is used to store executable instructions that can be run on the processor; The processor is configured to execute the method according to any one of claims 1 to 10 when running the executable instructions.
13. A computer storage medium, characterized in that: The computer storage medium stores a configuration program of an application development environment, and when the configuration program of the application development environment is executed by at least one processor, the method according to any one of claims 1 to 10 is implemented.
