Implementation of Embedded ARM Development Platform Based on AT91RM9200

Publisher:忠正Latest update time:2011-06-17 Keywords:AT91RM9200 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Embedded systems are application-centric and computer-based systems. The hardware and software can be tailored to meet the system's strict requirements on functions, reliability, cost, volume, and power consumption. With the improvement of various microprocessor functions and the support of operating systems on software, embedded systems have a complete architecture.
Running an operating system on a dedicated embedded board requires the use of a bootloader to boot and load the kernel and system programs. The bootloader mainly initializes hardware devices and establishes a mapping map of memory space, thereby connecting embedded hardware and embedded operating systems well.
U-Boot is a popular, powerful, and representative bootloader that supports processors including Powerarm (ARM7, ARM9, Srongarm, Xscale), MIPS, X86, Motorola, and other series.
Compared with the current common embedded operating systems such as Vxworks, QNx, Windows CE, Palm Os, etc., the embedded Linux operating system is widely used in various embedded devices due to its low price, powerful functions, and easy portability. This paper mainly introduces the ARM hardware development platform based on at91rm9200, as well as the transplantation of U-Boot and Linux-2.6.20 kernel on this platform.
AT91RM9200 processor is a microprocessor based on ARM920T kernel developed by Atmel, with MMU, CPU clock up to 240 MHz, rich standard interface, EBI interface, internal integration of static memory controller, SDRAM controller, Burst Flash controller, etc. SDRAM uses two hy57v651620b chips to form a 32-bit channel with a total size of 16 MB. Flash uses Intel Js28f128 chip with a capacity of 16 MB. The network chip uses dm9161a. The principle of the system hardware platform is shown in Figure 1.

1 U-Boot transplantation
For AT91RM9200, when the system is powered on, the system boot mode is selected by detecting BMS. If BMS is high, the system boots from the on-chip ROM. If BMS is low, it boots from the off-chip Flash. Before U-Boot is transplanted to Flash, only the on-chip ROM can be selected for booting. When the on-chip is started, the ROM of AT91RM9200 is mapped to 0x0 and 0x100000 after powering on. The ROM can be accessed at these two addresses. The ROM of AT91RM9200 has a Bootloader program solidified. This Bootloader mainly completes some corresponding initialization work and runs the Xmodem protocol to wait for the Loader.bin image. The Loader.bin code can be downloaded from the Atmel official website. The main task of Loader.bin is to download U-Boot.bin to the memory through the Xmodem protocol and run it directly. After U-Boot.bin runs in the memory, the function of U-Boot can be used to connect Boot.bin and U-Boot.bin. bin is written to Flash, thereby realizing off-chip Flash startup. The main task of Boot. bin is to copy U-Boot in Flash to memory for execution.
The source code of U-Boot can be downloaded from the official website. The version used in this article is U-Boot-1.1.1, which fully supports the AT91RM9200 chip. Due to the difference in specific hardware, certain modifications are required. The code supporting AT91RM9200 is under the BOARD/AT91RM9200 directory, mainly including AT91RM9200DK. c, Flash. c, U-Boot. lds, and Config. mk files. The main modifications are as follows:
(1) Modify Tex_base in Config. mk to 0x20f00000, which is consistent with the previous boot address;

(2) Modify the Flash.c file to support the Intel JS28F128 chip. Since the official version supports AMD Flash, it is necessary to add support for this system chip in the code. In the U-Boot code, the xm250 in the Strong ARM architecture supports Intel Flash. You can refer to the corresponding code to implement the transplantation; [page]

(3) Modify the header file include/Configs/AT91RM9200dk.H. The main modification is the parameter configuration for SDRAM and Flash: set phys_sdram to 0x20000000, which is the starting address of SDRAM, and set phys_flash_sdram_size to 0x1000000, and the SDRAM capacity is 16 MB. For Flash, the following modifications need to be made: the starting address of Flash is set to 0x10000000 (Flash is hung on bank0), and phys_flash_size is set to 0x1000000. The total number of sectors cfg_max_flash_sect is set to 128 accordingly.
Finally, install the cross compiler in Linux. The version of the cross compiler used by the author is 2.95.3, compile the code, and generate the U-Boot.bin file. After U-Boot is started, the display is as shown in Figure 2.

2 Linux2.6.20 kernel migration
2.1 Linux kernel version selection
The Linux kernel version is updated very quickly, and the latest version has now developed to 2.6.26.3. Compared with the 2.4 kernel, the 2.6 kernel has better stability and better support for bus, file system, block device support, multimedia, network security, etc. Therefore, the author chose to migrate the Linux2.6.20 version with more mature functions and reliability to this system. The source code of the Linux kernel can be downloaded from the website www.kernel.org, and the patches 2.6.20-AT91.patch.gz and Linux-2.6.20-exp.diff.Bz2 for AT91RM9200 can be obtained from the Atmel official website. After the patch supporting the AT91RM9200 processor is applied to the Linux2.6.20 source code, the kernel can support the AT91RM9200 processor.
2.2 Establishment of cross-compilation environment
The cross-compilation tool used is ARM-Linux-Gcc3.4.1, which is currently a relatively common cross-compiler that supports compiling 2.6 kernels. It fully supports compiling 2.6 kernels. Install the cross-compiler on the development platform and configure the environment variable Path=$Path:/Usr/Local/Arm/3.4.1/Bin.
2.3 Solve the Machine Id problem
In the U-Boot code, the supported AT91RM9200 Machine types are 251 and 262. These two are defined as mach_type_AT91RM9200 and mach_type_AT91RM9200dk in Include/asm-arm/mach-types.h. In U-Boot, board/AT91RM9200dk/AT91RM9200dk. c uses the first type, while in the Linux 2.6.20 kernel code, the type used by arh/Arm/Math-AT91RM9200 is AT91RM9200DK, which is the second type. Therefore, there will be a problem of Machine mismatch during startup. The solution is to change the code of U-Boot or Linux kernel to match the Machine type.
2.4 Address arrangement of NOR Flash
The Flash used by the author is 16 MB NOR Flash. In order to implement a hierarchical file system, it is necessary to add NOR Flash MTD driver support. The specific address arrangement is shown in Figure 3.

Add AT91 RM9200.c file in Dirvers/MTD/Maps/ as your own partition code and compile it into the kernel. [page]

2.5 Compile the kernel
First, modify the MAKEFILE file in the kernel directory, change the compiler to the installed cross compiler, that is, Arch?=ARM and Cross_Compile?=ARM-Linux-, then run the command make AT91RM9200DK_Defconfig to configure the kernel. If you need to modify some specific configurations, you can run the makeMenuconfig command to enter the following menu for configuration. After configuring the kernel, run the make Image command to compile and generate the kernel image Vmlinux, and finally use the Mkimage tool to generate Uimage.

2.6 Creating a Ramdisk File System
Linux uses a file system to organize files and devices in the system and provide a unified interface for devices and user programs. Therefore, a root file system is also required for Linux startup. The root file system is used to store various tools, applications, and necessary library files. Ramdisk is a driver mechanism that uses the computer's memory as a device to create and mount a file system. It is usually used in diskless systems. The root file system usually includes the following directory contents: /Dev (device directory); /Proe (Proe file system directory); /Etc (system configuration files); /Sbin (system program directory); /Bin (system application, usually implemented by busybox); /Lib (shared library files); /Mnt (directory installed on other disk nodes); /Usr (directory of additional applications).


3 Conclusion
As a new generation of processors, ARM9 has the characteristics of higher cost performance, lower power consumption, faster execution speed, higher performance and wider application range; Linux is being applied to more and more fields with its superior performance, open source code and easy portability. The hardware embedded development platform based on AT91RM9200 microcontroller can be applied to various occasions such as embedded teaching experiments and embedded product development according to specific needs, and has broad development prospects.

Keywords:AT91RM9200 Reference address:Implementation of Embedded ARM Development Platform Based on AT91RM9200

Previous article:Design of GPS Navigation Terminal Based on ARM9 Processor S3C2440
Next article:Design and implementation of handheld multimedia system based on ARM Linux QT

Recommended ReadingLatest update time:2024-11-16 17:48

Design and implementation of short message monitoring system based on AT91RM9200 microprocessor with ARM9 core
    This paper introduces the application of GSM wireless module in embedded system. The system adopts AT91RM9200 microprocessor based on ARM9 core , and GSM wireless module adopts Huawei MG323 wireless module. Under embedded Linux system, control communication is carried out through ARM and MG323, realizing the softw
[Microcontroller]
Design and implementation of short message monitoring system based on AT91RM9200 microprocessor with ARM9 core
Design of LCD driver based on AT91RM9200
1 Introduction Embedded systems are becoming more and more popular in the field of industrial control, playing an important role in the upgrading of traditional industrial control products. With the substantial improvement in the performance of industrial control products, the corresponding demand for high-end a
[Microcontroller]
Design of LCD driver based on AT91RM9200
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号