You are on page 1of 257

Mini2440 User’s Manual

REVISION ORIGINATOR SCR REV DATE


0.1.0 MicroArm Systems, Ltd Mar. 3, 2009
0.2.0 MicroArm Systems, Ltd July 24, 2009
0.3.0 FriendlyARM Dec 19, 2013
Friendly ARM Co., Ltd Confidential:
Friendly ARM Co., Ltd
This document and information contained in it shall not be reproduced by, used by, or
Guangzhou, China
disclosed to others except as expressly authorized in writing by Friendly ARM Co., Ltd.

copyright@2007 - 2013

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
1 / 257
COPYRIGHT STATEMENT
The content (content being images, text, programs and scripts) of this English

manual is copyright © Friendly ARM Co., Ltd. All rights expressly reserved.

Any content of the manual printed or downloaded may not be sold, licensed,

transferred, copied or reproduced in whole or in part in any manner or in or on any

media to any person without the prior written consent of Friendly ARM Co., Ltd

including but not limited to:

 transmission by any method

 storage in any medium, system or program

 display in any form

 performance

 hire, lease, rental or loan

Requests for permission to reproduce material from this manual should be addressed

to Friendly ARM Co., Ltd.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
2 / 257
Index
Chapter 1 Introduction ........................................................................................................................................................... 8
1.1 Introduction to Mini2440 .......................................................................................................................................... 8
1.1.1 Mini2440 Overview......................................................................................................................................... 8
1.1.2 Mini2440 Hardware Features ........................................................................................................................ 9
1.1.3 Linux Features .............................................................................................................................................. 11
1.1.4 WinCE 6.0 Features...................................................................................................................................... 14
1.2 Board Schematics .................................................................................................................................................... 15
1.2.1 Jumper ........................................................................................................................................................... 15
1.2.2 Layout ............................................................................................................................................................ 15
1.3 Interface Specifications ........................................................................................................................................... 16
1.3.1 Address Space ............................................................................................................................................... 16
1.3.2 SDRAM ......................................................................................................................................................... 17
1.3.3 Flash ............................................................................................................................................................... 18
1.3.4 Power ............................................................................................................................................................. 18
1.3.5 System Reset.................................................................................................................................................. 20
1.3.6 LED ................................................................................................................................................................ 20
1.3.7 User Button ................................................................................................................................................... 21
1.3.8 AD Conversion .............................................................................................................................................. 21
1.3.9 PWM Buzzer ................................................................................................................................................. 22
1.3.10 Serial Port.................................................................................................................................................... 22
1.3.11 USB............................................................................................................................................................... 23
1.3.12 LCD Interface ............................................................................................................................................. 23
1.3.13 EEPROM..................................................................................................................................................... 24
1.3.14 Ethernet ....................................................................................................................................................... 25
1.3.15 Audio ............................................................................................................................................................ 25
1.3.16 JTAG ............................................................................................................................................................ 26
1.3.17 GPIO ............................................................................................................................................................ 27
1.3.18 CMOS Camera ........................................................................................................................................... 28
1.3.19 System Bus .................................................................................................................................................. 29
Chapter 2 Get Started ........................................................................................................................................................... 31
2.1 Board Setup and Connection .................................................................................................................................. 31
2.1.1 Boot Opions ................................................................................................................................................... 31
2.1.2 Connect Peripherals ..................................................................................................................................... 31
2.1.3 Set up Hyper Terminal................................................................................................................................. 31
2.2 Install Systems with Minitools ................................................................................................................................ 32
2.2.1 Install Minitools ............................................................................................................................................ 32
2.2.1.1 Install on Windows ............................................................................................................................ 32
2.2.1.2 Install on Linux .................................................................................................................................. 33
2.2.2 Flash Superboot to SD Card ........................................................................................................................ 34
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
3 / 257
2.2.3 Install Systems with Minitools ..................................................................................................................... 35
2.3 Install Systems with SD Card ................................................................................................................................. 37
2.3.1 Install Linux .................................................................................................................................................. 38
2.3.2 Install WinCE................................................................................................................................................ 39
2.4 Independent Test Utility .......................................................................................................................................... 40
2.4.1 Download Utility ........................................................................................................................................... 40
2.4.2 Test Hardware Components ........................................................................................................................ 41
2.5 Navigate Linux ......................................................................................................................................................... 42
2.5.1 Calibrate Touch Screen ................................................................................................................................ 43
2.5.2 Introduction to Main Pages ......................................................................................................................... 43
2.5.3 Play MP3 ....................................................................................................................................................... 44
2.5.4 Play Video ...................................................................................................................................................... 45
2.5.5 Image Viewer................................................................................................................................................. 45
2.5.6 Auto Mount SD Card ................................................................................................................................... 46
2.5.7 Calculator ...................................................................................................................................................... 47
2.5.8 Terminal......................................................................................................................................................... 48
2.5.9 File Browser .................................................................................................................................................. 48
2.5.10 Network Setting .......................................................................................................................................... 49
2.5.11 WiFi Settings ............................................................................................................................................... 49
2.5.11.1 Starting WiFi Utility ........................................................................................................................ 49
2.5.11.2 Connecting to Wireless AP ............................................................................................................. 50
2.5.11.3 Disconnecting WiFi .......................................................................................................................... 53
2.5.11.4 Configuring WiFi IP ........................................................................................................................ 53
2.5.12 Ping Test ...................................................................................................................................................... 54
2.5.13 Web Browser ............................................................................................................................................... 55
2.5.14 LED Test ...................................................................................................................................................... 56
2.5.15 EEPROM Reading and Writing ................................................................................................................ 56
2.5.16 PWM Buzzer Test ....................................................................................................................................... 57
2.5.17 Serial Port Assistant ................................................................................................................................... 58
2.5.18 3G Networking ............................................................................................................................................ 61
2.5.19 Audio Recording ......................................................................................................................................... 62
2.5.20 USB Camera................................................................................................................................................ 64
2.5.21 Preview with CMOS Camera .................................................................................................................... 64
2.5.22 LCD Test ...................................................................................................................................................... 65
2.5.23 Backlight Control........................................................................................................................................ 66
2.5.24 A/D Conversion ........................................................................................................................................... 66
2.5.25 User Button Test.......................................................................................................................................... 68
2.5.26 Touch Pen Test ............................................................................................................................................ 68
2.5.27 Barcode Scanner ......................................................................................................................................... 69
2.5.28 Language Setting ........................................................................................................................................ 70
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
4 / 257
2.5.29 Time Zone, Date, Time and Alarm Setting ............................................................................................... 71
2.5.30 Rotate Screen .............................................................................................................................................. 72
2.5.31 Setup AutoRun Program ............................................................................................................................ 73
2.5.32 System Shutdown........................................................................................................................................ 74
2.5.33 Watchdog ..................................................................................................................................................... 76
2.5.34 Start QtE-4.6.3 ............................................................................................................................................ 76
2.6 Navigate Linux via Commandline.......................................................................................................................... 78
2.6.1 Play MP3 ....................................................................................................................................................... 78
2.6.2 Terminate Program ...................................................................................................................................... 79
2.6.3 Mount USB Drive/Portable Hard Disk ....................................................................................................... 79
2.6.4 Mount SD Card............................................................................................................................................. 80
2.6.5 File Transfer Between PC and Board via Serial Port ............................................................................... 81
2.6.6 LED Test ........................................................................................................................................................ 83
2.6.7 User Button Test............................................................................................................................................ 84
2.6.8 Serial Port Test .............................................................................................................................................. 85
2.6.9 PWM Buzzer Test ......................................................................................................................................... 86
2.6.10 Backlight Control........................................................................................................................................ 87
2.6.11 I2C-EEPROM Test ..................................................................................................................................... 87
2.6.12 AD Conversion Test .................................................................................................................................... 88
2.6.13 Preview with CMOS Camera .................................................................................................................... 89
2.6.14 Telnet............................................................................................................................................................ 89
2.6.15 Ethernet Configuration .............................................................................................................................. 90
2.6.16 Configure MAC Address ............................................................................................................................ 92
2.6.17 Telnet Mini2440 .......................................................................................................................................... 93
2.6.18 File Transfer with FTP ............................................................................................................................... 94
2.6.19 Control LED via WEB ............................................................................................................................... 95
2.6.20 Mount NFS .................................................................................................................................................. 96
2.6.21 USB WiFi ..................................................................................................................................................... 96
2.6.22 Set System Clock......................................................................................................................................... 98
2.6.23 Save Data to Flash Permanently ............................................................................................................... 99
2.6.24 Setup Autorun Program on System Startup ............................................................................................ 99
2.6.25 Take Screenshot with Snapshot ............................................................................................................... 101
2.7 Navigate WinCE6 .................................................................................................................................................. 101
2.7.1 User Button Test.......................................................................................................................................... 102
2.7.2 LED Test ...................................................................................................................................................... 102
2.7.3 ADC Test ...................................................................................................................................................... 103
2.7.4 I2C-EEPROM Test ..................................................................................................................................... 104
2.7.5 PWM Buzzer Test ....................................................................................................................................... 104
2.7.6 Watchdog Test ............................................................................................................................................. 105
2.7.7 LCD Test ...................................................................................................................................................... 106
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
5 / 257
2.7.8 CMOS Camera Test.................................................................................................................................... 107
2.7.9 Audio Recording ......................................................................................................................................... 107
2.7.10 Screen Rotation ......................................................................................................................................... 108
2.7.11 Serial Port .................................................................................................................................................. 109
2.7.12 Calibrate Touch Screen ............................................................................................................................ 109
2.7.13 Configure Ethernet ....................................................................................................................................111
2.7.14 Backlight Control...................................................................................................................................... 113
2.7.15 Real Time Clock........................................................................................................................................ 115
2.7.16 Auto Run Setup ......................................................................................................................................... 115
2.7.17 USB Flash Drive........................................................................................................................................ 117
2.7.18 SD/MMC Card.......................................................................................................................................... 117
2.7.19 Synchronize with PC ................................................................................................................................ 117
2.7.20 Configure MAC Address .......................................................................................................................... 117
Chapter 3 Set up Linux Development Environment ........................................................................................................ 120
3.1 Set up Fedora 9.0 Development Environment .................................................................................................... 120
3.1.1 Install Fedora 9.0 ........................................................................................................................................ 120
3.1.2 Add User Account ....................................................................................................................................... 135
3.1.3 Access Windows Files ................................................................................................................................. 137
3.1.4 Set up NFS Service ..................................................................................................................................... 141
3.2 Set up Cross Compile Environment ..................................................................................................................... 147
3.3 Uncompress Source Code and Install Application Utilities ............................................................................... 149
3.3.1 Uncompress Source Code........................................................................................................................... 149
3.3.2 Create Target File System .......................................................................................................................... 152
3.3.3 Install Utilities ............................................................................................................................................. 153
3.3.4 Install LogoMaker ...................................................................................................................................... 154
Chapter 4 Introduction to Linux Development ................................................................................................................ 155
4.1 Sample Application Programs .............................................................................................................................. 155
4.1.1 “Hello, World” ............................................................................................................................................ 155
4.1.2 LED Test Program ...................................................................................................................................... 160
4.1.3 User Button Test Program ......................................................................................................................... 161
4.1.4 PWM Buzzer ............................................................................................................................................... 162
4.1.5 I2C-EEPROM Program ............................................................................................................................. 165
4.1.6 Serial Port Program ................................................................................................................................... 168
4.1.7 UDP Program.............................................................................................................................................. 173
4.1.8 Math Libraries ............................................................................................................................................ 177
4.1.9 Thread Programming................................................................................................................................. 178
4.1.10 Pipe Programming – Manipulate LED via WEB................................................................................... 180
4.1.11 “Hello, World” C++ Program ................................................................................................................. 184
4.2 Sample Linux Driver Programs ........................................................................................................................... 185
4.2.1 Hello Module ............................................................................................................................................... 185
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
6 / 257
4.2.2 LED Driver.................................................................................................................................................. 190
4.2.3 User Button Driver ..................................................................................................................................... 193
4.3 Compile Qtopia-2.2.0............................................................................................................................................. 195
4.3.1 Uncompress and Install Source Code ....................................................................................................... 196
4.3.2 Compile and Run Qtopia-2.2.0 for X86 .................................................................................................... 196
4.3.3 Compile and Run Qtopia-2.2.0 for ARM .................................................................................................. 198
4.4 Compile QtE-4.6.3 ................................................................................................................................................. 200
4.4.1 Uncompress and Install Source Code ....................................................................................................... 200
4.4.2 Compile and Run QtE-4.6.3 for ARM ...................................................................................................... 200
Chapter 5 Set up WinCE6 Development Environment ................................................................................................... 202
5.1 Set up Windows CE6 Development Environment .............................................................................................. 202
5.1.1 Install Visual Studio 2005 and Patches ..................................................................................................... 205
5.1.2 Install WindowsCE 6.0 and Patches.......................................................................................................... 215
5.1.3 Install Tencent QQ (A Third Party Messenger) ....................................................................................... 230
5.1.4 Install BSP and Sample Programs ............................................................................................................ 233
5.2 Configure and Compile WinCE6.0 Kernel and Bootloader .............................................................................. 236
5.2.1 Compile Kernel ........................................................................................................................................... 236
5.2.2 Bootloader ................................................................................................................................................... 242
5.2.3 Configure LCD Type and Serial Port in BSP ........................................................................................... 245
5.2.4 Create SDK ................................................................................................................................................. 246
5.2.5 Install SDK .................................................................................................................................................. 248
5.3 Synchronize with PC (For Windows 7) ............................................................................................................... 253

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
7 / 257
Chapter 1 Introduction
This manual is intended to provide the user with an overview of the Mini2440 board, its

benefits, features, specifications, and set up procedures.

1.1 Introduction to Mini2440


The Mini2440 Development Board is based on the Samsung S3C2440 microprocessor. Its

PCB is 4-layer boarded, equipped with professional equal length wiring which ensures signal

integrity. All Mini2440 boards are manufactured in mass production and released with strict

quality control. On startup it directly boots preinstalled Linux by default. There are no extra

setup steps or configuring procedures to start the system. It is easy for users to get started.

Anyone with very basic knowledge about the C language can become proficient in its

development within two weeks. This package also provides detailed documents on how to

configure and boot to alternative operating systems. In addition, our technical support is

always available for assistance to our customers. This product delivers high quality with low

price.

Customers can get the latest information and news about our products by visiting:

http://www.arm9.net

1.1.1 Mini2440 Overview


Here’s the Mini2440 layout:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
8 / 257
1.1.2 Mini2440 Hardware Features
 CPU

- Samsung S3C2440A, 400Mhz, maximum 533Mhz

 SDRAM

- On board 64M SDRAM

 FLASH Memory

- On board 256M/1GB SLC Nand Flash

- 2M Nor Flash

 LCD

- Four-wire touch screen interface

- Support black and white, 4 level grayscale, 16 level grayscale, 256-color、4096-color

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
9 / 257
STN LCD, 3.5-inch to 12.1-inch, screen resolution up to 1024x768;

- Support black and white, 4 level grayscale, 16 level grayscale, 256-color, 64K-color,

true color TFT LCD, 3.5-inch to 12.1-inch, screen resolution up to 1024x768,

 Interfaces and Ports

- 1 x 100M Ethernet RJ-45 port (DM9000 chip)

- 3 x Serial Port

- 1 x USB Host

- 1 x USB Slave B

- 1 x standard SD card socket

- 1 x 3.5mm dual stereo audio output and single microphone input

- 1 x 2.0mm spacing JTAG

- 4 x USER LED

- 6 x USER Button

- 1 x PWM buzzer

- 1 x Adjustable resistor, for AD conversion testing

- 1 x I2C-EEPROM (AT24C08), for I2C Bus test

- 1 x 2.0 spacing 20 pin camera pin header

- 1 x Onboard real-time clock backup battery

- 5V power supply

 System Clock Source


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
10 / 257
- 1 x 12M crystal oscillator

 Real Time Clock

- 1 x RTC with Lithium Battery

 Extended Interfaces

- 1 x 34 pin 2.0 mm spacing GPIO

- 1 x 40 pin 2.0mm spacing system BUS

 Board Dimension

- 100 x 100 mm

 OS Support

The Mini2440 development board currently can load the following operating systems:

- Linux2.6.32.2 + Qtopia-2.2.0 + QtE-4.7.0

- WindowsCE.NET 6.0(R3)

1.1.3 Linux Features


 Kernel Version

- Linux 2.6.32.2

 File Systems

- YAFFS2: recommended

- CRAMFS

- EXT2

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
11 / 257
- FAT32

- NFS

 Drivers

- Serial ports

- DM9000 driver

- Audio (UDA1341)

- RTC driver

- User LEDs

- USB host

- LCD driver (it supports 3.5-inch, 4.3-inch, 7-inch, 8-inch, LCD2VGA1024x768,

LCD2VGA800x600, LCD2VGA640x480 and EZVGA800x600)

- Touch screen driver

- USB camera

- USB mouse, keyboard, flash drive and portable hard disk

- SD card driver, up to 32 GB

- I2C-EEPROM

- PWM Buzzer

- LCD backlight driver

- A/D Conversion

- Watchdog driver (watchdog reset is cold reset)


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
12 / 257
 Basic Applications and Utilities

- Busybox1.13 (Linux tool kit including basic Linux commands)

- Telnet, FTP and inetd (remote login tool)

- boa (web server)

- Madplay (command line mp3 player)

- Snapshot (command line screenshot tool)

- ifconfig, ping, route and so on (basic network commands)

 Graphic User Interface

- Qtopia-2.2.0: open source, including two versions: one for x86 and the other for ARM

- QtE-4.6.3: open source, only for ARM

 Qtopia Applications and Utilities

- A/D conversion test utility

- LED test utility

- User button test utility

- I2C-EEPROM read/write test utility

- LCD test utility

- Ping test utility

- USB camera utility

- Audio recorder

- Web browser(konquor, open source)


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
13 / 257
- Watchdog test utility

- Network configuration utility

- Backlight control utility

- Language setting utility (English, Chinese and Japanese)

- Penpad utility (for touch pen testing)

- MMC/SD card and flash drive utility enabling auto mounting and unmounting

1.1.4 WinCE 6.0 Features


 Version

- Windows CE Embedded 6.0 R3

 Features

- Fast booting (boot up within 10 seconds)

- Configurable NBOOT: users can customize the process bar’s color, position, length

and width, and startup image’s position and background.

- PWM Buzzer

- CMOS camera driver

- I2C-EEPROM

- ADC Conversion

- Watchdong

- User button (six)


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
14 / 257
- LED driver

- Backlight control

- RTC

- DM9000

- SD Card, up to 32G

- USB keyboard, mouse, flash drive

- Audio input/output driver

- LCD driver (it supports 3.5-inch, 4.3-inch, 7-inch, 8-inch, LCD2VGA1024x768,

LCD2VGA800x600, LCD2VGA640x480 and EZVGA800x600)

- Screen Rotation

- Serial port

1.2 Board Schematics


1.2.1 Jumper
There are no jumpers on this board. This design makes the board easy for users.

1.2.2 Layout
The Mini2440 schematic is presented as below. It includes most of the popular interfaces,

ports, IOs and buses on a 100 x 100 mm board.

Note: in the diagram below those orange points indicate the first pins of those

interfaces/ports/connectors accordingly.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
15 / 257
1.3 Interface Specifications
This section describes in detail each interface/port on the board. For more details users can

refer to the complete schematics in the CDs shipped together with this product.

1.3.1 Address Space


The S3C2440 has two boot modes: Nand flash and Nor flash.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
16 / 257
1.3.2 SDRAM
The Mini2440 has two 32M-byte SDRAM chips therefore the total RAM is 64M

(HY57V561620FTP/MT48LC16M16A2). The starting address is 0x30000000.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
17 / 257
1.3.3 Flash
The Mini2440 has two types of Flash: Nor Flash and Nand Flash. The Nor Flash is

SST39VF1601, 2M bytes and the Nand Flash is K9F2G08, 256M bytes. By switching the on

board S2 switch you can boot the board from either the Nor Flash or the Nand Flash. The

following shows the Nor Flash and Nand Flash’s schematics

1.3.4 Power
The Mini2440 takes an external 5V power and converts it to 3.3V, 1.8V and 1.25V.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
18 / 257
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
19 / 257
1.3.5 System Reset
The Mini2440 has a reset system which uses MAX811.

1.3.6 LED
The Mini2440 has 4 LEDs which are directly connected to GPIOs and effective on low

level.
LED1 LED2 LED3 LED4
GPIO GPB5 GPB6 GPB7 GPB8
Multiplexed nXBACK nXREQ nXDACK1 nDREQ1
name nLED_1 nLED_2 nLED_3 nLED_4

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
20 / 257
1.3.7 User Button
The Mini2440 has six user buttons connected directly to the CPU’s interrupt pins.
K1 K2 K3 K4 K5 K6
Interrupt EINT8 EINT11 EINT13 EINT14 EINT15 EINT19
Multiplexed GPG0 GPG3 GPG5 GPG6 GPG7 GPG11
GPIO
Special N/A nSS1 SPIMISO1 SPIMOSI1 SPICLK1 TCLK1
function
CON12 pin CON12.1 CON12.2 CON12.3 CON12.4 CON12.5 CON12.6

Note: CON12.7 is connected to power(3.3V) and CON12.8 is gound(GND)

1.3.8 AD Conversion
The Mini2440 has 4 ADC channels (CON4-GPIO) for different purposes. AIN0 is

connected to a adjustable resistor for testing

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
21 / 257
1.3.9 PWM Buzzer
The on-board buzzer is controlled by PWM, the diagram is shown below. PWM

corresponds to GPB0 which can be configured as PWM output via software or used as a

GPIO.

1.3.10 Serial Port


The S3C2440 has three serial ports: UART0、1 and 2.

As for the Mini2440 the UART0 is converted to RS232 (COM0).

Details of CON1,CON2 and CON3 are as follows:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
22 / 257
1.3.11 USB
This board has two types of USB interfaces: one USB Host and one USB Slave. The USB

Host functions the same as on PC's. You can access USB camera, USB keyboard, USB

mouse, USB flash drives and other common USB peripherals. You can also use USB Hub

extensions. Each OS has native USB Hub drivers. The USB Slave is generally used to

download from a host. If you use WinCE, connecting from a PC to this USB port will invoke

ActiveSync and the Mini2440 can be viewed as a volume, and data and programs dragged

and dropped between host PC and the Mini2440 and the other USB slave.

1.3.12 LCD Interface


The Mini2440 has an LCD interface which is a 0.5mm spacing 41 pin connector.

The LCD control signals are the same on all connectors with horizontal and vertical scan,
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
23 / 257
clock, enable, disable etc., and 8:8:8 models of RGB data. It has a PWM output and a reset

signal (nRESET). LCD_PWR is the backlight switch signal.

1.3.13 EEPROM
The Mini2440 has an I2C (AT24C08) pin which is directly connected to the CPU. The

EEPROM has 256 bytes.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
24 / 257
1.3.14 Ethernet
The Mini2440 base board has a DM9000 LAN chip for adaptive 10/100M Ethernet.

1.3.15 Audio
The S3C2440 supports I2S which can be directly connected to 8/16 bit CODEC. The

Micro2440 uses the I2S interface with the UDA1341.

The audio output is on the 3.5mm green jack. The board also has a microphone input.

When recording we suggest users to move the microphone close to the audio source

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
25 / 257
1.3.16 JTAG
When a development board just comes off from production lines, it is just a bare board

without any data. We will burn the first program to it through the JTAG interface, which is

SUPERVIVI. With SUPERVIVI, we can download more programs and utilities to the board

via USB further. In addition, the JTAG is more often used for debugging. In fact, most of the

widely used utilities in markets like JLINK, ULINK and other simulators actually work via

the JTAG interface. A standard JTAG has 4 signals :TMS, TCK, TDI and TDO which are

test mode select input, test clock, test data input and test data output. These 4 signal lines

plus a power line and a ground line form 6 lines in total. In order for testing, most simulators

even have a reset signal. Therefore, a standard JTAG is meant to have those signal lines, and

it does not mean whether it is 20Pin or 10Pin. As long as a JTAG interface has those signal

lines, it will be a standard JTAG interface. The mini2440 has a 10Pin JTAG interface which

has complete standard JTAG signals.

Notes: for beginners who just want to focus on Linux or WinCE development, a JTAG

interface has no significance because most development boards already have a complete BSP

which includes commonly needed serial ports, network port and USB port. When a board

runs with Linux or WinCE installed, users can fully utilize more convenient functions and

utilities provided by the operating system to debug. They do not need a JTAG. Even if you

can trace your programs it will be extremely tough to step debug because it will go into the

operating system. A JTAG interface might only be usable for users who do not need to run a
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
26 / 257
complicated operating system or just need a simple operating system (such as uCos2). Most

development boards which already have a Bootloader or BIOS are completely functional and

do not need to be debugged.

1.3.17 GPIO
GPIO is the abbreviated form of General Purpose Input Output. The mini2440 has a 34

Pin 2.0mm GPIO interface, i.e. CON4. In fact, CON4 has not only quite a few GPIO pins but

also some CPU pins such as AD0-AIN3, CLKOUT and so on. The SPI interface, I2C

interface, GPB0 interface and GPB1 in the schematic are all GPIO, but they are marked as

special function interfaces. They can be configured for other purposes too by setting related

CPU registers

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
27 / 257
CON4 Spec Comment CON4 Spec Comment
1 VDD5V 5V power 2 VDD33V 3.3V power
3 GND GND 4 nRESET Reset
5 AIN0 AD input channel 0 6 AIN1 AD input channel 1
7 AIN2 AD input channel 2 8 AIN3 AD input channel 3
9 EINT0 EINT0/GPF0 10 EINT1 EINT1/GPF1
11 EINT2 EINT2/GPF2 12 EINT3 EINT3/GPF3
13 EINT4 EINT4/GPF4 14 EINT5 EINT5/GPF5
15 EINT6 EINT6/GPF6 16 EINT8 EINT8/GPG0
17 EINT9 EINT9/GPG1 18 EINT11 EINT11/GPG3/nSS1
19 EINT13 EINT13/GPG5/SPIMISO1 20 EINT14 EINT14/GPG6/SPIMOSI1
21 EINT15 EINT15/GPG7/SPICLK1 22 EINT17 EINT17/GPG9/nRST1
23 EINT18 EINT18/GPG10/nCTS1 24 EINT19 EINT19/GPG11
25 SPIMISO SPIMISO/GPE11 26 SPIMOSI SPIMOSI/EINT14/GPG6
27 SPICLK SPICLK/GPE13 28 nSS_SPI nSS_SPI/EINT10/GPG2
29 I2CSCL I2CSCL/GPE14 30 I2CSDA I2CSDA/GPE15
31 GPB0 TOUT0/GPB0 32 GPB1 TOUT1/GPB1
33 CLKOUT0 CLKOUT0/GPH9 34 CLKOUT1 CLKOUT1/GPH10

1.3.18 CMOS Camera


The S3C2440 has a CMOS camera interface. It is marked as CAMERA on the schematic.

It is a 20 pin 2.0mm connector, users can directly use the CAM130 module we provide. The

CAM130 module does not have any circuits. It is basically just a converter and directly

connects to a ZT130G2 camera module.

Notes: the camera interface is a multiplexed port. It can be used as GPIO by setting

corresponding registers. The schematic below presents its pin details

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
28 / 257
CAMERA Spec Multiplex CAMERA Spec Multiplex
1 I2CSDA GPE15 2 I2CSCL GPE14
3 EINT20 GPG12 4 CAMRST GPJ12
5 CAMCLK GPJ11 6 CAM_HREF GPJ10
7 CAM_VSYNC GPJ9 8 CAM_PCLK GPJ8
9 CAMDATA7 GPJ7 10 CAMDATA6 GPJ6
11 CAMDATA5 GPJ5 12 CAMDATA4 GPJ4
13 CAMDATA3 GPJ3 14 CAMDATA2 GPJ2
15 CAMDATA1 GPJ1 16 CAMDATA0 GPJ0
17 VDD33V 3.3V power 18 VDD_CAM VDD_CAM
19 VDD18V 1.8V power 20 GND GND

1.3.19 System Bus


The system bus is CON5. It contains 16 data lines (D0-D15), 8 address lines (A0-A6,

A24), and some control signal lines (such as chip select, read/write, reset and so on). CON5

can provide 5V output. In fact very few users would extend interfaces through system bus.

Below is the detailed information about CON5’s pins.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
29 / 257
CON5 Spec Comment CON5 Spec Comment
1 VDD5V 5V Power 2 GND Ground
3 EINT17 Interrupt 17 4 EINT18 Interrupt 18
5 EINT3 Interrupt 3 6 EINT9 Interrupt 9
7 nGCS1 Chip Selection 1, physical 8 nGCS2 Chip Selection 2, physical
address: 0x08000000 address: 0x10000000
9 nGCS3 Chip Selection 3, physical 10 nGCS5 Chip Selection 5, physical
address: 0x18000000 address: 0x28000000
11 LnOE Read Enable 12 LnWE Write Enable
13 nWAIT Wait 14 nRESET Reset
15 nXDACK0 nXDACK0 16 nXDREQ0 nXDREQ0
17 LADDR0 Address 0 18 LADDR1 Address 1
19 LADDR2 Address 2 20 LADDR3 Address 3
21 LADDR4 Address 4 22 LADDR5 Address 5
23 LADDR6 Address 6 24 LADDR24 Address 24
25 LDATA0 Data 0 26 LDATA1 Data 1
27 LDATA2 Data 2 28 LDATA3 Data 3
29 LDATA4 Data 4 30 LDATA5 Data 5
31 LDATA6 Data 6 32 LDATA7 Data 7
33 LDATA8 Data 8 34 LDATA9 Data 9
35 LDATA10 Data 10 36 LDATA11 Data 11
37 LDATA12 Data 12 38 LDATA13 Data 13
39 LDATA14 Data 14 40 LDATA15 Data 15

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
30 / 257
Chapter 2 Get Started
This chapter will guide you to experience our Mini2440 step by step. We strongly

recommend our users to read them carefully. Although those details may seem tedious and

boring they list very useful references and notes which will be of great help for developers.

By default, all our systems have been preinstalled Linux (located in the shipped CDs’

directory /images/Linux are Superboot, zImage, root-qtopia-qt4.img etc) therefore you

could easily play once you get it.

2.1 Board Setup and Connection


2.1.1 Boot Opions
Switch “S2” to the “NOR” side, the system will boot from Nor Flash.

Switch “S2” to the “NAND” side, the system will boot from Nand Flash.

2.1.2 Connect Peripherals


 Connect the Mini2440 board’s serial port0 to a PC’s serial port with the shipped

serial cable in the package

 Connect the shipped 5V power supply

 Connect an LCD touch panel (if you have)


2.1.3 Set up Hyper Terminal


Setup your serial terminal like this:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
31 / 257
2.2 Install Systems with Minitools
The Minitools utility is a FriendlyARM developed USB download tool which allows users

to install systems more easily and conveniently. It has the following features:

- Only need a USB cable: with the Minitools users only need a USB cable to install

systems

- One key action: no need to type any command.

- Works with both 32/64-bit OS: it can be installed on both 32-bit and 64-bit Windows

systems

- Cross platform: it can be installed on both Windows and Linux systems

2.2.1 Install Minitools


2.2.1.1 Install on Windows

Double click on the “MiniToolsSetup.exe” icon in the tools directory in your shipped DVD
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
32 / 257
and you will be guided to install it. Just follow the prompts and take the default options.

When it asks whether you want install the driver please go by “continue anyway”. After

installation is done please unplug and plug the USB cable and Windows will prompt that it is

updating drivers. After Windows’ updating is done you can continue

If your installation is successful there will be an icon on your desktop. You can double

click on it to run:

The minitools’ main window is shown below:

2.2.1.2 Install on Linux

We tested installing the Minitools on Fedora9/Fedora15/Ubuntu12.04 64-bit systems.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
33 / 257
Please login and execute the installation as root. Please copy the

“MiniTools-Linux-YYYYMMDD.tgz” in the “tools” directory from your DVD to your PC and

untar the ball and run the “./start.sh” command to the installation.

2.2.2 Flash Superboot to SD Card


In order to work with the Minitools you need to get an SD card and flash our superboot to

it. Please follow the steps below:

1. Please flash the superboot to an SD card with “SD-Flasher”

2. Please copy the whole “images” directory from your DVD to the root directory of your

SD card

3. Open the “images/friendlyARM.ini” and add the following line

USB-Mode = yes

Please follow the steps below to connect your board to your PC

1. Switch the S2 on your board to “SD”

2. Power on the board and you will see the LCD showing “USB Mode:Waiting” if

everything works correctly

3. Please connect your board to your PC via a USB cable

4. If the connection is successful the LCD will show “USB Mode:Connected”

Now you can start installing systems with the Minitools

To change the installation method back to SD card installation you just need to change the
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
34 / 257
“USB-Mode = yes” to “USB-Mode=no”.

2.2.3 Install Systems with Minitools


Please enter the USB download mode and connect your board to your PC which runs the

Minitools via USB

On the left bottom of the window there is an LED which is green indicating the board is

connected successfully. On the left bottom there is a button which can start your board

directly without switching to NAND.

Before install systems please select the system you want to install e.g. Linux and then its

configuration will be presented as follows:


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
35 / 257
You can just click on the “images” button to select an “images” directory which contains

complete installation files for all systems and the Minitools will show all the info listed in

the FriendlyARM.ini.

With the Minitools utility you can update either the whole system (all image files) or

individual image files e.g. the kernel image file. After you are done with your installation

configuration please click on “Start flashing”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
36 / 257
After installation is done you can boot your board and enter your system.

Note: sometime users complain that Minitools shows the board isn’t connected to PC. It is

very likely that the USB download driver is not properly installed on your PC and you can

try manually install the USB download driver which is under the Minitools directory in the

shipped DVD

2.3 Install Systems with SD Card


You can flash the Mini2440 with an SD card. The is done by the superboot flashed in the
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
37 / 257
Nor Flash. We already flashed the superboot in Nor Flash. What users need to do is to get an

SD card which should be FAT formatted and copy the whole image directory to the SD card.

2.3.1 Install Linux


Before you start with the following steps please make sure you have copied the whole

images directory to your SD card.

Step1: insert the SD card to a PC and open the “images\FriendlyARM.ini” file and make

sure the contents are as follows


FriendlyARM.ini File
#This line cannot be removed. by FriendlyARM(www.arm9.net)

USBMode = No
Action = Install
OS = Linux
VerifyNandWrite = Yes
LowFormat = No
Status Type = Beeper| LED
# Linux part
Linux-BootLoader = Superboot2440.bin
Linux-Kernel = Linux/zImage_W35
Linux-CommandLine = noinitrd root=/dev/mtdblock3 init=/linuxrc console=ttySAC0
Linux-RootFs-InstallImage = Linux/rootfs_qtopia_qt4.img

Step2: copy the following files from the DVDs to your SD card
File Comment
images\Superboot2451.bin Bootloader
images\Linux\zImage Linux Kernel
images\Linux\rootfs_qtopia_qt4.img Linux file system
images\FriendlyARM.ini Configuration file

Step3: insert the SD card to the board’s SD card socket. Switch S2 to “SD” and power on. If

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
38 / 257
everything works fine hyperterminal/minicom will show system installation messages

Step4: after system installation is done system will enter the command line interface. Switch

S2 to “Nand” , power on the board and Linux will load.

When the system is initially started the following calibration screen will show up

2.3.2 Install WinCE

Please copy the whole “images” directory to the root directory of your SD card.

Step1: Insert the SD card to a PC and open the “images\FriendlyARM.ini” and make

changes according to the following lines.


#This line cannot be removed. by FriendlyARM(www.arm9.net)

USBMode = No
Action = Install
OS = CE
VerifyNandWrite = Yes
LowFormat = No
Status Type = Beeper| LED
# Windows CE 6 part
WindowsCE6-Bootloader = wince6/nboot_W35.bin
WindowsCE6-BootLogo = wince6/bootlogo.bmp
WindowsCE6-InstallImage = wince6/NK_W35.bin
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
39 / 257
Step2: make sure your card has the following files (actually you can copy the whole image

directory to your SD card’s root directory)


File Comment
images\wince6\nboot_w35.bin Bootloader. It can boot CE and other OS such as Linux. It can be run from an SD card.
images\wince6\bootlogo.bmp CE start logo. You can replace it with your own. It should be a 24bit bmp.
images\wince6\NK-W35.bin CE kernel and file sysem image
images\FriendlyARM.ini Configuration file

Step3: insert the SD card to the board’s SD socket and switch S2 to the Nor side. Power on

the board and you will hear a beep and see the following messages on your terminal
Try to find SD card... Found.
Installing bootloader...
Installing bootloader succeed
Installing bootloader succeed
Installing CE Logo...
Width, Height, BPP is 240 320 24
Logo Saved
Installing CE Logo succeed
Installing NK.bin...

Step4: after system burning is done you will hear two continuous beepings and the LCD

will show the burning status. Reboot the system from “Nand” you will see CE load.

2.4 Independent Test Utility


FriendlyARM developed a test utility 2440test. This utility can be used to test major

hardware components: PWM buzzer, RTC clock, AD conversion, user button, LCD, I2C etc.

2.4.1 Download Utility


The 2440test has various versions for different LCDs respectively.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
40 / 257
File Comment Note
2440test_N35.bin For NEC 3.5”LCD 1. We call all these utilities
2440test_X35.bin For Sony 3.5”LCD “2440test.bin”
2440test_W35.bin For 3.5”LCD 2. 2440test can work with both our
2440test_T35.bin For TPO 3.5”LCD current 2440 boards and our
2440test_H43.bin For 4.3”LCD previous 64M/128M boards
2440test_W50.bin For 5.0”LCD
2440test_L80.bin For Sharp 8”LCD
2440test_S70.bin For 7.0”LCD
2440test_A70.bin For Innolux 7.0”LCD
2440test_VGA1024x768.bin For VGA output(1024 x 768 @ 70Hz)

Please follow the steps below to download the 2440test to your board:

1) Switch S2 to “Nor”

2) Launch the MiniTools on your PC and connect your board to the PC

3) Select the 2440test utility and download as follows:

2.4.2 Test Hardware Components


After start the 2440test utility you will see a menu which has a command list. You can

select these commands to test the hardware components. For example you can select “1” to

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
41 / 257
test the PWM Buzzer.

2.5 Navigate Linux


The Linux image we prepare for the Mini2440 includes Qtopia2.2.0 and Qt E- 4.6.3. Users

can switch between these two GUIs freely. By default the Linux GUI is Qtopia 2.2.0.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
42 / 257
2.5.1 Calibrate Touch Screen
Note: if you didn’t calibrate well you can reflash the board or use a USB mouse to calibrate

after Linux is loaded.

In the following two scenarios the calibration screen will be brought up:

1. Reflash your board and restart your board for the first time

Click on “+”, follow it till the end position and Linux will resume. After it is completely

booted you will see the following screen:

2. After enter the system go to “start->setting” and click on the “calibrate” icon you will see

the above screen too.

2.5.2 Introduction to Main Pages


After Linux qtopia is loaded you will see the following screen.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
43 / 257
There are five pages which represent five categories of software and utilities. Click

on the “start” on the left bottom you will see five sub-menus which are the same as

these five pages. The “FriendlyARM” page contains software utilities that are all

developed or migrated by us. All the other utilities and documents in other pages are

open source

2.5.3 Play MP3


Go to the “Application” page, click on the “music” icon, select an mp3 and click on

“play”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
44 / 257
2.5.4 Play Video
Go to the “Application” page, click on the “video” icon, select a video file and click on

“play”.

2.5.5 Image Viewer


Go to the Application page, click on the “pictures” icon and you will be able to browse

pictures
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
45 / 257
2.5.6 Auto Mount SD Card
Insert a common or high speed SD card (max memory 32G) or a USB drive moments later

a small icon will pop up on the lower right of the screen. The Mini2440 supports

simultaneous mounting of the two. Click on the icon you will see the screenshot below, you

can remove it safely like what you can do in Windows. All files in the MMC/SD card or the

flash drive can be viewed in the “Documents” tab. Their directories will not be displayed.

Auto mounting of a MMC/SD card or a flash drive is developed by Friendly ARM based

on a Qtopia 2.2.0 plugin. Now this function can only recognize the first section and can only

recognize VFAT/FAT32/FAT16. Files of other formats may not be recognized correctly.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
46 / 257
Click on “Applications -> System Info -> Storage” you will view your SD card or flash

drive’s detailed memory information:

2.5.7 Calculator
Go to “Applications” and click on the calculator icon. You can select “Simple”, “Fraction”,

“Scientific” and “Conversion”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
47 / 257
2.5.8 Terminal
Go to “Applications”, click on the terminal icon and you will be able to type Linux

commands.

2.5.9 File Browser


Go to “FriendlyARM”, click on the file manager icon and you will see your system’s file

structure:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
48 / 257
2.5.10 Network Setting
Go to “FriendlyARM”, click on the network setting and you will be able to see the

following screenshot

You can set your network parameters and “save” it to the “/etc/eth0-setting”.

2.5.11 WiFi Settings


This section will guide to through the steps to set up WiFi. The Mini2440 supports most of

the popular USB WiFi cards.

2.5.11.1 Starting WiFi Utility

Go to the “Friendly ARM” tab and click on “WLAN Setting”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
49 / 257
2.5.11.2 Connecting to Wireless AP

After the WLAN Setting utility is started it will automatically search for wireless AP and

list their SSIDs and signal strength. If your utility doesn’t show sources please click on

“Scan”

After an AP is found click on its SSID to connect. The following dialog will pop up and

you need to input its password:

After typing the password (leaving it as blank if no password is set) click on “Connect”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
50 / 257
If the connection is successful, its status will show “connected”

If your Ethernet is connected the following dialog may pop up asking you to disconnect it

(ifconfig eth0 down) otherwise some network utilities would connect the Ethernet rather than

the WiFi. Clock on “Yes” to close it. To reconnect it you can either start “Network Setting”

or type “ifconfig eth0 up”.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
51 / 257
Click on “Net Detail” to view more detailed network information such as IP, DNS and etc.

If the WiFi connection is a success, you can minimize its GUI to a small icon by clicking

on the “Close” button. To restore its GUI you can click on the small icon

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
52 / 257
Now you can try your WLAN

2.5.11.3 Disconnecting WiFi

In the main menu click on “Disconnect” to disconnect the WiFi connection

2.5.11.4 Configuring WiFi IP

In the main menu, click on “Configure IP” to start the IP configuration interface:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
53 / 257
Click on the pull down menu you will see two options: “IP via DHCP” and “Configure IP

manually”

After configuration is done, click on “Save” to keep your settings

2.5.12 Ping Test


After configure your network please go to “FriendlyARM” and click on “Ping Testing”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
54 / 257
2.5.13 Web Browser
Go to “FriendlyARM”, click on “Browser”, open the soft keypad on the left bottom and

you can type a website in the address bar.

In addition we migrated Arora browser to our system. You can click on the “WebKit” icon

to start it.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
55 / 257
2.5.14 LED Test
Go to “FriendlyARM” and click on “LED Testing”

2.5.15 EEPROM Reading and Writing


Go to “FriendlyARM” and click on “I2C-EEPROM”. Click on “Write Data below into

EEPROM via IIC” you will see the writing process

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
56 / 257
Click on “Read EEPROM Data via IIC” you will see the reading process

2.5.16 PWM Buzzer Test


Go to the “FriendlyARM” tab and click on the “PWM/Buzzer Testing” icon to open the

interface. By default, the output frequency of PWM is 1000Hz. Click on the “Start” button, the

buzzer will beep. Clicking on the “+” or “-” button will change its frequency and sound as well.

Clicking on the “Stop” button stops the buzzer

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
57 / 257
2.5.17 Serial Port Assistant
Note: before start this program please connect the serial port your want to test to your board.

- The on board CON1, 2, 3 and 4 are CPU UART0, 1, 2 and 3. UART0 has been converted to

RS232, and extended to COM0 via DB9. On system startup it has been set to the console

terminal, so it cannot be tested via this utility. The other three ports CON2, 3 and 4 must be

converted to RS232 before they can communicate with a PC serial port. (FriendlyARM has a

“OneCom” RS232 conversion module) When connect the ports to a PC, please make sure to

use a correct serial cable (crossover serial line).

- This program also supports common USB to Serial cables. Now most laptops don’t have

serial ports. For the sake of users most of our agents provide those conversion cables.

Connecting a USB to Serial cable to your board, you can extend your serial ports. Its device ```

name generally is “/dev/ttyUSB0, 1, 2 and 3”, which implies you can use a USB hub to extend

your serial ports.

Connect your serial port extension board to the Mini2440’s CON2/3/4 and connect to a PC

via a crossover serial cable.

Go to the “FriendlyARM” tab and click on the “serial port assistant” icon to open the

interface.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
58 / 257
The title bar of the utility shows the default setting is “ttySAC1 115200 8N1 [C]”, and it

implies the default port is:


- Serial Port Deivce: /dev/ttySAC1, it corresponds to the second port UART1
- Bits Per Second: 115200
- Data Bits: 8
- Flow Control: None
- Stop Bits: 1
- [C]: stands for the character mode;
- [H]: stands for Hex

There are two edit areas in the interface, the top one shows received data which cannot be

edited; the bottom one shows sent data which can be edited via a USB keyboard or a soft

keyboard.

Click on the “Connect” button to open “/dev/ttySAC1”, type some characters in the edit area,

click on the “Send” button and it will send data to the connected serial port device. The

screenshot below shows what a Windows super terminal receives (Note: the settings for this

super terminal should be 115200 8N1)


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
59 / 257
Click on “Disconnect” to disconnect the connection. Click on “Setting…” to enter the

parameter setting interface which lists some basic serial port parameters:

Comm Port: you can choose “/dev/ttySAC0,1,2” or the USB to Serial “/dev/ttyUSB0,1,2,3”.

Note: in this utility, SAC0 corresponds to CON1, SAC1 corresponds to CON2 and etc.

Speed: bits per second

Data: data bits, 8 or 7, usually 8.

Hex: input and output data in Hex format

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
60 / 257
2.5.18 3G Networking
We specially developed a 3G network utility for Android. It can automatically detect and

support up to more than one hundred USB network cards for all these systems: WCDMA,

CDMA2000 and TD-SCDMA. We have a list of the USB 3G cards that are supported (listed

in later sections).

Our following example was tested with HUAWEI E1750 for WCDMA

Step1 insert a SIM card to your USB device

Step2 connect your USB card to the board and start the 3G utility

Step3 the 3G utility will detect the E1750 card. Click on its icon

Step4 in the dialog shown below there is an orange icon with a “-” in the center. This means
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
61 / 257
no network is connected. Click on “Connect” to start connection

Step5 if the connection is a success it will list the detailed network information

2.5.19 Audio Recording


Go to the “FriendlyARM” tab and click on the “recorder” icon:

Click on the “REC” button to start recording. When you speak to the microphone on the board

you will see audio waves shown on the screen. Click on the “STOP” button to stop recording.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
62 / 257
Click on the “PLAY” button to play what you recorded and you can see what you recorded

has been saved as “WAV” files in the “Documents” directory.

Note: Qtopia 2.2.0 has a recorder utility by itself. But it cannot record audio. We leave it as

what it is.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
63 / 257
2.5.20 USB Camera
Plug your camera to the USB host port on the board, click on the “USB Camera” in the

“FriendlyARM” tab you will see a dynamic preview interface. Click on the “Snap” button you

will take a picture which will be saved in the “Documents”. This utility has provides functions

to adjust brightness, contrast and gamma value. When you start this utility, it will read the

camera preset parameters.

Note: although the system already has drivers for USB cameras, each camera might have

different output format. Since we cannot collect all cameras this utility would only work for

some common cameras, if your camera doesn’t work with our system please email us

capbily@163.com

2.5.21 Preview with CMOS Camera


To launch the preview utility you can use our CMOS CAM130 module. Connect the

module to your board, power on, go to the “Friendly ARM” tab and click on “CMOS

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
64 / 257
Camera”. Clicking on “Snap” takes pictures of what your are previewing. After a picture is

taken, “Snap” changes to “Continue”. Click on it you will be able to preview again and the

picture you just took will be saved in “Documents” (located in

“/root/Documents/image/jpeg”). Click on the picture you just took in “Documents” you will

see it is opened in Qtopia’s “image” utility.

2.5.22 LCD Test


Go to the “FriendlyARM” tab, click on the “LCD” icon you will see the following dialog

pop up:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
65 / 257
This utility has two modes: auto and manual

Auto-loop loops automatically. Executing it presents “red”, “yellow”, “white”, “sky blue”,

“dark blue”, “green”, “pink” and “black”. During the loop clicking on any place on the

screen will return

2.5.23 Backlight Control


In the “FriendlyARM” tab clicking on “Backlight Control” will start this utility

2.5.24 A/D Conversion


The Samsung S3C2440 chip has 8 A/D conversion channels but only one converter. In

general, AIN4, AIN5, AIN6 and AIN7 are used as YM, YP, XM and XP channels via a four

wire resistor. We extended AINs 0-3 which reside on CON4. For easier testing AIN0 is

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
66 / 257
directly connected to an adjustable resistor W1. How do they share a common converter? The

following screenshots will show you:

Click on the “ADC Testing” icon in the “FriendlyARM” tab:

Turning the W1 adjustable resistor, you will see the conversion changes. It has 10 digit

precision, therefore the minimum value is close to 0 and the maximum value is close to 1024.

When you click on the touch screen, the A/D converter will take the touch screen as the

channel, you will see the result “-1”; when you move your touch pen away from the screen, the

A/D converter will take AIN0 as the channel again.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
67 / 257
2.5.25 User Button Test
Note: the user buttons don’t have dedicated functions and they are just for testing low level

drivers. Click on the “Buttons” icon in the “FriendlyARM” tab. Press down any buttons on

the board, the corresponding button icons will change to blue, release them, their icons will

change back to grey.

2.5.26 Touch Pen Test


To test whether or not a touch pen works properly, you can draw a line on the LCD, check

if there is any offset or vibration. This can be done via the “penpad” utility. Click on the

“penpad” icon in the “FriendlyARM” tab.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
68 / 257
The “penpad” utility is an easy to use program developed by FriendlyARM. Start it and a

yellow drawing area will show up. Draw whatever you like in the area (the pen color is black,

its width is 1 pixel), go to “File” -> “Save”, you will save what you draw to a png file (in the

“Documents” tab, the /Documents/image/png/ directory). The file name begins with 001. The

maximum number of files that can be saved is 999. The following screenshot shows that our

writing was smooth which meant our pen was accurate.

2.5.27 Barcode Scanner


Our system supports USB barcode scanners which are actually a HID device very similar to

a USB keyboard. Therefore a barcode scanner can work any where a USB keyboard works.

Note: before start this utility, please make sure to plug in your scanner.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
69 / 257
Click on the “text editor” icon in the “Application Programs” subgroup, scan a code with

your scanner, then you will see the code number displayed in the editor.

2.5.28 Language Setting


Qtopia 2.2.0 has a language setting utility which is different from the one in Qtopia 1.7.0.

It only supports English. Therefore we developed a new utility located in the “FriendlyARM”

tab (the icon is a waving flag).

It now supports three languages: English, Chinese and Japanese. When you select “English”,

then click on “OK”, a message will popup asking you if you want to change your language

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
70 / 257
setting. Clicking on “Yes” Qtopia will reboot; clicking on “No” it will return. (Note: the

Chinese and Japanese versions only have file names translated).

2.5.29 Time Zone, Date, Time and Alarm Setting


When you get our system the date and time usually might not be right. You can adjust

them by yourself. Because the CPU has its own RTC and the board has a backup battery after

you adjust the date and time, they will be saved. To adjust them, click on the time zone area

at the right bottom of the screen a menu will show up. Please select “Set time..” and open the

setting interface where you can set parameters such as time zone, date, time and so on

Select “Clock” from the menu.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
71 / 257
Click on “Stop Watch” to open a stopwatch utility

Besides you can set the alarm clock. When it is triggered you will hear a beeping sound

which lasts about one minute and the following popup window will show up. Click on “OK” to

close the alarm clock.

2.5.30 Rotate Screen


Click on the “rotation” icon in the “settings” tab to enter its interface. You can rotate the

screen in four directions.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
72 / 257
Select the direction you want, click on “OK” you will see the screen rotate.

Note: sometimes you need to reboot Qtopia to see the rotation. It is a Qtopia utility and we

haven’t made any change to it. In addition the rotation effect is implemented via Qtopia

software and has nothing to do with LCD drivers.

After rotation you will notice that all “FriendlyARM” utilities get rotated too. We

implemented this feature to make our utilities displayed properly with different LCDs

2.5.31 Setup AutoRun Program


By setting “auto run” you can make Qtopia launch its own or your programs after it boots

up. It is very similar to what you see in Windows “Programs -> Startup”.

Click on the “Auto Start Setting” icon in the “FriendlyARM” tab.

Those programs listed are available programs including all Qtopia programs. The status
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
73 / 257
column indicates whether a program is set to auto start. The status is unique. For instance, if

the “Serial Port Assistant” is checked its status will show “Auto Start”, click on “Save”, a

message box will pop up prompting that the net setting has been successfully saved. Close this

utility, reboot the system you will see the “Serial Port Assistant” is auto run.

To disable auto run for a program, just click on “Clean” and “Close”, a message box will

pop up, click on “Yes” the auto run for that program will be disabled.

2.5.32 System Shutdown


In the “Settings” tab, click on the “shutdown” icon you will see four options on the

shutdown window.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
74 / 257
Shutdown: Press this button, Linux will end all the programs and services to shutdown the

whole system. After the whole system is shutdown, the CPU will not be running and

the system consumes lest power. However since our system doesn’t have a hardware power

down circuit you still can see the power LED on the board is on.

Reboot: This is a “hot” reboot button. If your system boots from the Nor Flash, after you

press this button, the system will shutdown, reboot and enter the supervivi main menu. If

your system boots from the Nand Flash, after you press this button, the system will shutdown,

reboot and enter the Qtopia interface.

Note: Reboot is different from the “Watchdog” function we will introduce. The “Watchdog”

is “cold” reboot and doesn’t end programs or services but reset the system instead.

Restart Server: it restarts the Qtopia system only. It doesn’t interrupt the running Linux.

Terminate Server: it shuts down the Qtopia system. After press this button, the Qtopia

interface will be disabled. What is left on the screen is the left data in RAM and it is not an

active graphic interface.

Note: the original Qtopia 2.2.0 system doesn’t “shutdown” or “reboot” effectively, we

changed its code to make it work.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
75 / 257
2.5.33 Watchdog
The “Watchdog” is a very basic utility in embedded systems. The S3C2440 chip already

has a watchdog. The latest Linux kernel has drivers for it.

Click on the “Watchdog” icon in the “FriendlyARM” tab

Note: before take any action, please read the notes in the red area: once start, no way out,

feed the dog, or else reboot!

Here we set a countdown time 15 seconds. To feed the dog, click on the “Feed” button.

Keep feeding, it will always have bones and the system will not reboot.

2.5.34 Start QtE-4.6.3


In order for users to switch freely and smoothly between different systems we

implemented a feature that allows Qtopia-2.2.0 and QtE-4.6.3 to co-exist in the same file
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
76 / 257
system. In Qtopia-2.2.0, by clicking on a common application icon users will be able to start

QtE-4.6.3. After close the QtE-4.6.3 utility, users will be able to return to Qtopia-2.2.0.

QtE-4.6.3 runs as follows. It is a program manager that displays a CoverFlow effect. You

can drag it left and right and run it by clicking on one of the Covers.

You can exit QtE-4.6.3 by clicking on “Exit Embedded Demo” and return to Qtopia-2.2.0

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
77 / 257
2.6 Navigate Linux via Commandline
Note: every Linux fan may need to get familiar with the command line utility. All Linux

commands are very similar (99% of them are identical) across different versions. Before step

in this section, please set up your super terminal properly.

Below is a screenshot of system login via super terminal. Just press “Enter” as prompted

to continue.

2.6.1 Play MP3


The madplay utility is an mp3 player migrated by FriendlyARM. It can be run in various

ways and the most straightforward one is this:

#madplay your.mp3

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
78 / 257
This command will play “your.mp3” in its default way. You can get help by running

“madplay -h”. Below is a screenshot of how it works.

2.6.2 Terminate Program


To terminate a running program you can press Ctrl + C in a terminal. For instance, if you

are running madplay you can press Ctrl + C to terminate it. If a program runs in the

background you need to issue the “kill” command to terminate it.

2.6.3 Mount USB Drive/Portable Hard Disk


After inserting a USB drive, the system will automatically create a “/udisk” directory and

mount the drive on it, you will see the following messages:

The USB drive has a device name “/dev/udisk”. Entering the “/udisk” directory, you will

be able to browse its contents.

Note: if your drive cannot be detected, please check whether it is FAT32/VFAT.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
79 / 257
2.6.4 Mount SD Card
Similar to USB drive mounting an SD card will be automatically detected and mounted.

After inserting an SD card, you will see the following messages:

The system will create a “/sdcard” directory and mount the SD card on it.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
80 / 257
2.6.5 File Transfer Between PC and Board via Serial Port
After you open a hyper terminal and connect your board to a PC you can transfer files

between your board and the PC via “rz” or “sz”.

(1) Send files to PC via “sz”

In the hyper terminal window right click the mouse, select “receive file” and make the

following configurations

Then type “sz /shanghaitan.mps” command in the hyper terminal’s commandline and it

will send the file to PC.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
81 / 257
(2) Download files from PC to board

In the hyper terminal’s commandline please type “rz” to receive files from PC. Then in the

hyper terminal window right click the mouse, select “send file” and make the following

configurations

Click on “send” to start file transferring

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
82 / 257
After file transferring is done you can check its validility via the “md5sum”

2.6.6 LED Test


(1) LED Server

After the system starts up it will automatically start a LED service (/etc/rc.d/init.d/leds). It

actually runs a led-player script. After the led-player script is run a pipe file led-control will

be created in the /tmp directory.

Users can change an LED’s flashing by setting its parameters

#echo 0 0.2 > /tmp/led-control

After this command is executed each of the 4 LEDs will be flashing one by one with 0.2

second in between.

#echo 1 0.2 >/tmp/led-control

After this command is executed 4 LEDs will be running one by one with 0.2 second in

between.

#/etc/rc.d/init.d/leds stop

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
83 / 257
After this command is executed all 4 LEDs will be turned off.

#/etc/rc.d/init.d/leds start

After this command is executed all 4 LEDs will be turned on.

(2) Manipulating a Single LED

The /bin/leds utility can be used to manipulate a single led. To launch this utility, users

need to stop the led-player service first:

#/etc/rc.d/init.d/leds stop

This command will stop the led-player service. To get more information for the usage

of “led” you can type the following command:

[root@fa /]# led

Usage: leds led_no 0|1

led_no: the LED you want to manipulate (0/1/2/3). “0” and “1” represents “turn off” and

“turn on” respectively

#led 2 1

This will turn on LED3

2.6.7 User Button Test


Type the “buttons” command, press a user button and you will see the following scenario

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
84 / 257
2.6.8 Serial Port Test
Note: the armcomtest utility is an easy to use program developed by FriendlyARM for Linux.

It doesn’t rely on system calls or hardware. After Linux is loaded Serial Ports1, 2, 3 and 4

correspond to /dev/ttySAC0, 1, 2 and 3.

To test Serial Port 2 you need a PC with a serial port. Please connect CON2 to the PC via

our extension board. Type the following command:

#armcomtest –d /dev/ttySAC1 -o

Now if you type characters (in Serial Port Assistant) on your board they will be output to

your PC’s super terminal simultaneously and vice versa

To test Serial Port 3 you need to connect CON3 via our extension board and type the

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
85 / 257
command below:

#armcomtest –d /dev/ttySAC2 -o

Here is a screenshot

2.6.9 PWM Buzzer Test


Type “pwm_test” in a terminal and you will be able to hear beeps. Press “+” or “-” you

can turn up or down. Press “ESC” to exit.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
86 / 257
2.6.10 Backlight Control
Note: the device file for the LCD backlight is /dev/backlight

We also implement the feature of adjusting backlight for accurate touch LCDs. It supports

up to 127 levels of adjustment. To turn off the backlight you can feed “0” to the device file

as follows:

Type the command: echo 0 > /dev/backlight

When feed 1-127 to the device file you will observe different levels of light. 127 is the

highest.In general 15 will begin to show some light. 1-15 makes the screen completely dark.

Values higher than 127 will be treated as 127.

Try: echo 15 > /dev/backlight you will be able to see some light.

2.6.11 I2C-EEPROM Test


The I2C-EEPROM’s device name is “/dev/i2c/0”

Type “i2c –w” in a terminal you will be able to write data (0x00-0xff) to 24C08.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
87 / 257
Type “i2c –r” in a terminal you will be able to read data from 24C08.

2.6.12 AD Conversion Test


Type “adc-test” in a terminal, you will be able to test AD conversion. By adjusting the W1

resistor you will observe the output.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
88 / 257
2.6.13 Preview with CMOS Camera
Connect your CAM130 camera to your board’s camera interface, power on, command

“camtest” you will be able to preview

2.6.14 Telnet
“Telnet” is a popular utility. If your board is connected to the internet you can telnet a bbs.

First make sure your board’s IP is 192.168.1.230 and your board is communicating with

other machines.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
89 / 257
Then configure your router’s IP: route add default gw 192.168.1.1

Now you can telnet a BBS. Here we visited “bbs.scut.edu.cn”.

2.6.15 Ethernet Configuration


Connect your board to the internet, write down your gateway IP (the one in our example

was 192.168.1.1) and configure your router:

# route add default gw 192.168.1.1

Now you can visit an IP address on the internet e.g. you can ping bbs.scut.edu.cn (IP:

202.112.17.137):

#ping 202.112.17.137

If it is a success you will see the following output

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
90 / 257
To ping through an outside website you also need to configure your DNS. You may get it

from your network manager

The one in our example was “202.96.128.86”. Therefore we set our board as follows:

#rm /etc/resolv.conf; This is to remove the existing configuration file.

#touch /etc/resolv.conf; This is to generate a resolv.conf file

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
91 / 257
#echo nameserver 202.96.128.86 >> /etc/resolv.conf; Set up the DNS configuration file

resolv.conf with your DNS IP or you can edit it with vi.

2.6.16 Configure MAC Address


The MAC address in the Mini2440 is “soft” therefore you can change it via “ifconfig”.

First check your current MAC address via “ifconfig”:

#ifconfig ;

In our example the MAC was “08:90:90:90:90:90”, this is the default MAC
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
92 / 257
address and has been hard-coded in the kernel. If you want to update it you have to

recompile the kernel. In order to change the MAC dynamically you need to close your

network connection and then fill your new MAC:

#ifconfig eth0 down

#ifconfig eth0 hw ether 00:11:AA:BB:CC:DD; note: a,b,c,d,e,f… could be lower case

Restart the network, check your MAC via “ifconfig” and verify your network via “ping”:

#ifconfig eth0 up

#ifconfig

#ping 192.168.1.1

2.6.17 Telnet Mini2440


If the system reboots normally it will automatically start a telnet service therefore users

can telnet the board too. You can try typing “telnet 192.168.1.230” from a command line,

type “root” and you will be able to login.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
93 / 257
2.6.18 File Transfer with FTP
After the system boots normally it will automatically start a telnet service. Users can ftp a

remote host via “ftp” in the command line utility in both Linux and Windows. Users can

transfer files to the board from a host PC.

Note: please make sure you have a file ready in your FTP directory. Here we had

“test.mp3”.The account for login is plg and the password is plg.

After file transfer is doen you will see a test.mp3 file in your target board’s /home/plg

directory.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
94 / 257
2.6.19 Control LED via WEB
Click on “Manipulating LEDs via HTML” on the test page of our web server the

following page will be loaded

You can test each of these items. The “LED Test” manipulates the LEDs via CGI and

it includes two display modes and three display rates.

To stop the web service you need to type the following commands:

#/etc/rc.d/init.d/httpd stop

Then restart the service

#/etc/rc.d/init.d/httpd start
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
95 / 257
2.6.20 Mount NFS
Please make sure you have set up the NFS server in your host PC and then type the

following command (our server’s IP is 192.168.1.111).

#mount –t nfs –o nolock 192.168.1.111 :/opt/FriendlyARM/mini2440/rootfs_qtopia /mnt

After a successful mount you will be able to enter “/mnt” and operate your files

To unmount it type the command below

#umount /mnt

2.6.21 USB WiFi


We tested Tp-Link’s TL-WN321G+. After you plug a USB WIFI to your board and if it

works it will show the messages below:


[root@FriendlyARM /]# usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: New USB device found, idVendor=148f, idProduct=2573
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
96 / 257
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: 54M.USB.......
usb 1-1: Manufacturer: Ralink
usb 1-1: configuration #1 chosen from 1 choice
wmaster0 (rt73usb): not using net_device_ops yet
wlan0 (rt73usb): not using net_device_ops yet
[root@FriendlyARM /]#

This means the dongle is recognized. Then you can follow the commands below:

(1) Close all the Ethernet connections (DM9000)


[root@FriendlyARM /]# ifconfig eth0 down

(2) Mount USB WiFi


[root@FriendlyARM /]# ifconfig wlan0 up
rt73usb 1-1:1.0: firmware: requesting rt73.bin
[root@FriendlyARM /]#

(3) Scan WiFi sources


[root@FriendlyARM /]# iwlist scanning | grep ESSID
lo Interface doesn't support scanning.
eth0 Interface doesn't support scanning.
wmaster0 Interface doesn't support scanning.
ESSID:"FRIENDLY-ARM"
ESSID:"NETGEAR"
ESSID:"TP-LINK"
[root@FriendlyARM /]#

(4) Select a WiFi source


[root@FriendlyARM /]# iwconfig wlan0 essid "FRIENDLY-ARM"

(5) Type the password


[root@FriendlyARM /]# iwconfig wlan0 key s:12345

(6) Select AP
[root@FriendlyARM /]# iwconfig wlan0 ap auto

(7) Set up IP address


[root@FriendlyARM /]# ifconfig wlan0 192.168.1.120

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
97 / 257
(8) Ping test
[root@FriendlyARM /]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=42.804 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=5.020 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=5.021 ms

The whole process is as follows


[root@FriendlyARM /]# usb 1-1: new full speed USB device using s3c2410-ohci and address 2
usb 1-1: New USB device found, idVendor=148f, idProduct=2573
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: 54M.USB.......
usb 1-1: Manufacturer: Ralink
usb 1-1: configuration #1 chosen from 1 choice
wmaster0 (rt73usb): not using net_device_ops yet
wlan0 (rt73usb): not using net_device_ops yet
[root@FriendlyARM /]# ifconfig eth0 down
[root@FriendlyARM /]# ifconfig wlan0 up
rt73usb 1-1:1.0: firmware: requesting rt73.bin
[root@FriendlyARM /]# iwconfig wlan0 key s:12345
[root@FriendlyARM /]# iwconfig wlan0 essid "FRIENDLY-ARM"
[root@FriendlyARM /]# iwconfig wlan0 ap auto
[root@FriendlyARM /]# ifconfig wlan0 192.168.1.120
[root@FriendlyARM /]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=42.804 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=5.020 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=5.021 ms
^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 5.020/17.615/42.804 ms
[root@FriendlyARM /]#

2.6.22 Set System Clock


The Linux command for updating time is “date”, to synchronize the S3C2440 time with

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
98 / 257
Linux’s system time you can use “hwclock”:

(1) date -s 042916352007 #set time to 2007-04-29 16:34

(2) hwclock -w # save your setting to S3C2440’s RTC

(3) Command “hwclock –s” to update Linux’s system time with RTC. Usually this command

will be included in “/etc/init.d/rcS” for auto run

Note: our system’s “/etc/init.d/rcS” includes “hwclock –s” already.

2.6.23 Save Data to Flash Permanently


The Mini2440 system supports yaffs2 thus can save data permenantly even when the

system is powered off. After the system boots please try the following command:

#cp / shanghaitan.mp3 /home/plg

This will create a duplicate file under “/home/plg”. Power off and on you will observe that

the file still exists.

2.6.24 Setup Autorun Program on System Startup


Users can set up programs that will be automatically run on system startup in the boot

script. It is similar to Window’s Autobat. It is under the /etc/init.d/rcS directory, the contents

are as follows (they may be different in differed systems)


#! /bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:
runlevel=S
prevlevel=N
umask 022
export PATH runlevel prevlevel

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
99 / 257
#
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#
trap ":" INT QUIT TSTP
/bin/hostname FriendlyARM
[ -e /proc/1 ] || /bin/mount -n -t proc none /proc
[ -e /sys/class ] || /bin/mount -n -t sysfs none /sys
[ -e /dev/tty ] || /bin/mount -t ramfs none /dev
/bin/mount -n -t usbfs none /proc/bus/usb
echo /sbin/mdev > /proc/sys/kernel/hotplug
/sbin/mdev -s
/bin/hotplug
# mounting file system specified in /etc/fstab
mkdir -p /dev/pts
mkdir -p /dev/shm
/bin/mount -n -t devpts none /dev/pts -o mode=0622
/bin/mount -n -t tmpfs tmpfs /dev/shm
/bin/mount -n -t ramfs none /tmp
/bin/mount -n -t ramfs none /var
mkdir -p /var/empty
mkdir -p /var/log
mkdir -p /var/lock
mkdir -p /var/run
mkdir -p /var/tmp
/sbin/hwclock -s
syslogd
/etc/rc.d/init.d/netd start
echo " " > /dev/tty1
echo "Starting networking..." > /dev/tty1
sleep 1
/etc/rc.d/init.d/httpd start
echo " " > /dev/tty1
echo "Starting web server..." > /dev/tty1
sleep 1
/etc/rc.d/init.d/leds start
echo " " > /dev/tty1
echo "Starting leds service..." > /dev/tty1
echo " "
sleep 1
echo " " > /dev/tty1

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
100 / 257
/etc/rc.d/init.d/alsaconf start
echo "Loading sound card config..." > /dev/tty1
echo " "
/sbin/ifconfig lo 127.0.0.1
/etc/init.d/ifconfig-eth0
/bin/qtopia &
echo " " > /dev/tty1
echo "Starting Qtopia, please waiting..." > /dev/tty1

2.6.25 Take Screenshot with Snapshot


Users can take screenshots with “snapshot” and save them as png files

#snapshot pic.png

Executing this command will take a screenshot of the current LCD display and save it as

“pic.png”.

2.7 Navigate WinCE6


The image file for WindowsCE6 is under “\images\WindowsCE6”. Please follow the steps

described in our previous chapters to burn a WinCE 6 image into the board. After your

burning is done please toggle the S2 switch to the Nand Flash and reboot.

When your WinCE6 is loading you will see the following screenshots

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
101 / 257
2.7.1 User Button Test

Name: buttons Comment


Driver files mini2440\src\drivers\userkey
Compiler VS2005
Device name /dev/buttons
Notes:

Go to “FriendlyARM”, click on “Buttons” you will see the following windows. Clicking

on the buttons you will observe their color changes

2.7.2 LED Test

Name: LED-Test.exe Comment


Driver files mini2440\src\drivers\leddriver
Compiler VS2005
Device name
Notes:

Go to “FriendlyARM”, click on “LED-Test” you will see the following windows and you

can manipulate LEDs by clicking on the buttons on it

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
102 / 257
2.7.3 ADC Test

Name: AD-Convert Comment


Driver files mini2440\src\drivers\touch
Compiler VS2005
Device name
Notes: ADC driver files are implemented in the touchscreen driver

Go to “FriendlyARM”, click on “ADC-Convert” you will see the following windows.

When you adjust the W1 resistor you will see the value changes.

Note: the W1 resistor is hidden bebind the LCD.


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
103 / 257
2.7.4 I2C-EEPROM Test

Name: I2C-EEPROM Comment


Driver files Mini2440\src\drivers\iic
Compiler VS2005
Device name

Go to “FriendlyARM”, click on “I2C-EEPROM” you will see the following windows.

2.7.5 PWM Buzzer Test

Name: PWM-Buzzer Comment


Driver files mini2440\src\drivers\pwm
Compiler VS2005
Device name

Go to “FriendlyARM”, click on “PWM Buzzer” you will see the following windows.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
104 / 257
2.7.6 Watchdog Test

Name: Watchdog Comment


Driver files Mini2440\src\drivers\wdt
Compiler VS2005
Device name
Note:

Go to “FriendlyARM”, click on “Watchdog” you will see the following windows

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
105 / 257
2.7.7 LCD Test

Name: LCD-Test Comment


Driver files mini2440\src\drivers\display
Compiler VS2005
Device name
Note:

Go to “FriendlyARM”, click on “LCD-Test” you will see the following windows

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
106 / 257
2.7.8 CMOS Camera Test

Name: CMOS-Camera Comment


Driver files mini2440\src\drivers\camera
Compiler VS2005
Device name
Note:

Go to “FriendlyARM”, click on “CMOS Camera” you will see the following windows

You can click on “Snap” to take pictures which will be saved in the “Documents”

directory.

2.7.9 Audio Recording

Name: Recorder Comment


Driver files mini2440\src\drivers\wavedev
Compiler VS2005
Device name
Note:

Go to “FriendlyARM”, click on “Recorder”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
107 / 257
Click on “Record” to begin recording. Now if you speak to the microphone on the board

your voice will be recorded. Click on “Stop” to stop redording

Click on “Play” it will loop the audio you just recorded.

Note: this utility doesn’t save the recorded audio file.

2.7.10 Screen Rotation


Note: the screen rotation driver is implememted in the LCD driver and is located in

“mini2440\src\drivers\display”

Go to “FriendlyARM” and click on the “Rotate” icon you will see the following effect.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
108 / 257
2.7.11 Serial Port

Name: SerialPort Comment


Driver files mini2440\src\drivers\serial
Compiler VS2005
Device name
Note:

Go to “FriendlyARM”, click on “SerialPort” you will see the following windows

2.7.12 Calibrate Touch Screen

Name: Touch Comment


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
109 / 257
Driver files Mini2440\src\drivers\touch
Compiler VS2005
Device name
Note:

The default WinCE system’s touch screen parameters are for 3.5”LCD. Other LCD

systems may require different settings therefore users need to re-calibrate the screen. Below

are the steps:

Step 1: connect a USB mouse to your board, go to “Start -> Settings -> Control Panel”,

locate the “Stylus” icon, double click to open its property window and click on “Calibrate ->

ReCalibrate”

Follow the system’s prompt to start calibration. After you are done you will see the

following screen. Click on any position you will return to the property window. Please click

on “OK” to save and exit.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
110 / 257
If you want to save the setting, you can go to “Start -> Suspend” and reboot.

2.7.13 Configure Ethernet

Name: Comment
Driver files Mini2440\src\drivers\dm9000
Compiler VS2005
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
111 / 257
Device name
Note:

Before you can browse the internet you need to set up your IP, gateway and DNS

properly.Please go to “Start -> Settings->Control Panel”, launch the network setting utility

and locate your DM9CE1.

Double click on the DM9CE1 icon you will see the following dialog in which you can

make your network configurations.

After setting up your network properly you can try it now

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
112 / 257
2.7.14 Backlight Control

Name: Comment
Driver files Mini2440\src\drivers\backlight
Compiler VS2005
Device name
Note:

If your system is preinstalled with WindowsCE6, you may notice that your LCD backlight

will turn off if it doesn’t accept any touch within 30 seconds. This is manipulated by the

backlight control function. In WinCE the backlight control driver utilizes standard system

interfaces and you can easily manipulate it via software.

Please go to “Start -> Control Panel -> Display”

Click on “backlight” you will be able the set its turn-off time. By default it is 30 seconds

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
113 / 257
Click on “Advanced”

The backlight control window will pop up

You can slide the slider to adjust the backlight. Click on “close” to return to your previous

interface

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
114 / 257
2.7.15 Real Time Clock

Name: Comment
Driver files mini2440\src\common\rtc
Compiler VS2005
Device name
Note:

Click on the right bottom of the WinCE status bar and set up your time. After you are

done click on “OK” to return. If you want to save your changes please click on “suspend”.

2.7.16 Auto Run Setup


Users can set up an application to be started automatically on system startup. Please go to

“FriendlyARM”, click on “AutoRun-Setting” you will see the following windows

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
115 / 257
Click on “Browser” and select an application. In our example we chose “AD-Convert”.

Click on “OK” and then “Close” to return

Now “AD Convert” would be automatically started on system startup


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
116 / 257
2.7.17 USB Flash Drive
USB flash drives are plug and play. After you insert a USB drive to the USB host and

click on “My Computer” you will find the USB drive’s icon.

2.7.18 SD/MMC Card


SD cards are plug and play. The maximum SD card that can be supported is 32G. After

you insert an SD card to the SD card socket you will find a “Storage Card” icon.

2.7.19 Synchronize with PC


When your host PC is Windows XP you need to install ActiveSync on your PC to

synchronize with your board. If you use Windows 7 you can use its mobile device center to

synchronize.

2.7.20 Configure MAC Address


The integrated DM9000 network card doesn’t come with a MAC address therefore we

strongly recommend our users to set it prior to connecting to the internet after burning an

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
117 / 257
image into the board.

After you set up your MAC address it will be written into the registry and will be there

forever unlessyoureinstall you system or update it.Click on the “iMAC” icon to start the

utility.

On the MAC Address setting dialog, “Old” shows the current MAC. You can type your

new in “New” or click on the “Gen”button to generate a ramdom MAC which in general

achieves better results:

The following screens shows a MAC generated by “Gen”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
118 / 257
Click on “Update MAC” to save your MAC into the registry and reboot your system

After system is rebooted you MAC will take into effect.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
119 / 257
Chapter 3 Set up Linux Development Environment
This section will guide you through the steps on how to set up Linux development

environment on a PC.

3.1 Set up Fedora 9.0 Development Environment


First of all you need to install Fedora 9.0 on a PC and set up your Linux development

environment. All our software development and testing for the Mini2440 were based on

Fedora 9.0. We didn’t do it on other platforms. We strongly suggest that our users should use

this platform which you can download from its website

(ftp://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/i386/iso/Fedora-9-i38

6-DVD.iso).

The reason why we chose Fedora 9.0 is that it is easy to be installed and set up. Fedora 10

and later versions are more complicated and therefore may not be easy for beginners and

Fedora 8 and earlier versions are a little bit obsolete. Please follow the steps below to install.

3.1.1 Install Fedora 9.0


Step1:Insert the first disk in the CDROM/DVD, set the boot sequence to CDROM in the

BIOS. After reboot it will prompt the user to the following interface, just press “enter”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
120 / 257
Step2:The system will check the installation disk. It can be ignored, just press “Skip” to the

next step

Step3:it enters the graphic interface, click on the “Next” button.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
121 / 257
Step4:set the installation language. In this example, we chose the simplified English.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
122 / 257
Step5:set the keyboard, in this example, we chose the U.S. key board.

Step 6:configure the network.

In our example, we didn’t set it as “DHCP”, we used a static IP instead, and typed
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
123 / 257
the IP and subnet mask as follows.

Click on the OK button and go on to set the machine name, gateway and DNS.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
124 / 257
Step 7:set the time zone. We chose “Asia/Shanghai”.

Step 8:set up the administrator’s password, i.e. the root’s password. “root” is the super user.

It should be at least 6 characters

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
125 / 257
Step 9:disk partition. We followed the default option. Before do this, please back up disk

data.

Click on “Next”, it will warn the user that all the data will be deleted. Usually we would do

this installation in VMWARE, so we chose “Write changes to disk” and disk format would

begin.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
126 / 257
Here is the format process:

Step 11:select the installation type, in this example, we chose “customize”

Step 12:configure the “server” item as follows:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
127 / 257
Step 13:begin installation

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
128 / 257
Step14: installation complete.

Step15: after installation completed, click on the reboot button on the page shown in step 14

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
129 / 257
Step16: skip this license page and go “forward”

Step17: create new users. We ignored user creation and went to the next step.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
130 / 257
Press “continue” to go on.

Step18: setup date and time. We ignored this and went to the next step.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
131 / 257
Step19: confirm hardware information. We just clicked on “Finish”.

On the popup window shown below, just click on the red marked button.

Step 20: on the login page, login as “root”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
132 / 257
Input the password we just created for “root”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
133 / 257
When login as “root”, the following popup window will show up, just click on “Continue”

Below is the interface the user will see after a successful login.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
134 / 257
3.1.2 Add User Account
To create a new user (not root) account, here are the steps:

Step 1: go to “Users and Groups”

Step 2: open the “Users Manager” window

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
135 / 257
Step 3: click on the “Add User” button, type the user name and password

Click on “OK”, you will see that a new “plg” user has been created, and a “plg” directory has

been created in the “/home” directory too.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
136 / 257
3.1.3 Access Windows Files
You can easily access shared files in Windows from either a virtual machine or a real

Fedora9 system as long as they can communicate. To connect to a Windows from a virtual

machine, the easiest way is to set “Guest” to “Bridge” in the network configuration.

To access shared files in Windows, please follow the steps below:

Step 1: set a shared directory in Windows. Here we set a “share_f9”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
137 / 257
Step 2: set Fedora9

Open the window below:

Select “Windows share” in the “service type” field

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
138 / 257
Input the shared file’s name and its windows machine IP

Click on “connect”, the following window will show up:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
139 / 257
Go ahead and “connect” again you will see the shared files.

If you want to access this directory from the command line utility, you can do it by hitting

the TAB key.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
140 / 257
To disconnect the shared directory, right click on the shared directory and following the

operations in the screenshot below:

3.1.4 Set up NFS Service


If you have installed Fedora9 on your system, all the corresponding NFS components will

be installed by default, you can just follow the steps below to setup and configure the NFS

service.

Step 1: Setting Up a Shared Directory

Note: to access a shared directory, you need to follow what were described in 5.4.2 to install

the root_qtopia system.

(1) Set up Shared Directories

Run the command below:

#gedit /etc/exports

This command edits the NFS configuration file. Add the following line (Note:if this file

is opened for the first time, it will be empty):


/opt/FriendlyARM/Mini2440/root_qtopia_qt4
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
141 / 257
*(rw,sync,no_root_squash)
“/opt/FriendlyARM/mini2440/root_qtopia_qt4” is a NFS shared directory, it can be

mounted as the root file system through NFS;

* means all clients can mount to this directory.

rw means all clients that have been mounted to this directory have the read and write

rights to this directory.

no_root_squash means all clients that have been mounted to this directory can be set to a

root user

Step 2: Starting NFS

You can start the NFS service through either command line or graphic interface. We set up

the NFS service to let others access shared directories. By default Fedora starts it firewall

which will disable the NFS service. So you need to disable the firewall by typing “lokkit” in

a command line window.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
142 / 257
Select (*) Disabled, and click on the “OK” button to disable the firewall permanently.

Now you can start the NFS service:

(1) Start and Stop the NFS service

Run the command below:

#/etc/init.d/nfs start

This command will start the NFS service. The user can verify whether the service is

running by commanding:

# mount -t nfs localhost: /opt/FriendlyARM/mini2440/root_qtopia_qt4 /mnt/

If no err messages come up, the user can then browse the contents of the “/mnt” directory

and verify if the contents are the same as the

“/opt/FriendlyARM/mini2440/root_qtopia_qt4” directory.

Stop the service by commanding:

#/etc/init.d/nfs stop

(2) Starting the NFS service through the graphic interface

To auto run the service on system startup, the user can execute the command below:

# serviceconf

Open the system configuration window, on the left side of the window, check the NFS box,

click on the “Enable” button to start it.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
143 / 257
Step 3: Booting System via NFS

After setting up and running the NFS service, the user can set the NFS as the root file

system to boot the board. To boot the system via NFS, the board can fully utilize a “big” hard

disk because the user can use the host PC’s hard disk, this trick is widely used in Linux

development.

Switch the target board’s boot mode to the “SDBOOT” side (note: you need to enter the

super terminal menu, please refer to 2.4), connect the power cable, serial port cable and the

network cable, and open a super terminal. Type the following command:

console=ttySAC0 root=/dev/nfs

nfsroot=192.168.1.111:/opt/FriendlyARM/mini2440/root_qtopia_qt4

ip=192.168.1.70:192.168.1.111:192.168.1.111:255.255.255.0:sbc2440.arm9.net:eth0:off

“nfsroot” is the board’s IP. If you started a virtual machine this IP would be your virtual

machine’s IP.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
144 / 257
The number strings after “ip=” are detailed as below:

The first item, in this example “192.168.1.70” is the target’s temporary IP (please make

sure this IP doesn’t conflict with other IPs within the same network);

The second item, in this example “192.168.1.111” is the host’s IP,

The third item, in this example “192.168.1.111” is the target board’s gateway IP,

The fourth item, in this example “255.255.255.0” is the subnet mask.

The fifth item is the board’s machine name (the user can give whatever name he likes)

“eth0” is the network adaptor’s name

This command is so long that it could be easily typed wrong. In this shipped CD, this

command has been written in the “nfs.txt” file for the customer’s convenience. The user can

copy it directly. After “enter” these parameters will be saved in the NAND Flash.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
145 / 257
Then type “b” and press “enter” to boot the system via NFS.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
146 / 257
3.2 Set up Cross Compile Environment
To compile kernels, Qtopia/Qt4, bootloader and other programs in Linux you need a a

cross compile environment. We used arm-linux-gcc-4.4.3 and its by defauly supports armv6

command sets. The following steps will introduce how to build a compile environment.

Step 1: copy the compressed file “arm-linux-gcc-4.4.3.tgz” in the shipped CD into a system’s

directory, e.g “tmp\”, enter this directory and execute the following commands:

#cd \tmp

#tar xvzf arm-linux-gcc-4.4.3.tgz –C /

Note: there is a space after “C” and “C” is a capital letter.

These commands will install “arm-linux-gcc” in the “/opt/FriendlyARM/toolschain/4.4.3”

Step 2: run the command below to add the compiler’s path to system variables:

#gedit /root/.bashrc

This is to edit the “/root/.bashrc” file. Update the last line with “export

PATH=$PATH:/opt/FriendlyARM/toolschain/4.4.3/bin” in the opened file, save and exit

the file.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
147 / 257
Logout and login the system again (no need to reboot the system, just go to “start”->

“logout”), the above settings will take into effect. Type “arm-linux-gcc –v”, if the messages

depicted in the screen shot below appear, it indicates the compile environment has been set

up successfully

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
148 / 257
3.3 Uncompress Source Code and Install Application Utilities
This section will introduce how to uncompress all the source code that users may need and

install some application utilities including:

- Linux kernel source code

- Qtopia-2.2.0 source code (for x86 and arm)

- QtE-4.6.3 (for ARM)

- Busybox-1.13 source code

- Sample programs code (developed by FriendlyArm)

- Target file system directory

- File system image maker

- Linux logo maker: logomaker

Note: all source code and utilities should be uncompressed and compiled with

arm-linux-gcc-4.4.3

3.3.1 Uncompress Source Code


Firstly, create a working directory: /opt/FriendlyARM/mini2440

After execute command “mkdir –p /opt/FriendlyARM/mini2440”, all the source code in

the following steps will be uncompressed in this work directory

(1) Get Linux source code ready

In Fedora9, create a temporary director “/tmp/linux” by running the following command

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
149 / 257
#mkdir /tmp/linux

Copy all the files in the linux directory in the shipped CD to “/tmp/linux”

(2) Uncompress the Linux kernel source code

In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/linux-2.6.32.2-mini2440-20100106.tar.gz

A linux-2.6.32.2 directory will be created, it includes a complete copy of linux kernel

source code.

Note: 20100106 is the date when FriendlyARM released the new version, the file name in

the shipped CD may be different.

(3) Uncompress and install Qtopia source code

In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/x86-qtopia.tgz

#tar xvzf /tmp/linux/arm-qtopia.tgz

An x86-qtopia directory and an arm-qtopia directory will be created, and their source code

will be uncompressed into these two directories.

Note: in this release, supports for mouse and tp are all included in one package. And the

source code for the embedded browser konquor is included too.

(4) Uncompress and install QtE-4.6.3 source code


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
150 / 257
In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/arm-qte-4.6.3-20100802.tar.gz

An arm-qte-4.6.3 will be created, and their source code will be uncompressed into the

directory.

(5) Uncompress and install busybox source code

The Busybox is a compact Linux tool kit. Here we used busybox-1.13.3. Users can

download its latest version from http://www.busybox.net

In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/busybox-1.13.3-mini2440.tgz

A busybox-1.13.3 directory will be created, and its source code will extracted into this

directory.

Note: for the sake of users, we have made a default configuration file: fa.config.

(6) Uncompress and install Linux sample programs

In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/examples-20100108.tgz

An examples directory will be created, all the source code will be extracted into this

directory.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
151 / 257
Note: all these sample programs are developed by FriendlyARM.

(7) Uncompress and install vboot

In the work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/vboot-src-20100106.tar.gz

An examples directory will be created, all the source code will be extracted into this

directory.

(8) Uncompress and install other bootloader source code

Besides the vboot we have other bootloader (vivi and u-boot) soruce code as well. In the

work directory /opt/FriendlyARM/mini2440, run the commands below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/bootloader.tgz

An examples directory will be created, all the source code will be extracted into this

directory.

3.3.2 Create Target File System


Execute the following commands:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/ rootfs_qtopia_qt4-20100816.tar.gz

A rootfs_qtopia_qt4 will be created.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
152 / 257
This package includes root_default, root_nfs, root_qtopia_tp and root_qtopia_mouse. It

has the following features:

- auto detection of NFS reboot or local reboot

- auto detection of touch screen and launching the calibration utility if necessary. If no touch

screen is connected system will enable the mouse.

- auto detection of command or high speed SD cards (up to maximum memory of 32G) and

flash drives

- auto detection of USB mouse or touch screen

- support co-existence of a USB mouse and a touch screen (since Linux-2.6.36)

3.3.3 Install Utilities


To burn a target file system to the board you need to make the file system an image first.

We offered two tools that can be used to make file images:mkyaffs2image and

mkyaffs2image-128M. The “mkyaffs2image” utility is for 64M and the

“mkyaffs2image-128M” is for 128M/256M/512M/1GB.

Below are the steps to install:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/mkyaffs2image.tgz –C /

This will create an “mkyaffs2image” in the “/usr/sbin” directory.

Note: “C” is capitalized and means “change”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
153 / 257
3.3.4 Install LogoMaker
LogoMaker is developed by FriendlyARM for making linux logos. There are many

resources describing how to convert image files such as bmp, jpg, png and so on to linux

logos using command line tools. We created this graphic version which is based on Fedora9.

Execute the command below:

#cd /opt/FriendlyARM/mini2440

#tar xvzf /tmp/linux/logomaker.tgz –C /

Note: “C” is capitalized and means “change”.

After executing the above commands, LogoMaker will be installed in the /usr/sbin

directory. It only has one file. After installing it, type “logomake” in a command line window,

you will see the following screenshot

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
154 / 257
Chapter 4 Introduction to Linux Development
This section lists some sample Linux programs for users’ reference.

All the following programs are compiled with arm-linux-gcc-4.3.2 with EABI. We don’t

guarantee they can be compiled and run with other corss compilers. To check your compiler,

please type “arm-linux-gcc –v”

The following programs are developed by Friendly ARM. We have found that some

companies illegally copied our programs.

4.1 Sample Application Programs


4.1.1 “Hello, World”
The source code is under /opt/FriendlyARM/mini2440/examples/hello”.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
155 / 257
#include <stdio.h>

int main(void) {

printf("hello, FriendlyARM!\n");

Step1: Compile Hello,World

Enter the directory where the source code is located and execute “make”:

#cd /opt/FriendlyARM/mini2440/examples/hello

#make

A “hello” executable will be generated and you can check whether it is for ARM by

commanding “file”:

Step2: Download “Hello,World” to Board

You can download your executable to the board in any of the following ways:

- FTP file transfer (recommended)

- Copy to a media (such as flash drives)

- File transfer via serial port

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
156 / 257
- Run via NFS

(1) FTP File Transfer

Note: login your board via FTP, transfer your executable to it and change its file property to

executable

First, execute your commands in PC

Go to your board and execute the following commands:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
157 / 257
(2) Copy to Flash Drive

Note: copy your executable to a flash drive, mount it to your board and copy the file to

“/bin”

1. Copy to Flash Drive

Connect your flash drive to your PC and execute the following commands

#mount /dev/sda1 /mnt ; mount your drive

#cp hello /mnt ; copy your file to the drive

#umount /mnt ; unmount your drive

2. Copy to Board

Insert your drive to your board’s USB host, it will be automatically mounted under

“/udisk”. Please execute the following command

#cd /udisk

#./hello ;execute “hello”

Note: if you take out your drive directly you need to go back to the root directory and

execute “umount /udisk” for the next mount

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
158 / 257
(1) File Transfer via Serial Port

Download your file to the board via serial port and change its property to executable

#chmod +x hello

Note: some users do this via a USB to Serial connector. This may not be successful due to

the connector’s quality issues therefore we recommend file transfer via FTP

(2) Run via NFS

It is very popular to launch programs via NFS in Linux. This saves download time

especially for large size files. Please set up your NFS server and type the commands below

(in our example the IP was 192.168.1.111):

#mount –t nfs –o nolock 192.168.1.111:/opt/FriendlyARM/mini2440/root_qtopia /mnt

If the mounting is successful you can enter “/mnt” to manipulate your files. Please copy

“hello” to “opt/FriendlyARM/mini2440/root_qtopia” and type the following commands:


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
159 / 257
#cd /mnt

#./hello

4.1.2 LED Test Program

Program Description:
Driver’s Source Code /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Driver Mini2440_leds.c
Device Type misc
Device Name /dev/leds
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/leds
Test Program Name led.c
Executable Name led
Test Program’s Location in Board
Note: the LED driver has been compiled into the kernel by default and you cannot load it via insmod
Program:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
int main(int argc, char **argv)
{
int on;
int led_no;
int fd;
/* Check parameters */
if (argc != 3 || sscanf(argv[1], "%d", &led_no) != 1 || sscanf(argv[2],"%d", &on) != 1 ||
on < 0 || on > 1 || led_no < 0 || led_no > 3) {
fprintf(stderr, "Usage: leds led_no 0|1\n");
exit(1);
}
/*Open /dev/leds file*/
fd = open("/dev/leds0", 0);
if (fd < 0) {
fd = open("/dev/leds", 0);

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
160 / 257
}
if (fd < 0) {
perror("open device leds");
exit(1);
}
/*Manipulate led via ioctl and input parameters */
ioctl(fd, on, led_no);
/*Close device*/
close(fd);
return 0;
}

You can compile the program, download it and run

4.1.3 User Button Test Program


Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Driver Mini2440_buttons.c
Device Type misc
Device Name /dev/buttons
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/buttons
Test Program Name button_test.c
Executable Name buttons
Test Program’s Location in Board
Note: the button driver has been compiled into the kernel by default and you cannot load it via insmod
Program:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/time.h>
#include <errno.h>
int main(void)
{

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
161 / 257
int buttons_fd;
char buttons[6] = {'0', '0', '0', '0', '0', '0'};
buttons_fd = open("/dev/buttons", 0);
if (buttons_fd < 0) {
perror("open device buttons");
exit(1);
}
for (;;) {
char current_buttons[6];
int count_of_changed_key;
int i;
if (read(buttons_fd, current_buttons, sizeof current_buttons) != sizeof current_buttons) {
perror("read buttons:");
exit(1);
}
for (i = 0, count_of_changed_key = 0; i < sizeof buttons / sizeof buttons[0]; i++) {
if (buttons[i] != current_buttons[i]) {
buttons[i] = current_buttons[i];
printf("%skey %d is %s", count_of_changed_key? ", ": "", i+1, buttons[i] == '0' ? "up" : "down");
count_of_changed_key++;
}
}
if (count_of_changed_key) {
printf("\n");
}
}
close(buttons_fd);
return 0;
}

You can compile the program, download it and run

4.1.4 PWM Buzzer

Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Driver Mini2440_pwm.c
Device Type misc
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
162 / 257
Device Name /dev/pwm
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/pwm
Test Program Name pwm_test.c
Executable Name Pwm_test
Test Program’s Location in Board
Note: the pwm driver has been compiled into the kernel by default and you cannot load it via insmod
Program:
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <stdlib.h>
#define PWM_IOCTL_SET_FREQ 1
#define PWM_IOCTL_STOP 2
#define ESC_KEY 0x1b
static int getch(void)
{
struct termios oldt,newt;
int ch;
if (!isatty(STDIN_FILENO)) {
fprintf(stderr, "this problem should be run at a terminal\n");
exit(1);
}
// save terminal setting
if(tcgetattr(STDIN_FILENO, &oldt) < 0) {
perror("save the terminal setting");
exit(1);
}
// set terminal as need
newt = oldt;
newt.c_lflag &= ~( ICANON | ECHO );
if(tcsetattr(STDIN_FILENO,TCSANOW, &newt) < 0) {
perror("set terminal");
exit(1);
}
ch = getchar();
// restore termial setting
if(tcsetattr(STDIN_FILENO,TCSANOW,&oldt) < 0) {
perror("restore the termial setting");
exit(1);
}
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
163 / 257
return ch;
}
static int fd = -1;
static void close_buzzer(void);
static void open_buzzer(void)
{
fd = open("/dev/pwm", 0);
if (fd < 0) {
perror("open pwm_buzzer device");
exit(1);
}
// any function exit call will stop the buzzer
atexit(close_buzzer);
}
static void close_buzzer(void)
{
if (fd >= 0) {
ioctl(fd, PWM_IOCTL_STOP);
close(fd);
fd = -1;
}
}
static void set_buzzer_freq(int freq)
{
// this IOCTL command is the key to set frequency
int ret = ioctl(fd, PWM_IOCTL_SET_FREQ, freq);
if(ret < 0) {
perror("set the frequency of the buzzer");
exit(1);
}
}
static void stop_buzzer(void)
{
int ret = ioctl(fd, PWM_IOCTL_STOP);
if(ret < 0) {
perror("stop the buzzer");
exit(1);
}
}
int main(int argc, char **argv)
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
164 / 257
{
int freq = 1000 ;
open_buzzer();
printf( "\nBUZZER TEST ( PWM Control )\n" );
printf( "Press +/- to increase/reduce the frequency of the BUZZER\n" ) ;
printf( "Press 'ESC' key to Exit this program\n\n" );
while( 1 )
{
int key;
set_buzzer_freq(freq);
printf( "\tFreq = %d\n", freq );
key = getch();
switch(key) {
case '+':
if( freq < 20000 )
freq += 10;
break;
case '-':
if( freq > 11 )
freq -= 10 ;
break;
case ESC_KEY:
case EOF:
stop_buzzer();
exit(0);
default:
break;
}
}
}

You can compile the program, download it and run

4.1.5 I2C-EEPROM Program

Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/i2c/busses
Driver I2c-s3c2410c
Device Type Char
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
165 / 257
Device Name /dev/i2c/0
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/i2c
Test Program Name eeprog.c 24cxx.c
Executable Name I2c
Test Program’s Location in Board
Note: the i2c driver has been compiled into the kernel by default and you cannot load it via insmod
Program:
Note: the following program depends on “24cxx.c” in the same directory.
#include <stdio.h>
#include <fcntl.h>
#include <getopt.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "24cXX.h"
#define usage_if(a) do { do_usage_if( a , __LINE__); } while(0);
void do_usage_if(int b, int line)
{
const static char *eeprog_usage =
"I2C-24C08(256 bytes) Read/Write Program, ONLY FOR TEST!\n"
"FriendlyARM Computer Tech. 2009\n";
if(!b)
return;
fprintf(stderr, "%s\n[line %d]\n", eeprog_usage, line);
exit(1);
}
#define die_if(a, msg) do { do_die_if( a , msg, __LINE__); } while(0);
void do_die_if(int b, char* msg, int line)
{
if(!b)
return;
fprintf(stderr, "Error at line %d: %s\n", line, msg);
fprintf(stderr, " sysmsg: %s\n", strerror(errno));
exit(1);
}
static int read_from_eeprom(struct eeprom *e, int addr, int size)
{
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
166 / 257
int ch, i;
for(i = 0; i < size; ++i, ++addr)
{
die_if((ch = eeprom_read_byte(e, addr)) < 0, "read error");
if( (i % 16) == 0 )
printf("\n %.4x| ", addr);
else if( (i % 8) == 0 )
printf(" ");
printf("%.2x ", ch);
fflush(stdout);
}
fprintf(stderr, "\n\n");
return 0;
}
static int write_to_eeprom(struct eeprom *e, int addr)
{
int i;
for(i=0, addr=0; i<256; i++, addr++)
{
if( (i % 16) == 0 )
printf("\n %.4x| ", addr);
else if( (i % 8) == 0 )
printf(" ");
printf("%.2x ", i);
fflush(stdout);
die_if(eeprom_write_byte(e, addr, i), "write error");
}
fprintf(stderr, "\n\n");
return 0;
}
int main(int argc, char** argv)
{
struct eeprom e;
int op;
op = 0;
usage_if(argc != 2 || argv[1][0] != '-' || argv[1][2] != '\0');
op = argv[1][1];
fprintf(stderr, "Open /dev/i2c/0 with 8bit mode\n");
die_if(eeprom_open("/dev/i2c/0", 0x50, EEPROM_TYPE_8BIT_ADDR, &e) < 0,
"unable to open eeprom device file "
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
167 / 257
"(check that the file exists and that it's readable)");
switch(op)
{
case 'r':
fprintf(stderr, " Reading 256 bytes from 0x0\n");
read_from_eeprom(&e, 0, 256);
break;
case 'w':
fprintf(stderr, " Writing 0x00-0xff into 24C08 \n");
write_to_eeprom(&e, 0);
break;
default:
usage_if(1);
exit(1);
}
eeprom_close(&e);
return 0;
}

You can compile the program, download it and run

4.1.6 Serial Port Program

Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/serial/
Driver s3c2440.c
Device Type
Device Name /dev/ttySAC0, 1 and 2
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/comtest
Test Program Name comtest.c
Executable Name armcomtest
Test Program’s Location in Board
Note: you can get two versions , one for x86 and the other for ARM. Both are generated from the same source code.
The comtest utility is developed by Friendly ARM to test serial ports. It is very similar to “minicom” in Linux
and independent of hardware. Its source code can be applied in both any arm-linux platforms and PCs. This
program is developed by Friendly ARM and unauthorized usage of it is forbidden
Program:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
168 / 257
# include <stdio.h>
# include <stdlib.h>
# include <termio.h>
# include <unistd.h>
# include <fcntl.h>
# include <getopt.h>
# include <time.h>
# include <errno.h>
# include <string.h>
static void Error(const char *Msg)
{
fprintf (stderr, "%s\n", Msg);
fprintf (stderr, "strerror() is %s\n", strerror(errno));
exit(1);
}
static void Warning(const char *Msg)
{
fprintf (stderr, "Warning: %s\n", Msg);
}
static int SerialSpeed(const char *SpeedString)
{
int SpeedNumber = atoi(SpeedString);
# define TestSpeed(Speed) if (SpeedNumber == Speed) return B##Speed
TestSpeed(1200);
TestSpeed(2400);
TestSpeed(4800);
TestSpeed(9600);
TestSpeed(19200);
TestSpeed(38400);
TestSpeed(57600);
TestSpeed(115200);
TestSpeed(230400);
Error("Bad speed");
return -1;
}
static void PrintUsage(void)
{
fprintf(stderr, "comtest - interactive program of comm port\n");
fprintf(stderr, "press [ESC] 3 times to quit\n\n");
fprintf(stderr, "Usage: comtest [-d device] [-t tty] [-s speed] [-7] [-c] [-x] [-o] [-h]\n");
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
169 / 257
fprintf(stderr, " -7 7 bit\n");
fprintf(stderr, " -x hex mode\n");
fprintf(stderr, " -o output to stdout too\n");
fprintf(stderr, " -c stdout output use color\n");
fprintf(stderr, " -h print this help\n");
exit(-1);
}
static inline void WaitFdWriteable(int Fd)
{
fd_set WriteSetFD;
FD_ZERO(&WriteSetFD);
FD_SET(Fd, &WriteSetFD);
if (select(Fd + 1, NULL, &WriteSetFD, NULL, NULL) < 0) {
Error(strerror(errno));
}
}
int main(int argc, char **argv)
{
int CommFd, TtyFd;
struct termios TtyAttr;
struct termios BackupTtyAttr;
int DeviceSpeed = B115200;
int TtySpeed = B115200;
int ByteBits = CS8;
const char *DeviceName = "/dev/ttyS0";
const char *TtyName = "/dev/tty";
int OutputHex = 0;
int OutputToStdout = 0;
int UseColor = 0;
opterr = 0;
for (;;) {
int c = getopt(argc, argv, "d:s:t:7xoch");
if (c == -1)
break;
switch(c) {
case 'd':
DeviceName = optarg;
break;
case 't':
TtyName = optarg;
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
170 / 257
break;
case 's':
if (optarg[0] == 'd') {
DeviceSpeed = SerialSpeed(optarg + 1);
} else if (optarg[0] == 't') {
TtySpeed = SerialSpeed(optarg + 1);
} else
TtySpeed = DeviceSpeed = SerialSpeed(optarg);
break;
case 'o':
OutputToStdout = 1;
break;
case '7':
ByteBits = CS7;
break;
case 'x':
OutputHex = 1;
break;
case 'c':
UseColor = 1;
break;
case '?':
case 'h':
default:
PrintUsage();
}
}
if (optind != argc)
PrintUsage();
CommFd = open(DeviceName, O_RDWR, 0);
if (CommFd < 0)
Error("Unable to open device");
if (fcntl(CommFd, F_SETFL, O_NONBLOCK) < 0)
Error("Unable set to NONBLOCK mode");
memset(&TtyAttr, 0, sizeof(struct termios));
TtyAttr.c_iflag = IGNPAR;
TtyAttr.c_cflag = DeviceSpeed | HUPCL | ByteBits | CREAD | CLOCAL;
TtyAttr.c_cc[VMIN] = 1;
if (tcsetattr(CommFd, TCSANOW, &TtyAttr) < 0)
Warning("Unable to set comm port");
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
171 / 257
TtyFd = open(TtyName, O_RDWR | O_NDELAY, 0);
if (TtyFd < 0)
Error("Unable to open tty");
TtyAttr.c_cflag = TtySpeed | HUPCL | ByteBits | CREAD | CLOCAL;
if (tcgetattr(TtyFd, &BackupTtyAttr) < 0)
Error("Unable to get tty");
if (tcsetattr(TtyFd, TCSANOW, &TtyAttr) < 0)
Error("Unable to set tty");
for (;;) {
unsigned char Char = 0;
fd_set ReadSetFD;
void OutputStdChar(FILE *File) {
char Buffer[10];
int Len = sprintf(Buffer, OutputHex ? "%.2X " : "%c", Char);
fwrite(Buffer, 1, Len, File);
}
FD_ZERO(&ReadSetFD);
FD_SET(CommFd, &ReadSetFD);
FD_SET( TtyFd, &ReadSetFD);
# define max(x,y) ( ((x) >= (y)) ? (x) : (y) )
if (select(max(CommFd, TtyFd) + 1, &ReadSetFD, NULL, NULL, NULL) < 0) {
Error(strerror(errno));
}
# undef max
if (FD_ISSET(CommFd, &ReadSetFD)) {
while (read(CommFd, &Char, 1) == 1) {
WaitFdWriteable(TtyFd);
if (write(TtyFd, &Char, 1) < 0) {
Error(strerror(errno));
}
if (OutputToStdout) {
if (UseColor)
fwrite("\x1b[01;34m", 1, 8, stdout);
OutputStdChar(stdout);
if (UseColor)
fwrite("\x1b[00m", 1, 8, stdout);
fflush(stdout);
}
}
}
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
172 / 257
if (FD_ISSET(TtyFd, &ReadSetFD)) {
while (read(TtyFd, &Char, 1) == 1) {
static int EscKeyCount = 0;
WaitFdWriteable(CommFd);
if (write(CommFd, &Char, 1) < 0) {
Error(strerror(errno));
}
if (OutputToStdout) {
if (UseColor)
fwrite("\x1b[01;31m", 1, 8, stderr);
OutputStdChar(stderr);
if (UseColor)
fwrite("\x1b[00m", 1, 8, stderr);
fflush(stderr);
}
if (Char == '\x1b') {
EscKeyCount ++;
if (EscKeyCount >= 3)
goto ExitLabel;
} else
EscKeyCount = 0;
}
}
}
ExitLabel:
if (tcsetattr(TtyFd, TCSANOW, &BackupTtyAttr) < 0)
Error("Unable to set tty");
return 0;
}

You can compile the program, download it and run

4.1.7 UDP Program

Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/net/
Driver Dm9000.c
Device Type
Device Name eth0 (not listed in /dev)
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
173 / 257
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/udptak
Test Program Name udptalk.c
Executable Name udptalk
Test Program’s Location in Board

Program:
/*
* udptalk :Example for Matrix V ;this program applies to the mini2440 system too
*
* Copyright (C) 2004 capbily - friendly-arm
* capbily@hotmail.com
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdio.h>
#define BUFLEN 255
int main(int argc, char **argv)
{
struct sockaddr_in peeraddr, /*remote IP and socket socket address*/
localaddr;/*Local socket address*/
int sockfd;
char recmsg[BUFLEN+1];
int socklen, n;
if(argc!=5){
printf("%s <dest IP address> <dest port> <source IP address> <source port>\n", argv[0]);
exit(0);
}
sockfd = socket(AF_INET, SOCK_DGRAM, 0);
if(sockfd<0){
printf("socket creating err in udptalk\n");
exit(1);
}
socklen = sizeof(struct sockaddr_in);
memset(&peeraddr, 0, socklen);
peeraddr.sin_family=AF_INET;
peeraddr.sin_port=htons(atoi(argv[2]));
if(inet_pton(AF_INET, argv[1], &peeraddr.sin_addr)<=0){
printf("Wrong dest IP address!\n");
exit(0);
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
174 / 257
}
memset(&localaddr, 0, socklen);
localaddr.sin_family=AF_INET;
if(inet_pton(AF_INET, argv[3], &localaddr.sin_addr)<=0){
printf("Wrong source IP address!\n");
exit(0);
}
localaddr.sin_port=htons(atoi(argv[4]));
if(bind(sockfd, &localaddr, socklen)<0){
printf("bind local address err in udptalk!\n");
exit(2);
}
if(fgets(recmsg, BUFLEN, stdin) == NULL) exit(0);
if(sendto(sockfd, recmsg, strlen(recmsg), 0, &peeraddr, socklen)<0){
printf("sendto err in udptalk!\n");
exit(3);
}
for(;;){
/*recv&send message loop*/
n = recvfrom(sockfd, recmsg, BUFLEN, 0, &peeraddr, &socklen);
if(n<0){
printf("recvfrom err in udptalk!\n");
exit(4);
}else{
/*received data*/
recmsg[n]=0;
printf("peer:%s", recmsg);
}
if(fgets(recmsg, BUFLEN, stdin) == NULL) exit(0);
if(sendto(sockfd, recmsg, strlen(recmsg), 0, &peeraddr, socklen)<0){
printf("sendto err in udptalk!\n");
exit(3);
}
}
}

Test:

Please compile “udptalk.c”, there are two executables under

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
175 / 257
“/opt/FriendlyARM/mini2440/linux/examples/udptalk”, one x86-udptalk and the other

arm-udptalk. The make command will generate both. Please download “arm-udptalk” to the

board (the preinstalled Linux doesn’t have this), in our example, the host IP is 192.168.1.108

and the board’s IP is 192.168.1.230.

Type the following command on your host:

#./x86-udptalk 192.168.1.230 2000 192.168.1.108 2000

Type the following command on your board

#arm-udptalk 192.168.1.108 2000 192.168.1.230 2000

You will see the following results:

x86-udptalk running on host

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
176 / 257
arm-udptalk running on board

4.1.8 Math Libraries

Program Description:
Source Code Location
Driver
Device Type
Device Name
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/math
Test Program Name mathtest.c
Executable Name mathtest
Test Program’s Location in Board
Note: to utilize math libraries you need to include its header file “math.h” and add an compile option libm
Program:
#include <stdio.h>
#include <stdlib.h>
#include <math.h> ; note: including this header file is a must

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
177 / 257
int main(void)
{
double a=8.733243;
printf("sqrt(%f)=%f\n", a, sqrt(a));
return 0;
}

Makefile:
CROSS=arm-linux-
all: mathtest
#It includes the math library “libm”, marked in red
mathtest:
$(CROSS)gcc -o mathtest main.c -lm
clean:
@rm -vf mathtest *.o *~

4.1.9 Thread Programming

Program Description:
Source Code Location
Driver
Device Type
Device Name
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/pthread
Test Program Name pthread_test.c
Executable Name pthread_test
Test Program’s Location in Board
Note: to utilize math libraries you need to include its header file “pthread.h” and add an compile option
libpthread
Program:
#include<stddef.h>
#include<stdio.h>
#include<unistd.h>
#include"pthread.h" ; including this header is a must
void reader_function(void);
void writer_function(void);
char buffer;
int buffer_has_item=0;

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
178 / 257
pthread_mutex_t mutex;
main()
{
pthread_t reader;
pthread_mutex_init(&mutex,NULL);
pthread_create(&reader,NULL,(void*)&reader_function,NULL);
writer_function();
}
void writer_function(void)
{
while(1)
{
pthread_mutex_lock(&mutex);
if(buffer_has_item==0)
{
buffer='a';
printf("make a new item\n");
buffer_has_item=1;
}
pthread_mutex_unlock(&mutex);
}
}
void reader_function(void)
{
while(1)
{
pthread_mutex_lock(&mutex);
if(buffer_has_item==1)
{
buffer='\0';
printf("consume item\n");
buffer_has_item=0;
}
pthread_mutex_unlock(&mutex);
}
}
Makefile:
CROSS=arm-linux-
all: pthread
#note: it includes the thread library libphread marked in red
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
179 / 257
pthread:
$(CROSS)gcc -static -o pthread main.c -lpthread
clean:
@rm -vf pthread *.o *~

4.1.10 Pipe Programming – Manipulate LED via WEB

Program Description:
Source Code Location
Driver
Device Type
Device Name
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/led-player
Test Program Name led-player.c
Executable Name led-player
Test Program’s Location in Board
Note: to utilize math libraries you need to include its header file “pthread.h” and add an compile option
libpthread
Program:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/time.h>
#include <string.h>
static int led_fd;
static int type = 1;
static void push_leds(void)
{
static unsigned step;
unsigned led_bitmap;
int i;
switch(type) {
case 0:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
180 / 257
if (step >= 6) {
step = 0;
}
if (step < 3) {
led_bitmap = 1 << step;
} else {
led_bitmap = 1 << (6 - step);
}
break;
case 1:
if (step > 255) {
step = 0;
}
led_bitmap = step;
break;
default:
led_bitmap = 0;
}
step++;
for (i = 0; i < 4; i++) {
ioctl(led_fd, led_bitmap & 1, i);
led_bitmap >>= 1;
}
}
int main(void)
{
int led_control_pipe;
int null_writer_fd; // for read endpoint not blocking when control process exit
double period = 0.5;
led_fd = open("/dev/leds0", 0);
if (led_fd < 0) {
led_fd = open("/dev/leds", 0);
}
if (led_fd < 0) {
perror("open device leds");
exit(1);
}
unlink("/tmp/led-control");
mkfifo("/tmp/led-control", 0666);
led_control_pipe = open("/tmp/led-control", O_RDONLY | O_NONBLOCK);
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
181 / 257
if (led_control_pipe < 0) {
perror("open control pipe for read");
exit(1);
}
null_writer_fd = open("/tmp/led-control", O_WRONLY | O_NONBLOCK);
if (null_writer_fd < 0) {
perror("open control pipe for write");
exit(1);
}
for (;;) {
fd_set rds;
struct timeval step;
int ret;
FD_ZERO(&rds);
FD_SET(led_control_pipe, &rds);
step.tv_sec = period;
step.tv_usec = (period - step.tv_sec) * 1000000L;
ret = select(led_control_pipe + 1, &rds, NULL, NULL, &step);
if (ret < 0) {
perror("select");
exit(1);
}
if (ret == 0) {
push_leds();
} else if (FD_ISSET(led_control_pipe, &rds)) {
static char buffer[200];
for (;;) {
char c;
int len = strlen(buffer);
if (len >= sizeof buffer - 1) {
memset(buffer, 0, sizeof buffer);
break;
}
if (read(led_control_pipe, &c, 1) != 1) {
break;
}
if (c == '\r') {
continue;
}
if (c == '\n') {
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
182 / 257
int tmp_type;
double tmp_period;
if (sscanf(buffer,"%d%lf", &tmp_type, &tmp_period) == 2) {
type = tmp_type;
period = tmp_period;
}
fprintf(stderr, "type is %d, period is %lf\n", type, period);
memset(buffer, 0, sizeof buffer);
break;
}
buffer[len] = c;
}
}
}
close(led_fd);
return 0;
}

“make” will generate a led-player executable which is run as a server under “/sbin”. The

leds.cgi gateway source code is under “/www/leds.cgi” on the board. It is a shell script and

can be invoked by leds.html as an action. Here is the shell file


leds.cgi:
#!/bin/sh
type=0
period=1
case $QUERY_STRING in
*ping*)
type=0
;;
*counter*)
type=1
;;
*stop*)
type=2
;;
esac

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
183 / 257
case $QUERY_STRING in
*slow*)
period=0.25
;;
*normal*)
period=0.125
;;
*fast*)
period=0.0625
;;
esac
/bin/echo $type $period > /tmp/led-control
echo "Content-type: text/html; charset=gb2312"
echo
/bin/cat led-result.template
exit 0

4.1.11 “Hello, World” C++ Program

Program Description:
Source Code Location
Driver
Device Type
Device Name
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/C++
Test Program Name cplus.c
Executable Name cplus
Test Program’s Location in Board
Note: to utilize math libraries you need to include its header file “pthread.h” and add an compile option
libpthread
Program:
#include <iostream>
#include <cstring>
using namespace std;
class String
{ private:
char *str;
public:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
184 / 257
String(char *s)
{
int lenght=strlen(s);
str = new char[lenght+1];
strcpy(str, s);
}
~String()
{
cout << "Deleting str.\n";
delete[] str;
}
void display()
{
cout << str <<endl;
}
};
int main(void)
{
String s1="I like FriendlyARM.";
cout << "s1=";
s1.display();
return 0;
double num, ans;
cout << "Enter num:";
}

4.2 Sample Linux Driver Programs


The “Hello,World” introduced in the previous section runs in user mode. Now we will

present a program “Hello, World” that runs in kernel mode and take this as an example to

show you how to write a driver

4.2.1 Hello Module

Program Description:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
185 / 257
Source Code Location
Driver
Device Type
Device Name
Test Program Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Test Program Name Mini2440_hello_module.c
Executable Name
Test Program’s Location in Board
Note: mounting this driver will not create a device node under /dev
Program:
#include <linux/kernel.h>
#include <linux/module.h>
static int __init mini2440_hello_module_init(void)
{
printk("Hello, Mini2440 module is installed !\n");
return 0;
}
static void __exit mini2440_hello_module_cleanup(void)
{
printk("Good-bye, Mini2440 module was removed!\n");
}
module_init(mini2440_hello_module_init);
module_exit(mini2440_hello_module_cleanup);
MODULE_LICENSE("GPL");

(1) Integrate Hello,Module into Kernel and Compile

Please follow the steps below to include the module into the kernel and compile (Note:

actually the following steps have been set up and you only need to directly compile it):

Step1: configure “Kconfig”, add this module in the drivers and it will appear in make

menuconfig Open “linux-2.6.32.2/drivers/char/Kconfig” add lined marked in yellow

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
186 / 257
Save and exit. When you run “make menuconfig” in the linux-2.6.32.2 directory you will

see your item in Device Drivers -> Character devices. Press the space key it will be marked

“<M>”. This means this souce code will be compiled as a module. Press the space key again

it will be marked “<*>” and it will be compiled into the kernel. Here we chose “<M>”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
187 / 257
Step2: the previous step still cannot include it into the kernel when compiling. You need

tolinkthe kernel configuration to the source code in “makefile”. Open

“linux-2.6.32.2/drivers/char/Makefile”, add the marked line shown below, save and exit

Step3: go back to the linux-2.6.32.2 source code directory, run “make modules” a

“mini2440_hello_module.ko” module will be generated. Prior to executing “make modules”,

you need to run “make zImage”. This only needs to be run once.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
188 / 257
(2) Download Hello, Module to Board

Please transfer “mini2440_hello_module.ko” to the board via FTP and move it to

“/lib/modules/2.6.29.4-FriendlyARM”

#modprobe mini2440_hello_module

You can observe that the module has been loaded (note: to load a module with “modprobe”

you don’t need to add the “ko” extension)

Run the following command and you will observe that the module has been unmounted

#rmmod mini2440_hello_module

Note: to load a module correctly, you need to move your module to the boards’s

“/lib/modules/2.6.29.4-FriendlyARM” directory. In addition, if your kernel’s version is

different from the example here please create a new directory for your kernel. Here it is

/lib/modules/2.6.29.4-FriendlyARM.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
189 / 257
4.2.2 LED Driver
In this example we will present a LED driver program which can drive the 4 LEDs on the

board
LED IO Register CPU Pin
LED1 GPB5 K2
LED2 GPB6 L5
LED3 GPB7 K7
LED4 GPB8 K5

To manipulate an IO you need to set up its register by invoking some functions and

macros. Here we used “readl” and “writel”. They can directly read and write corresponding

registers. Besides you need some other driver related functions too such as misc_register,

module_init, module_exit and filling the file_operations structure.


Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Driver Mini2440_leds.c
Device Type Misc, auto generated
Device Name /dev/leds
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/leds
Test Program Name led.c
Executable Name Led
Test Program’s Location in Board
Note: the LED driver has been compiled into the kernel by default and cannot be loaded via insmod
Program:
void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
{
void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long mask;

unsigned long con;


unsigned long flags;
if (pin < S3C2410_GPIO_BANKB) { mask = 1 << S3C2410_GPIO_OFFSET(pin); }
else { mask = 3 << S3C2410_GPIO_OFFSET(pin)*2; }

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
190 / 257
switch (function) { case S3C2410_GPIO_LEAVE: mask = 0; function = 0; break;
case S3C2410_GPIO_INPUT:
case S3C2410_GPIO_OUTPUT:
case S3C2410_GPIO_SFN2:
case S3C2410_GPIO_SFN3: if (pin < S3C2410_GPIO_BANKB)
{ function -= 1; function &= 1; function <<= S3C2410_GPIO_OFFSET(pin); }
else { function &= 3; function <<= S3C2410_GPIO_OFFSET(pin)*2; }
}

/* modify the specified register wwith IRQs off */


local_irq_save(flags);
con = __raw_readl(base + 0x00);
con &= ~mask;
con |= function;
__raw_writel(con, base + 0x00);
local_irq_restore(flags); }

The driver’s source code is as follows:

#include <linux/miscdevice.h>
#include <linux/delay.h>
#include <asm/irq.h>
//#include <mach/regs-gpio.h>
#include <mach/hardware.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/moduleparam.h>
#include <linux/slab.h>
#include <linux/errno.h>
#include <linux/ioctl.h>
#include <linux/cdev.h>
#include <linux/string.h>
#include <linux/list.h>
#include <linux/pci.h>
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
191 / 257
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <asm/unistd.h>
#include <mach/map.h>
#include <mach/regs-clock.h>
#include <mach/regs-gpio.h>
#include <plat/gpio-cfg.h>

#include <mach/gpio-bank-e.h>
#include <mach/gpio-bank-k.h>
#define DEVICE_NAME "leds"

static unsigned long led_table [] = { S3C2410_GPB5, S3C2410_GPB6, S3C2410_GPB7,


S3C2410_GPB8, };
static unsigned int led_cfg_table [] = { S3C2410_GPB5_OUTP, S3C2410_GPB6_OUTP, S3C2410_GPB7_OUTP,
S3C2410_GPB8_OUTP, };

static int sbc2440_leds_ioctl( struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg)
{ switch(cmd)
{ case 0: case 1: if (arg > 4) { return -EINVAL; }s3c2410_gpio_setpin(led_table[arg], !cmd); return 0; default:
return -EINVAL; }
}

static struct file_operations dev_fops = { .owner = THIS_MODULE, .ioctl = sbc2440_leds_ioctl, };


static struct miscdevice misc = { .minor = MISC_DYNAMIC_MINOR, .name = DEVICE_NAME, .fops =
&dev_fops, };
static int __init dev_init(void)
{ int ret;
int i;
for (i = 0; i < 4; i++) { s3c2410_gpio_cfgpin(led_table[i], led_cfg_table[i]); s3c2410_gpio_setpin(led_table[i],
0); }
ret = misc_register(&misc);
printk (DEVICE_NAME"\tinitialized\n"); return ret; }

static void __exit dev_exit(void)


{ misc_deregister(&misc); }
module_init(dev_init);
module_exit(dev_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("FriendlyARM Inc.");
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
192 / 257
4.2.3 User Button Driver

Program Description:
Source Code Location /opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
Driver Mini2440_buttons.c
Device Type Misc, auto generated
Device Name /dev/buttons
Test Program Source Code Location /opt/FriendlyARM/mini2440/examples/buttons
Test Program Name buttons_test.c
Executable Name buttons
Test Program’s Location in Board
Note: the button driver has been compiled into the kernel by default and cannot be loaded via insmod
Key IO Interrupt
K1 GPG0 EINT8
K2 GPG3 EINT11
K3 GPG5 EINT13
K4 GPG6 EINT14
K5 GPG7 EINT15
K6 GPG11 EINT19
Program:
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/delay.h>
#include <linux/poll.h>
#include <linux/irq.h>
#include <asm/irq.h>
#include <asm/io.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include <mach/hardware.h>
#include <linux/platform_device.h>
#include <linux/cdev.h>
#include <linux/miscdevice.h>
#include <mach/map.h>

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
193 / 257
#include <mach/regs-clock.h>
#include <mach/regs-gpio.h>
#include <plat/gpio-cfg.h>
#include <mach/gpio-bank-n.h>
#include <mach/gpio-bank-l.h>
#define DEVICE_NAME "buttons"
struct button_irq_desc {
int irq;
int number;
char *name;
};

static struct button_irq_desc button_irqs [] = { {IRQ_EINT8 , S3C2410_GPG0 , S3C2410_GPG0_EINT8 , 0,


"KEY0"}, {IRQ_EINT11, S3C2410_GPG3 , S3C2410_GPG3_EINT11 , 1, "KEY1"}, {IRQ_EINT13,
S3C2410_GPG5 , S3C2410_GPG5_EINT13 , 2, "KEY2"}, {IRQ_EINT15, S3C2410_GPG7 ,
S3C2410_GPG7_EINT15 , 3, "KEY3"}, {IRQ_EINT14, S3C2410_GPG6 , S3C2410_GPG6_EINT14 , 4,
"KEY4"},
{IRQ_EINT19, S3C2410_GPG11, S3C2410_GPG11_EINT19, 5, "KEY5"}, }; static volatile char key_values []
= {'0', '0', '0', '0', '0', '0'}; static DECLARE_WAIT_QUEUE_HEAD(button_waitq); static volatile int ev_press =
0;

static irqreturn_t buttons_interrupt(int irq, void *dev_id)


{ struct button_irq_desc *button_irqs = (struct button_irq_desc *)dev_id; int down; // udelay(0);
down = !s3c2410_gpio_getpin(button_irqs->pin);
if (down != (key_values[button_irqs->number] & 1)) { // Changed
key_values[button_irqs->number] = '0' + down;
ev_press = 1;
wake_up_interruptible(&button_waitq); }
return IRQ_RETVAL(IRQ_HANDLED); }

static int s3c24xx_buttons_open(struct inode *inode, struct file *file)


{ int i;
int err;
for (i = 0; i < sizeof(button_irqs)/sizeof(button_irqs[0]); i++) { err = request_irq(button_irqs[i].irq,
buttons_interrupt, IRQ_TYPE_EDGE_BOTH, button_irqs[i].name, (void *)&button_irqs[i]); if (err) break;
}
if (err) { i--; for (; i >= 0; i--) { disable_irq(button_irqs[i].irq);
free_irq(button_irqs[i].irq, (void *)&button_irqs[i]); }
return -EBUSY; }
ev_press = 1;
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
194 / 257
return 0; }

static int s3c24xx_buttons_close(struct inode *inode, struct file *file)


{ int i;
for (i = 0; i < sizeof(button_irqs)/sizeof(button_irqs[0]); i++)
{ free_irq(button_irqs[i].irq, (void *)&button_irqs[i]); }
return 0; }

static int s3c24xx_buttons_read(struct file *filp, char __user *buff, size_t count, loff_t *offp)
{ unsigned long err;
if (!ev_press) { if (filp->f_flags & O_NONBLOCK) return -EAGAIN;
else wait_event_interruptible(button_waitq, ev_press); }
ev_press = 0;
err = copy_to_user(buff, (const void *)key_values, min(sizeof(key_values), count)); return err ? -EFAULT :
min(sizeof(key_values), count); }

static unsigned int s3c24xx_buttons_poll( struct file *file, struct poll_table_struct *wait)
{ unsigned int mask = 0; poll_wait(file, &button_waitq, wait); if (ev_press) mask |= POLLIN | POLLRDNORM;
return mask; }

static struct file_operations dev_fops = { .owner = THIS_MODULE, .open = s3c24xx_buttons_open, .release =


s3c24xx_buttons_close, .read = s3c24xx_buttons_read, .poll = s3c24xx_buttons_poll, };

static struct miscdevice misc = { .minor = MISC_DYNAMIC_MINOR, .name = DEVICE_NAME, .fops =


&dev_fops, };

static int __init dev_init(void) { int ret; ret = misc_register(&misc); printk (DEVICE_NAME"\tinitialized\n");
return ret; }

static void __exit dev_exit(void) { misc_deregister(&misc); }module_init(dev_init); module_exit(dev_exit);


MODULE_LICENSE("GPL");
MODULE_AUTHOR("FriendlyARM Inc.");

4.3 Compile Qtopia-2.2.0


To make it easy for users we compile all the steps into one build script. Executing this

script will compile thewhole qtopia platform and its utilities. You can start them by
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
195 / 257
commanding “run”. The compiling scripts for x86 and arm are a little bit different.

4.3.1 Uncompress and Install Source Code


Please refer to 3.3.1

4.3.2 Compile and Run Qtopia-2.2.0 for X86


All our programs have been verified on Fedora9. We didn’t try them on other platforms.

We strongly recommend our users to use Fedora9 and download it from

ftp://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/i386/iso/Fedora-9-i386

-DVD.iso.

Enter the working directory and run the following command

#cd /opt/FriendlyARM/mini2440/x86-qtopia

#./build-all (this process takes about 30 minutes)

Note: ./build-all will automatically compile the complete Qtopia and its embedded web

browser. You can execute “./build” first and then “./build-konq” to compile them separately.

To run your qtopia you can type the command below:

#./run

You will see the following screen

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
196 / 257
Follow the default options to continue and you will see the following screen
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
197 / 257
4.3.3 Compile and Run Qtopia-2.2.0 for ARM
Please make sure your compiler is arm-linux-gcc-4.4.3 and platform is Fedora 9. Enter the

working directory and type the command below

#cd /opt/FriendlyARM/mini2440/arm-qtopia

#./build-all (this process takes about 30 minutes)

#./mktarget (this makes a file system image and will generate “target-qtopia-konq.tgz”)

Note: “./build-all” will automatically compile a complete Qtopia system and the web

browser and generate Jpeg, GIF, PNG image files. You can execute “./build” first and then

“./build-konq” to compile them separately.

To remove your old Qtopia system you just need to delete all the files under “/opt”. Then

you can uncompress your target-qtopia-konq.tgz to the board’s root directory via a flash

drive. In our example we had it under /home/plg. Please run the command below:

#tar xvzf /home/plg/target-qtopia-konq.tgz –C /


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
198 / 257
“C” means “Change” and “/” after “C” means it will be uncompressed to the root directory.

Afteryouare done, reboot your board and you will see that all your GUI components are in

English now and there is a browser under the “FriendlyARM” tag. This is your own Qtopia.

Note: your new system may load parameters from “/etc/pointercal”, you can delete that file

too and will be directed to the calibration screen after reboot.

The above procedure is a simplied one. We hide all technical details in the build-all script

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
199 / 257
you can look into it for more details

4.4 Compile QtE-4.6.3


4.4.1 Uncompress and Install Source Code
Please refer to 3.3.1

4.4.2 Compile and Run QtE-4.6.3 for ARM


Note: please use our arm-linux-gcc-4.4.3 and Fedora9 to compile. We offered a build-all

script for users to easily compile QtE-4.6.3. Please enter the source code directory and type

the following command:

#cd /opt/FriendlyARM/mini2440/arm-qte-4.6.3

#./build-all

The build process takes a while. And after it is done, please run the mktarget script and a

target-qte-4.6.3.tgz will be generated. Please follow the command below:

#tar xvzf target-qte-4.6.3.tgz –C /

A Trolltech directory will be generated under “/usr/local/”, which includes all needed

libraries and executables. Since our shipped Linux already includes QtE-4.6.3, to test your

build you can delete the one on your board by “rm” the whole “/usr/local/Trolltech”

directory.

Before running QtE-4.6.3, please stop the current running Qtopia-2.2.0. Go to “Settings” ->

“Shutdown” and you will see the following screen. Click on “Terminate Server” to shut
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
200 / 257
down Qtopia-2.2.0.

Or you can shut it down: either by commenting out the qtopia option in the init

script ”/etc/init.d/rcS” and rebooting the system or commanding “kill all” to terminate related

process (there are many options: you can even delete the whole “/opt”, shut down

qtopia-2.2.0 and run “qt4”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
201 / 257
Chapter 5 Set up WinCE6 Development Environment

5.1 Set up Windows CE6 Development Environment


Note: the following softare and installation steps are based on Windows 7 (flagship version).

We recommend users to copy the installation software to your hard disk to install

Installation of Windows CE 6.0 is complicated and has lots of requirements for hardware

therefore we strongly suggest users exactly follow our installation steps:

Below are the basic system requirements

CPU: Intel Core Duo E8400

RAM: DDR2 4GB

Hard Disk: 500GB

Software List (We don’t offer Windows Embedded 6.0 CE 6 installation files and users

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
202 / 257
may need to download its trial version from Microsoft’s website):

Visual Studio 2005

(trial version download website:

http://download.microsoft.com/download/e/1/4/e1405d9e-47e3-404c-8b09-489437b27fb0/E

n_vs_2005_Pro_90_Trial.img )

Visual Studio 2005 Service Pack 1(file name: VS80sp1-KB926601-X86-ENU.exe)

Download website:

http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39d-37b

af6b5b1dc&displaylang=en

Visual Studio 2005 Service Pack 1 Update for Windows Vista (文件名:

VS80sp1-KB932232-X86-ENU.exe)

Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyID=90E2942D-3AD1-4873-A2EE

-4ACC0AACE5B6&displaylang=en )

Visual Studio 2005 Service Pack 1 ATL Security Update

(VS80sp1-KB971090-X86-INTL.exe)

Download website:

http://www.microsoft.com/downloads/details.aspx?familyid=7C8729DC-06A2-4538-A90D-

FF9464DC0197&displaylang=en

Windows Embedded CE 6.0


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
203 / 257
Trial version download website:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7e286847-6e

06-4a0c-8cac-ca7d4c09cb56

Windows Embedded CE 6.0 Platform Builder Service Pack 1

Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyId=BF0DC0E3-8575-4860-A8E3-

290ADF242678&displaylang=en

Windows Embedded CE 6.0 R2

Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyId=F41FC7C1-F0F4-4FD6-9366-

B61E0AB59565&displaylang=en

Windows Embedded CE 6.0 R3

Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyID=BC247D88-DDB6-4D4A-A5

95-8EEE3556FE46&amp;displaylang=ja&displaylang=en

Tencent QQ (third part software)

Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyID=527042f7-bb5b-4831-a6ad-50

81808824ec&displaylang=en

WesttekFileViewers6.exe(office file manager, third part software)


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
204 / 257
Download website:

http://www.microsoft.com/downloads/details.aspx?FamilyID=d2fd14eb-7d5c-428b-951c-34

3f910047c1&displaylang=en

The above list also indicates the order of installing these software components:Visual

Studio 2005and its patches first, then Windows CE 6.0 and its patches and finally the third

party software

Note: the Platform Builder for Windows CE 6.0 is different from its previous versions such

as Windows CE 5.0/4.2. It is not a standalone software application but a plugin of VS2005

and therefore depends on VS2005. You need to install VS2005 first. All the configurations

and compilation described below are with VS2005.

Here are the steps:

5.1.1 Install Visual Studio 2005 and Patches


Step1:enter the Visual Studio 2005 directory and double click on “setup.exe”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
205 / 257
Step2:click on “Install Visual Studio 2005” to continue

Step3:click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
206 / 257
Step4: check the redly marked box and enter your serial number, click on “Next” to continue

Step5: select your installation features, please check “Full” and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
207 / 257
Step6: the following screen kicks off the installation of Visual Studio 2005

Step7: after Visual Studio 2005 installation is done please click on “Finish” on the dialog

shown below

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
208 / 257
Click on “Exit” on the dialog shown below

Step8: now we will begin to install “Visual Studio 2005 Service Pack 1”. Double click on

“VS80sp1-KB926601-X86-ENU.exe” to begin installation

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
209 / 257
Step9: click on “OK” on the following dialog

Step10: click on “I accept” on the license dialog

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
210 / 257
Step11: the following dialog kicks off the installation. The whole process may take a while.

Step12: after installation is done click on “OK” on the following dialog

Step13: now we will begin to install the second patch “Visual Studio 2005 Service Pack 1

Update for Windows Vista”. Double click on “VS80sp1-KB932232-X86-ENU.exe”

Step14: click on “OK” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
211 / 257
Step15: on the following license dialog click on “I accept”

Step16: the following screen kicks off the installation. This may take a while

Step17: after the installation is done click on “OK” to finish

Step18: now we will begin to install the third patch “Visual Studio 2005 Service Pack 1 ATL
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
212 / 257
Security Update”. Double click on “VS80sp1-KB971090-X86-INTL.exe”

Step19: click on “OK” to continue

Step20: on the license dialog click on “I accept”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
213 / 257
Step21: the following screen kicks off the installation. This may take a while

Step22: after the installation is done click on “OK” to finish

We have completed our installation of Visual Studio 2005 and its patches on Windows7

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
214 / 257
5.1.2 Install WindowsCE 6.0 and Patches
This section will guide you through the steps on how to install Windows CE 6.0 Platform

Builder.

Note: to install Windows CE 6.0 and its patches on Windows 7 you need to do it as

administrator. You cannot just double click on the setup.exe to install. Please strictly follow

the steps below

Step1: go to “Start”->“Programs”->“Accessories”, locate the command line utility, right

click on it and select “run as administrator”

Step2: enter the installation directory, type “Windows Embedded CE 6.0.msi” and press

“return”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
215 / 257
Step3: click on “Next” to continue

Step4: type the product key and click on “Next”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
216 / 257
Step5: check “I accept” on the license dialog and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
217 / 257
Step6: follow the options marked redly as below and click on “Next” to continue

Step7: follow the options mared redly as below and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
218 / 257
Step8:click on “Install” to continue

Step9: the installation is kicked off and it may take a while

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
219 / 257
Step10: after the installation is done click on “Finish” to complete

Step11: now we will begin to install a patch “Windows Embedded CE 6.0 Platform Builder

Service Pack 1.msi”.Open the command line utility as administrator, enter the directory, type

“Windows Embedded CE 6.0 Platform Builder Service Pack 1.msi” and press “return”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
220 / 257
Step12: click on “Next” to continue

Step13: check “I accept” and click on “Next” to continue

Step14: click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
221 / 257
Step15: the installation is kicked off and it may take a while

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
222 / 257
Step16: after the installation is done, click on “Finish” to complete

Step17: now we will begin to install the second patch “Windows Embedded CE 6.0 R2.msi”.

Please follow the previous steps to launch the command line utility, type “Windows

Embedded CE 6.0 R2.msi” and press “return”

Note: some users may download a “Windows Embedded CE 6.0 R2.msi” which is about

50MB. But this is not a complete installation file. We suggest our users use our R2 patch

which is about 1.01GB

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
223 / 257
Step18: click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
224 / 257
Step19: check “I accept” and click on “Next” to continue

Step20: click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
225 / 257
Step21: click on “Next” to continue

Step22: the installation process is kicked off and this may take a while

Step23: after the installation is done, click on “Finish” to complete

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
226 / 257
Step24: now we will begin to install R3. Please follow the previous steps to launch the

command line utility, type “Windows Embedded CE 6.0 R2.msi” and press “enter”

Note: some users may download a “Windows Embedded CE 6.0 R3” which is an image file.

In order for users to use it more conveniently we make it a directory which contains 166 files

that are about 1.14GB

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
227 / 257
Step25: click on “Next” to continue

Step26: check “I accept” and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
228 / 257
Step27: click on “Next” to continue

Step28: the installation is kicked off and it may take a while

Step29: after the installation is done, click on “Finish” to complete

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
229 / 257
5.1.3 Install Tencent QQ (A Third Party Messenger)
Windows CE 6.0 R3 includes some third party software such as Tencent QQ and File

Viewers. We have burned it into our shipped CD and you can also download it from the

following website:

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=bc247d88-dd

b6-4d4a-a595-8eee3556fe46#filelist .

We will intall QQ as an example for you.

Step1: enter the QQ directory, double click on the “setup.exe” executable.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
230 / 257
Step2: click on “Next” to continue

Step3: follow the default options and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
231 / 257
Step4: check “I agree” on the license dialog and click on “Next” to continue

Step5: click on “Next” to continue

Step6: the installation is kicked off.

Step7: click on “Close” to complete

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
232 / 257
5.1.4 Install BSP and Sample Programs
The Mini2440 BSP and it project file can be installed by running

“mini2440-ce6-suite-1033.exe” (1033 is the date when we released it. Our latest file one may

have a different date, please refer to our CD). Users can download this file from

http://www.arm9.net . Below are the steps to follow

Step1: locate the “mini2440-ce66-suite-1033.exe” executable and double click on it

Step2: follow the default options and click on “Install” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
233 / 257
Step3: the installation is kicked off and very short since the file is very small

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
234 / 257
Step4: after the installation is done, click on “Close” to complete

A 2440 BSP directory will be created under “WinCE600\PLATFORM”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
235 / 257
Three directories for three languages will be created under “WinCE600\OSDesigns”:

Mini2440 - Simplified Chinese

Mini2440-en - English

Mini2440-with-QQ – this is a Chinese version with QQ

Now you have successfully set up your Windows CE 6.0 development environment.

5.2 Configure and Compile WinCE6.0 Kernel and Bootloader


Configuring a Windows CE6 kernel is very complicated and users may easily to fail if

they don’t do it carefully. Therefore we prepared a kernel project for users’ reference. You

can follow the steps below to open and compile it. There is a ready image under

“images\WindowsCE6” in the shipped CD

5.2.1 Compile Kernel


Please launch VS2005 to begin compiling the mini2440 BSP.

Step1: go to “Start”->“Programs”->“Microsoft Visual Studio 2005”-> “Microsoft Visual

Studio 2005”

Step2: click on “Exit Visual Studio” on the following dialog

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
236 / 257
Step3: Go to “Start”->“Programs”->“VS2005”->“VS2005”, right click on it and you will see

the following dialog. Select “Property”. We need to run it as administrator.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
237 / 257
Step4: in the dialog shown below, click on “compatibility” and check the option shown and

click on “OK”

Step5: go to “Start”->“Programs”->“VS2005”->“VS2005” and click on “Continue” and you

will run it as administrator

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
238 / 257
Step6: now you will see the initial interface of VS2005

Step7: Go to “File->Open->Project/Solution…”

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
239 / 257
Step8: locate your mini2440 (in this example it was C:\WINCE600\OSDesigns\Mini2440),

click on “Open”

Step9: moments later after the mini2440 project is loaded you will see the following dialog

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
240 / 257
Step10: go to “Build->Advanced Build Commands->Clean Sysgen” to begin compilation.

This process may take a while

Step11: after the compilation is done, an NK.bin and an NK.nb0 will be generated under the

following directory:

C:\WINCE600\OSDesigns\Mini2440\Mini2440\RelDir\Mini2440_ARMV4I_Release

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
241 / 257
5.2.2 Bootloader
In the Mini2440 system the bootloader for WindowsCE5/6 is nboot which is compiled

with ADS.

Origianlly the nboot was from Samsung and we made some improvements. Our version

has the following features:

Support boot logo

Support process bar for WinCE kernel loading

Rapid WinCE Booting

Nboot doesn’t support file buring and can only read files: BootLogo and the WinCE.

Nboot is easy to be customized. You can set its bootlogo’ position, background and process

bar’s color, length and width in “options.h”.

//define LCD type, the default is T35 3.5”LCD

#define LCD_N35

//#define LCD_T35

//#define LCD_L80

//#define LCD_X35

//#define LCD_A70

//#define LCD_VGA1024768

//define background color

#define BACKGROUND_R 0x00


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
242 / 257
#define BACKGROUND_G 0x00

#define BACKGROUND_B 0x7F

//define process bar’s color

#define PROGRESS_BAR_R 0xFF

#define PROGRESS_BAR_G 0xFF

#define PROGRESS_BAR_B 0x00

//define bootlogo’s position

#define LOGO_POS_TOP 0

#define LOGO_POS_LEFT 0

//define process bar’s position, length and width

#define PROGRESS_BAR_TOP 260

#define PROGRESS_BAR_LEFT 20

#define PROGRESS_BAR_WIDTH 200

#define PROGRESS_BAR_HEIGHT 12

Compiling Nboot

In your WindowsCE6.0 directory please remove the “read only” property and open it with

ADS1.2. Click on “File -> Open” to open “nboot.mcp”.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
243 / 257
Click on “Project -> Make” to begin compilation.

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
244 / 257
After it is done an nboot.bin will be generated.

5.2.3 Configure LCD Type and Serial Port in BSP


Our BSP currently supports the following LCD models:

NEC 3.5”LCD with touch screen

TPO 3.5”LCD with touch screen

Inonux 7”LCD with touch screen

Sharp 8”LCD (or compatible models) with touch screen

LCD2VGA conversion module: 1024x768

You can define your LCD type by setting up the LCD_TYPE value in

“MINI2440\SRC\INC\options.h”:

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
245 / 257
#define LCD_N35 – for NEC3.5”LCD by default

//#define LCD_T35

//#define LCD_L80

//#define LCD_A70

//#define LCD_VGA1024768

Users can modify the serial port function in “options.h” too:

// --- by customer

#define KITL_NONE – default setting

//#define KITL_SERIAL_UART0

//#define KITL_SERIAL_UART1

The default setting here is to make it a common serial port (there are some issues now to

use COM1 as a common serial port). If you want to set it as an output for debugging

information you can follow the changes below:

//#define KITL_NONE

#define KITL_SERIAL_UART0

//#define KITL_SERIAL_UART1

5.2.4 Create SDK


After you installed VS2005 on your PC but didn’t install Windows CE 6.0 Platform

Builder you must have a SDK to develop Mini2440 applications with VS2005. It is very
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
246 / 257
similar to the SDK needed for Embedded Visual C++.

After you compile your kernel you can set up a SDK via VS2005. Note: this SDK is only

for VS2005 not for other utilities such as EVC and VS2008. Please follow the steps below to

do it:

Step1: start VS2005, open your project file mini2440, right click on “Mini2440-CE6-SDK”

and select “Build”

Step2: moments later the SDK will be built

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
247 / 257
Step3: go to “C:\WINCE600\OSDesigns\mini2440\mini2440\SDKs\SDK1” you will be able

to find a “Mini2440-CE6-SDK.msi” installation file

5.2.5 Install SDK


Note: our shipped CD already has an SDK under “WindowsCE6\Mini2440-CE6-SDK.msi”.

Now let’s install an SDK

Step1: double click on “Mini2440-CE6-SDK.msi” and click on “Next” to continue


____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
248 / 257
Step2: check “I accept” and click on “Next” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
249 / 257
Step3: type your user name and company’s name and click on “Next” to continue

Step4: click on “Complete” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
250 / 257
Step5: click on “Next” to continue

Step6: click on “Install” to continue

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
251 / 257
Step7: the installation is kicked off

Step8: click on “Finish” to complete

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
252 / 257
Now the SDK has been installed successfully

5.3 Synchronize with PC (For Windows 7)


Note: in Windows 7, you don’t need ActiveSync! Please make sure your PC can connect to

the internet.

In Windows 7 the synchronization is implemented via “Windows Mobile Device”

(Synchronization Center) which is similar to ActiveSync. Below is its interface

The “Synchronization Center” doesn’t come with Windows 7 and needs to be installed.

Below are the steps to follow for Windows 7: (Note: if your board runs WinCE6 you still can
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
253 / 257
connect your board to your PC via ActiveSync.)

Install Windows Mobile Device Center

Power on your board that runs WinCE6, connect it to a PC that runs Windows 7 via USB

you will see the following window

Soon you will see the following window

If your system is connected to the internet it will automatically download and install

related software

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
254 / 257
After installation is done, you will see the following configuration dialog click on “Accept”

on the license window

You board is now connected to your PC

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
255 / 257
Click on “Connect”

Click on “File Management -> Browse” you will enter the board’s root directory. If your

board has a SD card or USB drive connected it will be listed here too

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
256 / 257
Now you can manipulate your files between your PC and board

____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: capbily@163.com
Tel: +86-20-85201025 Fax: +86-20-85261505
257 / 257