The difference and correlation between embedded Linux and 51/430/stm32 embedded development

Source: Internet
Author: User

Embedded Linux and 51/430/stm32 Embedded development of the Difference and Association summary: Microcontroller series: 8051, MSP 430, STM32 f0-3 (ARM cortext m0-m3 series), etc.

The main feature is that there is no memory management unit, no Linux operating system with virtual memory, only bare-metal programs or a Ucos class of real-time operating systems can be run. The main work is peripheral driver development (such as writing an encoder driver, LCD driver, USB driver) and driver-based application development, such as control classes and simple image processing functions.

Microprocessor series: ARM Cortex A-series processors

There is a memory management unit MMU, you can run Linux programs, development and write programs on the Windows PC is the same, just because the arm compiled slowly, generally choose on the PC with the arm-specific compiler to compile the program to run on arm, is cross-compilation. The driver development involved here is more complex and will generally follow the rules of Linux definition to write.

Detailed

STM32-based development is a microcontroller development field, the main development tool is Keil or IAR, this development more accurate is the single-chip development or hardware development, and the recruitment of embedded development, development environment is based on the Linux operating system, this development is generally divided into several levels: drive development, Operating system layer development, application layer development. The knowledge needed to develop the latter is not at the same level as the former.

If you've played with Arduino and Raspberry Pi, then this is a good idea. STM32 development and Arduino are at the same level, at the microcontroller level, embedded Linux development and Raspberry Pi A level, belonging to the microprocessor level.

In more detail, the microcontroller development is mainly in the control, detection and transmission of data, such as control relay switch to control the door lock, detect temperature and humidity upload data to the gateway. In addition to the processor can do a single-chip, but also to deal with audio and video and other computationally large tasks, there is a file management system has more storage space, and the platform provides the " The "Ready to use" tool (which can be used directly after installation), such as running a face detection system on a Raspberry Pi, is no problem, and it is convenient to build a Web site on the Raspberry Pi.

Embedded Linux uses a master chip that is more advanced than STM32. What do you mean advanced? In addition to the characteristics of running speed memory space, from getting the chip to start development, to finally become a complete product prototype or solution, its process needs to use a lot of development tools, hardware circuit board design, drive layer and system layer code porting, application layer code writing, these need a team to work together to complete, Of course, Daniel can do it independently, but it takes a lot of effort, and the project cycle can be very, very long. Embedded Linux development, not like the microcontroller developed as well as the design of hardware, only need to open the IDE to write code, and then burn Test change Code burn test code.

Put a summary picture of the arm chip core. Where the STM32 kernel belongs to the CORTEX-M series, the embedded Linux kernel may be the CORTEX-A series. Some cortex-m do not support the MMU Memory management unit, as far as I know can only up to Μc/os series of embedded systems, and CORTEX-A support MMU, can be on Unix-like systems. Once on Unix-like systems, the underlying stuff can be encapsulated, providing only interfaces to the upper-level developers.

Here to popular science. If you learn object-oriented programming, the package and interface are easy to understand. Encapsulation is to hide the implementation details as much as possible, to provide one or more public interfaces, developers only need to know how to call this interface, do not need to know how to implement. This point and based on the development of single-chip microcomputer is very different, SCM development is the essence of "register-oriented development." and embedded Linux development, is "oriented to N-1 layer development", such as application layer is "facing the operating system Layer API development".

Of course, now that STM32 has stm32cube this development tool, it is as if the STM32 development encapsulates a layer and provides an interface. But for me, Cube is just a "development framework" or "middleware", Cube allows developers to configure the pin more hassle-saving, while the register encapsulated a layer, in a more friendly way to tell developers, developers only need to according to the interface document provided by the interface to call (unfortunately, the cube's documents, Too little learning and development data). If I don't use cube, I can also develop STM32, without cube developers are directly looking at the chip manual development.

For embedded Linux development, you can not detach from the N-1 layer, do not understand the underlying API does not know what to do, such as using TCP, at least to know the socket interface, such as writing a Web Administration page, At least one web framework (like Python's Django) and a Web server (such as Apache) are needed. Of course, since Embedded Linux is based on Unix-like development, many interfaces and their knowledge are common, and mastering the underlying interface can pay more attention to the business logic. In the development of single-chip microcomputer, a chip will need to re-see the chip manual, even to achieve the same function is also a kind of re-development of the feeling, so the chip selection stage is also a heavy priority. Embedded Linux Application layer development is not so troublesome, as long as the operating system is UNIX-like, the bottom of the same interface to provide code reuse.

If there is a wrong place, very welcome to give guidance!

--"Thanks" data source https://www.zhihu.com/question/53880054

The difference and correlation between embedded Linux and 51/430/stm32 embedded development

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.