Home> System Tutorial> LINUX> body text

What do you need to learn to learn STM32 before it is recommended to learn Linux?

WBOY
Release: 2024-02-05 13:03:42
forward
812 people have browsed it

Today I will share a popular embedded-related question on Zhihu: What do you need to learn to learn STM32 before it is recommended to learn Linux?

What do you need to learn to learn STM32 before it is recommended to learn Linux?

A very good answer:

Author: snowdream

Link: https://www.zhihu.com/question/357775329/answer/2338874463

As an experienced programmer in embedded software development,the respondent has also experienced the technology stack transformation process from STM32 development to Soc Linux development.

In general,Having stm32 embedded development skills will help to master the embedded development of Soc Linux, but if the subject is interested in Linux application development Road,Then the development skills of stm32 do not necessarily have to be mastered.

According to the respondent’s personal skill stack transformation experience,The following skills are usually common to stm32 and Linux embedded application development, in other words, they are reusable skills.

1.C coding ability

For embedded development, the current mainstream coding language is still C language. This is true for stm32, and the same is true for Linux. The only difference is that Linux embedded development often involves some Linux library function APIs, such as sockets, locks, etc.

Just use these when you need them. Therefore, if there are enough stm32 development projects, generally speaking, C programming skills can be directly inherited.

2. Functional modules and algorithm design capabilities

The key to application development is to understand the requirements and design appropriate functional units (providing API interfaces for other modules) or designing appropriate control logic algorithms according to the requirements. This understanding of requirements and the ability to design modules and algorithms can also be experienced in the stm32 project, and can provide a foundation for Linux application development.

3. Multi-threading and mutual exclusion protection thinking

What is the biggest difference between Linux application development and stm32?

The idea of so many threads and mutual exclusion protection will be the first choice. In the Linux development world, threads and processes are inseparable, and mutual exclusion protection of shared resources is inseparable. However, if RTOS is not involved in the development of stm32, you need to learn the multi-tasking thinking of RTOS.

Multi-tasking and multi-threading have very similar logic, so with RTOS multi-tasking thinking, it can greatly promote learning and mastering Linux multi-threading, multi-process and mutual exclusion protection.

4. Basic capabilities of commonly used protocol stacks

stm32 This MCU can be said to have very strong peripheral and internal library support, which is very helpful for learning some communication protocol stacks. **Some friends may say that since I don’t make Linux drivers, there is no need to learn UART, IIC, SPI, DMA, TCP/IP, RapidIO and other hardware communication protocols. This kind of thinking is wrong**.

Having this kind of protocol stack foundation will always be useful in future application development.

In many Linux application development, the respondent has involved the development of functional units that communicate with other embedded systems and the design of its own communication protocols. For example, if you don’t understand the UART protocol, you have no way to design it. The text of your agreement. If you don't understand the RapidIO protocol, how can you communicate with the CPUs of other single boards? Although the driver colleagues will help you with the driver, understanding the upper-layer logic or problem location will always help you if you understand the protocol stack.

So, in summary, it is not necessary to become proficient in stm32 before learning embedded Linux development. If you have accumulated stm32 in the above four points, you can consider trying embedded Linux application development.

The above is the detailed content of What do you need to learn to learn STM32 before it is recommended to learn Linux?. For more information, please follow other related articles on the PHP Chinese website!

source:lxlinux.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!