[go: up one dir, main page]

CN111610968B - Development method and device for multi-domain MicroPython program - Google Patents

Development method and device for multi-domain MicroPython program Download PDF

Info

Publication number
CN111610968B
CN111610968B CN202010447604.6A CN202010447604A CN111610968B CN 111610968 B CN111610968 B CN 111610968B CN 202010447604 A CN202010447604 A CN 202010447604A CN 111610968 B CN111610968 B CN 111610968B
Authority
CN
China
Prior art keywords
micropython
domain
program
operating system
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010447604.6A
Other languages
Chinese (zh)
Other versions
CN111610968A (en
Inventor
杨曦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Yinhanyi Technology Co ltd
Original Assignee
Chengdu Yinhanyi Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Chengdu Yinhanyi Technology Co ltd filed Critical Chengdu Yinhanyi Technology Co ltd
Priority to CN202010447604.6A priority Critical patent/CN111610968B/en
Publication of CN111610968A publication Critical patent/CN111610968A/en
Application granted granted Critical
Publication of CN111610968B publication Critical patent/CN111610968B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms
    • G06F8/315Object-oriented languages
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • G06F8/42Syntactic analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Stored Programmes (AREA)

Abstract

The invention discloses a development method and a device for a multi-domain MicroPython program, wherein the development method comprises the following steps: step 1, constructing a multi-domain MicroPython integrated development environment; and 2, communicating the multi-domain MicroPython integrated development environment with a multi-domain embedded operating system through a TCP/IP protocol and a serial port. According to the invention, the multi-domain MicroPython integrated development environment is built, and TCP/UP communication and serial port communication are adopted with the multi-domain embedded operating system, so that the MicroPython program can be loaded into the domain designated by the multi-domain embedded operating system to run, and the information acquisition and monitoring during the running of the MicroPython program can be realized.

Description

Development method and device for multi-domain MicroPython program
Technical Field
The invention relates to the technical field of information, in particular to a method and a device for developing a multi-domain MicroPython program.
Background
Aiming at the desktop development environment of MicroPython programs of a multi-domain embedded operating system, the desktop refers to a Windows operating system and a Linux operating system with desktop. The multi-domain embedded operating system supports the creation and running of multiple domains in the operating system. The multi-domain embedded operating system adopts a space-time (namely, the processor occupies time and physical memory space) isolation technology to abstract and isolate hardware resources, and all domains run in the isolated time and space.
Although some MicroPython desktop development environments exist in the current industry, when applied to MicroPython program development of a multi-domain embedded operating system, the following problems still exist:
1. the existing development environment can only download MicroPython program files to a target machine through a virtual hard disk to operate, and the mode requires that hardware is connected with a host machine through a USB line and cannot be downloaded remotely;
2. the existing development environment cannot download MicroPython programs into a designated domain in a multi-domain embedded operating system, and the existing MicroPython runtime environment is single-threaded and does not provide operating system support;
3. the existing development environment does not configure the runtime priority and other needed resources for the MicroPython program, because the existing MicroPython runtime environment is single-threaded, the priority does not need to be set, and only one MicroPython program in the target environment runs, so that hardware resources do not need to be allocated for the MicroPython program, and the MicroPython program can use all hardware resources;
4. the existing development environment cannot collect the memory information of the MicroPython program during running and can only output information through a serial port for viewing;
5. the existing development environment does not provide a graphical display interface for MicroPython program runtime information;
6. existing development environments do not provide a means to modify the variable values of MicroPython programs in multi-domain embedded operating systems.
Disclosure of Invention
The technical problems to be solved by the invention are as follows: aiming at the problems, a development method and a device aiming at a multi-domain MicroPython program are provided.
The invention provides a development method for a multi-domain MicroPython program, which comprises the following steps:
step 1, constructing a multi-domain MicroPython integrated development environment; the multi-domain MicroPython integrated development environment comprises: the system comprises a resource creation guide module, a project management module, a source code editor, a lexical and grammatical analyzer, a module management module, a programming library management module, a multi-domain embedded operating system program runtime monitoring module, a multi-domain embedded operating system program configuration module and a multi-domain embedded operating system communication module;
step 2, the multi-domain MicroPython integrated development environment is communicated with a multi-domain embedded operating system through a TCP/IP protocol and a serial port; when the multi-domain MicroPython integrated development environment is utilized to develop the MicroPython program, the MicroPython program and configuration data thereof are downloaded from the multi-domain MicroPython integrated development environment and are downloaded to the multi-domain embedded operating system through a TCP/IP protocol, and information is transmitted to the multi-domain MicroPython integrated development environment through a TCP/IP protocol or a serial port when the MicroPython program in the multi-domain embedded operating system runs.
Further, the process of developing the MicroPython program by utilizing the multi-domain MicroPython integrated development environment is as follows:
1) A developer creates a MicroPython project through a MicroPython project creation wizard of a resource creation wizard module in a multi-domain MicroPython integrated development environment; when a MicroPython project is created, selecting a hardware environment in which a MicroPython program needs to run;
2) A developer creates a guide through a MicroPython program source file of a resource creation guide module in a multi-domain MicroPython integrated development environment, creates a MicroPython program source file, and automatically opens the MicroPython program source file in a source code editor;
3) Displaying a related function library by the multi-domain MicroPython integrated development environment according to the hardware environment of the current MicroPython project;
4) A developer writes a MicroPython source code in a source code editor, or drags a required function library into the source code editor to generate a source code;
5) A developer establishes communication with a multi-domain embedded operating system in a multi-domain MicroPython integrated development environment, wherein the communication comprises TCP/IP communication and serial communication;
6) A developer selects a MicroPython program source file which needs to be downloaded to a multi-domain embedded operating system to run;
7) A configuration dialog box when the MicroPython program runs is popped up by a multi-domain MicroPython integrated development environment for a developer to perform configuration operation;
8) After the configuration of the developer is completed, the multi-domain MicroPython integrated development environment downloads the MicroPython program file and configuration data to the multi-domain embedded operating system;
9) Through TCP/IP communication or serial port communication, a developer can see the running information of the MicroPython program in a multi-domain MicroPython integrated development environment;
10 A developer selects a MicroPython program source file to be monitored;
11 The multi-domain MicroPython integrated development environment sends monitoring information to the multi-domain embedded multi-domain operating system;
12 Displaying the monitoring view by the multi-domain embedded operating system, and displaying the received monitoring information in the monitoring view;
13 A developer selects a form monitoring mode or a graphic monitoring mode in the monitoring view according to the requirement.
The invention also provides a development device for the multi-domain MicroPython program, which comprises:
a multi-domain MicroPython integrated development environment; the multi-domain MicroPython integrated development environment comprises: the system comprises a resource creation guide module, a project management module, a source code editor, a lexical and grammatical analyzer, a module management module, a programming library management module, a multi-domain embedded operating system program runtime monitoring module, a multi-domain embedded operating system program configuration module and a multi-domain embedded operating system communication module;
a multi-domain embedded operating system; the multi-domain MicroPython integrated development environment is communicated with a multi-domain embedded operating system through a TCP/IP protocol and a serial port; when the multi-domain MicroPython integrated development environment is utilized to develop the MicroPython program, the MicroPython program and configuration data thereof are downloaded from the multi-domain MicroPython integrated development environment and are downloaded to the multi-domain embedded operating system through a TCP/IP protocol, and information is transmitted to the multi-domain MicroPython integrated development environment through a TCP/IP protocol or a serial port when the MicroPython program in the multi-domain embedded operating system runs.
Specifically, the source code editor is used for editing and displaying source code of MicroPython to a developer, and simultaneously provides the following functions:
1) Coloring key words: different display colors are provided for rendering keywords, libraries, functions, classes, variables, comments and the like, so that different display is performed, and developers are helped to quickly identify different parts in source codes;
2) Intelligent prompting: performing lexical and grammatical analysis on the source code which is being typed by the user, and providing suggestions for writing codes for the user by combining a lexical and grammatical analyzer;
3) Sentence automatic completion: based on the candidate content of the intelligent prompt, the user selects a certain candidate item, and then inserts the candidate item into a designated position of the source code through the source code editor;
4) Displaying grammar errors: locating and displaying grammar error information in a source code editor based on the analysis result of the lexical & grammar analyzer;
5) Display library errors: based on the analysis of the library of references in the source code by the module management module, error information is located and displayed in the editor.
The module management module is used for prompting the developer through the module management module when the developer uses the function library irrelevant to the selected hardware and application scene;
and the module management module is used for providing candidate function library suggestions for the developer according to the text contents typed by the developer and the hardware and application scenes selected by the user when the developer needs to import a certain function library.
Specifically, the programming library management module is used for analyzing the function library in the form of an XML file, organizing and classifying the function library in the form of logic of the function library, and providing the function library for the module management module.
Specifically, the multi-domain embedded operating system program runtime monitoring module is used for analyzing the acquired MicroPython program runtime information, and corresponding the analysis result with global variables and local variables in the source code, and periodically displaying and updating the values of related variables; meanwhile, the change trend of the related variable is displayed in the chart for analysis by a developer.
Specifically, the multi-domain embedded operating system program runtime monitoring module supports a developer to modify a variable value and write the variable value into a runtime memory of the program by utilizing a runtime variable dynamic modification mechanism of the multi-domain embedded operating system.
Specifically, the multi-domain embedded operating system program configuration module is used for configuring configuration parameters of a MicroPython program; the configuration parameters of the MicroPython program comprise: the priority of the MicroPython program in running, the message port required by the MicroPython program and the peripheral equipment allocation required by the MicroPython program.
Preferably, the multi-domain MicroPython integrated development environment is developed based on an Eclipse platform.
In summary, due to the adoption of the technical scheme, the beneficial effects of the invention are as follows:
1. according to the invention, the multi-domain MicroPython integrated development environment is built, and TCP/UP communication and serial port communication are adopted with the multi-domain embedded operating system, so that the MicroPython program can be loaded into the domain designated by the multi-domain embedded operating system to run, and the information acquisition and monitoring during the running of the MicroPython program can be realized.
2. The multi-domain MicroPython integrated development environment built by the invention provides a source code editor and a word and grammar analyzer, is used for grammar checking and error prompting during source code editing, and simultaneously realizes that MicroPython source codes are directly dragged from a function library through a module management module and a programming library management module.
3. The multi-domain MicroPython integrated development environment built by the invention provides a multi-domain embedded operating system program configuration module, and can be used for configuring priority and other resources when the MicroPython program runs. In addition, a related variable dynamic modification mechanism during the running of the MicroPython program can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic diagram of a multi-domain embedded operating system running multiple domains.
Fig. 2 is a schematic diagram of a method and apparatus for developing a multi-domain MicroPython program according to the present invention.
FIG. 3 is a block diagram of a multi-domain MicroPython integration development environment of the present invention.
FIG. 4 is a schematic diagram of a library of functions according to the present invention.
FIG. 5 is a schematic diagram of the library of functions of the present invention depicted in the form of an XML file.
Fig. 6 is a schematic diagram of information content of a MicroPython program in running according to an embodiment of the present invention.
Fig. 7 is a schematic diagram of monitoring information related variables during a MicroPython program running in an embodiment of the present invention.
Fig. 8 is a schematic diagram of a MicroPython program runtime information-related variable curve according to an embodiment of the present invention.
FIG. 9 is a schematic diagram of a configuration interface of a program configuration module of a multi-domain embedded operating system according to an embodiment of the present invention.
Fig. 10 is a block diagram of a multi-domain MicroPython integrated development environment developed based on Eclipse platform according to an embodiment of the present invention.
Detailed Description
The features and capabilities of the present invention are described in further detail below in connection with the examples.
A schematic diagram of a development method and a device for a multi-domain MicroPython program in this embodiment is shown in FIG. 2, and the development method includes the following steps:
step 1, constructing a multi-domain MicroPython integrated development environment; as shown in fig. 3, the multi-domain MicroPython integrated development environment includes: the system comprises a resource creation guide module, a project management module, a source code editor, a lexical and grammatical analyzer, a module management module, a programming library management module, a multi-domain embedded operating system program runtime monitoring module, a multi-domain embedded operating system program configuration module and a multi-domain embedded operating system communication module;
(1) Resource creation wizard module
The resource creation wizard module provides the user with a variety of resource creation functions:
1) Providing a MicroPython project creation guide;
2) Providing a creating guide for creating a MicroPython program source file;
3) A MicroPython module creation wizard is provided.
(2) Project management module
MicroPython program source files are organized in units of items. A MicroPython project may contain multiple MicroPython program source files, while the MicroPython program source files in a MicroPython project constitute a program that can run in a multi-domain operating system. In addition to the MicroPython program source files, the project also contains program runtime configuration data.
The project management module provides the following functions:
1) Deleting the project;
2) Renaming the project;
3) Item import/export;
4) The item is closed/opened.
(3) Source code editor
The source code editor is used for editing and displaying source code of MicroPython to a developer, and simultaneously provides the following functions:
1) Coloring key words: different display colors are provided for rendering keywords, libraries, functions, classes, variables, comments and the like, so that different display is performed, and developers are helped to quickly identify different parts in source codes;
2) Intelligent prompting: performing lexical and grammatical analysis on the source code which is being typed by the user, and providing suggestions for writing codes for the user by combining a lexical and grammatical analyzer;
3) Sentence automatic completion: based on the candidate content of the intelligent prompt, the user selects a certain candidate item, and then inserts the candidate item into a designated position of the source code through the source code editor;
4) Displaying grammar errors: locating and displaying grammar error information in a source code editor based on the analysis result of the lexical & grammar analyzer;
5) Display library errors: based on the analysis of the library of references in the source code by the module management module, error information is located and displayed in the editor.
(4) Lexical & grammatical analyzer
The multi-domain MicroPython integrated development environment of the present embodiment is based on the Python3 grammar rule, and the lexical & grammar analyzer is used for lexical and grammar analysis of the source code being typed by the developer, and grammar checking of the source code in the source code editor by establishing a grammar tree model.
(5) Module management module
In order to facilitate the rapid development of programs by developers, microPython provides many libraries of functions (also called modules in Python) that need to be displayed or hidden according to the hardware and application scenario chosen by the developer. Thereby the processing time of the product is reduced,
the module management module is used for prompting the developer through the module management module when the developer uses the function library irrelevant to the selected hardware and application scene;
and the module management module is used for providing candidate function library suggestions for the developer according to the text contents typed by the developer and the hardware and application scenes selected by the user when the developer needs to import a certain function library.
(6) Programming library management module
The multi-domain embedded program developed based on MicroPython needs to run in a multi-domain operating system and cannot run at a host side. Therefore, all function libraries (modules) are described in the form of XML files. The schematic diagram of the function library is shown in fig. 4, and the schematic diagram of the function library described in the form of an XML file is shown in fig. 5.
The programming library management module is used for analyzing the function library (module) in the form of an XML file, organizing and classifying the function library (module) in the form of logic of the function library (module), and providing the function library (module) for the module management module.
(7) Multi-domain embedded operating system program run-time monitoring module
And acquiring the runtime information of the MicroPython program by using a runtime monitoring mechanism of the multi-domain embedded operating system by using a multi-domain MicroPython integrated development environment, wherein the content is shown in figure 6. The multi-domain embedded operating system program runtime monitoring module is used for analyzing the acquired MicroPython program runtime information, and corresponding the analysis result with global variables and local variables in the source code, and periodically displaying and updating the values of related variables. As shown in fig. 7, the "current value" shows the value newly acquired from the multi-domain embedded operating system, and is marked with a font of another color (e.g., red) when the latest value of the "current value" is different from the value acquired last time. At the same time, the change trend of the related variables is also provided for analysis by a developer, as shown in fig. 8.
Further, the multi-domain embedded operating system program runtime monitoring module supports a developer to modify the change value and write the change value into a runtime memory of the program by utilizing a runtime variable dynamic modification mechanism of the multi-domain embedded operating system. As shown in fig. 7, "set values" allow a user to input values to change the values of variables in the operating system).
(8) Program configuration module of multi-domain embedded operating system
In the multi-domain embedded operating system, all the MicroPython programs running in the domain need to have corresponding configuration data to run, so that the multi-domain embedded operating system program configuration module is used for configuring configuration parameters of the MicroPython programs, as shown in fig. 9, the configuration parameters of the MicroPython programs include:
1) The priority of the MicroPython program in running is that the multi-domain embedded operating system provides priority options of 1-99 levels, wherein the 1 level is the highest priority, the 99 level is the lowest priority, and the default priority is 10;
2) The embedded operating system of the multi-domain provides a message port for the MicroPython program running in the domain to communicate with the outside (like another domain in an operating system, a third party device and the like), each port has a unique port number with a number range of 1-65535, and the program performs read-write operation on the ports to receive and send messages when running, and defaults to not allocate the message ports;
3) The peripheral allocation required by the MicroPython program allows a certain hardware device (such as a serial port) to be allocated to a specified MicroPython program for use by the multi-domain embedded operating system, and the peripheral is not allocated by default.
(9) Multi-domain embedded operating system communication module
The invention needs to communicate the multi-domain MicroPython integrated development environment with the multi-domain embedded operating system through a TCP/IP protocol and a serial port.
When the multi-domain embedded operating system is used for communication, the multi-domain embedded operating system is used as a TCP server, and the multi-domain embedded operating system communication module is used for initiating a TCP connection request to the multi-domain embedded operating system; meanwhile, the multi-domain embedded operating system communication module encapsulates and abstracts a protocol of a bottom layer, and is used for providing a unified communication interface for other modules in the multi-domain MicroPython integrated development environment. Meanwhile, the multi-domain embedded operating system communication module also provides a serial port, such as RS232, for receiving MicroPython program runtime information fed back from the multi-domain embedded operating system.
Preferably, the multi-domain MicroPython integrated development environment is developed based on an Eclipse platform. Eclipse platform is open-source, free industrial level program development platform based on OSGi protocol, which uses Java as development language. There are many commercial integrated development environments in the industry that are developed based on Eclipse platforms, such as:
1)WindRiver workbench;
2)Xilinx SDK;
3) QNX integrated development environment, etc.;
in Eclipse, plug-ins are the basic unit for code development and execution, so the functional modules of the multi-domain MicroPython integrated development environment are developed and organized in plug-ins, as shown in fig. 10.
And 2, communicating the multi-domain MicroPython integrated development environment with a multi-domain embedded operating system through a TCP/IP protocol and a serial port, downloading the MicroPython program and configuration data thereof from the multi-domain MicroPython integrated development environment to the multi-domain embedded operating system through the TCP/IP protocol when the multi-domain MicroPython integrated development environment is utilized to develop the MicroPython program, and transmitting information during running the MicroPython program in the multi-domain embedded operating system to the multi-domain MicroPython integrated development environment through the TCP/IP protocol or the serial port.
Specifically, the process of developing the MicroPython program by utilizing the multi-domain MicroPython integrated development environment is as follows:
1) A developer creates a MicroPython project through a MicroPython project creation wizard of a resource creation wizard module in a multi-domain MicroPython integrated development environment; when a MicroPython project is created, selecting a hardware environment in which a MicroPython program needs to run;
2) A developer creates a guide through a MicroPython program source file of a resource creation guide module in a multi-domain MicroPython integrated development environment, creates a MicroPython program source file, and automatically opens the MicroPython program source file in a source code editor;
3) The multi-domain MicroPython integrated development environment displays related function libraries according to the hardware environment of the current MicroPython project (the function libraries are classified in a tree structure in a function library view);
4) A developer writes MicroPython source code in a source code editor, or drags a needed function library (from a function library view) into the source code editor to generate source code;
5) A developer establishes communication with a multi-domain embedded operating system in a multi-domain MicroPython integrated development environment, wherein the communication comprises TCP/IP communication and serial communication;
6) The developer selects a MicroPython program source file which needs to be downloaded to a multi-domain embedded operating system and runs, a right mouse button can be clicked on the selected MicroPython program source file, and a 'download' menu item is selected from a pop-up right button menu;
7) A configuration dialog box when the MicroPython program runs is popped up by a multi-domain MicroPython integrated development environment for a developer to perform configuration operation;
8) After the configuration of the developer is finished, the MicroPython program file and the configuration data can be downloaded into the multi-domain embedded operating system by clicking a 'confirm' button through the multi-domain MicroPython integrated development environment;
9) Through TCP/IP communication or serial port communication, a developer can see the running information of the MicroPython program in a multi-domain MicroPython integrated development environment;
10 A developer selects a MicroPython program source file to be monitored;
11 The multi-domain MicroPython integrated development environment sends monitoring information to the multi-domain embedded multi-domain operating system;
12 Displaying the monitoring view by the multi-domain embedded operating system, and displaying the received monitoring information in the monitoring view;
13 A developer selects a form monitoring mode or a graphic monitoring mode in the monitoring view according to the requirement.
The foregoing description of the preferred embodiments of the invention is not intended to be limiting, but rather is intended to cover all modifications, equivalents, and alternatives falling within the spirit and principles of the invention.

Claims (5)

1. The development method for the multi-domain MicroPython program is characterized by comprising the following steps of:
step 1, constructing a multi-domain MicroPython integrated development environment; the multi-domain MicroPython integrated development environment comprises: the system comprises a resource creation guide module, a project management module, a source code editor, a lexical and grammatical analyzer, a module management module, a programming library management module, a multi-domain embedded operating system program runtime monitoring module, a multi-domain embedded operating system program configuration module and a multi-domain embedded operating system communication module;
the module management module is used for prompting the developer through the module management module when the developer uses the function library irrelevant to the selected hardware and application scene; when a developer needs to import a certain function library, the module management module provides candidate function library suggestions for the developer according to the text content typed by the developer and the hardware and application scene selected by the user;
the programming library management module is used for analyzing the function library in the form of an XML file, organizing and classifying the function library in the form of logic of the function library, and providing the function library for the module management module;
the multi-domain embedded operating system program runtime monitoring module is used for analyzing the acquired MicroPython program runtime information, and corresponding the analysis result with global variables and local variables in the source code, and periodically displaying and updating the values of related variables; meanwhile, a change trend of the related variable of the chart display is provided for a developer to analyze;
the multi-domain embedded operating system program runtime monitoring module supports a developer to modify a variable value and write the variable value into a runtime memory of the program by utilizing a runtime variable dynamic modification mechanism of the multi-domain embedded operating system;
the program configuration module of the multi-domain embedded operating system is used for configuring configuration parameters of a MicroPython program; the configuration parameters of the MicroPython program comprise: priority of MicroPython program running, message port required by MicroPython program and peripheral equipment allocation required by MicroPython program;
the multi-domain embedded operating system communication module is used for initiating a TCP connection request to the multi-domain embedded operating system; meanwhile, the multi-domain embedded operating system communication module encapsulates and abstracts a protocol at the bottom layer, and is used for providing a unified communication interface for other modules in the multi-domain MicroPython integrated development environment;
step 2, the multi-domain MicroPython integrated development environment is communicated with a multi-domain embedded operating system through a TCP/IP protocol and a serial port; when the multi-domain MicroPython integrated development environment is utilized to develop the MicroPython program, the MicroPython program and configuration data thereof are downloaded from the multi-domain MicroPython integrated development environment and are downloaded to the multi-domain embedded operating system through a TCP/IP protocol, and information is transmitted to the multi-domain MicroPython integrated development environment through a TCP/IP protocol or a serial port when the MicroPython program in the multi-domain embedded operating system runs.
2. The development method for the multi-domain MicroPython program according to claim 1, wherein the process of developing the MicroPython program by utilizing the multi-domain MicroPython integrated development environment is as follows:
1) A developer creates a MicroPython project through a MicroPython project creation wizard of a resource creation wizard module in a multi-domain MicroPython integrated development environment; when a MicroPython project is created, selecting a hardware environment in which a MicroPython program needs to run;
2) A developer creates a guide through a MicroPython program source file of a resource creation guide module in a multi-domain MicroPython integrated development environment, creates a MicroPython program source file, and automatically opens the MicroPython program source file in a source code editor;
3) Displaying a related function library by the multi-domain MicroPython integrated development environment according to the hardware environment of the current MicroPython project;
4) A developer writes a MicroPython source code in a source code editor, or drags a required function library into the source code editor to generate a source code;
5) A developer establishes communication with a multi-domain embedded operating system in a multi-domain MicroPython integrated development environment, wherein the communication comprises TCP/IP communication and serial communication;
6) A developer selects a MicroPython program source file which needs to be downloaded to a multi-domain embedded operating system to run;
7) A configuration dialog box when the MicroPython program runs is popped up by a multi-domain MicroPython integrated development environment for a developer to perform configuration operation;
8) After the configuration of the developer is completed, the multi-domain MicroPython integrated development environment downloads the MicroPython program file and configuration data to the multi-domain embedded operating system;
9) Through TCP/IP communication or serial port communication, a developer can see the running information of the MicroPython program in a multi-domain MicroPython integrated development environment;
10 A developer selects a MicroPython program source file to be monitored;
11 The multi-domain MicroPython integrated development environment sends monitoring information to the multi-domain embedded multi-domain operating system;
12 Displaying the monitoring view by the multi-domain embedded operating system, and displaying the received monitoring information in the monitoring view;
13 A developer selects a form monitoring mode or a graphic monitoring mode in the monitoring view according to the requirement.
3. A development device for a multi-domain MicroPython program, comprising:
a multi-domain MicroPython integrated development environment; the multi-domain MicroPython integrated development environment comprises: the system comprises a resource creation guide module, a project management module, a source code editor, a lexical and grammatical analyzer, a module management module, a programming library management module, a multi-domain embedded operating system program runtime monitoring module, a multi-domain embedded operating system program configuration module and a multi-domain embedded operating system communication module;
the module management module is used for prompting the developer through the module management module when the developer uses the function library irrelevant to the selected hardware and application scene; when a developer needs to import a certain function library, the module management module provides candidate function library suggestions for the developer according to the text content typed by the developer and the hardware and application scene selected by the user;
the programming library management module is used for analyzing the function library in the form of an XML file, organizing and classifying the function library in the form of logic of the function library, and providing the function library for the module management module;
the multi-domain embedded operating system program runtime monitoring module is used for analyzing the acquired MicroPython program runtime information, and corresponding the analysis result with global variables and local variables in the source code, and periodically displaying and updating the values of related variables; meanwhile, a change trend of the related variable of the chart display is provided for a developer to analyze;
the multi-domain embedded operating system program runtime monitoring module supports a developer to modify a variable value and write the variable value into a runtime memory of the program by utilizing a runtime variable dynamic modification mechanism of the multi-domain embedded operating system;
the program configuration module of the multi-domain embedded operating system is used for configuring configuration parameters of a MicroPython program; the configuration parameters of the MicroPython program comprise: priority of MicroPython program running, message port required by MicroPython program and peripheral equipment allocation required by MicroPython program;
the multi-domain embedded operating system communication module is used for initiating a TCP connection request to the multi-domain embedded operating system; meanwhile, the multi-domain embedded operating system communication module encapsulates and abstracts a protocol at the bottom layer, and is used for providing a unified communication interface for other modules in the multi-domain MicroPython integrated development environment;
a multi-domain embedded operating system; the multi-domain MicroPython integrated development environment is communicated with a multi-domain embedded operating system through a TCP/IP protocol and a serial port; when the multi-domain MicroPython integrated development environment is utilized to develop the MicroPython program, the MicroPython program and configuration data thereof are downloaded from the multi-domain MicroPython integrated development environment and are downloaded to the multi-domain embedded operating system through a TCP/IP protocol, and information is transmitted to the multi-domain MicroPython integrated development environment through a TCP/IP protocol or a serial port when the MicroPython program in the multi-domain embedded operating system runs.
4. A development device for a multi-domain MicroPython program according to claim 3, wherein the source code editor is configured to edit and expose the source code of MicroPython to a developer, while also providing the following functions:
1) Coloring key words: different display colors are provided for the keywords, the library, the functions, the classes, the variables and the notes to be rendered for distinguishing display, so that developers are helped to quickly identify different parts in the source code;
2) Intelligent prompting: performing lexical and grammatical analysis on the source code which is being typed by the user, and providing suggestions for writing codes for the user by combining a lexical and grammatical analyzer;
3) Sentence automatic completion: based on the candidate content of the intelligent prompt, the user selects a certain candidate item, and then inserts the candidate item into a designated position of the source code through the source code editor;
4) Displaying grammar errors: locating and displaying grammar error information in a source code editor based on the analysis result of the lexical & grammar analyzer;
5) Display library errors: based on the analysis of the library of references in the source code by the module management module, error information is located and displayed in the editor.
5. The development device for the multi-domain MicroPython program according to claim 3, wherein the multi-domain MicroPython integrated development environment is developed based on Eclipse platform.
CN202010447604.6A 2020-05-25 2020-05-25 Development method and device for multi-domain MicroPython program Active CN111610968B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010447604.6A CN111610968B (en) 2020-05-25 2020-05-25 Development method and device for multi-domain MicroPython program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010447604.6A CN111610968B (en) 2020-05-25 2020-05-25 Development method and device for multi-domain MicroPython program

Publications (2)

Publication Number Publication Date
CN111610968A CN111610968A (en) 2020-09-01
CN111610968B true CN111610968B (en) 2023-05-05

Family

ID=72200586

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010447604.6A Active CN111610968B (en) 2020-05-25 2020-05-25 Development method and device for multi-domain MicroPython program

Country Status (1)

Country Link
CN (1) CN111610968B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114077286A (en) * 2021-04-16 2022-02-22 深圳市云琈科技有限公司 Method for constructing pi OS lite based on MicroPython development and using device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CA2391719A1 (en) * 2002-06-26 2003-12-26 Ibm Canada Limited-Ibm Canada Limitee Editing files of remote systems using an integrated development environment
CN101706540B (en) * 2009-12-04 2011-11-16 首都师范大学 Programmable integrated circuit automatic testing and sorting system
US8539234B2 (en) * 2010-03-30 2013-09-17 Salesforce.Com, Inc. Secure client-side communication between multiple domains
CN108429786A (en) * 2018-01-25 2018-08-21 南京邮电大学 A sensor automatic access control system based on the Internet of Things
CN208572445U (en) * 2018-07-10 2019-03-01 上海物思信息科技有限公司 A kind of network data acquisition system
CN209248870U (en) * 2018-08-31 2019-08-13 北京哈工科教机器人科技有限公司 One kind is for children's science and technology teaching class machine vision development board

Also Published As

Publication number Publication date
CN111610968A (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN110688142B (en) Method, device and storage medium for publishing application programming interface
US20100287525A1 (en) Extension through visual reflection
CN107577607B (en) User interface automatic testing method and device, electronic equipment and storage medium
US6829771B1 (en) Method and apparatus for selectable event dispatching
US6779177B1 (en) Mechanism for cross channel multi-server multi-protocol multi-data model thin clients
US7210117B2 (en) System and method for programmatically generating a graphical program in response to program information
US6282699B1 (en) Code node for a graphical programming system which invokes execution of textual code
US6292933B1 (en) Method and apparatus in a data processing system for systematically serializing complex data structures
US20030200532A1 (en) System and method for sharing reusable code base
US20170123762A1 (en) Graphical representation of data in a program code editor
US9965257B2 (en) Automatic configuration of project system from project capabilities
US8930879B2 (en) Application building
US12014158B2 (en) System and method for developing user interface applications
US6862686B1 (en) Method and apparatus in a data processing system for the separation of role-based permissions specification from its corresponding implementation of its semantic behavior
US20080098377A1 (en) Compiler neutral linking solution for c++ code
CN114217789A (en) Functional component expansion method, apparatus, device, storage medium and program product
US6799320B1 (en) Providing binding options for component interfaces
CN111610968B (en) Development method and device for multi-domain MicroPython program
Palazzetti Getting started with UDOO
Borycki Programming for the Internet of Things: Using Windows 10 IoT Core and Azure IoT Suite
Dey Cross-Platform Development with Qt 6 and Modern C+
bin Uzayr Getting started with python programs in visual studio code
Kletsko et al. Advanced Game Engine Wizardry for Visual Programming Environments
Nayyeri Professional Visual Studio Extensibility
Matikainen Controlling RS-232 equipped devices using Raspberry Pi and C++

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant