What is the difference between embedded Linux and stm32? Is there any relationship between them?

I have been engaged in the development of embedded microcontrollers for 11 years, and many people are confused about embedded, microcontrollers , STM32, and Linux .

This led to a lot of detours in the learning process. Although it only takes a few months of learning time, it wasted 1-2 years. Finally, you complain that the embeddedness is too high, right? !

After reading this article, I believe you will be enlightened and thoroughly understand the relationship between embedded linux and stm32 !

I will completely solve your problems from the following points:

1. Several directions of embedded development

2. When to use embedded Linux ? When to use a microcontroller?

3. The difference between embedded Linux and single-chip microcomputer ( stm32 ) development

1. Several directions of embedded development

In the past, many children's shoes asked me: Brother Wuji, what is the difference between embedded and single-chip microcomputers, and which one is better?

Probably, everyone thinks that embedded development is an ARM chip running a Linux system.

In fact, embedded development is divided into many directions, starting with processors with different performances:

The picture above shows some processors that are currently mainstream in embedded development.

As an embedded microcontroller MCU, the single-chip microcomputer is included in the embedded development. Embedded is a large category, and the single-chip microcomputer is one of the subdivision directions.

8051, AVR, STM32, etc. belong to the category of single-chip microcomputers, but the chip performance is different due to different manufacturers.

In addition, the ARM+Linux that people often say probably refers to the embedded microprocessor MPU. This kind of processor has more powerful performance, so it usually runs Linux or Android system.

Different career directions are derived from different embedded processors, and the mainstream ones are as follows:

1. MCU engineer

2. Linux driver development

3. Linux system development engineer

4. Linux application engineer

5. Android system development engineer

6. FPGA/DSP development

Second, when to use embedded Linux ? When to use a microcontroller?

It depends on the product's demand for chip performance. If your product has complex functions, needs to play video on the display screen, or needs to process complex algorithms, you will generally use the ARM hardware platform + Linux solution.

What I want to emphasize is that ARM is a core, and not all chips with ARM cores run Linux.

STM32 also belongs to the ARM core, but most models do not run Linux.

ARM is also divided into many versions according to performance, as shown in the figure below:

Generally, when an ARM9-level processor is installed, it will cooperate with the Linux system to make more high-end applications. This is what everyone often calls embedded ARM+Linux development.

If it is something simple, use a single-chip microcomputer.

But one thing is undeniable, if a single-chip microcomputer can be used, the boss will never choose ARM+Linux , because of the advantages of low cost of single-chip microcomputer, short product development cycle, easy maintenance, low power consumption, and small size .

The single-chip microcomputer is "bare-metal programming", and at most a real-time operating system (RTOS) is added, so the power-on initialization program is simple and the real-time performance is relatively high.

Although ARM+Linux can do many complex functions, its real-time performance will be a little worse than that of a single-chip microcomputer.

3. The difference between embedded Linux and single-chip microcomputer ( stm32 ) development

Mainly reflected in the following aspects:

1. Different hardware resources

Single-chip microcomputer generally integrates flash and ram inside the chip, and ARM is generally CPU, which is used in conjunction with external flash, ram, and sd card memory.

STM32 now also has high-end MPUs that can run Linxu, such as STM32MP157F.

In terms of peripherals, ARM is also much more complex than microcontrollers.

2. Program storage locations are different

MCU programs are generally relatively small, and the program logic of hundreds of Kb is already relatively complicated, so most product programs are generally stored in the on-chip flash.

The ARM+Linux program is relatively large, and the Linux system is also added. Generally, there is an external memory, such as sd card, mmc, sata, etc.

3. The program development environment is different

Most single-chip microcomputers use Keil, IAR, etc., and the development environment is relatively simple.

ARM+Linxu is much more complicated, and you can refer to the chip solution for details.

The compilation time of the program is not at the same level. The single-chip microcomputer only takes tens of seconds, and ARM+Linux. If I run on the Android system again, I played with rk3288 a long time ago and recompiled it. If the computer configuration is good, it will take about a few hours. .

4. Different debugging tools

Single-chip microcomputer: hardware development board, emulator (debugger), USB to serial cable.

ARM+Linux: hardware development board, network cable, USB to serial cable, SD card.

When we debug STM32-based microcontrollers, we generally use st-link to simulate the debugger and find bugs.

However, ARM+Linux development generally does not use a hardware debugger, and generally prints information through the serial port for debugging, especially when doing application development.

4. Final summary

Single-chip microcomputers such as ARM+Linux and stm32 have different product directions and job directions, and there is no correlation between them.

Single-chip microcomputers are more inclined to hardware, and ARM+Linux is more inclined to applications.

Of course, if you are very good at single-chip microcomputers, and then learn ARM+Linux, you will understand more deeply and be more efficient.

Last egg time!!!

Recently, many friends asked me for some MCU learning materials, and then based on my ten years of experience in the industry, I stayed up all night in my spare time, carefully compiled a "MCU Introduction to Advanced Tutorial + Toolkit" , and shared it with everyone for free! ! !

In addition, I will share with tears my 22 popular open source projects at the bottom of the box, including source code + schematic diagram + PCB + documentation, so that you can quickly advance to become a master!

It is said that a small partner successfully entered the BAT factory by relying on this information , so you must study hard if you save it.

The tutorial package and detailed learning path can be found at the beginning of my article below.

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

Guess you like

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