当前位置:网站首页>[Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS

[Baiwen smart home] first day of the course_ Learn Embedded and understand the development mode of bare metal and RTOS

2022-07-06 05:48:00 Python's path to immortality

I taught myself during the holiday , This blog is to record the learning process and some experiences . So there may be some mistakes in the content , Welcome to correct .

One 、 Understand the basic route and direction of embedded learning

By watching the video of Baiwen , I learned the development direction of embedded , Know the space and salary level of relevant work , There is also a reference route for learning .
 Embedded learning reference route
The difficulty of bare metal direction is low , There are many posts , General treatment ;RTOS The difficulty is going up , The procedure is complex and requires many , There are many posts , Pay high ;linux The driver is a little lower , Need a certain knowledge reserve , Know how to transplant and write drivers , understand linux Driving framework and some mechanisms , Most of the posts are distributed in first tier cities , The treatment is also relatively high ;linux Application is to write business logic and some small programs , There are many posts , Good treatment ;DSP and FPGA Usually as a supplementary project to learn , It's hard , This skill is required only when there are special project requirements .

Two 、ARM Architecture introduction

Most of the mainstream chip architectures I know now are ARM,A Tie you MMU function , Suitable for running advanced operating system , Realize multi task and multi process , for example Windows、MacOS、Linux、Android;R It is suitable for high performance , High real-time applications ;M It is suitable for products with low power consumption and low cost , No MMU function , Can run FreeRTOS、VxWorks、ucLinux、uc/OS.
ARM Architecture classification
MPU and MCU The difference is that the application scenarios are different ,MPU The performance of operation and processing is strong ,MCU The function of is relatively single , It is mainly used to control and manage other equipment .

 be based on ARM Architecturally STM32 Processor classification
Besides, there are DSP and FPGA Chip ,DSP Chips are used in digital signal processing , Strong computational power ;FPGA Programmable hardware , It can be used to compile common hardware circuits .

3、 ... and 、 Development process

It mainly describes the process of program compilation .
 The specific process of integrated development environment

Four 、RTOS The introduction of

The development mode of bare metal machine is generally divided into polling mode and event driven mode . Polling mode is to execute functions in sequence , In this way, the execution time between functions will be affected ; The event driven method uses the corresponding time to trigger the function execution , Common interruptions , Set the global variable as the event flag bit . No multitasking 、 The concept of thread . In the case of multiple functions , The real-time performance of bare metal programs is not high .
Introduce the concept of task into the operating system , Each task can be written as an endless loop , The operating system schedules tasks according to their priority , send CPU Perform each task in time , As long as the scheduling method is good , Each task looks like parallel execution , Improved CPU Utilization ratio .

原网站

版权声明
本文为[Python's path to immortality]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202132041411247.html