1. Introduction to ARM
Generally speaking, any dedicated hardware and software system with a microprocessor can be called an embedded system. It is a dedicated computer system embedded in an object system, centered on applications and based on computer technology. The hardware and software can be tailored to meet the strict requirements of the application system for functions, reliability, cost, volume, power consumption, etc. Currently, the most popular ARM cores include ARM7TDM1, S trong ARM, ARM 720T, ARM 9TDM1, ARM920T, ARM940T, ARM946T, ARM966T, ARM10TDM1, etc. The CPU of the target board discussed in this article is the Samsung S3C2410 chip with ARM920T core.
ARM9 series microprocessors are mainly used in wireless devices, instruments, security systems, set-top boxes, high-end printers, digital cameras and digital video cameras, etc. It includes three types: ARM920T, ARM922T and ARM940T, which are widely used in PDA, mobile communications, routers, industrial control and other fields.
2. Implementation principle of embedded Web server
Embedded Web server refers to the introduction of Web server into embedded devices on site and resides in the limited code space. Compared with traditional Web applications, it simplifies the system structure and integrates information collection and information release into embedded devices on site. With the support of corresponding hardware and software platforms, using standard interface forms and communication protocols, the Web server embedded in the embedded device can provide a unified browser-based operation and control interface to any legitimate user connected to its network. At this time, the browser becomes the front-end control panel of the device. Currently in the field of embedded applications, the transformation of embedded systems into embedded WebServers can be roughly divided into two implementation schemes:
(1) Internet access for embedded devices based on gateway servers;
(2) Directly implement TCP/IP embedded device Internet access. This project adopts the second implementation scheme.
3. Implementation of system functions
3.1 Development Process
Figure 1 shows the experimental environment and development process used in this project. ①Install the Linux distribution package and cross compiler armlinux-gCC under the RedHat Linux operating system of the host; ②Configure Linux (makem enuconfig) and select the relevant configuration suitable for the system of this project; ③Compile and generate the Linux image file zlmage; ④Download the file to the target board through the tftp command of u-boot and execute it. This will be introduced in the following content.
3.2 Loading the Linux kernel image
3.2.1 Connect the serial port 0 of JXARM 9-2410 to COM 1 of PC, connect the network card of JXARM 9-2410 to the network card of PC with a direct network cable, or connect JXARM 9-2410 and PC to the same LAN with a common network cable. The IP of ARM experiment box is 192.168.1.45, the IP of Linux under virtual machine is 192.168.1.180, and the security level is set to no firewall, and the host IP is set to 192.168.1.145.
3.2.2 Power on JXARM9-2410. Normally, you will see the bootloader menu interface in the terminal DNW. Follow the prompts in the bootloader to load. After completion, enter CTRL+C to enter the Linux command line. If a failure occurs, there may be the following problems:
1) When loading the kernel, the overall display is "TT". This is because the tftp server is not connected successfully. Enter the PINg 192.168.1.180 command in uboot. If it prompts "not alive", please check whether the network is connected correctly: whether the network cable is used correctly or the IP addresses of the host and target machines are not in the same subnet. Here, the host and target machines are required to be in the 192.168.1.xxx network segment, and the last digit cannot be the same; if it prompts "alive" but still prompts "TT", please check the Windows firewall settings and turn off the firewall. If it still doesn't work, please turn off other programs started in the system, such as anti-virus software.
2) The prompt "PACket too big" is caused by uboot receiving illegal packets. A small number of such prompts will not affect the loading of the kernel. If it causes the kernel loading to fail, please check as follows: ① Use a direct network cable to connect the computer and the experimental box; ② Close all network-related programs opened on the computer.
3.3 Establishment of Boa Web Server
Setting up a Boa web server involves the following steps:
3.3.1 Download Boa source code
The source code of the Boa web server can be downloaded from here. The download file in this article is:
boa-0.94.13.tar.gz is the latest version.
3.3.2 Install and compile Boa source code 1) Copy the Boa source code downloaded from Windows to the /home/cvtech/jx2410/examples/ directory through the file sharing in Vmware Tools.
2) Install source code: Generate Makefile #./configure.
3) Modify the Makefile file, find CC=gcc, change it to CC = arm-linux-gcc, then find CPP = gcc-E, change it to CPP = arm-linux-gcc-E, save and exit.
4) Run make to compile, and the Boa file will be generated in the boa/SRC directory. This file is the Boa Web server executable file. After stripping the debugging information, the final program is only about 60KB in size.
3.3.3 Configure the Boa Web server to support the execution of CGI programs
When Boa starts, it will load a configuration file boa.
conf, before running the Boa program, you must first edit this file and place it in the default directory defined by the SEVER-ROOT macro definition in the src/defines.h file, or use the parameter "-c" to specify boa when starting Boa.
conf loading directory.
Users can modify boa.conf according to their needs, but they must ensure that other auxiliary files and settings must be consistent with the configuration in boa.conf, otherwise Boa will not work properly. In the above example, we also need to create a directory /var/log/boa where the log file is located, and copy the mime.types file to the /etc directory. The mime.types file is used to specify the MIME type corresponding to different file extensions. Generally, you can copy one directly from the Linux host, and most of them are also in the /etc directory of the host.
3.4 System Function Testing
After porting the Boa server, we will test whether it can work properly, whether static HTML pages can be accessed normally, and whether dynamic Web pages can be accessed normally. In this project, NFS will be used to carry out the test work.
Test the Web server. The Boa test development environment is shown in Figure 2:
You can copy the /etc directory on the embedded target system to the NFS shared directory on the host, and then remount the etc directory in the NFS shared directory as the /etc directory on the target system. In this way, you can modify various configuration files in the etc directory on the host and the changes will take effect immediately on the target system.
The IP address of JXARM9-2410 is previously set to 192.168.1.45, and the configured boa has been pre-burned in the JFFS2 file system of JXARM9-2410.
conf file, located in the /mnt/jffs2/etc/directory.
Start JXARM9-2410 Linux, and then follow the steps below:
a) Copy the Boa executable file to the tftpboot directory;
b) Mount the tftpboot directory under the host to the nfs directory of the target board;
c) Start the Boa server.
According to the configuration of boa.conf above, the target board's mnt/jffs2/web directory now contains the test main page index.html, the directory IMAGES for storing various images, and the directory cgi-bin for storing CGI scripts.
After starting, test the Boa server by accessing the following URL in a web browser: If the network connection is normal and Boa starts normally, you will see /mnt/jffs2/web/index.
The html web page, as shown in Figure 3, indicates that the static HTML page test has passed. You can modify the web page and replace it with the required web page, and then refresh the browser display.
3.5 Dynamic Web Page Testing
Enter the following command in the JXARM9-2410 Linux command line to mount the host's tftpboot directory to the target board's nfs directory:
The above command first places the written CGI program cgi_test in the cgi-bin directory defined in boa.conf.
In this topic, the path is / mnt / jffs 2 / web / cgi -bin /, and then start the boa server. The CGI program can be executed correctly.
Previous article:Hardware platform design of wireless printing module based on ARM chip AT91RM9200
Next article:Detailed explanation of LPCXpresso54628, a low-power MCU based on ARM Cortex-M4 core
Recommended ReadingLatest update time:2024-11-23 08:22
- Popular Resources
- Popular amplifiers
- Virtualization Technology Practice Guide - High-efficiency and low-cost solutions for small and medium-sized enterprises (Wang Chunhai)
- Semantic Segmentation for Autonomous Driving: Model Evaluation, Dataset Generation, Viewpoint Comparison, and Real-time Performance
- Machine Learning and Embedded Computing in Advanced Driver Assistance Systems (ADAS)
- Practical Deep Neural Networks on Mobile Platforms: Principles, Architecture, and Optimization
- 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?
- STMicroelectronics discloses its 2027-2028 financial model and path to achieve its 2030 goals
- 2024 China Automotive Charging and Battery Swapping Ecosystem Conference held in Taiyuan
- State-owned enterprises team up to invest in solid-state battery giant
- The evolution of electronic and electrical architecture is accelerating
- The first! National Automotive Chip Quality Inspection Center established
- BYD releases self-developed automotive chip using 4nm process, with a running score of up to 1.15 million
- GEODNET launches GEO-PULSE, a car GPS navigation device
- Should Chinese car companies develop their own high-computing chips?
- Infineon and Siemens combine embedded automotive software platform with microcontrollers to provide the necessary functions for next-generation SDVs
- Continental launches invisible biometric sensor display to monitor passengers' vital signs
- Transmission Line
- Ding~~The weekly evaluation information has been delivered, please receive it~~
- How to change the PIN pin of the segment code LCD screen with zebra stripes?
- How to copy schematic symbols or packages from the built-in library to a new library in PADS
- C Language Zone (I) Primary School Questions
- Automobile electronic instrument combination based on single chip microcomputer
- How to amplify uV signal?
- MC33078-9 Dual Quad Low Noise Operational Amplifier.rar
- A low-cost peak detector requiring only a few components WORD format
- NeoPixel Clock Using ESP8266