Microcontroller engineering creation method, medium, device, vehicle and product

By providing engineering templates and shared resource management for microcontrollers, the microcontroller project is automatically created, which solves the problems of cumbersome creation process and poor stability in the existing technology, and achieves efficient and stable engineering development.

CN120406224APending Publication Date: 2025-08-01BYD CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510329648.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-18
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing microcontroller project creation process is cumbersome, especially when creating multiple projects, it requires duplication of configuration files or manual replication, resulting in low development efficiency and poor stability. Compilation and debugging exceptions often occur during project porting during collaborative development.

Method used

Provide engineering templates to automatically create microcontroller projects based on the chip type of the microcontroller, including pre-tested and verified configuration files, simplify compilation and debugging settings, support chip type expansion, and manage resources for multi-core and multi-engineering through shared engineering, reducing redundancy and cumbersome updates.

Benefits of technology

It improves the development efficiency and stability of microcontroller engineering, reduces the probability of manual configuration errors, enhances compatibility and effectiveness, and simplifies resource management and update processes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120406224A_ABST
    Figure CN120406224A_ABST
Patent Text Reader

Abstract

The invention relates to a microcontroller project creation method, a medium, equipment, a vehicle and a product. The method comprises the following steps: acquiring a project template corresponding to a microcontroller project to be created; and creating the microcontroller project based on the project template and the chip type corresponding to the microcontroller project. According to the method and the device, the project template corresponding to the microcontroller project to be created is acquired, and the microcontroller project is automatically created according to the project template and the chip type corresponding to the microcontroller project, so that the development efficiency of the microcontroller project is improved, the probability of problems caused by errors in manual configuration is reduced, and the development efficiency of the microcontroller project is improved. According to the method, the built micro-control project is better in stability, chip types are considered when the micro-control project is built, targeted processing can be carried out according to different chip types, and the compatibility and effectiveness of the built micro-control project are further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular, to a method, medium, device, vehicle, and product for creating a microcontroller project. Background Art

[0002] In the rapidly developing fields of the Internet of Things and embedded systems today, the creation of microcontroller unit (MCU) projects has become a crucial task. With the advancement of technology, microcontrollers are increasingly widely used in various intelligent devices, from smart homes and wearable devices to industrial automation and automotive electronics, and their importance is self-evident. However, the current process of creating microcontroller projects still faces a series of challenges.

[0003] Therefore, how to create a microcontroller project has become a technical problem that the industry urgently needs to solve. Summary of the Invention

[0004] An embodiment of this application provides a method for creating a microcontroller project, which improves the creation efficiency of the microcontroller project to at least partially solve the above technical problems.

[0005] To achieve the above objective, according to the first aspect of this application, a method for creating a microcontroller project is provided, including:

[0006] Obtain an engineering template corresponding to the microcontroller project to be created;

[0007] Create the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project.

[0008] According to the second aspect of this application, a device for creating a microcontroller project is provided, including:

[0009] An obtaining module, configured to obtain an engineering template corresponding to the microcontroller project to be created;

[0010] A creating module, configured to create the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project.

[0011] According to the third aspect of this application, a computer-readable storage medium is further provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0012] According to the fourth aspect of this application, an electronic device is further provided, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above method are implemented.

[0013] According to the fifth aspect of this application, a vehicle is further provided, including the above electronic device.

[0014] According to the sixth aspect of the present application, there is also provided a computer program product, including a computer program or instructions, which, when executed by a processor, implement the steps of the above method.

[0015] In summary, in the embodiments of the present application, by obtaining an engineering template corresponding to the microcontroller project to be created and automatically creating a microcontroller project according to the engineering template and the chip type corresponding to the microcontroller project, the development efficiency of the microcontroller project is improved, and the probability of problems caused by manual configuration errors is also reduced, making the created microcontroller project more stable. Moreover, when creating the microcontroller project, the chip type is considered, and targeted processing can be performed for different chip types, further improving the compatibility and effectiveness of the created microcontroller project.

[0016] Other features and advantages of the present application will be described in detail in the subsequent specific implementation part. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0018] In order to more fully understand the present application and its beneficial effects, the following will be described in conjunction with the drawings, where the same reference numerals represent the same parts in the following description.

[0019] Figure 1 is a schematic flowchart of a method for creating a microcontroller project provided in an exemplary embodiment of the present application;

[0020] Figure 2 is a schematic flowchart of a process for creating an empty project provided in an exemplary embodiment of the present application;

[0021] Figure 3 is a schematic diagram of the structure of a multi-core multi-project provided in an exemplary embodiment of the present application;

[0022] Figure 4 is a second schematic diagram of the structure of a multi-core multi-project provided in an exemplary embodiment of the present application

[0023] Figure 5 is a schematic flowchart of a process for creating a sample project provided in an exemplary embodiment of the present application;

[0024] Figure 6 is a first schematic diagram of a creation interface for creating a microcontroller project provided in an exemplary embodiment of the present application;

[0025] Figure 7 It is the second schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application;

[0026] Figure 8 It is the third schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application;

[0027] Figure 9 It is the fourth schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application;

[0028] Figure 10 It is the schematic diagram of the process for renaming a project provided in the exemplary embodiment of the present application;

[0029] Figure 11 It is the schematic diagram of the structure of the microcontroller project creation device provided in the exemplary embodiment of the present application;

[0030] Figure 12 It is the schematic diagram of the structure of the electronic device provided in the embodiment of the present application. Detailed implementation manners

[0031] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.

[0032] An integrated development environment (IDE) is a software environment for users, generally including tools such as a code editor, a compiler, a debugger, and a graphical user interface, and supports code editing, compilation, debugging, and testing, etc. Among various existing integrated development platforms, Eclipse has won the favor of many users with its controllability of being free and open source; the convenience of its modular architecture and plug-in development. Eclipse itself also provides an Eclipse C / C++ Development Tools (CDT) environment to support C / C++ embedded development, and at the same time, multiple embedded manufacturers have also launched their own integrated development environments developed based on the Eclipse platform.

[0033] The current Eclipse platform has some defects. For example, when developing a project for a microcontroller (Microcontroller Unit), it is necessary to first create a C / C++ project and then configure its compilation and debugging parameters according to the relevant microcontroller specifications. When creating multiple projects, if projects are created in this way, it is necessary to repeatedly create the same configuration files multiple times or copy the relevant configuration files to the specified projects manually, which is very cumbersome. In addition, in collaborative development, there are situations where developers need to perform project transplantation or debugging. It often occurs that the same project cannot be compiled or debugged normally after being imported into another computer, and developers need to modify the relevant project compilation configuration and create a new debugging configuration by themselves before it can be compiled and debugged correctly, which affects the development efficiency.

[0034] Therefore, the embodiments of the present application provide a method, medium, device, vehicle, and product for creating a microcontroller project to at least partially solve the above technical problems. The method for creating a microcontroller project provided by the embodiments of the present application can be applied to the Eclipse platform or other platforms, which is not limited herein.

[0035] The method for creating a microcontroller project provided by the embodiments of the present application is applicable to terminals. The terminal can be various electronic devices with a display screen and supporting web browsing, including but not limited to servers, smart phones, tablet computers, laptop portable computers, and desktop computers, etc.

[0036] Figure 1 is a schematic flowchart of the method for creating a microcontroller project provided in the exemplary embodiment of the present application. As Figure 1 shown, the method for creating a microcontroller project provided by the embodiments of the present application includes step 110 and step 120. The steps of this method process are only a possible implementation manner of the present application.

[0037] Step 110, obtain an engineering template corresponding to the microcontroller project to be created.

[0038] Step 120, create the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project.

[0039] Specifically, the execution subject of the method for creating a microcontroller project provided by the embodiments of the present application is a microcontroller project creation device. This device can be an independent hardware device set in the terminal or a software program running in the terminal.

[0040] A microcontroller project refers to a project developed for a microcontroller chip.

[0041] The project template at least includes a preset set of configuration files for creating a microcontroller project. The project template in the embodiments of the present application is a template that has been pre-tested and verified successfully. For example, the project template can be a C / C++ project developed in advance according to each type of microcontroller through an IDE.

[0042] Pre-building the project template can simplify the process of creating a microcontroller project. These project templates have been fully configured and can include all key parameters required for compilation and debugging, such as launch files, link folders, header file inclusion paths, macro definitions, etc.

[0043] By using the project template, the user does not need to manually perform cumbersome compilation and debugging settings after the project is created and can directly start writing the functional code, which greatly improves the development efficiency of the microcontroller project; since the project template has been pre-tested and verified and contains correct compilation and debugging settings, the problems caused by manual configuration errors are reduced, and the stability of the project is improved. In addition, when new chip types need to be supported or existing configurations need to be adjusted, only the corresponding project template needs to be updated or added to achieve the expansion of the microcontroller project.

[0044] The chip type is the specific model or series of the microcontroller selected for the microcontroller project, such as including multi-core chips and single-core chips, etc. The corresponding chip model can be selected according to the microcontroller project to be created.

[0045] According to the selected chip model, the project template corresponding to the chip model can be used as the project template corresponding to the microcontroller project to be created. Copy the project template to the target creation path, and configure relevant parameters in the project template to complete the creation of the microcontroller project. The target creation path is the directory path specified by the user for storing the microcontroller project files to be created.

[0046] The chip type can be determined according to the chip model. The creation processes of microcontroller projects with different chip types may be different. Therefore, the specific creation process of the microcontroller project can be determined according to the chip type and the corresponding project template of the microcontroller project, so as to complete the creation of the microcontroller project.

[0047] The integrated development environment based on Eclipse can provide relevant resources for the method for creating a microcontroller project provided in the embodiments of the present application.

[0048] For example, the resources provided by the Eclipse-based integrated development environment may include: engineering templates corresponding to multiple chip models, such as engineering templates corresponding to single-core or multi-core chip models, as well as compilation tools and debugging tools required for compilation. These resources can be installed in the integrated development environment or a specified path of the computer system in the form of an Eclipse installation package for use when creating a microcontroller project.

[0049] The method for creating a microcontroller project provided by the embodiments of the present application improves the development efficiency of the microcontroller project by obtaining an engineering template corresponding to the microcontroller project to be created and automatically creating the microcontroller project according to the chip type corresponding to the engineering template and the microcontroller project. It also reduces the probability of problems caused by manual configuration errors, making the created microcontroller project more stable. Moreover, when creating the microcontroller project, the chip type is considered, and targeted processing can be performed for different chip types, further improving the compatibility and effectiveness of the created microcontroller project.

[0050] It should be noted that each embodiment of the present application can be freely combined, the order can be swapped, or it can be executed independently, and does not need to rely on or depend on a fixed execution order.

[0051] In some embodiments, step 110 includes:

[0052] Determine the chip model of the microcontroller project;

[0053] Obtain the engineering template based on the chip model.

[0054] Specifically, the chip model is a specific identifier of the microcontroller, used to distinguish microcontroller chips of different specifications and functions. After determining the chip model of the microcontroller project, obtain the corresponding engineering template according to the chip model, and use the engineering template corresponding to the chip model as the engineering template corresponding to the microcontroller project to be created.

[0055] In some embodiments, step 120 includes:

[0056] Obtain the project type of the microcontroller project, where the project type is related to the chip type;

[0057] Create the microcontroller project according to the project type and the engineering template.

[0058] Specifically, the chip type is related to the project type of the microcontroller project.

[0059] The engineering types of microcontroller projects can include multi-core single project, multi-core multi-project, and single-core project. Both multi-core single project and multi-core multi-project are multi-core projects. A multi-core single project means that microcontrollers with multiple cores are integrated into one project. A multi-core multi-project means that each microcontroller core corresponds to one project. A single-core project means that the entire microcontroller project is centered around only one core, and there is only one project for a single-core project.

[0060] The engineering type can be stored as a parameter in a specific location of the microcontroller project, such as in the project preferences (prefs) configuration file or the initialization (ini) file. It can be saved when creating the microcontroller project. For example, "true" indicates a multi-core project, and "false" indicates a single-core project, as long as the engineering type can be obtained and recognized.

[0061] Different chip types will correspond to different engineering types of microcontroller projects. For example, when the chip type is a multi-core chip, the corresponding engineering types of its microcontroller project include multi-core single project and multi-core multi-project. When the chip type is a single-core chip, the corresponding engineering type of its microcontroller project includes single-core project.

[0062] The creation processes of microcontroller projects with different engineering types may be different. For example, the creation processes of single-core and multi-core microcontroller projects will be different. Therefore, the specific creation process of the microcontroller project can be determined according to the engineering type and engineering template of the microcontroller project, so as to complete the creation of the microcontroller project.

[0063] The method for creating a microcontroller project provided in the embodiments of this application accurately obtains an adapted engineering template by determining the chip model of the microcontroller project, and creates the microcontroller project based on the correlation between the engineering type and the chip type, improving the accuracy and efficiency of creating the microcontroller project.

[0064] In some embodiments, the engineering template includes an empty project template for an empty project and / or an example project template for an example project; the empty project template is a framework template that can be used to create a new project, and the example project template is a template with functional code added to the empty project template; the configuration values of the path configuration in the engineering template are characterized by predefined variables.

[0065] Specifically, an empty project refers to a non-functional project that does not implement any functions.

[0066] An example project refers to a project that implements specific functions, such as an example application project for each peripheral or special function of the chip, and the functions can include implementing the flipping of a specified IO port and sending / receiving data through DMA for IIC, etc.

[0067] Project templates include the Empty Project template for a fully configured empty project and the Example Project template for a fully configured example project.

[0068] In the project template's path configuration, string variables are used to construct the path, rather than directly using absolute paths. This reduces the manual configuration adjustments required when porting microcontroller projects, improving the portability and flexibility of microcontroller projects.

[0069] For example, you can define the required path based on the actual usage scenario and use a custom string variable (such as a_path) to replace a specific path segment (such as ${eclipse_home}tools\a\bin). In this way, you can directly use this custom string path variable in the project template without having to configure a lengthy specific path in detail.

[0070] The microcontroller project creation method provided in the embodiment of the present application meets different creation requirements by providing an empty project template and an example project template, simplifies the creation process of the microcontroller project and improves the creation efficiency.

[0071] In some embodiments, if the project type is a multi-core multi-project and the project template is an empty project template, creating the microcontroller project according to the project type and the project template includes:

[0072] Determining shared resources, where the shared resources are resources that can be shared by each microcontroller project in the multi-core multi-project;

[0073] Creating the microcontroller project according to the empty project template;

[0074] In the microcontroller project, the shared resource is linked to complete the creation of the microcontroller project; including: creating a link folder in the microcontroller project; and linking the link folder to the shared resource.

[0075] The determining of the shared resources includes: creating a shared project of the multi-core multi-project; acquiring the shared resources, and copying the shared resources to the shared project.

[0076] The obtaining of the shared resources includes: locating the shared resources corresponding to the chip model according to the chip model of the microcontroller project, and obtaining the located shared resources; and also includes: parsing the resources in each of the microcontroller projects in the multi-core multi-project to obtain the parsed resources; and splitting the parsed resources from each of the microcontroller projects to obtain the shared resources.

[0077] Creating the microcontroller project according to the empty project template includes:

[0078] Copy the empty project template to the target creation path of the microcontroller project;

[0079] Import the empty project template under the target creation path into the workspace to create the microcontroller project.

[0080] In the embodiments of the present application, the empty project template in the workspace will also be adjusted based on user configuration information.

[0081] The user configuration information includes the project identifier and chip model of the microcontroller project; adjusting the empty project template in the workspace based on the user configuration information includes:

[0082] Modify the identifier of the empty project template based on the project identifier, and / or configure the template content of the empty project template based on the chip model.

[0083] Specifically, Figure 2 is a schematic diagram of the process for creating an empty project provided in an exemplary embodiment of the present application; as Figure 2 shown, creating an empty project includes the following steps:

[0084] Step 210, obtain the chip model corresponding to the microcontroller project to be created. The chip model may include the chip series model and the chip detailed model.

[0085] Step 220, determine whether the chip type is a multi-core chip according to the chip model, and determine the specific execution steps according to the chip type.

[0086] For example, if the chip type is a multi-core chip, execute steps 230 to 290; if it is a single-core chip, execute steps 250 to 270 and step 290.

[0087] Step 230, the microcontroller project corresponding to the multi-core chip includes a multi-core single project and a multi-core multi-project. When the microcontroller project is a multi-core multi-project, obtain the target creation path of the microcontroller project, and create a shared project under the target creation path; when the microcontroller project is a multi-core single project, there is no need to create a shared project.

[0088] The shared project is a specific project built for the multi-core multi-project and used to store and manage the shared resources of each microcontroller project.

[0089] Shared resources are common codes, data, or configuration information that can be read or used by each microcontroller project in the multi-core multi-project.

[0090] In existing embedded development, for a multi-core microcontroller project, multiple cores can correspond to one project, i.e., a multi-core single project, or each core can correspond to one project, i.e., a multi-core multi-project. The creation process of a multi-core multi-project is cumbersome. There may be a problem of duplicate existence of resource files (such as driver files) used in a multi-core multi-project. For example, each microcontroller project in a multi-core multi-project will use the same driver and device code, resulting in the same resources existing in each microcontroller project, with resource redundancy. And when these same resource codes need to be modified and updated, it is necessary to synchronously modify the files under each project, performing repetitive modification operations, which is cumbersome.

[0091] Therefore, when the microcontroller project in the system of the embodiments of the present application is a multi-core multi-project, a shared project will be additionally created to place shared resources, and this shared project is shared by the subsequent created microcontroller projects of each core.

[0092] For example, if the microcontroller project to be created is a multi-core multi-project, a shared project microcontroller_share will be created at step 230. At this time, this shared project is empty, and at step 240, the shared resources required for this microcontroller project will be added to this shared project.

[0093] Figure 3 is one of the structural schematic diagrams of the multi-core multi-project provided in the exemplary embodiments of the present application; Figure 4 is the second of the structural schematic diagrams of the multi-core multi-project provided in the exemplary embodiments of the present application. Figure 3 and Figure 4 is a dual-core multi-project, Figure 3 in which the project of core 1 links the shared resources independent of the version number in the shared project; core 2 links the shared resources related to the version number. Figure 4 in which the project of core 1 links the shared resources independent of the version number and the shared resources related to the version number in the shared project; core 2 only links the shared resources related to the version number in the shared project.

[0094] The microcontroller projects in a multi-core multi-project may include at least one of the resources unique to this project, the shared resources related to the version number, and the shared resources independent of the version number. These three types of resources can exist simultaneously or in combination. The completely identical redundant resources are split out from each microcontroller project and placed separately in the shared project as shared resources. The microcontroller projects that need to use the shared resources can link the resources in the microcontroller project by linking. By this method, the existing redundant resources can be reduced. When the shared resources need to be modified, only the code resource file of the shared resources in the shared project needs to be modified.

[0095] Step 240: Locate the shared resources corresponding to the chip model of the microcontroller project, detect whether the required shared resources exist. If they do not exist, a pop-up window will prompt that the required resources cannot be found and the creation process will exit. If they exist, copy the corresponding shared resources to the shared project.

[0096] Step 250: Locate the position of the project template according to the chip model, detect whether the required project template exists. If it does not exist, a pop-up window will prompt that the required resources cannot be found and the creation process will exit. If it exists, copy the corresponding project template to the target creation path specified by the user.

[0097] If the project type is not a multi-core multi-project, and the project template is an empty project template for an empty project, creating the microcontroller project according to the project type and the project template includes:

[0098] Create the microcontroller project according to the empty project template.

[0099] Therefore, if the project type of the microcontroller project is not a multi-core multi-project, there is no need to create a shared project, and the project template can be directly obtained.

[0100] Step 260: Import the project template under the target creation path into the workspace.

[0101] The workspace is the activity area where users develop and manage projects, and is used to organize and operate various project files and resources. The target creation path and the workspace may be the same path or different paths, which can be set according to the actual situation.

[0102] The name of the microcontroller project in the user configuration information can be obtained to modify the name of the project template in the workspace. And judge whether relevant special operations are required according to the selected chip model. The relevant special operations can include copying specified files for a specified project, or performing configurations that are not required for other projects, etc.

[0103] Step 270: Modify the relevant project attribute configurations of the project template according to the configuration parameters (i.e., user configuration information) selected by the user in the project configuration interface and save them. Detect whether there is a default debug configuration file and a launch file under the project template. If they exist, modify the relevant configuration information of the project template. The relevant information that needs to be modified in the debug configuration file includes the debug corresponding project identifier (such as the project name) and the elf generated by the project compilation, etc.

[0104] Configure the user configuration information into the project template, and record the user configuration information in the project parameter file for subsequent renaming operations.

[0105] Step 280. If it is a multi-core and multi-project scenario, in the microcontroller project that has been created, a linked folder needs to be created and linked to the shared resources of the shared project. Since the linked folder is only a virtual reference and does not actually copy the resources, there is only one physical copy of the shared resources. This helps reduce disk space occupancy and ensures that all projects referencing this resource can use the latest version.

[0106] Step 290. Refresh the microcontroller project in the workspace to ensure that the modifications to the microcontroller project can be synchronized in a timely manner.

[0107] The embodiments of this application are embodiments of an empty project template. Therefore, the project template in the embodiments of this application refers to an empty project template. However, in actual applications, except for the steps related to shared resources, other steps are also basically applicable to the example project, and the project template involved can also be an example project template. For example, steps 250 to 270 and step 290 are also applicable to the example project.

[0108] The method for creating a microcontroller project provided by the embodiments of this application, when it is determined that the chip type corresponding to the microcontroller project is a multi-core chip and it is further confirmed that the microcontroller project is a multi-core and multi-project scenario, creates a shared project and configures shared resources in the shared project, thus effectively solving the problems of resource redundancy and cumbersome updates in the microcontroller project of multi-core and multi-project scenarios, and improving the development efficiency and maintenance convenience. Use the shared project to manage duplicate resources, and through the method of linked folders, link the core project with the actual resources of the shared project to reduce redundant resources.

[0109] In some embodiments, creating the microcontroller project according to the project type and the project template includes:

[0110] Creating the microcontroller project according to the project type and the example project template.

[0111] Among them, the example project template is saved in the example function folder, and the example function folder includes a shared project.

[0112] If the project type is a multi-core and multi-project scenario, the example function folder includes multiple example project templates. Creating the microcontroller project according to the project type and the example project template includes:

[0113] Loading each of the example project templates in the example function folder into the workspace, and transferring the function description file in the example function folder to each of the example project templates.

[0114] If the project type is not multi-core and multi-project, the example function folder includes an example project template. Creating the microcontroller project according to the project type and the example project template includes:

[0115] Loading the example project template in the example function folder into the workspace.

[0116] Specifically, Figure 5 is a schematic diagram of the process for creating an example project provided in an exemplary embodiment of the present application. As Figure 5 shown, creating an example project includes the following steps:

[0117] Step 510, obtaining the chip model corresponding to the microcontroller project to be created.

[0118] Step 520, obtaining the chip model corresponding to the microcontroller project to be created. If the chip type corresponding to the chip model is a multi-core chip, then execute Step 530 and Step 540; if it is a single-core chip, then execute Step 550.

[0119] Step 530, loading all the example project templates under the example function folder selected in the project configuration interface into the workspace. The microcontroller project corresponding to the multi-core chip includes multi-core single-project and multi-core multi-project. Therefore, there may be one example project template or multiple example project templates in the example function folder of the example project template to implement the functions of the example project. Therefore, all the example project templates in the example function folder need to be loaded into the workspace.

[0120] There is a shared project in the example function folder. Therefore, different from an empty project, it is not necessary to create an additional shared project when creating an example project.

[0121] Step 540, obtaining the function description file under the example function folder, and copying the function description file into each example project template.

[0122] The function description file refers to a file that includes a detailed description of the functions of each example project and the specific configurations used by the example project. Its file type can be in the ordinary text txt format or in the doc format, etc. Copying it into each example project template is for the convenience of users to view.

[0123] For the project of the single-core chip, since there is only one project, it is only necessary to load the example project template selected in the project configuration interface into the workspace.

[0124] Step 560, refreshing the microcontroller project in the workspace.

[0125] The microcontroller project creation method provided by the embodiments of the present application realizes the intelligence and personalization of the project creation process and improves the development efficiency by adopting different example project template loading strategies for different chip types (multi-core and single-core); by loading the function description file, detailed project information is provided for users, facilitating users to understand and use the example project.

[0126] In some embodiments, the shared resources in the shared project are updated based on the latest shared resources.

[0127] Specifically, when the shared resources need to be modified, only the code resource file of the shared resources in the shared project needs to be modified according to the latest shared resources to complete the update of the shared resources.

[0128] The microcontroller project creation method provided by the embodiments of the present application realizes the rapid synchronization and efficient management of resources by updating the shared resources in the shared project with the latest shared resources, greatly simplifies the resource update process, and reduces the maintenance cost.

[0129] In some embodiments, the microcontroller project creation method provided by the embodiments of the present application further includes:

[0130] Providing a creation interface, which includes project creation options;

[0131] In response to the user's operation on the project creation options, jumping to the project configuration interface to enable the user to select or input user configuration information on the project configuration interface.

[0132] Among them, the project configuration interface includes a workspace path option, and the method further includes:

[0133] Based on the workspace path selected or input by the user in the workspace path option, determining the workspace of the microcontroller project.

[0134] The project configuration interface includes a chip model option, and the method further includes:

[0135] Based on the chip model selected or input by the user in the chip model option, determining the chip model of the microcontroller project.

[0136] The project configuration interface includes a project name editing option, and the method further includes:

[0137] Based on the project name selected or input by the user in the project name editing option, determining the project name of the microcontroller project.

[0138] The project configuration interface includes an example project display area and a function description display area of the example project.

[0139] Specifically, the user can select the project creation option on the creation interface, and the interface will jump to the function configuration interface.

[0140] Figure 6 It is one of the schematic diagrams of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application; Figure 7 It is the second schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application; Figure 8 It is the third schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application. As Figures 6 to 8 shown, the configuration parameters and trigger process used for creating the microcontroller project are obtained by selecting the relevant option buttons in the extended self-guided wizard in project creation.

[0141] In the embodiment of the present application, through the new wizard extension point of Eclipse, the options for project creation are extended on the creation interface. By clicking on this project creation option, the self-defined configuration wizard for creating a microcontroller project is triggered, and the project configuration interface is entered for microcontroller project configuration. After the configuration is completed, clicking the complete option on the project configuration interface triggers the project creation process. The self-defined configuration wizard for creating a microcontroller project includes the project configuration interface as Figures 5 to 7 shown.

[0142] Figure 6 It is a schematic diagram of configuration interface 1 of the project configuration interface. In this project configuration interface, the user needs to select or enter the project name of the microcontroller project in the project name editing option of the project name edit box. Then, the workspace path of the microcontroller project is configured. The user can check the use workspace path checkbox to create the microcontroller project in the default workspace. If not checked, the workspace path can be selected through the browse button. The finally configured workspace path will be displayed in the project creation path box of the project configuration interface. Then click the Next button to enter the next project configuration interface. The entered project name and the created workspace path will be subjected to validity detection to ensure that no abnormal situation occurs in the created microcontroller project.

[0143] Figure 7 It is a schematic diagram of configuration interface 2 of the project configuration interface. In this project configuration interface, the user needs to select the project chip model. The user can select or enter the chip model in the chip model option, and then click the Next button to enter the next project configuration interface.

[0144] Figure 8It is a schematic diagram of Configuration Interface 3 of the project configuration interface. In this project configuration interface, the user needs to select project parameters. There are many types of project parameters (such as instruction set selection, toolchain configuration, and driver version selection, etc.). Only the necessary configuration items need to be opened to the user in the form of function buttons so that the user can configure. Then click the Finish button to enter the project creation process.

[0145] There are both the same and different configuration interfaces in the function configuration interfaces of the empty project and the sample project. The project configuration interfaces of the empty project and the sample project both include Figures 5 to 7 the project configuration interface. However, the function configuration interface of the sample project also includes a sample project display area and a function description display area of the sample project.

[0146] Figure 9 It is the fourth schematic diagram of the creation interface for creating a microcontroller project provided in the exemplary embodiment of the present application. Figure 9 It shows a schematic diagram of the project configuration interface of the sample project. In this project configuration interface, the left half is the sample project display area, which shows the sample projects that can be created under the chip model. After selecting the sample project to be created, the function description of this project will be displayed in the right half area. Then click the Finish button to enter the sample project creation process.

[0147] The microcontroller project creation method provided in the embodiment of the present application simplifies the creation and configuration process of the microcontroller project, enhances the user experience, and at the same time ensures the accuracy and effectiveness of the project settings by providing an intuitive and easy-to-use creation interface and configuration wizard.

[0148] In some embodiments, the microcontroller project creation method provided in the embodiment of the present application further includes:

[0149] Obtain the renamed microcontroller project;

[0150] Update the project name configuration item of the associated project associated with the renamed microcontroller project based on the renamed name.

[0151] If the project type of the renamed microcontroller project is a multi-core project, update the link target name in the link folder of the renamed microcontroller project.

[0152] Specifically, in the Eclipse integrated development environment, when renaming a microcontroller project, it is often encountered that the modification of the project name cannot be automatically synchronized to the associated project or debug configuration file (such as the launch file). This can lead to inconsistent project names for multi-core microcontroller projects and requires manually updating the project name in the existing launch file and related references or precompiled items in the microcontroller project configuration, thus easily introducing errors and resulting in compilation failures or abnormal operation during debugging.

[0153] Figure 10 is a schematic diagram of the project renaming process provided in an exemplary embodiment of the present application. As Figure 10 shown, the project renaming includes the following steps:

[0154] Step 1010, obtain the renamed microcontroller project.

[0155] Rename the microcontroller project to the microcontroller project that needs to be renamed.

[0156] Step 1020, after obtaining the renamed microcontroller project, determine whether it is a multi-core project. If it is a multi-core project, execute Step 1030 and Step 1040. If it is a single-core project, execute Step 1050.

[0157] [[ID=]18]Step 1030, update the project name configuration item of the associated project associated with the renamed microcontroller project according to the obtained renamed name.

[0158] The associated project refers to the project associated with the renamed microcontroller project. For example, the microcontroller project corresponding to the renamed microcontroller project and the shared project.

[0159] The project name configuration item may include refresh policies, reference relationships, prebuild parameters, and configurations in postbuild, etc.

[0160] Modify the project name configuration item related to the project name in the associated project according to the obtained renamed name.

[0161] Step 1040, obtain the linked folder in the renamed microcontroller project. Since the name of the associated shared project has changed, its link relationship needs to be modified and it needs to be re-linked to the corresponding shared folder.

[0162] Therefore, if the project type of the renamed microcontroller project is a multi-core project, update the link target name of the linked folder of the renamed microcontroller project according to the renamed name.

[0163] The link target name is the project name before the renamed microcontroller project.

[0164] Step 1050, since there is only one renamed microcontroller project for the single-core chip, only the project name configuration item related to the project name in the renamed microcontroller project needs to be associated.

[0165] Step 1060, check whether there is a configuration file related to debugging saved under the renamed microcontroller project, and modify all the parameters related to the project name in the configuration file to the renamed name.

[0166] The microcontroller project creation method provided by the embodiments of the present application solves the problem of cumbersome manual adjustment of configurations after project renaming by automatically updating the names and configuration parameters of associated projects, improves development efficiency, and reduces the risk of compilation or debugging failure caused by configuration errors.

[0167] In some embodiments, the embodiments of the present application provide a plug-in based on Eclipse. This plug-in enhances the project creation wizard and renaming function by extending the official extension points of Eclipse. Specifically, new nodes are added in the wizard and a project configuration interface is created to interact with users, obtain the configuration parameters for project creation, and perform project creation operations. At the same time, by participating in the process of project renaming, this plug-in can automatically modify the project name of the associated microcontroller project and its related configuration parameters after renaming is triggered.

[0168] This plug-in supports renaming of single-core and multi-core microcontroller projects. For a multi-core microcontroller project, its structure usually includes multiple microcontroller projects and a shared project. Using this plug-in, no matter which microcontroller project is selected for renaming, it can ensure that all associated project names are updated, and the configuration parameters related to the project name will also be modified accordingly. After the entire renaming step is executed, compilation, debugging, or continued functional development work can be directly carried out without manually adjusting parameter settings, thus significantly improving development efficiency.

[0169] This plug-in also supports creating empty projects and sample projects, and can implement the linked renaming function for multi-core microcontroller projects. By installing this plug-in, users can directly use functions such as creating empty projects, creating sample projects, renaming extensions, and related resources, and at the same time integrate compilation and debugging tools, which is convenient for users to directly install and use.

[0170] Next, the microcontroller project creation device provided by the embodiments of the present application will be described. The microcontroller project creation device described below can be correspondingly referred to the microcontroller project creation method described above.

[0171] Figure 11 is a schematic structural diagram of the microcontroller project creation device provided by the embodiments of the present application, as Figure 11As shown in the figure, the device includes an acquisition module 1110 and a creation module 1120.

[0172] The acquisition module 1110 is configured to acquire an engineering template corresponding to the microcontroller project to be created;

[0173] The creation module 1120 is configured to create the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project.

[0174] Among them, the acquisition module 1110 and the creation module 1120 can be respectively used to execute step 110 and step 120 in the corresponding embodiments of the above microcontroller project creation method. For the specific implementation manners of these modules and more detailed content, reference can be made to the corresponding method part, which will not be elaborated here one by one.

[0175] It should be noted here that the microcontroller project creation device provided in the embodiments of the present application can implement all the method steps implemented by the above microcontroller project creation method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be specifically elaborated in this embodiment.

[0176] Figure 12 is a schematic structural diagram of an electronic device provided in the embodiments of the present application. As Figure 12 shown, the electronic device may include: a processor 1210, a communication interface 1220, a memory 1230, and a communication bus 1240. Among them, the processor 1210, the communication interface 1220, and the memory 1230 complete mutual communication through the communication bus 1240. The processor 1210 can call the computer program in the memory 1230 to execute the above method.

[0177] In addition, when the logical instructions in the above memory are implemented in the form of software function modules and sold or used as an independent product, they can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or a part of this 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 causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: various media 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 disc that can store program codes.

[0178] An embodiment of the present application further provides a computer-readable storage medium, on which instructions are stored, and when the instructions are executed by a processor, the processor is configured to execute the above-mentioned scheduling method for mobile charging.

[0179] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (CD-ROM), optical memory, etc.) containing computer-usable program code.

[0180] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be realized by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate means for realizing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0181] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0182] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for realizing the functions specified in one Figure 1 flow or multiple flows and / or blocks Figure 1 block or multiple blocks.

[0183] In a typical configuration, a computing device includes one or more processors (Central Processing Unit, CPU), an input / output interface, a network interface, and memory.

[0184] The memory may include non-permanent memory in the form of computer-readable storage media, such as RAM and / or non-volatile memory, such as ROM or flash RAM. The memory is an example of computer-readable storage media.

[0185] Computer-readable storage media includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, Phase Change Memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of RAM, ROM, Electrically Erasable Programmable Read-Only Memory (EEPROM), flash memory, or other memory technologies, CD-ROM, Digital Versatile Disc (DVD), or other optical storage, magnetic cassette tapes, magnetic disk storage, or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable storage media does not include transitory media, such as modulated communication signals and carrier waves.

[0186] The embodiments of the present application also provide a vehicle, which includes the above-mentioned electronic device. In this embodiment, the vehicle can be a fuel vehicle, a plug-in hybrid vehicle, or a new energy vehicle, etc., and the present application does not make specific limitations in this regard.

[0187] The embodiments of the present application also provide a computer program product, including a computer program or instruction, and when the computer program or instruction is executed by a processor, the steps of the above method are implemented.

[0188] In the description of the present application, the terms "first" and "second" are only used for descriptive purposes and cannot be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, "a plurality of" means two or more, unless otherwise specifically defined.

[0189] In the above embodiments, the descriptions of the respective embodiments have their own emphases. For parts not detailed in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

[0190] The embodiments, implementation manners and related technical features of the present application can be combined and replaced with each other without conflict.

[0191] The above are only the preferred embodiments of the present application and do not impose any formal restrictions on the present application. However, any simple modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present application without departing from the content of the technical solution of the present application still fall within the scope of the technical solution of the present application.

Claims

1. A method for creating a microcontroller project, characterized in that Including: Obtain an engineering template corresponding to the microcontroller project to be created; Create the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project.

2. The method according to claim 1, characterized in that, The obtaining of the engineering template corresponding to the microcontroller project to be created includes: Determine the chip model of the microcontroller project; Obtain the engineering template based on the chip model.

3. The method according to claim 1, wherein The creating of the microcontroller project based on the engineering template and the chip type corresponding to the microcontroller project includes: Obtain the project type of the microcontroller project, where the project type is related to the chip type; Create the microcontroller project according to the project type and the engineering template.

4. The method according to claim 1, characterized in that, The engineering template includes an empty engineering template of an empty project and / or an example engineering template of an example project; the empty engineering template is a framework template that can be used to create a new project, and the example engineering template is a template with functional codes added to the empty engineering template.

5. The method according to claim 3, characterized in that, If the project type is multi-core multi-project and the engineering template is the empty engineering template of an empty project, the creating of the microcontroller project according to the project type and the engineering template includes: Determine shared resources, where the shared resources are resources that can be shared by each microcontroller project in the multi-core multi-project; Create the microcontroller project according to the empty engineering template; In the microcontroller project, link the shared resources to complete the creation of the microcontroller project.

6. The method according to claim 5, wherein The determining of the shared resources includes: Create a shared project for the multi-core multi-project; Obtain the shared resources and copy the shared resources to the shared project.

7. The method according to claim 6, wherein The obtaining of the shared resources includes: Locate the shared resources corresponding to the chip model according to the chip model of the microcontroller project and obtain the located shared resources.

8. The method according to claim 6, characterized in that, The obtaining of the shared resources includes: Parse the resources in each microcontroller project in the multi-core multi-project to obtain the parsed resources; Split the parsed resources from each microcontroller project to obtain the shared resources.

9. The method according to claim 5, wherein The linking of the shared resources in the microcontroller project includes: In the microcontroller project, create a link folder; Link the link folder to the shared resources.

10. The method according to claim 3, characterized in that If the project type is not multi-core multi-project and the engineering template is the empty engineering template of an empty project, the creating of the microcontroller project according to the project type and the engineering template includes: Create the microcontroller project according to the empty engineering template.

11. The method according to claim 5 or 10, characterized in that, The creating of the microcontroller project according to the empty engineering template includes: Copy the empty engineering template to the target creation path of the microcontroller project; Import the empty engineering template under the target creation path into the workspace to create the microcontroller project.

12. The method according to claim 11, characterized in that Also including: Adjust the empty engineering template in the workspace based on user configuration information.

13. The method according to claim 12, characterized in that, The user configuration information includes the project identifier and chip model of the microcontroller project; the adjusting of the empty engineering template in the workspace based on user configuration information includes: Modify the identifier of the empty project template based on the project identifier, and / or configure the template content of the empty project template based on the chip model.

14. The method according to claim 3, wherein Creating the microcontroller project according to the project type and the project template includes: Create the microcontroller project according to the project type and the example project template.

15. The method according to claim 14, characterized in that, The example project template is saved in the example function folder, and the example function folder includes a shared project.

16. The method according to claim 15, wherein If the project type is a multi-core multi-project, the example function folder includes multiple example project templates. Creating the microcontroller project according to the project type and the example project template includes: Load each of the example project templates in the example function folder into the workspace, and transfer the function description file in the example function folder to each of the example project templates.

17. The method according to claim 15, wherein If the project type is not a multi-core multi-project, the example function folder includes one example project template. Creating the microcontroller project according to the project type and the example project template includes: Load the example project template in the example function folder into the workspace.

18. The method according to claim 6 or 15, characterized in that Update the shared resources in the shared project based on the latest shared resources.

19. The method according to any one of claims 1 to 4, characterized in that, Further includes: Provide a creation interface, and the creation interface includes project creation options; In response to the user's operation on the project creation option, jump to the project configuration interface, so that the user can select or input user configuration information on the project configuration interface.

20. The method according to claim 19, characterized in that The project configuration interface includes a workspace path option, and the method further includes: Determine the workspace of the microcontroller project based on the workspace path selected or input by the user in the workspace path option.

21. The method according to claim 19, wherein The project configuration interface includes a chip model option, and the method further includes: Determine the chip model of the microcontroller project based on the chip model selected or input by the user in the chip model option.

22. The method according to claim 19, wherein The project configuration interface includes a project name editing option, and the method further includes: Determine the project name of the microcontroller project based on the project name selected or input by the user in the project name editing option.

23. The method according to claim 19, characterized in that, The project configuration interface includes an example project display area and a function description display area of the example project.

24. The method according to any one of claims 1 to 4, characterized in that, Further includes: Obtain the renamed microcontroller project; Update the project name configuration item of the associated project associated with the renamed microcontroller project based on the renamed name.

25. The method according to claim 24, wherein If the project type of the renamed microcontroller project is a multi-core project, update the link target name in the link folder of the renamed microcontroller project.

26. The method according to any one of claims 1 to 4, characterized in that, Further includes: Characterize the configuration value of the path configuration in the project template based on a predefined variable.

27. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 26.

28. An electronic device on which a computer program is stored, characterized in that, When the computer program is executed by a processor, it implements the steps of the method described in any one of claims 1 to 26.

29. A vehicle, characterized in that, Includes the electronic device described in claim 28.

30. A computer program product, characterized in that, Comprising a computer program or instructions which, when executed by a processor, implement the steps of the method according to any one of claims 1 to 26.