Design of Embedded Web Server Using ARM9 Microprocessor

Publisher:古古斋Latest update time:2020-09-07 Source: elecfansKeywords:ARM9 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.     

Design of Embedded Web Server Using ARM9 Microprocessor

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:

Design of Embedded Web Server Using ARM9 Microprocessor

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.

Design of Embedded Web Server Using ARM9 Microprocessor

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.

Keywords:ARM9 Reference address:Design of Embedded Web Server Using ARM9 Microprocessor

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

Design and implementation of a color TFT-LCD module based on ARM9
1 Introduction TFT-LCD has been widely used in image display systems because of its thin thickness and excellent picture quality, which can realize high-speed, high-brightness and high-contrast display of information. Although TFT-LCD has good display performance, the driving signal of TFT-LCD is very complex, and t
[Microcontroller]
Design and implementation of a color TFT-LCD module based on ARM9
Implementation of external NAND FLASH control based on ARM9 core processor
1 NAND FLASH  NAND has fast write-back speed, small chip area, and especially large capacity, which makes it have obvious advantages. Page is the basic storage unit in NAND. One page is generally 512 B (there are also large page NAND FLASH with 2 kB per page), and multiple pages form a block. The number of pages in
[Microcontroller]
Implementation of external NAND FLASH control based on ARM9 core processor
Design of video surveillance system based on 3G mobile phones
  With the rapid development of 3G network technology and the enhancement of various functions of 3G mobile phones, it has become possible to use 3G mobile phones to achieve video surveillance anytime and anywhere. Embedded technology is a popular technology in today's IT industry. Various embedded chips such as DSP,
[Microcontroller]
Design of video surveillance system based on 3G mobile phones
Design of car video surveillance and anti-theft system based on ARM9
  This paper designs a car video monitoring system based on Samsung's S3C2410 as the control center. The system is mainly composed of S3C2410 processor, USB camera, and touch screen. It explains the basic working principle of system hardware design, platform customization and the design process of camera image monitor
[Microcontroller]
Design of car video surveillance and anti-theft system based on ARM9
Qt/Embedded/battery status detection control software design
1 Introduction The detection of battery status parameters in the battery production process is the key to ensure the quality of the battery. However, at present, the domestic battery status detection mainly relies on instruments such as battery voltage inspection meter, battery conductivity tester a
[Power Management]
Qt/Embedded/battery status detection control software design
Design of network projector system based on ARM9 core and embedded Linux
Projector networking is becoming an important trend in the development of projectors. Through standard wired and wireless network interfaces or optional network adapters, users can more conveniently transmit display control signals to the projector through a computer, display output content on the projector, and mon
[Microcontroller]
Design of network projector system based on ARM9 core and embedded Linux
Design of robot control system based on ARM9 and Linux
Introduction When the existing intelligent robots use DC motors as driving wheels, they are generally controlled by single-chip microcomputers or high-speed DSPs, and the same robot often needs multiple CPUs to realize their respective functions. However, with the increasing requirements for the intelligence of
[Microcontroller]
Design of robot control system based on ARM9 and Linux
Design of Embedded Web Server Using ARM9 Microprocessor
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
[Microcontroller]
Design of Embedded Web Server Using ARM9 Microprocessor
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号