Embedded scene-oriented cloud integrated development system and development method
By integrating SDK tool extensions, compilation tool extensions, and embedded development master extensions into the cloud-based integrated development system, the complete embedded development process is realized, solving the problem of difficult environment setup in embedded development and supporting online collaborative development.
Patent Information
- Application Number
- CN202410363981.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-28
- Publication Date
- 2025-09-30
AI Technical Summary
The existing cloud-based integrated development environment is difficult to use out-of-the-box in embedded development. Developers need to perform complex environment setup work, and it cannot provide complete embedded development support.
Provides a cloud-based integrated development system for embedded scenarios, including an operating system, underlying environment, plug-in system business layer, page interaction layer, and presentation layer. It integrates SDK tool extensions, compilation tool extensions, and embedded development main extensions, and implements project creation, compilation, and debugging through web pages, supporting the complete process of embedded development.
It realizes project creation, compilation and debugging in the embedded development process, eliminating the complicated work of environment construction for developers and supporting collaborative online development on different devices and locations.
Smart Images

Figure CN120723262A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer software systems, and in particular to a cloud-based integrated development system and development method, computing device, and storage medium for embedded scenarios. Background Art
[0002] There are currently two mainstream solutions for cloud-based integrated development environments: Theia, led by the Eclipse Theia Foundation, and code-server, launched by Coder, based on Microsoft's open-source Visual Studio Code (VS Code). Theia utilizes VS Code as part of its infrastructure, while code-server is a web-based distribution based entirely on VS Code. Both offer a basic editor environment based on VS Code, and their overall architecture is consistent with VS Code.
[0003] like Figure 1 The following diagram shows the process architecture of VS Code. The main processes include the renderer process, the main process, and the extension process, as well as the language service and debug adapter processes. The language service is a special extension process that implements intelligent features such as syntax highlighting. The debug adapter is a debug child process created specifically for the debugger based on the Node.js V8 debug protocol, which is ultimately debugged and interacted with by the renderer process. Node.js not only provides the V8 debug protocol but also the system runtime environment. This feature provides the prerequisites for cloud deployment of code-server and Theia.
[0004] Both use Monaco Editor as their underlying code editor. This web-based code editor, first released in VS Code, is a core component of VS Code and is also used by cloud-based integrated development environments.
[0005] Both code-server and Theia are based on the Electron multi-process framework and Monaco Editor to form a complete editor environment, while the Node.js runtime environment provides cross-platform and cloud deployment support. As cloud-based text editing solutions, they have become one of the consensus solutions for cloud development environments worldwide. However, it is clear that they only provide basic code editing and common file system operations, which are not enough to support the complete embedded development process. Although the official has launched a series of extensions to enrich the support for embedded development, it is still difficult to achieve out-of-the-box use. When conducting embedded development, developers still need to set up the corresponding embedded development environment in the integrated development environment.
[0006] Therefore, in this context, how to provide a solution that can provide good support for cloud integration developers for embedded scenarios and save developers from complicated tasks such as environment construction is a technical problem that needs to be solved. Summary of the Invention
[0007] In view of the above problems in the prior art, the present application provides a cloud-based integrated development system, development method, computing device and storage medium for embedded scenarios, so as to save developers from the complicated work of setting up the environment when developing for embedded systems.
[0008] To achieve the above-mentioned purpose, the first aspect of the present application provides a cloud-based integrated development system for embedded scenarios, including an operating system, an underlying environment, a plug-in system business layer, a page interaction layer, and a presentation layer, which are deployed in sequence from the bottom layer to the top layer;
[0009] The plug-in system business layer includes third-party extensions, supplementary extensions for embedded development, and extension processes running in the underlying environment; the supplementary extensions for embedded development include:
[0010] SDK tool expansion, used to provide SDK packages required for embedded development;
[0011] Compilation tool expansion, used to provide engineering compilation tools for embedded development;
[0012] The main extension for embedded development is used to communicate with the presentation layer through the page interaction layer so that the presentation layer can implement an interactive interface for embedded development based on web pages, and to respond to user operations through the interactive interface, call the SDK tool extension and the compilation tool extension according to the embedded development process, and call the third-party extension through the extension process to realize project creation, compilation and debugging of embedded development.
[0013] As described above, the cloud-based integrated development system for embedded scenarios described in this application can, through the three aforementioned embedded development supplementary extensions and combined with third-party extensions, implement project creation, compilation, and debugging during the embedded development process, eliminating the complex tasks of developers such as setting up the environment. Furthermore, due to its web-based embedded development interactive interface, cloud-based embedded development is implemented, supporting developers to conduct collaborative online development through browsers on different devices and locations, providing excellent support for developers in embedded development.
[0014] As a possible implementation method of the first aspect, the embedded development main extension integrates a decompression tool and a project template compression package, which is used to respond to the project type and output directory determined by the user through the interactive interface, and decompress the project template compression package of the corresponding project type to the output directory using the decompression tool to realize the project creation.
[0015] From the above, the project creation work in the embedded development process can be achieved through the tools integrated by the embedded development main expansion.
[0016] As a possible implementation of the first aspect, the embedded development main extension is further configured to respond to user operations through the interactive interface and manage the created project.
[0017] From the above, the tasks of project creation and management in the embedded development process can be achieved through the embedded development main extension.
[0018] As a possible implementation method of the first aspect, the compilation tool extension integrates the CMake build tool, the Make build tool and the GCC compiler, which is used to generate a compilation rule file according to the project configuration data generated when the project is created, generate a configuration file according to the compilation rule file through the CMake build tool, and call the GCC compiler according to the configuration file through the Make build tool to achieve the compilation.
[0019] From the above, the full process of compiling the projects created during the embedded development process can be achieved through the integrated compilation tool chain, such as the CMake build tool, Make build tool and GCC compiler mentioned above.
[0020] As a possible implementation of the first aspect, the embedded development main extension further integrates a debugger for implementing the debugging through interaction with the third-party extension called by the extension process; the interactive interface is also used to display the debugging process.
[0021] From the above, the integrated debugger can be used to interact with third-party extensions to debug the target program (i.e., the executable file generated by the code of the created project) during the embedded development process.
[0022] As a possible implementation method of the first aspect, the third-party extension includes at least one of the following extensions: vscode-ioc extension: used to provide language localization support; clang-format extension: used to provide code formatting support; clangd extension: used to cooperate with the compile_commands.json generated during compilation to provide code jump, problem prompts, and automatic completion functions; doxdocgen extension: used to provide specified comments generated in C / C++ files; cpp-tools extension: used to provide a debugger-based project debugging perspective; hexeditor extension: used to provide hexadecimal viewing function based on memory address; memview extension: used to provide memory variable viewing function during debugging; debug_tracker_vscode extension: used to perform session tracking during debugging to view memory.
[0023] From the above, you can flexibly select the third-party extension to be used and call it according to the needs of the debugging process.
[0024] A second aspect of the present application provides a cloud-based integrated development method for embedded scenarios, using any of the cloud-based integrated development systems for embedded scenarios described in the first aspect, the method comprising:
[0025] The embedded development main extension communicates with the presentation layer through the page interaction layer so that the presentation layer displays the interactive interface of the embedded development based on the Web page;
[0026] According to the embedded development process, the embedded development main extension responds to the user's operations through the interactive interface, calls the SDK tool extension, the compilation tool extension, and calls the third-party extension through the extension process to realize the project creation, compilation and debugging of embedded development.
[0027] As a possible implementation of the second aspect, according to the embedded development process, the embedded development main extension responds to the user's operation through the interactive interface, calls the SDK tool extension, the compilation tool extension, and calls the third-party extension through the extension process to implement embedded development project creation, compilation and debugging, including:
[0028] The embedded development main extension responds to the project type and output directory determined by the user through the interactive interface, decompresses the project template compressed package of the corresponding project type to the output directory using the decompression tool, and generates project configuration data to complete the project creation;
[0029] The compilation tool is extended to generate a compilation rule file according to the project configuration data;
[0030] Generate a configuration file based on the compilation rule file using a CMake build tool integrated with the compilation tool extension;
[0031] The Make build tool integrated by the compilation tool extension completes the compilation according to the configuration file and calls the GCC compiler integrated by the compilation tool extension to generate a target program;
[0032] The target program is debugged through the interaction between the debugger and the third-party extension called by the extension process, and the debugging process is displayed through the interactive interface.
[0033] A third aspect of the present application provides a computing device, comprising: a communication interface, and at least one processor; wherein the at least one processor is used to execute program instructions, and when the program instructions are executed by the at least one processor, the computing device implements the above method.
[0034] A fourth aspect of the present application provides a computer-readable storage medium having program instructions stored thereon, which, when executed by a computer, enables the computer to implement the above-mentioned method.
[0035] In summary, the solution provided by this application provides supplementary expansion in the expansion process, solving the current situation where cloud environments do not provide sufficient support for embedded development activities. This application solution supports cloud deployment, regardless of the local environment, and supports collaborative online development through a browser on any device and in any location. Moreover, this application solution can be used out of the box, and through supplementary expansion and third-party expansion, a complete embedded development process is realized, eliminating the problem of environment construction in the development process of conventional integrated development environments. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 This is a diagram of the process architecture of VS Code;
[0037] Figure 2 Schematic diagram of the framework of the cloud-based integrated development system for embedded scenarios provided by an embodiment of the present application;
[0038] Figure 3 This is a flow chart of a cloud-based integrated development method for embedded scenarios provided by an embodiment of the present application;
[0039] Figure 4 It is a structural schematic diagram of a computing device provided in an embodiment of the present application.
[0040] It should be understood that the sizes and shapes of the blocks in the above structural diagrams are for reference only and should not constitute an exclusive interpretation of the embodiments of the present invention. The relative positions and inclusion relationships between the blocks presented in the structural diagrams are merely schematic representations of the structural relationships between the blocks and do not limit the physical connection methods of the embodiments of the present invention. DETAILED DESCRIPTION
[0041] The technical solution provided by this application is further described below with reference to the accompanying drawings and examples. It should be understood that the system structure and business scenarios provided in the examples of this application are mainly for illustrating possible implementation methods of the technical solution of this application and should not be interpreted as the sole limitation of the technical solution of this application. It is known to those skilled in the art that with the evolution of the system structure and the emergence of new business scenarios, the technical solution provided by this application is also applicable to similar technical problems.
[0042] It should be understood that the cloud-based integrated development solutions for embedded scenarios provided in the embodiments of this application include cloud-based integrated development systems and development methods, apparatuses, computing devices, and storage media for embedded scenarios. Because these technical solutions solve the same or similar problems, some repetitions may not be repeated in the following descriptions of the specific embodiments. However, these specific embodiments should be considered as cross-references and can be combined with each other.
[0043] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. In the event of any inconsistency, the meanings described in this specification or the meanings derived from the contents recorded in this specification shall prevail. In addition, the terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application. In order to accurately describe the technical content in this application and to accurately understand the present invention, the following explanations or definitions are given for the terms used in this specification before describing the specific embodiments:
[0044] 1) Main Process: This is typically started by the main.js file and persists throughout the application lifecycle. The main process is responsible for managing and controlling the entire application lifecycle, including creating and managing renderer processes, interacting with the operating system (such as opening files, displaying notifications, creating context menus, etc.), and handling global system-level events. If the main process supports the Node.js API, developers can directly call Node.js functions from the main process to implement cross-platform system operations.
[0045] 2) Renderer Process: A renderer process corresponds to each window or tab visible to the user. It is actually the web page rendering environment based on the Chromium kernel. Each window has its own renderer process, which runs the normal web page code (HTML / CSS / JavaScript).
[0046] 3) Extension Process: An extension process is an independent process that runs an extension (also known as a plug-in). An extension process can have its own sandbox environment, so its operation does not affect the security of the main process and other extensions.
[0047] 4) Debug Adapter: Its main responsibility is to receive commands from debuggers (such as Chrome Dev Tools and Visual Studio Code's debugging extensions) and convert these commands into a format that the V8 engine can understand before sending them. It also converts the debugging information returned by the V8 engine into a format that the debugger can understand and returns it.
[0048] 5) Runtime Environment: The runtime environment (RE) refers to the set of external conditions and resources that a program relies on during execution. It includes operating system services, library functions, hardware resources, and specific application frameworks. The runtime environment ensures the smooth execution of the program and provides the necessary support. When a program is loaded into memory and begins running, it interacts with the runtime environment, utilizing its resources and services to complete its tasks.
[0049] 6) Compilation environment: The compilation environment is an integrated development environment (IDE) that provides various tools and applications required for program development. This environment usually includes tools such as code editors, compilers, debuggers, and graphical user interfaces, designed to help developers write, test, and debug code more efficiently. In the compilation environment, source code (usually high-level language code) is converted into executable binary instructions. During this process, the compiler will check for syntax errors in the source code and may perform code optimization. Finally, the compiler converts the source code into low-level language code (such as assembly language code), and the linker then merges these codes with library files to generate an executable file.
[0050] This application provides an implementation solution for cloud-based integrated development for embedded scenarios. This solution primarily leverages an extension approach, adding supplementary extensions for embedded development to a cloud-based integrated development system. Based on these supplementary extensions and some third-party extensions, the cloud-based integrated development system implements the process of project creation, compilation, and debugging for web-based embedded development. This application is described below with reference to the accompanying drawings and various embodiments.
[0051] The first embodiment of the present application provides a cloud-based integrated development system for embedded scenarios, which can be deployed in a server. Figure 2 A schematic diagram of the framework of the cloud-based integrated development system for embedded scenarios is shown, including the operating system, underlying environment, plug-in system business layer, page interaction layer and presentation layer deployed in sequence from the bottom to the top.
[0052] The plug-in system business layer includes third-party extensions, supplementary extensions for embedded development, and extension processes running in the underlying environment. The supplementary extensions for embedded development include SDK tool extensions, compilation tool extensions, and main extensions for embedded development.
[0053] The SDK tool extension (Intel_sdk_tool) provides the SDK package required for embedded development. In some embodiments, the SDK can be provided by a software vendor, device manufacturer, or platform developer. The SDK can include a series of interface files and library files (a set of pre-compiled, reusable code modules that can be called during compilation or runtime). When building applications, developers can reference the interfaces in the interface files and call the corresponding library files to implement the corresponding functions.
[0054] Among them, the compilation tool extension (Intewell_build_tools) is used to provide engineering compilation tools for embedded development. These engineering compilation tools are used to implement the compilation process of program codes.
[0055] Among them, the embedded development main extension (Intewell_vscode) is used to communicate with the presentation layer through the page interaction layer, so that the presentation layer can implement the interactive interface of embedded development based on the web page, and is used to respond to user operations through the interactive interface, call the SDK tool extension and the compilation tool extension according to the embedded development process, and call the third-party extension through the extension process to realize the project creation, compilation and debugging of embedded development. In some embodiments, the embedded development main extension can also call library functions, APIs, etc. provided by the underlying environment through the extension process as needed.
[0056] Among them, the presentation layer is used to describe the construction of the user interface (UI) and display it. In this embodiment, the presentation layer displays an interactive interface for embedded development based on a web page, wherein the content displayed by the interactive interface is registered with the embedded development main extension (that is, the embedded development main extension specifies the content displayed by the interactive interface) so that the displayed content matches the embedded development process. In some embodiments, the presentation layer can be built based on technologies such as HTML, JavaScript, TypeScript, CSS, or Vue.js.
[0057] HTML (Hyper Text Markup Language) is the markup language for webpages, defining their structure and content. HTML tags describe various parts of a page, such as headings, paragraphs, images, tables, and forms, building the basic skeleton of the page. CSS (Cascading Style Sheets) is responsible for the style and layout of webpages, such as setting the color, font, size, layout, and animation effects of webpage elements, thus achieving page aesthetics. JavaScript is a scripting language that enables webpages to have dynamic content updates and responsive interactions. For example, it can manipulate HTML elements, handle user events, execute asynchronous requests, and perform data validation. TypeScript is a superset of JavaScript that enhances the JavaScript development experience. TypeScript adds a static type system, interfaces, enumerations, generics, and other features, while maintaining compatibility with JavaScript code. Vue.js is a progressive JavaScript framework that enables more complex data binding and responsive updates. JavaScript and Vue.js can implement user interaction and data-driven view updates.
[0058] Wherein, the page interaction layer is used to realize the information interaction between the plug-in system business layer and the presentation layer, including realizing the interaction between the embedded development main extension and the presentation layer. Wherein, the page interaction layer can realize the information transmission between different web pages through the web-based API, or realize the data transmission between the web page and other threads, such as realizing the data transmission between the web page and the thread corresponding to the embedded development main extension, or the data transmission with the thread corresponding to the called other extension. In some embodiments, the web-based API includes postMessage and addEventListener. Wherein, postMessage can be used to transmit data between the page and the background (such as the background thread), and addEventListener can be used to monitor and process events such as mouse clicks, form submissions, and keyboard presses. The interaction between the presentation layer and the plug-in system business layer can be realized through postMessage and addEventListener.
[0059] Among them, the operating system and the underlying environment constitute the runtime environment (Runtime Environment) of the upper layer, which provides support for the operation of the upper layer. In some embodiments, the support provided includes memory management, process and thread management, file system access, support for multiple APIs and library functions (or library files), or security management, etc. In some embodiments, the support provided includes providing some tools, such as providing extension loading and publishing tools, packaging tools, etc. Among them, the operating system is installed in the server. In some embodiments, the operating system can be, for example, Linux, Unix, Ubuntu, Debian, Fedora, or openSUSE. Among them, the underlying environment is deployed in the operating system. In some embodiments, the underlying environment includes Node.js, VS Code, code-server, or Electron, etc. installed in the operating system, as well as necessary tools, etc.
[0060] Among them, Node.js is a runtime environment for running JavaScript code, which allows JavaScript code to run on the server side. Among them, VS Code provides a set of VS Code APIs that enable developers to create customized VS Code extensions to meet specific workflows or needs. Among them, code-server is a web version of VS Code that runs on a server, allowing users to access and use the functions of VS Code running on the server through a web browser. Among them, Electron is an open source framework that integrates Chromium (the open source version of Chrome) and Node.js into a runtime environment, allowing developers to use web technologies (including HTML, CSS, and JavaScript) to build desktop applications.
[0061] In some embodiments, the embedded development main extension integrates a decompression tool and a project template compression package, which is used to respond to the project type and output directory determined by the user through the interactive interface, and decompress the project template compression package of the corresponding project type to the output directory using the decompression tool to complete the project creation.
[0062] In some embodiments, decompression tools include zip, 7z, tar, and xz. In some embodiments, there may be multiple project template compressed packages, with different compressed packages corresponding to different types, such as project templates for sensor data acquisition, wearable smart product projects, and robotic motion control projects. An introduction to each type of project template can be displayed on an interactive interface, allowing the user to select the desired project type and select or enter the project output directory through the interactive interface. The corresponding project template compressed package is then decompressed to the output directory using the decompression tool to complete the project creation.
[0063] In some embodiments, when the project is created, the data of the project configuration will also be automatically saved to a file, which is referred to here as a project configuration file. In some embodiments, the data of the project configuration includes the project name, the directory where the project is located, the organizational structure of the project, the dependencies in the project (i.e., which files depend on other files), the link libraries used, etc., which are automatically generated when the project is created. In some embodiments, the saving format of the project configuration file can be json (JavaScript Object Notation) format, XML (Extensible Markup Language) format, YAML (YAML Ain't Markup Language) format, TOML (Tiny Object Mapping Language) format, etc. In this embodiment, the json file format is adopted, which does not rely on any specific platform or language specific cross-platform, cross-language characteristics, as well as lightweight and easy to parse characteristics.
[0064] In some embodiments, the embedded development main extension is further configured to manage the created project in response to user operations through the interactive interface. For example, management operations such as switching, adding, deleting, and modifying parameters within a project or function will also read and process the project configuration data in the corresponding project configuration file to implement the corresponding management operation.
[0065] In some embodiments, the compilation tool extension integrates the CMake build tool, the Make build tool and the GCC compiler, which is used to generate a compilation rule file according to the project configuration data, generate a compilation configuration file according to the compilation rule file through the CMake build tool, and complete the compilation through the Make build tool according to the compilation configuration file and calling the GCC compiler.
[0066] Among them, the compilation tool extension can generate a compilation rule file (CMakeLists file) based on the project configuration data recorded in the project configuration file. The compilation rule file can be used to describe the project's organizational structure, dependencies, compilation options, link libraries, source file paths (including project directories) and other information.
[0067] Among them, the CMake build tool generates a compilation configuration file (Makefiles) based on the compilation rule file. The Makefile can define the dependencies of the project and how to generate the target file and the final executable file from the source code. In some embodiments, the CMake build tool will also generate a compile_command.json file, which can be used to record the specific compilation process of the source files in the project. For example, the recorded content includes: source file path, compilation command line (for example, it can contain preprocessor definitions, paths, compilation options, etc.), output target file path, etc. The compile_command.json file can be used by an integrated development environment (IDE) or other tools (such as clangd extensions) to identify and understand the compilation commands and source code structure of the project, so that accurate code jumps, reconstruction and other functions can be provided during debugging.
[0068] Among them, the Make build tool determines how to compile and link the program by reading the Makefile. When the Make command is executed, Make will call the GCC compiler, and according to the content in the Makefile, the GCC compiler completes the compilation and generates a binary executable file.
[0069] Among them, the compilation process of the GCC compiler mainly includes four stages: preprocessing, compilation, assembly and linking. Among them, the preprocessing stage mainly processes the header files, macro definitions, etc. in the source files. For example, the function declarations and structure declarations in the header files will be included in the source files, and the macro definitions will be replaced according to their defined content. The compilation stage mainly converts the preprocessed files into assembly language. The compilation process will check the grammatical structure of the code. The assembly stage converts the assembly code generated in the compilation stage into a binary target file that can be recognized by the machine. The binary target file cannot be run directly because it lacks certain libraries required for the program to run. The linking stage is to link the binary target file with the dependent library files to generate a binary executable file, that is, the target program.
[0070] In some embodiments, the embedded development main extension also integrates a debugger for implementing the debugging through interaction with the third-party extension called by the extension process, wherein the interactive interface is also used to display the debugging process. In some embodiments, the debugger can be a GDB debugger, an lldb debugger, etc. In some embodiments, when debugging is started, the debugging process can be started by loading a debugging configuration file (launch file), which records the relevant parameters of the debugger and the path of the debugged program and other parameters. According to the debugging configuration file, the corresponding debugger can be started to debug the debugged program. In some embodiments, the parameters recorded in the debugging configuration file may include at least one of the following parameters:
[0071] name: The name of the debug configuration, mainly to help developers identify different debug configuration files.
[0072] type: The debugger type, such as "GDB", "lldb (LLVM Low-Level Debugger)", or other supported debugger types.
[0073] request: The method of launching the debugger, such as "launch" to directly launch the debugging target, or "attach" to attach to an already running process for debugging.
[0074] program: The full path of the target program to be debugged, that is, the directory where the executable file generated after compilation is located.
[0075] stopAtEntry: Used to set whether to stop the debugger at the program entry. If set to true, the debugger will pause at the first line of code executed by the program, making it easier for developers to debug step by step from the program entry.
[0076] cwd: Current Working Directory. Debugging will be started in this directory. Configure the current working directory so that the program can correctly find the relevant resource files.
[0077] MIMode: Used to indicate the debugger mode, for example, "GDB" for GDB.
[0078] miDebuggerPath: Indicates the actual path of the debugger, such as the location of the executable file of the GDB debugger.
[0079] miDebuggerServerAddress: If you are performing remote debugging, enter the debugging server's IP address and port number (ip:port) here so that the debugger can connect to the debugging server on the remote device.
[0080] In some embodiments, by calling third-party extensions, functions such as displaying a debug perspective, generating annotations, viewing memory status, and performing error checking can be implemented during the debugging process. The functions implemented are related to the specific third-party extensions called. In some embodiments, the third-party extensions include at least one of the following extensions:
[0081] vscode-ioc extension: used to provide language localization support.
[0082] clang-format extension: used to provide code formatting support.
[0083] clangd extension: used to analyze the compile_commands.json file generated during compilation, providing functions such as code jump, problem prompts, error detection, and automatic completion. For example, when clangd extension can be used according to
[0084] compile_commands.json analyzes the project's build configuration and provides context-sensitive code autocompletion, error checking, and other functions for source files.
[0085] doxdocgen extension: is a document comment generator that provides the function of generating comments in C / C++ files.
[0086] cpp-tools extension: A C / C++ development extension that provides a debug perspective for debugging, including rendering variables, memory, stack, registers, and other debug perspectives.
[0087] Hexeditor extension: is a hexadecimal viewer that provides the function of viewing data based on memory addresses and viewing these data in hexadecimal form.
[0088] memview extension: is a memory viewer that provides memory variable viewing capabilities during debugging; for example, it can visualize memory areas during debugging and display the values of memory variables, making it easier for developers to track and understand the memory status of the program while it is running.
[0089] debug_tracker_vscode extension: A debug session tracker used to track sessions during debugging to view memory.
[0090] The second embodiment of the present application provides a cloud-based integrated development method for embedded scenarios, using the above-mentioned cloud-based integrated development system for embedded scenarios to perform the development, such as Figure 3 The method includes:
[0091] S10: The embedded development main extension communicates with the presentation layer through the page interaction layer so that the presentation layer displays an interactive interface of the embedded development based on the Web page.
[0092] S20: According to the embedded development process, the embedded development main extension responds to the user's operation through the interactive interface, calls the SDK tool extension, the compilation tool extension, and calls the third-party extension through the extension process to realize the project creation, compilation and debugging of embedded development.
[0093] In some embodiments, the above step S20 may include the following sub-steps:
[0094] S21: The embedded development main extension responds to the project type and output directory determined by the user through the interactive interface, decompresses the project template compressed package of the corresponding project type to the output directory using the integrated decompression tool, and generates project configuration data to complete the project creation.
[0095] S22: The compilation tool generates a compilation rule file based on the project configuration data.
[0096] S23: Generate a configuration file according to the compilation rule file using the CMake build tool integrated by the compilation tool extension.
[0097] S24: The Make build tool integrated with the compilation tool extension completes the compilation according to the configuration file and calls the GCC compiler integrated with the compilation tool extension to generate a target program.
[0098] S25: Debugging the target program is achieved through interaction between the debugger integrated in the embedded development main extension and the third-party extension called by the extension process, and the debugging process is displayed through the interactive interface.
[0099] Below, this application will be further introduced in conjunction with the cloud-based integrated development system for embedded scenarios provided in the third embodiment. In this embodiment, the cloud-based development solution for embedded scenarios can be based on the cloud-based integrated development environment code-server, and the supplementary extension implementation of this application can be added. The related functions, views, data storage, etc. involved use supplementary extensions or third-party extensions as the main body of service provision. Among them, code-server is a stable VSCode web version, and can be directly compatible with the VS Code ecosystem and expansion system. This application uses the infrastructure of code-server as the basic runtime environment and editor, and adds the above-mentioned three supplementary extensions to the plug-in system business layer to realize cloud-based integrated development for embedded scenarios.
[0100] Among them, in the third embodiment, the specific configuration of the relevant integrated development environment that supports and implements the extended operation is as follows:
[0101] Runtime environment: Ubuntu 20.04 operating system, in which Node.js, Electron, and VS Code are installed and deployed. The runtime environment provides major third-party library files, including: vscode (the API of VS Code, used to interact with the core functions of VSCode, such as editing files, processing commands, etc.), fs (the file system module of Node.js, used to read and write files), vsce (a command-line tool for packaging and publishing VS Code extensions), etc. Package management tools and packaging tools are also provided: npm, yarn (npm and yarn are both JavaScript package managers for installing and managing extensions), Webpack (a module packager that can package many scattered modules into one or more optimized packages for fast loading in the browser). Among them, the programming language extensions can be TypeScript, JavaScript, Vue, and CSS to support interface rendering of the presentation layer. Among them, data storage can use the json file format.
[0102] Through the above-configured integrated development environment (also known as a compilation environment or runtime environment), it is possible to import the required extensions, including the supplementary extensions provided in this application (SDK tool extensions, compilation tool extensions, and embedded development main extensions) and third-party extensions, into the plug-in system business layer of the cloud-based integrated development system for embedded scenarios. In the above-configured integrated development environment, these extensions can operate normally.
[0103] In this embodiment, the SDK tool extension (Intewell_sdk_tool) can be an SDK tool extension provided by Beijing Dongtu Technology Co., Ltd., which includes the SDK packages required for embedded development. The SDK tool extension has a built-in set of SDK package support and provides SDK import, deletion, and data acquisition interfaces to import and integrate SDK packages into the SDK tool extension.
[0104] In this embodiment, the compilation tool extension (Intewell_build_tools) provides a backend interface for CMake, Make, and GCC compilers to import and integrate CMake, Make, and GCC compilers into the compilation tool extension. Among them, CMake, Make, and GCC compilers can be third-party tools.
[0105] In this embodiment, the embedded development main extension (Intel_vscode) provides a background interface for the GDB debugger and the 7z decompression tool to import and integrate the GDB debugger and the 7z decompression tool into the embedded development main extension. Among them, the GDB debugger and the 7z decompression tool can be third-party tools.
[0106] The three supplementary extensions mentioned above integrate the aforementioned third-party tools to support project creation, compilation, running, and debugging for embedded development. Furthermore, these three supplementary extensions, along with third-party extensions available from the official extension market (available as apps or web pages), complement embedded development activities within code-server, enabling support for the complete embedded development process within code-server.
[0107] In the process of embedded development, the Intewell_vscode extension, on the one hand, serves as the implementation body of the presentation layer, and supports which pages to display in the presentation layer. Specifically, each page of the interactive interface for implementing embedded development based on Web pages that the presentation layer wants to display needs to be registered in the Intewell_vscode extension. After the page is registered in the Intewell_vscode extension, the presentation layer can start the registered page during the development process. On the other hand, the Intewell_vscode extension serves as the interface scheduling center for other related extensions. During the development process, the complete process of embedded development is implemented by calling other extensions (including calling Intewell_sdk_tool, Intewell_build_tools, and calling third-party extensions through the VS Code extension process). The following examples illustrate the creation of projects, project management and configuration, project compilation, and project debugging in the embedded development process:
[0108] 1) The process of creating a project:
[0109] Provide users with an interactive interface for embedded development based on web pages through the presentation layer;
[0110] The user selects the project type and output directory through the interactive interface;
[0111] Provide the relevant information of the user's operation on the interactive interface to the IntelliJ IDEA extension through the page interaction layer;
[0112] The IntelliJ IDEA_VSCode extension reads the compressed template package for the corresponding project type and uses the integrated 7z file to extract it to the output directory to complete the project creation. During project creation, a JSON file is generated that records the project configuration data, such as the project name, project directory, project organization structure, and project dependencies.
[0113] 2) Project management and configuration process:
[0114] Through the interactive interface, users can manage the created projects, such as switching and deleting projects, deleting, modifying, and adding related content within the projects, etc.
[0115] Provide the relevant information of the user's operation on the interactive interface to the IntelliJ IDEA extension through the page interaction layer;
[0116] The IntelliJ IDEA_VSCODE extension will update the project files or data in the files involved according to the above operations of the user, and will also update the configuration data in the corresponding JSON files.
[0117] 3) Project compilation process:
[0118] Through the interactive interface, users can start compiling the created project;
[0119] Provide the relevant information of the user's operation on the interactive interface to the IntelliJ IDEA extension through the page interaction layer;
[0120] The Intewell_vscode extension will call the Intewell_build_tools extension based on the user's above operations, and execute the compilation process on the code of the created project according to the configuration data in the json file. The compilation process includes:
[0121] Dynamically generate CMakeLists.txt compilation rule file based on the project configuration data in the json file;
[0122] The CMake build tool integrated by Intewell_build_tools generates compilation configuration files Makefiles and compile_command.json code index files according to CMakeLists.txt;
[0123] The Make build tool integrated by the IntelliJ IDEA build tool calls the GCC compiler, and according to the content in the Makefile, the GCC compiler completes the compilation to generate a binary executable file.
[0124] 4) Engineering debugging process:
[0125] Through the interactive interface, the user can start the operation of the debugging function;
[0126] Provide the relevant information of the user's operation on the interactive interface to the IntelliJ IDEA extension through the page interaction layer;
[0127] The IntelliJ IDEA_VSCode extension calls the built-in GDB debugger and third-party extensions through the VS Code process to start debugging the target program (i.e., the compiled executable file). The choice of which third-party extension to call can be based on the developer's habits. The corresponding third-party extension can be called based on a pre-generated debugging configuration file (such as the launch.json file). The following are just a few examples:
[0128] During the debugging process, the cpp-tools extension (one of the third-party extensions) can be called. The cpp-tools extension interacts with the GDB debugger, sends commands to the GDB debugger and obtains data. The cpp-tools provides a debugging perspective based on the obtained data and displays it on the presentation layer.
[0129] Among them, during the debugging process, you can also call the debug_tracker_vscode stack tracker extension (one of the third-party extensions) and the memview extension (one of the third-party extensions). These extensions interact with the GDB debugger, send commands to the GDB debugger and obtain data, and provide debugging perspectives based on the obtained data, such as stack trace highlighting and memory status display during debugging.
[0130] Among them, during the debugging process, you can also call (one of the third-party extensions), the clangd extension can obtain the compile_command.json file to identify and understand the project's compilation commands and source code structure, so that accurate code jumps, reconstruction and other functions can be provided during the debugging process.
[0131] As can be seen above, the three supplementary extensions mentioned above and some third-party extensions in this application have realized the provision of a complete embedded development process in code-server. Since code-server itself provides basic cloud deployment support, it only needs to be packaged with the extensions when packaging the code-server source code to complete the distribution of code-server and extensions. Since code-server itself supports page mode, it only needs to be deployed on the server during distribution. The server can be accessed from different devices and embedded projects can be collaboratively developed directly in the browsers of different devices.
[0132] Figure 4 900 is a schematic structural diagram of a computing device provided in an embodiment of the present application. The computing device can be used as an optional embodiment for implementing the above method. The computing device can be a terminal, or a chip or chip system inside the terminal. Figure 4 As shown, the computing device 900 includes: a processor 910 , a memory 920 , and a communication interface 930 .
[0133] It should be understood that Figure 4 The communication interface 930 in the computing device 900 shown may be used to communicate with other devices, and may specifically include one or more transceiver circuits or interface circuits.
[0134] The processor 910 may be connected to a memory 920. The memory 920 may be used to store the program code and data. Therefore, the memory 920 may be a storage unit within the processor 910, an external storage unit independent of the processor 910, or a component including both a storage unit within the processor 910 and an external storage unit independent of the processor 910.
[0135] Optionally, the computing device 900 may further include a bus. The memory 920 and the communication interface 930 may be connected to the processor 910 via a bus. The bus may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 A line without an arrow is used to represent the bus, but this does not mean that there is only one bus or one type of bus.
[0136] It should be understood that in the embodiment of the present application, the processor 910 can adopt a central processing unit (CPU). The processor can also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. Alternatively, the processor 910 adopts one or more integrated circuits to execute relevant programs to implement the technical solutions provided in the embodiments of the present application.
[0137] The memory 920 may include a read-only memory and a random access memory, and provides instructions and data to the processor 910. A portion of the processor 910 may also include a non-volatile random access memory. For example, the processor 910 may also store information about the device type.
[0138] When the computing device 900 is running, the processor 910 executes the computer-executable instructions in the memory 920 to perform any operation step of the above method and any optional embodiment thereof.
[0139] It should be understood that the computing device 900 according to the embodiment of the present application can correspond to the corresponding subject in executing the method according to each embodiment of the present application, and the above-mentioned and other operations and / or functions of each module in the computing device 900 are respectively for implementing the corresponding processes of each method of the present embodiment. For the sake of brevity, they will not be repeated here.
[0140] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0141] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0142] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0143] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0144] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0145] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the 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 and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.
[0146] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the program is used to execute the above method, which includes at least one of the solutions described in the above embodiments.
[0147] The computer storage medium of the embodiment of the present application can adopt any combination of one or more computer-readable media.Computer-readable media can be computer-readable signal media or computer-readable storage media.Computer-readable storage media can be, for example, but not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or components, or any combination thereof.More specific examples (non-exhaustive list) of computer-readable storage media include: electrical connection with one or more wires, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination thereof.In this document, computer-readable storage media can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0148] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0149] Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0150] The computer program code for performing the operations of the present application can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0151] In addition, the words "first, second, third, etc." or module A, module B, module C and other similar terms in the specification and claims are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that the specific order or sequence can be interchanged where permitted so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0152] In the above description, the numbers representing the steps, such as S110, S120, etc., do not necessarily mean that the steps must be executed in this manner. If permitted, the order of the steps can be interchanged or they can be executed simultaneously.
[0153] The term "comprising" as used in the specification and claims should not be construed as limiting to what is listed thereafter; it does not exclude other elements or steps. Thus, it should be interpreted as specifying the presence of the features, integers, steps, or components mentioned, but not excluding the presence or addition of one or more other features, integers, steps, or components, or groups thereof. Thus, the expression "a device comprising means A and B" should not be limited to a device consisting solely of components A and B.
[0154] References in this specification to "one embodiment" or "an embodiment" mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in at least one embodiment of the present application. Therefore, the phrases "in one embodiment" or "in an embodiment" appearing throughout this specification do not necessarily refer to the same embodiment, but may refer to the same embodiment. Furthermore, in one or more embodiments, the particular features, structures, or characteristics can be combined in any suitable manner, as would be apparent to one of ordinary skill in the art from this disclosure.
[0155] Note that the above are only preferred embodiments of the present application and the technical principles employed. Those skilled in the art will understand that the present application is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present application. Therefore, although the present application has been described in more detail through the above embodiments, the present application is not limited to the above embodiments and may include many other equivalent embodiments without departing from the scope of protection of the present application, all of which fall within the scope of protection of the present application.
Claims
1. A cloud-based integrated development system for embedded scenarios, characterized by: It includes the operating system, underlying environment, plug-in system business layer, page interaction layer and presentation layer, which are deployed in sequence from the bottom layer to the top layer. The plug-in system business layer includes third-party extensions, supplementary extensions for embedded development, and extension processes running in the underlying environment; The additional expansion of embedded development includes: SDK tool expansion, used to provide SDK packages required for embedded development; Compilation tool extensions, used to provide engineering compilation tools for embedded development; and The main extension for embedded development is used to communicate with the presentation layer through the page interaction layer so that the presentation layer can implement an interactive interface for embedded development based on web pages, and to respond to user operations through the interactive interface, call the SDK tool extension and the compilation tool extension according to the embedded development process, and call the third-party extension through the extension process to realize project creation, compilation and debugging of embedded development.
2. The system according to claim 1, wherein: The embedded development main extension integrates a decompression tool and a project template compression package, which is used to respond to the project type and output directory determined by the user through the interactive interface, and decompress the project template compression package of the corresponding project type to the output directory using the decompression tool to realize the project creation.
3. The system according to claim 1 or 2, characterized in that The embedded development main extension is also used to respond to user operations through the interactive interface and manage the created project.
4. The system according to claim 1, wherein: The compilation tool extension integrates the CMake build tool, the Make build tool and the GCC compiler, which is used to generate a compilation rule file according to the project configuration data generated when the project is created, generate a configuration file according to the compilation rule file through the CMake build tool, and use the Make build tool to call the GCC compiler according to the configuration file to implement the compilation.
5. The system according to claim 1, wherein: The embedded development main extension further integrates a debugger for implementing the debugging through interaction with the third-party extension called by the extension process; The interactive interface is also used to display the debugging process.
6. The system according to claim 1 or 5, characterized in that The third-party extension includes at least one of the following extensions: vscode-ioc extension, used to provide language localization support; clang-format extension, used to provide code formatting support; clangd extension, used to provide code jump, problem prompts, and auto-completion functions in conjunction with the compile_commands.json generated during compilation; doxdocgen extension, used to generate specified comments in C / C++ files; cpp-tools extension, used to provide a debugger-based project debugging perspective; Hexeditor extension, used to provide hexadecimal viewing function based on memory address; memview extension, used to provide memory variable viewing function during debugging; debug_tracker_vscode extension for session tracking during debugging to view memory.
7. A cloud-based integrated development method for embedded scenarios, characterized in that: The cloud-based integrated development system for embedded scenarios according to any one of claims 1 to 6 of the right to use, wherein the method comprises: The embedded development main extension communicates with the presentation layer through the page interaction layer so that the presentation layer displays the interactive interface of the embedded development based on the web page; According to the embedded development process, the embedded development main extension responds to the user's operation through the interactive interface, calls the SDK tool extension, the compilation tool extension, and calls the third-party extension through the extension process to realize the project creation, compilation and debugging of the embedded development.
8. The method according to claim 7, characterized in that According to the embedded development process, the embedded development main extension responds to the user's operation through the interactive interface, calls the SDK tool extension, the compilation tool extension, and calls the third-party extension through the extension process to realize the project creation, compilation and debugging of the embedded development, including: The embedded development main extension responds to the project type and output directory determined by the user through the interactive interface, decompresses the project template compressed package of the corresponding project type to the output directory using a decompression tool, and generates project configuration data to realize project creation; The compilation tool is extended to generate a compilation rule file according to the project configuration data; Generate a configuration file based on the compilation rule file using a CMake build tool integrated with the compilation tool extension; The Make build tool integrated by the compilation tool extension completes the compilation according to the configuration file and calls the GCC compiler integrated by the compilation tool extension to generate a target program; The target program is debugged through the interaction between the debugger and the third-party extension called by the extension process, and the debugging process is displayed through the interactive interface.
9. A computing device, characterized in that include: processor, and A memory having program instructions stored thereon, wherein when the program instructions are executed by the processor, the processor executes the cloud-based integrated development method for embedded scenarios as described in claim 7 or 8.
10. A computer-readable storage medium, characterized in that Program instructions are stored thereon, and when the program instructions are executed by a computer, the computer executes the cloud-based integrated development method for embedded scenarios as described in claim 7 or 8.