Can the ordinary MCU development version run Python?

Ordinary development boards definitely won't work.

At present, there are attempts to use python language to develop MCU programs on the market, but it is not suitable for most products. Why?

Quite simply, it will increase hardware costs.

Being able to use python is bound to be because the product functions are more complicated, and it needs to be upgraded to the Linux level.

For the real-time performance of the product, the language that is closer to the bottom layer is undoubtedly the better, such as assembly, and C language is the mainstream.

The following is a general inventory, in order for the MCU to support Python development, the following conditions need to be met:

1. Processor performance and memory

The Python interpreter and libraries require sufficient processor performance and storage capacity to function properly.

Therefore, the single-chip microcomputer needs to use a high-performance and large enough memory space, such as ARM Cortex-M series processors or similar processors.

2. Operating system support

To run Python on a single-chip microcomputer, corresponding operating system support is required.

For example, some microcontrollers can use the Linux operating system, and install Python interpreters and libraries on this basis.

3. Python interpreter and library

In order for the single-chip microcomputer to support the Python language for development, it is necessary to have a Python interpreter and library suitable for the single-chip microcomputer.

For example, MicroPython is a Python interpreter specially designed for microcontrollers, suitable for some high-end microcontrollers.

 

4. Appropriate toolchain and development environment

MCU development of Python applications needs to support the corresponding tool chain, development environment or integrated development environment (IDE).

For example, you can use MicroPython to write Python code, and use the MicroPython firmware burning tool to burn the code to the MCU.

5. Appropriate interface and peripheral support

The MCU needs to provide proper interface and peripheral support to communicate and interact with other devices.

For example, the microcontroller needs to support interfaces such as serial communication, I2C bus, and SPI bus, as well as peripherals such as sensors, LEDs, and LCDs.

6. Hardware Security

Since Python is an interpreted language, the microcontroller needs to have sufficient hardware security features to protect the system from malicious code.

For example, the microcontroller needs to provide security functions such as hardware encryption module and memory protection.

7. Good community support

MCU support for Python development requires good community support for resources such as documentation, code samples, software tools, and technical support.

For example, the MicroPython community provides a large number of documents, code samples and technical support, which can help developers quickly get started and develop Python applications.

Although Python is a high-level programming language that is easy to learn and use, developing applications using Python on a microcontroller still requires a certain understanding of hardware circuits.

In terms of program execution efficiency, Python's performance is slower than other programming languages ​​(such as C/C++), so in application scenarios that require high performance, perhaps C language and assembly are the best choices.

At the end of the Easter egg time, recently some fans asked me how to improve the thinking and level of MCU programming .

I have been developing for more than 10 years, and have worked on dozens of projects. I have written a standard program framework for the common functions of these projects, such as task creation, management, queue algorithm, LED special effects, button scanning, etc.

I also recorded a tutorial for this architecture in 2019. When I was working on a new project, I directly applied this architecture to write, and the efficiency took off immediately.

If nothing else, it should be the most practical, hardcore, and systematic dry goods you can see so far.

Now it is released for everyone to see for a limited time, and it may be deleted later. This framework has applied for copyright, and non-students are only for learning use .

You can click the ⬇️ card below to see the beginning of the article to receive .

The learning path from the introduction of MCU to advanced opening and hanging (with tutorial + tools) icon-default.png?t=N6B9https://blog.csdn.net/weixin_43982452/article/details/114134096

Guess you like

Origin blog.csdn.net/weixin_43982452/article/details/131838176