Mini 2440 Users Manual
Mini 2440 Users Manual
copyright@2007 - 2013
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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,
media to any person without the prior written consent of Friendly ARM Co., Ltd
performance
Requests for permission to reproduce material from this manual should be addressed
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
8 / 257
1.1.2 Mini2440 Hardware Features
CPU
SDRAM
FLASH Memory
- 2M Nor Flash
LCD
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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,
- 3 x Serial Port
- 1 x USB Host
- 1 x USB Slave B
- 4 x USER LED
- 6 x USER Button
- 1 x PWM buzzer
- 5V power supply
Extended Interfaces
Board Dimension
- 100 x 100 mm
OS Support
The Mini2440 development board currently can load the following operating systems:
- WindowsCE.NET 6.0(R3)
- 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: [email protected]
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
- USB camera
- SD card driver, up to 32 GB
- I2C-EEPROM
- PWM Buzzer
- A/D Conversion
- Qtopia-2.2.0: open source, including two versions: one for x86 and the other for ARM
- Audio recorder
- MMC/SD card and flash drive utility enabling auto mounting and unmounting
Features
- Configurable NBOOT: users can customize the process bar’s color, position, length
- PWM Buzzer
- I2C-EEPROM
- ADC Conversion
- Watchdong
- Backlight control
- RTC
- DM9000
- SD Card, up to 32G
- Screen Rotation
- Serial port
1.2.2 Layout
The Mini2440 schematic is presented as below. It includes most of the popular interfaces,
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: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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: [email protected]
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: [email protected]
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
1.3.8 AD Conversion
The Mini2440 has 4 ADC channels (CON4-GPIO) for different purposes. AIN0 is
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
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: [email protected]
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
1.3.13 EEPROM
The Mini2440 has an I2C (AT24C08) pin which is directly connected to the CPU. The
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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
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: [email protected]
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
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: [email protected]
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
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
Notes: the camera interface is a multiplexed port. It can be used as GPIO by setting
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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’
Switch “S2” to the “NAND” side, the system will boot from Nand Flash.
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
- Works with both 32/64-bit OS: it can be installed on both 32-bit and 64-bit Windows
systems
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: [email protected]
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
If your installation is successful there will be an icon on your desktop. You can double
click on it to run:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
33 / 257
Please login and execute the installation as root. Please copy the
untar the ball and run the “./start.sh” command to the installation.
2. Please copy the whole “images” directory from your DVD to the root directory of your
SD card
USB-Mode = yes
2. Power on the board and you will see the LCD showing “USB Mode:Waiting” if
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
34 / 257
“USB-Mode = yes” to “USB-Mode=no”.
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
Before install systems please select the system you want to install e.g. Linux and then its
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
SD card which should be FAT formatted and copy the whole image directory to the SD card.
Step1: insert the SD card to a PC and open the “images\FriendlyARM.ini” file and make
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: [email protected]
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
When the system is initially started the following calibration screen will show up
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
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: [email protected]
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
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.
hardware components: PWM buzzer, RTC clock, AD conversion, user button, LCD, I2C etc.
Please follow the steps below to download the 2440test to your board:
1) Switch S2 to “Nor”
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
41 / 257
test the PWM Buzzer.
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: [email protected]
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
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
2. After enter the system go to “start->setting” and click on the “calibrate” icon you will see
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
“play”.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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”.
pictures
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
46 / 257
Click on “Applications -> System Info -> Storage” you will view your SD card or flash
2.5.7 Calculator
Go to “Applications” and click on the calculator icon. You can select “Simple”, “Fraction”,
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
structure:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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”.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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”
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
52 / 257
Now you can try your WLAN
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: [email protected]
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”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
55 / 257
2.5.14 LED Test
Go to “FriendlyARM” and click on “LED Testing”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
56 / 257
Click on “Read EEPROM Data via IIC” you will see the reading process
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
- 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
Connect your serial port extension board to the Mini2440’s CON2/3/4 and connect to a PC
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: [email protected]
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
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
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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
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: [email protected]
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
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: [email protected]
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
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
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: [email protected]
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
“/root/Documents/image/jpeg”). Click on the picture you just took in “Documents” you will
pop up:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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
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
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
if there is any offset or vibration. This can be done via the “penpad” utility. Click on the
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
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: [email protected]
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.
It only supports English. Therefore we developed a new utility located in the “FriendlyARM”
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: [email protected]
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
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
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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
up. It is very similar to what you see in Windows “Programs -> Startup”.
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: [email protected]
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.
shutdown window.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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,
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
Note: the original Qtopia 2.2.0 system doesn’t “shutdown” or “reboot” effectively, we
has a watchdog. The latest Linux kernel has drivers for it.
Note: before take any action, please read the notes in the red area: once start, no way out,
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.
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: [email protected]
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: [email protected]
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
Below is a screenshot of system login via super terminal. Just press “Enter” as prompted
to continue.
#madplay your.mp3
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
are running madplay you can press Ctrl + C to terminate it. If a program runs in the
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
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: [email protected]
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
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
82 / 257
After file transferring is done you can check its validility via the “md5sum”
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
After this command is executed each of the 4 LEDs will be flashing one by one with 0.2
second in between.
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: [email protected]
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
The /bin/leds utility can be used to manipulate a single led. To launch this utility, users
#/etc/rc.d/init.d/leds stop
This command will stop the led-player service. To get more information for the usage
led_no: the LED you want to manipulate (0/1/2/3). “0” and “1” represents “turn off” and
#led 2 1
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
To test Serial Port 2 you need a PC with a serial port. Please connect CON2 to the PC via
#armcomtest –d /dev/ttySAC1 -o
Now if you type characters (in Serial Port Assistant) on your board they will be output to
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
85 / 257
command below:
#armcomtest –d /dev/ttySAC2 -o
Here is a screenshot
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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:
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.
Try: echo 15 > /dev/backlight you will be able to see some light.
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: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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 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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
The one in our example was “202.96.128.86”. Therefore we set our board as follows:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
#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: [email protected]
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
Restart the network, check your MAC via “ifconfig” and verify your network via “ping”:
#ifconfig eth0 up
#ifconfig
#ping 192.168.1.1
can telnet the board too. You can try typing “telnet 192.168.1.230” from a command line,
remote host via “ftp” in the command line utility in both Linux and Windows. Users can
Note: please make sure you have a file ready in your FTP directory. Here we had
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: [email protected]
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
You can test each of these items. The “LED Test” manipulates the LEDs via CGI and
To stop the web service you need to type the following commands:
#/etc/rc.d/init.d/httpd stop
#/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: [email protected]
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
After a successful mount you will be able to enter “/mnt” and operate your files
#umount /mnt
This means the dongle is recognized. Then you can follow the commands below:
(6) Select AP
[root@FriendlyARM /]# iwconfig wlan0 ap auto
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
98 / 257
Linux’s system time you can use “hwclock”:
(3) Command “hwclock –s” to update Linux’s system time with RTC. Usually this command
system is powered off. After the system boots please try the following command:
This will create a duplicate file under “/home/plg”. Power off and on you will observe that
script. It is similar to Window’s Autobat. It is under the /etc/init.d/rcS directory, the contents
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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
#snapshot pic.png
Executing this command will take a screenshot of the current LCD display and save it as
“pic.png”.
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
101 / 257
2.7.1 User Button Test
Go to “FriendlyARM”, click on “Buttons” you will see the following windows. Clicking
Go to “FriendlyARM”, click on “LED-Test” you will see the following windows and you
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
102 / 257
2.7.3 ADC Test
When you adjust the W1 resistor you will see the value changes.
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
104 / 257
2.7.6 Watchdog Test
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
105 / 257
2.7.7 LCD Test
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
106 / 257
2.7.8 CMOS Camera Test
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
“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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
108 / 257
2.7.11 Serial Port
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
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
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: [email protected]
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
Double click on the DM9CE1 icon you will see the following dialog in which you can
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
113 / 257
Click on “Advanced”
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: [email protected]
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”.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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 “My Computer” you will find the USB drive’s icon.
you insert an SD card to the SD card socket you will find a “Storage Card” icon.
synchronize with your board. If you use Windows 7 you can use its mobile device center to
synchronize.
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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
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
(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.
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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
122 / 257
Step5:set the keyboard, in this example, we chose the U.S. key board.
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: [email protected]
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: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
126 / 257
Here is the format process:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
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:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
137 / 257
Step 2: set Fedora9
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
138 / 257
Input the shared file’s name and its windows machine IP
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
140 / 257
To disconnect the shared directory, right click on the shared directory and following the
be installed by default, you can just follow the steps below to setup and configure the NFS
service.
Note: to access a shared directory, you need to follow what were described in 5.4.2 to install
#gedit /etc/exports
This command edits the NFS configuration file. Add the following line (Note:if this file
rw means all clients that have been mounted to this directory have the read and write
no_root_squash means all clients that have been mounted to this directory can be set to a
root user
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
142 / 257
Select (*) Disabled, and click on the “OK” button to disable the firewall permanently.
#/etc/init.d/nfs start
This command will start the NFS service. The user can verify whether the service is
running by commanding:
If no err messages come up, the user can then browse the contents of the “/mnt” directory
“/opt/FriendlyARM/mini2440/root_qtopia_qt4” directory.
#/etc/init.d/nfs stop
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,
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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 third item, in this example “192.168.1.111” is the target board’s gateway IP,
The fifth item is the board’s machine name (the user can give whatever name he likes)
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: [email protected]
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: [email protected]
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
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
the file.
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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
Note: all source code and utilities should be uncompressed and compiled with
arm-linux-gcc-4.4.3
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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”
#cd /opt/FriendlyARM/mini2440
source code.
Note: 20100106 is the date when FriendlyARM released the new version, the file name in
#cd /opt/FriendlyARM/mini2440
An x86-qtopia directory and an arm-qtopia directory will be created, and their source code
Note: in this release, supports for mouse and tp are all included in one package. And the
#cd /opt/FriendlyARM/mini2440
An arm-qte-4.6.3 will be created, and their source code will be uncompressed into the
directory.
The Busybox is a compact Linux tool kit. Here we used busybox-1.13.3. Users can
#cd /opt/FriendlyARM/mini2440
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.
#cd /opt/FriendlyARM/mini2440
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
151 / 257
Note: all these sample programs are developed by FriendlyARM.
#cd /opt/FriendlyARM/mini2440
An examples directory will be created, all the source code will be extracted into this
directory.
Besides the vboot we have other bootloader (vivi and u-boot) soruce code as well. In the
#cd /opt/FriendlyARM/mini2440
An examples directory will be created, all the source code will be extracted into this
directory.
#cd /opt/FriendlyARM/mini2440
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
- auto detection of touch screen and launching the calibration utility if necessary. If no touch
- auto detection of command or high speed SD cards (up to maximum memory of 32G) and
flash drives
We offered two tools that can be used to make file images:mkyaffs2image and
#cd /opt/FriendlyARM/mini2440
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
#cd /opt/FriendlyARM/mini2440
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,
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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,
The following programs are developed by Friendly ARM. We have found that some
int main(void) {
printf("hello, FriendlyARM!\n");
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”:
You can download your executable to the board in any of the following ways:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
156 / 257
- Run via NFS
Note: login your board via FTP, transfer your executable to it and change its file property to
executable
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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”
Connect your flash drive to your PC and execute the following commands
2. Copy to Board
Insert your drive to your board’s USB host, it will be automatically mounted under
#cd /udisk
Note: if you take out your drive directly you need to go back to the root directory and
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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
If the mounting is successful you can enter “/mnt” to manipulate your files. Please copy
#./hello
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: [email protected]
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;
}
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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;
}
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: [email protected]
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: [email protected]
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: [email protected]
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;
}
}
}
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: [email protected]
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: [email protected]
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: [email protected]
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;
}
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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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: [email protected]
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;
}
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: [email protected]
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
* [email protected]
*/
#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: [email protected]
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:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
176 / 257
arm-udptalk running on board
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: [email protected]
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 *~
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: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
179 / 257
pthread:
$(CROSS)gcc -static -o pthread main.c -lpthread
clean:
@rm -vf pthread *.o *~
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: [email protected]
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: [email protected]
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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
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:";
}
present a program “Hello, World” that runs in kernel mode and take this as an example to
Program Description:
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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");
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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
“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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
188 / 257
(2) Download Hello, Module to Board
“/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”
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
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: [email protected]
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,
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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; }
}
#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: [email protected]
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 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; }
}
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: [email protected]
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 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 int __init dev_init(void) { int ret; ret = misc_register(&misc); printk (DEVICE_NAME"\tinitialized\n");
return ret; }
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
195 / 257
commanding “run”. The compiling scripts for x86 and arm are a little bit different.
ftp://download.fedora.redhat.com/pub/fedora/linux/releases/9/Fedora/i386/iso/Fedora-9-i386
-DVD.iso.
#cd /opt/FriendlyARM/mini2440/x86-qtopia
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.
#./run
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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
#cd /opt/FriendlyARM/mini2440/arm-qtopia
#./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
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:
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
199 / 257
you can look into it for more details
script for users to easily compile QtE-4.6.3. Please enter the source code directory and type
#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
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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
201 / 257
Chapter 5 Set up WinCE6 Development Environment
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
202 / 257
may need to download its trial version from Microsoft’s website):
http://download.microsoft.com/download/e/1/4/e1405d9e-47e3-404c-8b09-489437b27fb0/E
n_vs_2005_Pro_90_Trial.img )
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 )
(VS80sp1-KB971090-X86-INTL.exe)
Download website:
http://www.microsoft.com/downloads/details.aspx?familyid=7C8729DC-06A2-4538-A90D-
FF9464DC0197&displaylang=en
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7e286847-6e
06-4a0c-8cac-ca7d4c09cb56
Download website:
http://www.microsoft.com/downloads/details.aspx?FamilyId=BF0DC0E3-8575-4860-A8E3-
290ADF242678&displaylang=en
Download website:
http://www.microsoft.com/downloads/details.aspx?FamilyId=F41FC7C1-F0F4-4FD6-9366-
B61E0AB59565&displaylang=en
Download website:
http://www.microsoft.com/downloads/details.aspx?FamilyID=BC247D88-DDB6-4D4A-A5
95-8EEE3556FE46&displaylang=ja&displaylang=en
Download website:
http://www.microsoft.com/downloads/details.aspx?FamilyID=527042f7-bb5b-4831-a6ad-50
81808824ec&displaylang=en
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
and therefore depends on VS2005. You need to install VS2005 first. All the configurations
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
205 / 257
Step2:click on “Install Visual Studio 2005” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
209 / 257
Step9: click on “OK” on the following dialog
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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.
Step13: now we will begin to install the second patch “Visual Studio 2005 Service Pack 1
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
212 / 257
Security Update”. Double click on “VS80sp1-KB971090-X86-INTL.exe”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
213 / 257
Step21: the following screen kicks off the installation. This may take a while
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: [email protected]
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
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
215 / 257
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: [email protected]
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: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
218 / 257
Step8:click on “Install” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
220 / 257
Step12: click on “Next” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
224 / 257
Step19: 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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
227 / 257
Step25: click on “Next” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
228 / 257
Step27: click on “Next” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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 .
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
230 / 257
Step2: click on “Next” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
231 / 257
Step4: check “I agree” 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: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
234 / 257
Step4: after the installation is done, click on “Close” to complete
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
235 / 257
Three directories for three languages will be created under “WinCE600\OSDesigns”:
Mini2440-en - English
Now you have successfully set up your Windows CE 6.0 development environment.
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
Studio 2005”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
240 / 257
Step10: go to “Build->Advanced Build Commands->Clean Sysgen” to begin compilation.
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: [email protected]
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
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
#define LCD_N35
//#define LCD_T35
//#define LCD_L80
//#define LCD_X35
//#define LCD_A70
//#define LCD_VGA1024768
#define LOGO_POS_TOP 0
#define LOGO_POS_LEFT 0
#define PROGRESS_BAR_LEFT 20
#define PROGRESS_BAR_HEIGHT 12
Compiling Nboot
In your WindowsCE6.0 directory please remove the “read only” property and open it with
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
244 / 257
After it is done an nboot.bin will be generated.
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: [email protected]
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
// --- by customer
//#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
//#define KITL_NONE
#define KITL_SERIAL_UART0
//#define KITL_SERIAL_UART1
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: [email protected]
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”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
247 / 257
Step3: go to “C:\WINCE600\OSDesigns\mini2440\mini2440\SDKs\SDK1” you will be able
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
250 / 257
Step5: click on “Next” to continue
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
251 / 257
Step7: the installation is kicked off
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
252 / 257
Now the SDK has been installed successfully
the internet.
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
253 / 257
connect your board to your PC via ActiveSync.)
Power on your board that runs WinCE6, connect it to a PC that runs Windows 7 via USB
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
254 / 257
After installation is done, you will see the following configuration dialog click on “Accept”
____________________________________________________________________________________________________________________
Address: Room 1701,Block A2, Longyuan Plaza, 549# Longkouxi Road, Guangzhou, China, 510640
Website: http://www.arm9.net Email: [email protected]
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: [email protected]
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: [email protected]
Tel: +86-20-85201025 Fax: +86-20-85261505
257 / 257