As a powerful Cortex-M3 chip, why can't LPC1788 be ported to Linux? Because like ARM7, LPC1788 does not contain MMU - memory management unit. MMU is necessary for advanced operating systems (Windows, Linux). Simply put, the role of MMU is to provide safer storage space for threads.
ARM9, ARM11 and other CPUs include
Of course, there are solutions. For CPUs without MMU such as LPC17xx, uCLinux can be used. However, there is still little information on porting uCLinux to LPC17xx.
Learn more about MMU from Baidu
Full entry: http://baike.baidu.com/link?url=eOwAmbW0dXaXsQh1ylxcKFI8vxWQ54o_tAmfv1OAu51hB-Nv3mo1EowL8Er4TciT
MMU is the abbreviation of Memory Management Unit. Its Chinese name is memory management unit. It is the control circuit used to manage virtual memory and physical memory in the central processing unit (CPU). It is also responsible for mapping virtual addresses to physical addresses and providing memory access authorization for hardware mechanisms.
Mapping linear addresses to physical addresses
Modern multi-user, multi-process operating systems require MMU to achieve the goal of each user process having its own independent address space. Using MMU, the operating system divides an address area, and the content seen by each process in this address area may not be the same. For example, the MICROSOFT WINDOWS operating system divides the address range 4M-2G into user address space. Process A maps an executable file at address 0X400000 (4M), and process B also maps an executable file at address 0X400000 (4M). If process A reads address 0X400000, it reads the content of A's executable file mapped to RAM, and when process B reads address 0X400000, it reads the content of B's executable file mapped to RAM.
This is where the MMU comes in to perform address translation.
Provides hardware-based memory access authorization
For many years, microprocessors have come with on-chip memory management units (MMUs) that enable a single software thread to work in a hardware-protected address space. However, in many commercial real-time operating systems, the MMU is not used even if the system contains such hardware.
When all threads of an application share the same memory space, any thread can intentionally or unintentionally damage the code, data, or stack of other threads. Abnormal threads may even damage kernel code or internal data structures. For example, a pointer error in a thread can easily crash the entire system, or at least cause the system to work abnormally.
In terms of security and reliability, process-based real-time operating systems (RTOS) have superior performance. To generate processes with separate address spaces, the RTOS only needs to generate some RAM-based data structures and let the MMU enforce the protection of these data structures. The basic idea is to "access" a new set of logical addresses in each associated conversion. The MMU uses the current mapping to map the logical addresses used in instruction calls or data reads and writes to physical addresses of the memory. The MMU also marks accesses to illegal logical addresses that are not mapped to any physical addresses.
Although these processes add the system overhead inherent in accessing memory using lookup tables, the benefits they achieve are high. At process boundaries, carelessness or erroneous operations will not occur, and a defect in a user interface thread will not cause code or data in other more critical threads to be corrupted. It is incredible that there are still operating systems without memory protection in complex embedded systems with high reliability and security requirements.
The use of an MMU also facilitates the selective mapping or unmapping of pages into the logical address space. Physical memory pages are mapped into the logical space to hold the code for the current process, and the remaining pages are used for data mapping. Similarly, physical memory pages are mapped to hold the thread stacks of a process. The RTOS can easily retain the contents of the page corresponding to the logical address after each thread stack is unmapped. This way, if the stack allocated by any thread overflows, a hardware memory protection fault will occur, and the kernel will suspend the thread without allowing it to corrupt other important memory areas located in the address space, such as another thread stack. This adds memory protection not only between threads, but also between the same address space.
Memory protection, including this type of stack overflow detection, is usually very effective in application development. With memory protection, program errors will generate exceptions and can be detected immediately, which can be traced from the source code. Without memory protection, program errors will cause subtle failures that are difficult to trace. In fact, since RAM is usually located at page zero of physical address in a flat memory model, even the dereference of a NULL pointer cannot be detected.
Previous article:Correct use and precautions of SSP1 pin based on LPC1788
Next article:IIC usage of LPC1788
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Wi-Fi 8 specification is on the way: 2.4/5/6GHz triple-band operation
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Vietnam's chip packaging and testing business is growing, and supply-side fragmentation is splitting the market
- Three steps to govern hybrid multicloud environments
- Three steps to govern hybrid multicloud environments
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Microchip Accelerates Real-Time Edge AI Deployment with NVIDIA Holoscan Platform
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- Melexis launches ultra-low power automotive contactless micro-power switch chip
- [NXP Rapid IoT Review] A Preliminary Study on Timer Functions
- What are thin AP, fat AP, AP+AC, and Mesh?
- Bluenrg_Why can't I add my own services or characteristics?
- MSP-EXP430FR2355
- How connected vehicles process data: 3 common questions
- [Jihai APM32E103VET6S development board] Evaluation 2, Development environment
- [EVK-NINA-B400 Evaluation Kit] + First Meeting
- msp430 LCD driver module
- How to use high-speed ADCs and DACs with FPGAs
- 618 What did you buy?