Stm32 with ucos or linux

There are two common embedded operating systems: MMU and MMU.

The MMU is Windows, MacOS, Linux, Android, and the MMU is FreeRTOS VxWorks ucOS.

There are two kinds of CPUs: with MMU and without MMU, with MMU with Cortex-A series ARM9, ARM11 series, without MMU with Cortex-M series.

Stm32 with ucos or linux
Stm32 with ucos or linux
STM32 is M series, without MMU controller, it is impossible to run Linux. Of course, STM32 can run μClinux, but strictly speaking, μClinux is not Linux. So for many users have doubts about stm32 with ucos or linux, we will know the answer, stm32 is ucos.

The main reason is that the stm32 series products are low-cost designs and do not support running LINUX.
Interpretation of five operating systems on the STM platform
Stm32 with ucos or linux

Based on the STM platform and meeting the real-time control requirements of the operating system, there are five options available for porting. They are μClinux, μC/OS-II, eCos, FreeRTOS and rt-thread.

μC/OS-II is developed on the basis of μC/OS. It is a compact and preemptive multitasking real-time kernel written in C language. μC/OS-II can manage 64 tasks and provide functions such as task scheduling and management, memory management, inter-task synchronization and communication, time management and interrupt service. It has high execution efficiency, small footprint, real-time performance and scalability. Strong and so on.

For real-time satisfaction, since the μC/OS-II core is designed and implemented for real-time system requirements, it only supports fixed-priority preemptive scheduling; the scheduling method is simple and can meet high real-time requirements.

In memory management, μC/OS-II manages successive large blocks of memory by partition. Each partition contains an integer number of memory blocks of the same size, but the size of memory between different partitions can be different. When the user dynamically allocates memory, it is only necessary to select an appropriate partition, allocate memory by block, and put the block back to the previously owned partition when released, thus eliminating the fragmentation problem caused by multiple dynamic allocation and release of memory. .

The μC/OS-II interrupt processing is relatively simple. Only one interrupt service subroutine ISR can be attached to an interrupt vector, and the user code must be completed in the ISR (Interrupt Service Routine). The more ISR needs to do, the longer the interrupt latency, and the maximum nesting depth that the kernel can support is 255.

In terms of file system support, since μC/OS-II is for small and medium-sized embedded systems, even if all functions are included, the compiled kernel is less than 10 KB, so the system itself does not provide support for the file system. However, μC/OS-II has good scalability and can be added to the contents of the file system if necessary.

In terms of hardware support, μC/OS-II can support most of the currently popular CPUs. μC/OS-II is very small due to its own kernel. The minimum size of the clipped code can be 2KB, and the minimum required data RAM space. For 4 KB, the porting of μC/OS-II is relatively simple, and only the code associated with the processor needs to be modified.

μC/OS-II is an embedded operating system kernel with simple structure, complete functions and real-time performance. It is very suitable for CPUs without MMU function. It requires very little kernel code space and data storage space, has good real-time performance, good scalability, and is open source. There are a lot of data and examples on the Internet, so it is suitable for porting to stm32.

Stm32 with ucos or linux

Railway Freight Wagon

Railway Freight Wagon,Railroad Flat Wagon,Railroad Hopper Wagon,Multi-Fuction Covered Wagon

CRRC SHANDONG CO., LTD. , https://www.crrcsd.com

Posted on