Introduction: Aiming at the characteristics of embedded systems, this paper takes the cost-effective 32-bit ARM embedded processor AT91RM9200 as the hardware core, builds a general industrial control hardware platform, and transplants the embedded Linux operating system and the graphical interface development environment MiniGUI on this platform. Based on this general industrial control platform, most of the automatic measurement and control systems required for engineering applications can be easily constructed. Its application is extremely competitive in terms of performance and cost, which indicates that this platform has a good application prospect.
With the advancement of industrial control technology and the intensification of market competition, developers usually need to design a measurement and control system that meets user requirements in the shortest possible time. In view of the characteristics of embedded systems, this paper uses the cost-effective 32-bit ARM embedded processor AT91RM9200 as the hardware core to build a general industrial control hardware platform, and transplants the embedded Linux operating system and the graphical interface development environment MiniGUI on this platform. Based on this general industrial control platform, most of the automatic measurement and control systems required for engineering applications can be easily built. Its application is extremely competitive in terms of performance and cost, which indicates that this platform has a good application prospect.
In terms of hardware, this industrial control platform uses the AT91RM9200 microprocessor from ATMEL and designs its minimum system and peripheral components to meet the more abundant technical requirements of the current industrial control site. It also combines the industrial measurement and control Modbus protocol to expand multiple communication interfaces to meet the communication needs of users. At the same time, the embedded Linux operating system provides a high-performance software platform for the development of measurement and control software.
Design of general industrial control hardware platform
1 AT91RM9200 microprocessor minimum system composition
The minimum system is the basic circuit necessary to ensure the reliable operation of the microprocessor. The minimum embedded system based on the AT91RM9200 microprocessor consists of the microprocessor AT91RM9200, power circuit, crystal oscillator circuit, reset circuit, JTAG interface, memory module, serial debugging interface and other circuits. So far, the hardware foundation for designing and developing a general industrial control platform based on the ARM microprocessor has been established.
2 Hardware platform peripheral interface circuit
The rich built-in peripherals of AT91RM9200 can be used to easily expand the peripheral interfaces, as shown in Table 2.
3 Hardware Platform User Interface
The system provides a 2*32-pin standard 3U slot, a total of 64 pins. The 3U slot is specially designed for portable applications and is particularly suitable as an integrated mobile controller for industrial measurement and control, product lines, transportation systems and traffic control systems.
4 Hardware Platform Structure
According to the above design of the AT91RM9200 minimum system and its peripheral components, a general industrial control hardware platform with the AT91RM9200 microprocessor as the hardware core is finally constructed, as shown in Figure 1.
Figure 1 General industrial control platform hardware structure General industrial control software platform design
1 Building Linux operating system based on arm hardware platform
arm-Linux development environment construction
Establish the development environment of the industrial control platform with embedded Linux as the operating system and the software development environment of the virtual machine Linux environment installed under Windows. The embedded Linux kernel compilation and application compilation are completed in the virtual machine. In order to improve the development efficiency, the Linux installed in the virtual machine is used as the server. The server is logged in to the server through the Windows client using Telnet or SSH. The server can freely download the necessary development tools and software in the client. When debugging the application, it can be simulated in the Linux environment of the PC first, and then downloaded to the target platform through the DEBUG debugging serial port. The advantage of this development environment is that only one computer is needed to truly simulate Linux. The specific process is shown in Figure 2.
Figure 2 Development environment
Cross-compiling
Cross-compilation is to generate executable code on one platform for another platform. The so-called platform actually includes two concepts: architecture and operating system. According to the development environment established above, the target platform is an embedded Linux operating system based on the arm architecture, and the development and compilation environment is based on the Linux operating system on the virtual machine in the PC. If you run the program on the target platform, you must cross-compile the code in the PC development environment to adapt to the target platform.
According to the environment variable PREFIX, install the compiled toolchain to the specified folder and you can use it.
For example, modify the environment variables of arm-Linux-gcc-2.95.3 to:
PATH=$PATH:$HOME/bin:$PREFIX/bin:/usr/local/arm/2.95.3/bin:/sbin:/usr/sbin:/usr/local/sbin, and write the hello.c program for verification
$arm-Linux-gcc hello.c -o hello-arm
$file hello-arm
hello-arm: ELF 32-bit LSB executable, ARM, version1 (arm), for GNU/Linux 2.0.0, dynamically linked (uses shared libs),not stripped
This shows that the generated hello-arm can run on the arm platform, and it also proves that the cross-compilation toolchain is valid and usable.
Linux kernel compilation and download
Specific steps are as follows:
(1) Unzip Linux-2.6.21-2009-04-10.bz2: tar xjvf Linux-2.6.21-2009-04-10.bz2;
(2) Enter the Linux-2.6.21 directory and compile the kernel: make uImage;
(3) After the compilation is complete, copy the uImage file to the Windows environment via SSH;
(4) Configure U-Boot environment variables;
(5) Configure the tftp server: Run the tftp server under the Linux system, copy the uImage file of the Linux kernel to the tftp download working directory, start the tftp service, and ensure that the PC and AT91RM9200 are connected to the same network segment;
(6) Download the kernel image file and erase the Flash in the U-Boot prompt;
(7) Download the kernel image file to Flash;
Linux File System
The software platform uses the cramfs file system, which has the following characteristics: when the system accesses data at a certain location, it immediately calculates the location of the data in cramfs, decompresses it into RAM, and then obtains the data through memory access. The storage location of the data in the memory after decompression in cramfs is managed by the cramfs file system itself, and users do not need to implement the process, thus increasing transparency and saving time for developers.
2 Device driver development under Linux operating system
The device drivers on Linux are very rich, supporting various mainstream hardware devices and the latest hardware technologies. In the Linux kernel, device drivers are independent "black boxes" that make a specific hardware respond to a well-defined internal programming interface while completely hiding the working details of the device. It is the task of the device driver to map these calls to device-specific operations through a set of standardized calls. In the Linux system, each device is regarded as a file. The opened device is marked by a File structure in the kernel, and the kernel uses the File_operations structure to access the driver's functions. Each device is associated with a set of standard function sets.
3 Application Development under Linux Operating System
Compile the application on the PC, run the test, and then download it to the /usr directory of the target platform through the network or serial port. For smaller programs, it is more convenient to use the serial port to download. The specific steps are as follows:
(1) Develop programs and cross-compile in PC simulation environment;
(2) After Linux on the arm platform runs normally, enter the usr directory and select the downloaded program;
(3) After the download is complete, run chmod +x filenam to change the file attribute to an executable command;
(4) The command to execute the file just downloaded is ./filename. Implementation of human-computer interactive communication mechanism of general industrial control platform
Embedded GUI provides a human-computer interaction interface for embedded systems in special occasions. The main features of the new generation of embedded GUI are: user-centric, multi-channel, intelligent, and high bandwidth. In embedded Linux systems, almost all GUIs are built on FrameBuffer devices.
MiniGUI is a complete graphics support system tailored to the application characteristics of embedded systems. It brings modern window and graphics technology to embedded devices. It is an efficient, reliable, customizable, compact and flexible graphical user interface support system that is very suitable for embedded devices. Its main advantages can be summarized as supporting multiple embedded operating systems and having excellent portability; scalable system architecture, easy to expand; rich functions, flexible tailoring; achieving the best balance between small size and high performance and having a wide range of applications.
1 Preparation before porting MiniGUI
MiniGUI 1.3.3 is an open source version of MiniGUI, and it has rich resources and stable performance, so MiniGUI 1.3.3 is selected as the GUI development environment. To transplant MiniGUI, you need to prepare the files listed in Table 3, which can be obtained on the Internet.
Previous article:Establishment of ARM/uClinux development environment
Next article:Talking about the mutual growth of myself and ARM
- Popular Resources
- Popular amplifiers
- Naxin Micro and Xinxian jointly launched the NS800RT series of real-time control MCUs
- How to learn embedded systems based on ARM platform
- Summary of jffs2_scan_eraseblock issues
- Application of SPCOMM Control in Serial Communication of Delphi7.0
- Using TComm component to realize serial communication in Delphi environment
- Bar chart code for embedded development practices
- Embedded Development Learning (10)
- Embedded Development Learning (8)
- Embedded Development Learning (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Intel promotes AI with multi-dimensional efforts in technology, application, and ecology
- ChinaJoy Qualcomm Snapdragon Theme Pavilion takes you to experience the new changes in digital entertainment in the 5G era
- Infineon's latest generation IGBT technology platform enables precise control of speed and position
- Two test methods for LED lighting life
- Don't Let Lightning Induced Surges Scare You
- Application of brushless motor controller ML4425/4426
- Easy identification of LED power supply quality
- World's first integrated photovoltaic solar system completed in Israel
- Sliding window mean filter for avr microcontroller AD conversion
- What does call mean in the detailed explanation of ABB robot programming instructions?
- USB Type-C® and USB Power Delivery: Designed for extended power range and battery-powered systems
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- RAQ #223: How to measure and determine soft-start timing without a soft-start equation?
- GigaDevice's full range of automotive-grade SPI NOR Flash GD25/55 wins ISO 26262 ASIL D functional safety certification
- GigaDevice's full range of automotive-grade SPI NOR Flash GD25/55 wins ISO 26262 ASIL D functional safety certification
- New IsoVu™ Isolated Current Probes: Bringing a New Dimension to Current Measurements
- New IsoVu™ Isolated Current Probes: Bringing a New Dimension to Current Measurements
- Infineon Technologies Launches ModusToolbox™ Motor Kit to Simplify Motor Control Development
- Infineon Technologies Launches ModusToolbox™ Motor Kit to Simplify Motor Control Development
- STMicroelectronics IO-Link Actuator Board Brings Turnkey Reference Design to Industrial Monitoring and Equipment Manufacturers
- Design and implementation of temperature control system based on MSP430
- Multifunctional telephone alarm system solution
- [Erha Image Recognition Artificial Intelligence Vision Sensor] Evaluation 2: Built-in 7 functions, face recognition and other tests
- 【Xianji HPM6750】Development process using Embedded Studio
- 【TouchGFX Design】Decomposition of the generated project directory structure and recommendation of two C++ introductory books
- consult
- Nuvoton's new development board Chili allows you to complete Linux application development in 40 minutes
- Common basic knowledge of 4G DTU
- [NXP Rapid IoT Review] + Alternative Experience Rapid IoT Studio online IDE
- Starting at noon today, the China-US trade war has begun! Are you afraid?