You are on page 1of 640

MINI2440

2011-4-21

copyright@2007-2010

-1-

, ()

http://www.arm9.net

-2-


2011-4-21 W35 LCD
2011-3-5 - Linux 3G WCDMA, CDMA2000,
TD-SCDMA 2.4.18
- Linux USB WiFi
USB 2.4.11
-
2010-8-17 - arm-linux-gcc-4.4.1(EABI)
- QtE-4.6.3, Qtopia-2.2.0
- Linux NEC 4.3"LCD
- WindowsCE5 2
- WindowsCE5/6
- USB WiFi Kits linux USB
: TP-LINK
* TL-WN321G+
* TL-WN322G+
* TL-WN422G+
* TL-WN721N
* TL-WN722N
: QCOM
* LR802UKG
:
1. arm-linux-gcc-4.4.1 Qtopia-2.2.0 QtE-4.6.x
Segmentation Fault;(
)
2. Qtopia-2.2.0 Qte-4.6.1
64M Nand Flash
64M Nand Flash
2010-3-8 9 WindowsCE Embedded 6.0
()
9 Platform Builder 5.0 (
)
2010-02-18 2.5.18 ftp
2010-02-04 9
2.8 WindowsCE 5.0
2.8 WindowsCE 5.0 - 164 -
2.8.1 - 164 -
2.6.2 LED - 165 -
2.8.3 ADC - 166 -

-3-
2.8.4 I2C-EEPROM - 167 -
2.8.5 PWM - 168 -
2.8.6 - 169 -
2.8.7 LCD - 171 -
2.6.8 CMOS - 171 -
2.8.9 - 173 -
2.8.10 - 174 -
2.8.11 - 175 -
2.8.12 - 177 -
2.8.13 - 179 -
2.8.14 - 180 -
2.8.15 - 182 -
2.8.16 - 182 -
2.8.17 - 184 -
2.8.18 SD/MMC - 185 -
2.8.19 ActiveSync USB - 185 -
2.8.20 USB - 186 -
WindowsCE 5.0
WindowsCE 5.0 - 500 -
10.1 WindowsCE5.0 - 500 -
10.1.1 Platform Builder 5.0( 2007 ) - 500 -
10.1.2 BSP - 511 -
10.1.3 - 514 -
10.1.4 - 517 -
10.1.5 SDK - 521 -
10.1.6 Embedded Visual C++(EVC) - 527 -
10.1.7 EVC SDK - 533 -
10.1.8 CE - 542 -
10.1.9 WindowsCE StartLogo - 556 -
10.1.10 BootLoader Nboot - 560 -
10.1.11 NBOOT Nand Flash - 563 -
10.2 ActiveSync PC - 565 -
10.2.1 ActiveSync - 565 -
10.2.2 USB - 570 -
10.2.3 ActiveSync - 573 -
10.2.4 ActiveSync Platform Builder - 576 -
10.2.5 ActiveSync Platform Builder - 583 -
10.3 EVC Hello,World, - 584 -
10.4 VS2005/2008 , - 591 -
10.4.1 - 592 -

-4-
10.4.2 - 594 -
10.4.3 - 597 -
10.5 LED - 598 -
10.5.1 - 599 -
10.5.2 LED - 600 -
10.5.3 LED BSP - 607 -
10.5.4 LED - 609 -
10.5.5 LED - 612 -

-5-

MINI2440 ..................................................................................................................................- 1 -
2011-4-21..........................................................................................................................................................- 1 -
Mini2440 ...........................................................................................................................- 15 -
1.1 Mini2440 ...........................................................................................................................- 15 -
1.1.1 Mini2440 ................................................................................................................- 16 -
1.1.2 Mini2440 ................................................................................................- 16 -
1.1.3 Linux...........................................................................................................................- 18 -
1.1.4 WindowsCE 5.0 .........................................................................................................- 19 -
1.1.5 WindowsCE 6.0 .........................................................................................................- 21 -
1.1.6 ...................................................................................................................- 22 -
1.2 ...................................................................................................................................- 23 -
1.2.1 ...................................................................................................................................- 23 -
1.2.2 ...................................................................................................................................- 23 -
1.3 ......................................................................................................................................- 24 -
1.3.1 ...............................................................................................- 24 -
1.3.2 SDRAM ......................................................................................................................- 26 -
1.3.3 FLASH........................................................................................................................- 26 -
1.3.4 .......................................................................................................................- 27 -
1.3.5 ...................................................................................................................................- 29 -
1.3.6 LED....................................................................................................................................- 29 -
1.3.7 ...................................................................................................................................- 30 -
1.3.8 A/D..............................................................................................................................- 30 -
1.3.9 PWM.......................................................................................................................- 31 -
1.3.10 .........................................................................................................................................- 31 -
1.3.11 USB...................................................................................................................................- 32 -
1.3.12 LCD ..................................................................................................................................- 33 -
1.3.13 EEPROM ..................................................................................................................................- 34 -
1.3.14 .................................................................................................................................- 34 -
1.3.15 .................................................................................................................................- 35 -
1.3.16 JTAG.................................................................................................................................- 36 -
1.3.17 GPIO .........................................................................................................................................- 37 -
1.3.18 CMOS CAMERA .............................................................................................................- 38 -
1.3.19 .........................................................................................................................- 39 -
Mini2440 ...................................................................................................................- 41 -
2.1 .............................................................................................................................- 41 -
2.1.1 ...........................................................................................................................- 41 -
2.1.2 ...........................................................................................................................- 41 -
2.1.3 ...........................................................................................................................- 41 -
2.2 BIOS .............................................................................................................- 45 -

-6-
2.2.1 BIOS ..................................................................................................................- 45 -
2.2.2 USB....................................................................................................................- 46 -
2.2.3 .......................................................................................................................- 52 -
2.2.4 Linux ......................................................................................- 53 -
2.3 .........................................................................................................- 56 -
2.3.1 .................................................................................................................- 56 -
2.3.2 ...........................................................................................................................- 60 -
2.4 LinuxQtopia 2.2.0 () ...............................................................................- 68 -
2.4.1 ...............................................................................................................................- 69 -
2.4.2 ...........................................................................................................................- 70 -
2.4.3 Mp3....................................................................................................................................- 71 -
2.4.4 ...................................................................................................................................- 71 -
2.4.5 ...................................................................................................................................- 72 -
2.4.6 SD ..............................................................................................................- 75 -
2.4.7 .......................................................................................................................................- 76 -
2.4.8 ...................................................................................................................................- 77 -
2.4.9 ...............................................................................................................................- 78 -
2.4.10 .................................................................................................................................- 79 -
2.4.11 WiFi .................................................................................................................- 80 -
2.4.12 Ping ...................................................................................................................................- 85 -
2.4.13 .....................................................................................................................................- 86 -
2.4.14 LED...................................................................................................................................- 87 -
2.4.15 EEPROM ..................................................................................................................- 88 -
2.4.16 PWM..................................................................................................................- 90 -
2.4.17 .................................................................................................................................- 91 -
2.4.18 3G........................................................................................................- 93 -
2.4.19 .........................................................................................................................................- 97 -
2.4.20 USB..............................................................................................................- 98 -
2.4.21 CMOS ...........................................................................................................- 99 -
2.4.22 LCD ................................................................................................................................- 100 -
2.4.23 ...............................................................................................................................- 101 -
2.4.24 A/D..................................................................................................................................- 102 -
2.4.25 ...............................................................................................................................- 103 -
2.4.26 ...........................................................................................................................- 104 -
2.4.27 ...............................................................................................................................- 106 -
2.4.28 ...............................................................................................................................- 106 -
2.4.29 --- ...................................................................................................- 108 -
2.4.30 ...............................................................................................................................- 109 -
2.4.31 ....................................................................................................... - 111 -
2.4.32 ...............................................................................................................................- 112 -
2.4.33 ...................................................................................................................................- 113 -

-7-
2.4.34 QtE-4.6.3........................................................................................................................- 115 -
2.5 ................................................................................................................- 116 -
2.5.1 mp3 ...................................................................................................................................- 117 -
2.5.2 .............................................................................................................- 117 -
2.5.3 / ................................................................................................................- 118 -
2.5.4 SD ................................................................................................................................- 119 -
2.5.5 PC.........................................................................................- 121 -
2.5.6 LED......................................................................................................................- 123 -
2.5.7 ......................................................................................................................- 124 -
2.5.8 2 3 .................................................................................................................- 125 -
2.5.9 .............................................................................................................................- 126 -
2.5.10 LCD ...................................................................................................................- 127 -
2.5.11 I2CEEPROM .............................................................................................................- 127 -
2.5.12 AD...........................................................................................................................- 129 -
2.5.13 CMOS .........................................................................................................- 129 -
2.5.14 telnetbbs......................................................................................................................- 130 -
2.5.15 ........................................................................................- 132 -
2.5.16 MAC ..............................................................................................................- 134 -
2.5.17 Telnet..........................................................................................- 136 -
2.5.18 ftp...................................................................................................................- 137 -
2.5.19 LED.....................................................................................................- 137 -
2.5.20 NFS ........................................................................................- 138 -
2.5.21 USB................................................................................................................- 139 -
2.5.22 ....................................................................................................- 141 -
2.5.23 Flash...................................................................................................- 141 -
2.5.24 ................................................................................................- 142 -
2.5.25 ...............................................................................................- 143 -
2.6 WindowsCE5/6 ..........................................................................................- 144 -
2.6.1 .................................................................................................................................- 145 -
2.6.2 LED ..................................................................................................................................- 146 -
2.6.3 ADC ..................................................................................................................................- 146 -
2.6.4 I2C-EEPROM...................................................................................................................- 147 -
2.6.5 PWM.....................................................................................................................- 148 -
2.6.6 .....................................................................................................................................- 149 -
2.6.7 LCD ..................................................................................................................................- 151 -
2.6.8 CMOS ...........................................................................................................- 151 -
2.6.9 .................................................................................................................................- 153 -
2.6.10 ...................................................................................................................- 154 -
2.6.11 ...............................................................................................................................- 155 -
2.6.12 ...........................................................................................................................- 157 -
2.6.13 ...............................................................................................- 159 -

-8-
2.6.14 ...............................................................................................................................- 160 -
2.6.15 ...........................................................................................................- 162 -
2.6.16 .......................................................................................................- 162 -
2.6.17 ...............................................................................................................................- 164 -
2.6.18 SD/MMC ...................................................................................................................- 165 -
2.6.19 ActiveSyncUSB .....................................................................................- 165 -
2.6.20 USB................................................................................................................- 166 -
2.7 .......................................................................................................................- 166 -
2.7.1 ...................................................................................................................................- 167 -
2.7.1.1 ......................................................................................................................- 167 -
2.7.2 ...............................................................................................................................- 168 -
2.7.2.1 ..................................................................................................................................- 168 -
2.7.2.2 ..................................................................................................................................- 169 -
2.7.2.3 ..................................................................................................................................- 169 -
2.7.2.4 ..............................................................................................................................- 170 -
2.7.3 ...............................................................................................................................- 170 -
2.7.3.1 ..................................................................................................................- 170 -
2.7.3.2 ..................................................................................................................- 171 -
2.7.3.3 ..........................................................................................................................- 171 -
2.7.3.5 ..........................................................................................................................- 172 -
2.7.3.5 pdf ..............................................................................................................................- 172 -
2.7.4 ...............................................................................................................................- 173 -
2.7.4.1 TCPMP ..................................................................................................................................- 173 -
2.7.4.2 CorePlayer.............................................................................................................................- 173 -
2.7.4.3 Flash ..............................................................................................................................- 174 -
2.7.5 ...............................................................................................................................- 174 -
2.7.5.1 Photoshop ..............................................................................................................................- 174 -
2.7.6 ...............................................................................................................................- 175 -
2.7.6.1 UCWEB......................................................................................................................- 175 -
2.7.7 ...............................................................................................................................- 176 -
2.7.7.1 BUBBLETS ............................................................................................................................- 176 -
2.7.7.2 ..............................................................................................................................- 176 -
2.7.7.3 (33 )...................................................................................................................- 177 -
2.8 WindowsCE 5.0 ..........................................................................................................................- 177 -
2.8.1 .................................................................................................................................- 177 -
2.6.2 LED ..................................................................................................................................- 178 -
2.8.3 ADC ..................................................................................................................................- 179 -
2.8.4 I2C-EEPROM...................................................................................................................- 180 -
2.8.5 PWM.....................................................................................................................- 181 -
2.8.6 .....................................................................................................................................- 182 -
2.8.7 LCD ..................................................................................................................................- 184 -

-9-
2.6.8 CMOS ...........................................................................................................- 184 -
2.8.9 .................................................................................................................................- 186 -
2.8.10 ...................................................................................................................- 187 -
2.8.11 ...............................................................................................................................- 188 -
2.8.12 ...........................................................................................................................- 190 -
2.8.13 ...............................................................................................- 192 -
2.8.14 ...............................................................................................................................- 193 -
2.8.15 ...........................................................................................................- 195 -
2.8.16 .......................................................................................................- 195 -
2.8.17 ...............................................................................................................................- 197 -
2.8.18 SD/MMC ...................................................................................................................- 198 -
2.8.19 ActiveSyncUSB .....................................................................................- 198 -
2.8.20 USB................................................................................................................- 199 -
.................................................................................................................- 201 -
3.1 ...............................................................................................................................- 201 -
3.1.1 .................................................................................................................................- 201 -
3.1.2 .........................................................................................................- 206 -
3.2 Linux...................................................................................................................................- 209 -
3.2.1 .........................................................................................................................................- 209 -
3.2.2 bootloader ........................................................................................................................- 211 -
3.2.3 Linux........................................................................................................................- 213 -
3.2.4 .....................................................................................................................- 214 -
3.3 WinCE ................................................................................................................................- 217 -
3.3.1 Bootloader........................................................................................................................- 217 -
3.3.2 BootLogo .................................................................................................................- 219 -
3.3.3 wince................................................................................................................- 220 -
3.4 ................................................................................................................................- 223 -
3.4.1 2440test...........................................................................................................................- 223 -
3.4.2 uCos2 ...............................................................................................................................- 226 -
3.4.3 Linux................................................................................................................................- 230 -
3.4.4 WinCE .............................................................................................................................- 233 -
ADS1.2 ...........................................................................................................- 236 -
4.1 ADSLED.....................................................................................................................- 236 -
4.1.1 .........................................................................................................................- 236 -
4.1.2 .....................................................................................................................- 241 -
4.2 HJTAG................................................................................................................- 248 -
4.2.1 HJTAGAXDDEBUGGER .............................................................................................- 248 -
4.2.4 HJTAGADS1.2 ........................................................................- 250 -
4.3 2440test ....................................................................................................................- 251 -
4.3.1 HJTAG 2440test.........................................................................................- 251 -
4.3.2 USB 2440test ..................................................................................- 256 -

- 10 -
4.4.3 2440testNandFlash ......................................................................................- 258 -
4.5uCos2 ..........................................................................................................................- 261 -
4.5.1 uCos2 ..............................................................................................................................- 261 -
4.5.2 uCos2 ......................................................................................................- 263 -
4.5.3 uCos2 Nand Flash ............................................................................................- 266 -
Linux............................................................................................................................- 269 -
5.1 Fedora 9.0 ...........................................................................................................................- 269 -
5.2 ................................................................................................................................- 283 -
5.2.1 .............................................................................................................................- 284 -
5.2.2 Windows .................................................................................................- 286 -
5.3 .............................................................................................................................- 291 -
5.4 ............................................................................................................- 293 -
5.4.1 .....................................................................................................................- 293 -
5.4.2 .........................................................................................................- 296 -
5.4.3 .........................................................................................................- 296 -
5.5 NFS ..............................................................................................................- 297 -
5.5.1 .........................................................................................................................- 298 -
5.5.2 NFS .......................................................................................................................- 298 -
5.5.3 NFS ..................................................................................................................- 299 -
Linux........................................................................................................- 302 -
6.1 .................................................................................................- 302 -
6.2 ................................................................................................................- 305 -
6.3 Linux...........................................................................................................................- 306 -
6.3.1 CPU..................................................................................................................- 306 -
6.3.2 LCD........................................................................- 309 -
6.3.3 .............................................................................................................................- 311 -
6.3.4 USB..............................................................................................................- 312 -
6.3.5 .................................................................................................................- 313 -
6.3.6 USB .......................................................................................................- 315 -
6.3.7 CMOS ..........................................................................................................- 317 -
6.3.8 .........................................................................................................................- 319 -
6.3.9 USB..........................................................................................................- 322 -
6.3.10 .......................................................................................................................- 326 -
6.3.11 SD/MMC................................................................................................................- 329 -
6.3.12 ...........................................................................................................- 330 -
6.3.13 LED .........................................................................................................................- 331 -
6.3.14 .......................................................................................................................- 332 -
6.3.15 PWM .....................................................................................................- 333 -
6.3.16 AD ...................................................................................................................- 333 -
6.3.17 .......................................................................................................................- 334 -
6.3.18 RTC ................................................................................................- 335 -

- 11 -
6.3.19 I2C-EEPROM ...................................................................................................- 336 -
6.3.20 yaff2s..................................................................................................- 338 -
6.3.21 EXT2/VFAT/ NFS .....................................................................................- 341 -
6.3.22 Linux logo......................................................................................................................- 344 -
6.4 ................................................................................................................- 347 -
Linux........................................................................................................- 349 -
7.1Hello,World! .........................................................................................................................................- 349 -
7.1.1 Hello,World...................................................................................................................- 349 -
7.1.2 Hello,World......................................................................................................................- 350 -
7.1.3 Hello,World..........................................................................................- 350 -
7.2 Linux...............................................................................................................- 353 -
7.2.1 LED...........................................................................................................................- 353 -
7.2.2 .................................................................................................................................- 354 -
7.2.3 PWM.....................................................................................................- 356 -
7.2.4 I2C-EEPROM...........................................................................................................- 360 -
7.2.5 .........................................................................................................................- 363 -
7.2.6 UDP ..........................................................................................................................- 368 -
7.2.7 .............................................................................................................- 374 -
7.2.8 .........................................................................................................................- 375 -
7.2.9 -LED ........................................................................................- 377 -
7.2.10 C++Hello,World ........................................................................................................- 382 -
7.3 Linux ...............................................................................................- 383 -
7.3.1 Hello,Module ................................................................................................................- 383 -
7.3.2 Hello,Module ...........................................................................- 384 -
7.3.3 Hello, Module ..........................................................................- 387 -
7.4 Linux...................................................................................................................- 387 -
7.4.1 LED...........................................................................................................................- 388 -
7.4.2 .........................................................................................................................- 392 -
7.5 Qtopia-2.2.0 ................................................................................................................................- 397 -
7.5.1 .....................................................................................................................- 397 -
7.5.2 x86 Qtopia-2.2.0 ......................................................................................- 397 -
7.5.3 armQtopia-2.2.0 .......................................................................................- 398 -
7.6 QtE-4.6.3 ....................................................................................................................................- 399 -
7.6.1 .....................................................................................................................- 399 -
7.6.2 armQtE-4.6.3............................................................................................- 400 -
bootloader ............................................................................................................- 402 -
8.1 vboot ...........................................................................................................................................- 402 -
8.2 vivi ..................................................................................................................................- 403 -
8.3 U-Boot ............................................................................................................................- 405 -
8.3.1 U-Boot .................................................................................................................- 406 -
8.3.2 U-Boot .........................................................................................................- 407 -

- 12 -
8.4 ADSYL-BIOS.....................................................................................................................- 409 -
8.4.1 ADSYL-BIOS..........................................................................................................- 409 -
8.4.2 YL-BIOS...............................................................................................- 410 -
8.4.3 YL-BIOS...........................................................................................................- 413 -
WindowsCE 6.0 ..................................................................................................................- 416 -
9.1 WindowsCE 6.0 ..........................................................................................................- 416 -
9.1.1 Visual Studio 2005 ..............................................................................................- 418 -
9.1.2 Windows CE 6.0 .................................................................................................- 432 -
9.1.3 QQ........................................................................................................- 454 -
9.1.4 BSP ......................................................................................................- 461 -
9.1.5 .................................................................................................- 464 -
9.2 WindowsCE 6.0 Bootloader................................................................................- 465 -
9.2.1 .........................................................................................................- 465 -
9.2.2 .........................................................................................................- 466 -
9.2.3 QQ............................................................................................- 476 -
9.2.4 BootLoaderNBOOT.........................................................................................- 483 -
9.2.5 BSPLCD ..............................................................................- 489 -
9.2.6 Windows CELogo........................................................................................- 490 -
9.2.7 SDK .................................................................................................................................- 494 -
9.2.8 SDK .................................................................................................................................- 496 -
9.3 PC(Windows 7)................................................................................................................- 501 -
9.3.1 Windows MobilePC .........................................................................- 502 -
9.4 VS2005 , ................................................................- 506 -
9.4.1 .................................................................................................................................- 506 -
9.4.2 .....................................................................................................................- 509 -
9.4.3 .................................................................................................- 512 -
WindowsCE 5.0 ..................................................................................................................- 514 -
10.1 WindowsCE5.0 .....................................................................................................- 514 -
10.1.1 Platform Builder 5.0( 2007 ) ......................................................................- 514 -
10.1.2 BSP ........................................................................................................................- 525 -
10.1.3 .......................................................................................................- 528 -
10.1.4 ...............................................................................................................- 531 -
10.1.5 SDK ...............................................................................................................................- 535 -
10.1.6 Embedded Visual C++(EVC) ........................................................................................- 541 -
10.1.7 EVCSDK ...............................................................................................- 547 -
10.1.8 CE ..........................................................................................................................- 556 -
10.1.9 WindowsCEStartLogo ...................................................................................- 570 -
10.1.10 BootLoaderNboot .....................................................................................- 574 -
10.1.11 NBOOTNand Flash..............................................................................................- 577 -
10.2 ActiveSyncPC................................................................................................................- 579 -
10.2.1 ActiveSync.....................................................................................................................- 579 -

- 13 -
10.2.2 USB....................................................................................................- 583 -
10.2.3 ActiveSync .............................................................................- 587 -
10.2.4 ActiveSyncPlatform Builder ..........................................- 590 -
10.2.5 ActiveSyncPlatform Builder ...........................................................- 597 -
10.3 EVCHello,World, ....................................................................- 598 -
10.4 VS2005/2008 , ............................................................- 605 -
10.4.1 ...............................................................................................................................- 606 -
10.4.2 ...................................................................................................................- 608 -
10.4.3 ...............................................................................................- 611 -
10.5 LED.....................................................................................................- 612 -
10.5.1 .......................................................................................................................- 613 -
10.5.2 LED........................................................................................................- 614 -
10.5.3 LEDBSP.................................................................................- 621 -
10.5.4 LED............................................................................................- 623 -
10.5.5 LED ........................................................- 626 -
H-JTAGBIOS...................................................................................................- 629 -
1. 1 H-JTAG.......................................................................................................................................- 629 -
2. 2 H-JTAG..........................................................................................................................- 630 -
2. 3 FlashBIOS..............................................................................................................- 634 -
2. 4 ...........................................................................................................................................- 640 -

- 14 -
Mini2440

1.1 Mini2440

Mini2440 ARM9
Samsung S3C2440 CPU
mini2440 PCB

Linux WinCE
C 2
LED LCD
-

Linux WindowsCE6
2440 bootloader BSP 100%


http://www.arm9.net

Mini2440

(1) Linux 2440 ( Linux-2.6.31 Mini2440


Linux )
(2) Linux USB 2440 (
)
(3) EABI (
)
(4) BSP( Linux-2.6.29( Linux-2.6.32.2) WindowsCE 6.0)
(
)
(5).NET 3.5 QQ 2440 (2009 10 WindowsCE 6.0
Release 3 )
(6) WindowsCE
10 ( WindowsCE 30 70 )
(7) USB Linux(support yaffs2) WindowsCE 5.0/6.0
Nand Flash PC()
(8) WinCE/Linux CMOS (

- 15 -
)
(9) BSP ( Linux WindowsCE)( BSP
)
(10)( WinCE Linux) Nand Flash
()
(11) WindowsCE Linux
()
(12)Mini2440 2440
Mini2440

1.1.1 Mini2440

1.1.2 Mini2440

CPU
- Samsung S3C2440A 400MHz 533Mhz

SDRAM
- 64M SDRAM

- 32bit

- 16 -
- SDRAM 100MHz

FLASH
256M/1GB Nand Flash, ( 64M/128M/256M/512M/1G)

2M Nor Flash BIOS

LCD
- 4

- 4 16 256 4096 STN 3.5 12.1


1024x768

- 4 16 256 64K TFT 3.5 12.1


1024x768

- 3.5 LCD 240x320

- 1 100M RJ-45 ( DM9000 )

- 3

- 1 USB Host

- 1 USB Slave B

- 1 SD

- 1

- 1 2.0mm 10 JTAG

- 4 USER Leds

- 6 USER buttons()

- 1 PWM

- 1 AD

- 1 I2C AT24C08 I2C

- 1 2.0 mm 20pin

- (5V)

- 12M

- 17 -

1 34 pin 2.0mmGPIO

1 40 pin 2.0mm

- 100 x 100(mm)

- Linux2.6.32.2 + Qtopia-2.2.0+QtE-4.6.1()

- WindowsCE.NET 6.0(R3)

1.1.3 Linux


- Linux 2.6.32.2(BSP 64M/128M/256M/512M/1GB Nand Flash)

- yaffs2()
- cramfs()
- Ext2
- Fat32
- NFS()
()
- 3
- DM9000
- (UDA1341)()
- RTC ()
- LED
- USB Host
- LCD ( 1024x768VGA )
-
- USB
- USB USB
- SD SD , 32G
- I2C-EEPROM
- PWM
- LCD
- A/D
- ()
Linux

- 18 -
- busybox1.13(Linux Linux )
- TelnetFtpinetd()
- boa(web server)
- madplay( mp3 )
- snapshot()
- ifconfigpingroute ()
()
- Qt/Embedded 2.2: x86 arm
- QtE-4.6.3: ARM
Qtopia

- A/D
- LED
- Buttons
- I2C-EEPROM
- LCD
- Ping
- USB
-
- Web
-
- ()
-
-
-
- MMC/SD

1.1.4 WindowsCE 5.0


- WindowsCE 5.0 (BSP 64M/128M/256M/512M/1G Nand Flash)

- .NET 2.0
- SQL Mobile
-
- (10 )
- WindowsCE 5.0 BSP( bootloader) 100%
:
1 - PWM
2 - CMOS

- 19 -
3 - I2C-EEPROM
4 - ADC
5 -
6 - (6 )
7 - LED(4 )
8 - (,)
9 - RTC
10 - DM9000
11- SD 32G
12- USB USB
13-
14-
15-LCD ( X35N35/T35/W35, A70, L80, VGA1024x768
:240x320, 800x480, 640x480, 1024x768)
16- LCD( WinCE5 )
17- LCD
18- 3 ( UART0 DEBUG
, WinCE5 )
19- Nboot

20- Logo StartLogoMaker( XP Vista,


Win7)
21- USB bmp

BSP WindowsCE Qtopia Apps


:
- (1) LCD-Test: LCD
- (2) PWM-Buzzer: PWM
- (3) CMOS Camera: CMOS
- (4) I2C-EEPROM: I2C EEPROM
- (5) Watchdog:
- (6) AD-Convert: ADC
- (7) Buttons:
- (8) Rotate: ()
- (9) Autorun-Setting:
- (11) Recorder: (,)
- (12) :
- (13) LED :

- 20 -
1.1.5 WindowsCE 6.0


- WindowsCE Embedded 6.0 (BSP 64M/128M/256M/512M/1G Nand Flash)

- Release3(2009.10 QQ )
- .NET 3.5
-
- (10 )
- WindowsCE 6.0 BSP( bootloader) 100%
:
1 - PWM
2 - CMOS
3 - I2C-EEPROM
4 - ADC
5 -
6 - (6 )
7 - LED(4 )
8 - (,)
9 - RTC
10 - DM9000
11- SD 32G
12- USB USB
13-
14-
15-LCD ( X35N35/T35/W35, A70, L80, VGA1024x768
:240x320, 800x480, 640x480, 1024x768)
16- LCD( WinCE5 )
17- LCD
18- 3 ( UART0 DEBUG
, WinCE5 )
19- Nboot

20- Logo StartLogoMaker( XP Vista,


Win7)
21- USB bmp

BSP WindowsCE Qtopia Apps


:
- (1) LCD-Test: LCD

- 21 -
- (2) PWM-Buzzer: PWM
- (3) CMOS Camera: CMOS
- (4) I2C-EEPROM: I2C EEPROM
- (5) Watchdog:
- (6) AD-Convert: ADC
- (7) Buttons:
- (8) Rotate: ()
- (9) Autorun-Setting:
- (11) Recorder: (,)
- (12) :
- (13) LED :

1.1.6

DVD
(1) Linux

- arm-linux-gcc-4.4.3 with EABI


- Linux Linux-2.6.32.2 BSP
- Qte/Qtopia x86-qtopia arm-qtopia PC
ARM
- Busybox
- Bootloader (vboot) arm-linux-gcc
- Linux PWMADEEPROM
(2) WindowsCE5/6

- WindowsCE 5.0/6.0 BSP 2440 BSP100%


- Bootloader (nboot) ADS WindowsCE 5.0/6.0
bootloader Logo 2M 24-bit bmp
(16-bit 1024x768 bmp 1.5M)
- WindowsCE 5.0/6.0 SDK 2 SDK
- Mini2440.pbxml

- StartLogoMaker Logo
(3) uCos2
uCos2
(4) 2440test
2440test ADS
RTC ADC
IIS wav IIS I2C AT24C08

- 22 -
3.5LCD640x480 LCD2VGA
(5)Windows
Windows
windows
- ADS 1.2
- H-JTAG NOR Flash
- Vmware VMware-workstation-6.5.1
- Dnw USB
- ActiveSync PC
- Usb BIOS PC
(6)
( pdf protel99se )
LCD LCD
(7)

(8)

1.2

1.2.1

J2 LCD
3.5 LCD 5V

1.2.2

Mini2440 100 x 100mm


IO

- 23 -
1.3

CPU
( pdf Protel99SE )

1.3.1

S3C2440 Nand Flash (MINI2440 )


Nor Flash

- 24 -

nGCS0 Nor Flash
Nand Flash
SFR Area

nGCS0

NAND Flash 4K Bytes BootSram nGCS0



Nor Flash ( Nand Flash ) nGCS0
Nor Flash nGCS0
SDRAM 0x30000000 ~ 0x34000000

- 25 -
1.3.2 SDRAM

Mini2440 32M bytes 64M bytes SDRAM (


HY57V561620FTP/MT48LC16M16A2) 32-bit
nGCS6
CPU 5-2 0x30000000
mini2440 SDRAM

1.3.3 FLASH

Mini2440 Flash Nor Flash SST39VF1601(AMD29LV160DB


) 2Mbyte Nand Flash K9F1G08, 128M(
K9F1208 64Mbyte)S3C2440 Flash S2
NOR NAND Nand Flash
Nor Flash
Nand Flash CPU 8-bit
Nand Flash SD Nand Flash

Nor Flash A1-A22 22 16


CPU A1 2-byte
8Mbyte Nor Flash
A1-A20 A21A22 SST39V1601

- 26 -
1.3.4

5V
3.3V1.8V1.25V

S1

- 27 -
CON8
2.0mm 5V 5V
5V S1 5V

- 28 -
1.3.5

MAX811 CPU

1.3.6 LED

LED 4 LED
CPU GPIO ()
LED1 LED2 LED3 LED4
GPIO GPB5 GPB6 GPB7 GPB8
nXBACK nXREQ nXDACK1 nDREQ1
nLED_1 nLED_2 nLED_3 nLED_4

- 29 -
1.3.7

6 CPU
GPIO
6 CON12 6 CON12
K1 K2 K4 K4 K5 K6
EINT8 EINT11 EINT13 EINT14 EINT15 EINT19
GPIO GPG0 GPG3 GPG5 GPG6 GPG7 GPG11
nSS1 SPIMISO1 SPIMOSI1 SPICLK1 TCLK1
CON12 CON12.1 CON12.2 CON12.3 CON12.4 CON12.5 CON12.6

CON12.7 (3.3V)CON12.8 (GND)

1.3.8 A/D

4 A/D() CON4-GPIO
( GPIO ) AIN0 W1

- 30 -
1.3.9 PWM

SPEAKER PWM GPB0


PWM

1.3.10

S3C2440 3 UART012 UART0,1


3 ( Linux WinCE
)(TXD)(RXD) CON1
CON2CON3 3 CPU TTL
UART0 RS232 COM0 PC

- 31 -
CON1CON2CON3

1.3.11 USB

USB USB Host PC USB


USB USB USB USB USB Slave
WinCE ActiveSync
Windows Linux
USB Slave PC USB_EN
CPU GPC5
USB Host

- 32 -
1.3.12 LCD

LCD 41Pin 0.5mm LCD


() RGB (RGB 888
1600 LCD) PWM (GPB1
PWM) (nRESET) LCD_PWR
37383940
J2 LCD 5V

- 33 -
1.3.13 EEPROM

CPU I2C EEPROM AT24C08


256 byte I2C

1.3.14

DM9000 10/100M RJ45

MAC Linux

- 34 -
2.4 WinCE BSP DM9000
(platform.reg)

1.3.15

S3C2440 I2S 8/16 CODEC


I2S UDA1341
L3-bus CPU GPB2
GPB3GPB4 L3-Bus L3MODEL3DATAL3CLOCK
UDA1341
3.5mm
CON10 2.0mm
MIC

- 35 -
1.3.16 JTAG

JTAG
Supervivi Supervivi USB

JTAG JLINK
ULINK JTAG JTAG
4 TMS TCKTDITDO
6
JTAG JTAG 20Pin
10Pin USB
JTAG JTAG
JTAG 10 Pin JTAG
Linux WinCE JTAG
BSP
USB Linux WinCE
JTAG

- 36 -
PC PC
PCI WindowsXP Linux

JTAG ( uCos2 )
Bootloader BIOS

1.3.17 GPIO

GPIO 34 Pin 2.0mm GPIO


CON4
CON4 GPIO CPU
AD0-AIN3CLKOUT SPI I2C GPB0 GPB1
GPIO CPU

CON4 () CON4 ()
1 VDD5V 5V () 2 VDD33V 3.3V ()
3 GND 4 nRESET ()
5 AIN0 AD 0 6 AIN1 AD 1

- 37 -
7 AIN2 AD 2 8 AIN3 AD 3
9 EINT0 EINT0/GPF0 10 EINT1 EINT1/GPF1
11 EINT2 EINT2/GPF2 12 EINT3 EINT3/GPF3
13 EINT4 EINT4/GPF4 14 EINT5 EINT5/GPF5
15 EINT6 EINT6/GPF6 16 EINT8 EINT8/GPG0
17 EINT9 EINT9/GPG1 18 EINT11 EINT11/GPG3/nSS1
19 EINT13 EINT13/GPG5/SPIMISO1 20 EINT14 EINT14/GPG6/SPIMOSI1
21 EINT15 EINT15/GPG7/SPICLK1 22 EINT17 EINT17/GPG9/nRST1
23 EINT18 EINT18/GPG10/nCTS1 24 EINT19 EINT19/GPG11
25 SPIMISO SPIMISO /GPE11 26 SPIMOSI SPIMOSI /EINT14/GPG6
27 SPICLK SPICLK /GPE13 28 nSS_SPI nSS_SPI /EINT10/GPG2
29 I2CSCL I2CSCL/GPE14 30 I2CSDA I2CSDA/GPE15
31 GPB0 TOUT0/ GPB0 32 GPB1 TOUT1/ GPB1
33 CLKOUT0 CLKOUT0/GPH9 34 CLKOUT1 CLKOUT1/GPH10

1.3.18 CMOS CAMERA

S3C2440 CMOS CAMERA


20 2.0mm CAM130
CAM130
ZT130G2
CAMERA GPIO
GPIO

CAMERA CAMERA
1 I2CSDA GPE15 2 I2CSCL GPE14
3 EINT20 GPG12 4 CAMRST GPJ12

- 38 -
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 18 VDD_CAM VDD_CAM
19 VDD18V 1.8V 20 GND

1.3.19

CON5 16 (D0-D15)8
(A0-A6, A24)()CON5 5V
CON5

CON5 () CON5 ()
1 VDD5V 5V () 2 GND
3 EINT17 17() 4 EINT18 18()
5 EINT3 3() 6 EINT9 9()
7 nGCS1 1 8 nGCS2 2
: 0x08000000 : 0x10000000
9 nGCS3 3 10 nGCS5 2
: 0x18000000 : 0x28000000
11 LnOE 12 LnWE

- 39 -
13 nWAIT 14 nRESET
15 nXDACK0 nXDACK0 16 nXDREQ0 nXDREQ0
17 LADDR0 0 18 LADDR1 1
19 LADDR2 2 20 LADDR3 3
21 LADDR4 4 22 LADDR5 5
23 LADDR6 6 24 LADDR24 24
25 LDATA0 0 26 DATA1 1
27 LDATA2 2 28 DATA3 3
29 LDATA4 4 30 DATA5 5
31 LDATA6 6 32 DATA7 7
33 LDATA8 8 34 DATA9 9
35 LDATA10 10 36 DATA11 11
37 LDATA12 12 38 DATA13 13
39 LDATA14 14 40 DATA15 15

- 40 -
Mini2440
linux (
supervivizImage_t35/x35/w35rootfs-qtopia-qt4.img)
WindowsXP
supervivi-64M 64M mini2440supervivi-128M
128M/256M/512M/1GB mini2440

2.1

2.1.1

S2

S2 Nor Flash Nor Flash
S2 Nand Flash Nand Flash
Nor Flash Nand Flash BIOS( BIOS
Flash BIOS )S2 Nand
Flash Nand Flash

2.1.2

0 PC
PC
5V 5V
()
LCD
USB PC

2.1.3

USB USB

- 41 -


MS-Windows Windows9x
Windows2000
Linuxminicom

Windows WindowsXP
Windows "->->->"
Hypertrmtelnet

- 42 -
ttyS0Windows
COM1

- 43 -

115200

vivi

- 44 -
2.2 BIOS

2.2.1 BIOS

: supervivi supervivi-64M supervivi-128M


supervivi-64M 64M Nand Flash mini2440/micro2440supervivi-128M
128M /256M/512M/1GB Nand Flash mini2440/micro2440
Supervivi Nor Flash S2 NOR
Flash BIOS LED1

Supervivi
BIOS bootloader vivi Supervivi

Supervivi JTAG ( H-JTAG ) Nor Flash


Nand Flash Nor Flash
Nand Flash
(Linux/WindowsCE)
Supervivi
USB
Supervivi Nor Flash() linux
WinCE Nand Flash Nand
Flash uCos2U-bootNboot2440test Nand Flash
Demo

Supervivi Nand Flash Linux WindowsCE

bootloader

- 45 -
Download & Run
2440test

supervivi Linux zImage


supervivi suerpvivi
WinCE NK.nb0

2.2.2 USB

USB BIOS dnw.exe


Linux WinCE

USB

windows \usb \ FriendlyARM USB Download


Driver Setup_20090421.exe USB

- 46 -

- 47 -
USB

USB

S2 Nor Flash USB (


)
S1WindowsXP USB

- 48 -
(T)

- 49 -
USB

dnw.exe USB OK

- 50 -
USB

- 51 -
2.2.3

USB DNW

[x] Nand Flash , bon part 0 320k 2368k


Linux
[v] USB Linux bootloader Nand Flash bootloader
[k] USB Linux Nand Flash kernel
[y] USB yaffs Nand Flash root
[a] USB Nand Flash bin
2440test( 4K )uCos2( uCos2 nand flash )
U-Boot bin
[n] USB WinCE Nboot Nand Flash Block0
[l] USB WinCE Logo(bmp )
[w] USB WinCE NK.bin Nand Flash
[d] USB ( DNW Configuration->Option
)SDRAM 0x30000000
0x34000000 64Mbytes BIOS 0x33DE8000
BIOS USB 0x30000000 - 0x33DE8000

- 52 -
[z]: USB Linux zImage 0x30008000
[g]: Linux [z]
[f] Nand Flash Nand Flash (
)
[b] linux wince

[s] linux
[u] Nand Flash USB PC
PC Ghost
[r] Nand Flash
[i]
[q] vivi

menu

2.2.4 Linux

Linux BIOS [s]


Linux

- 53 -
(1)[v]
v

(2)[s]

- 54 -
s(
)
z Mach_type
z Linux command line

MACH_TYPE 1999 MACH_TYPE 2000
mach_type mach_type
2000()w

Linux_cmd_line
1 0

Linux_cmd_linenoinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC0
slinux_cmd_line
()
noinitrd root=/dev/mtdblock2 init=/linuxrc console=ttySAC1,115200

- 55 -
1 vivi
0
(3)[w]
w
(4)[r]
r
(5)[q]
q BIOS

2.3

PWM RTC AD
LCDI2C SD

2.3.1

2440test

- 56 -
LCD
() USB
LCD
LCD (2440test\inc\Option.h LCD_TYPE )

2440test_W35.bin 3.5LCD(LQ035Q1DG06 (1)
320x240)
2440test_N35.bin NEC 3.5LCD
2440test_x35.bin Sony 3.5LCD
2440test_T35.bin 3.5LCD 2440test.bin

2440test_L80.bin Sharp 8LCD( (2) 2440test


) 64M/128M

2440test_A70.bin 7LCD 2440

2440test_VGA1024x768.bin VGA( :
1024x768@70Hz)
images\2440test\ 2440test.bin BIOS

(1)USB S2 Nor Flash


DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 57 -
(3) DNW Configuration USB 0x30000000

(4) BIOS [d] USB

(5) DNW USB PortTransmit 2440test.bin (


images\2440test\)

- 58 -
(6) LCD

- 59 -
NEC3.5 (2440test.bin )

2440test supervivi CPU 2440test


USB USB

2.3.2

(1)(Test PWM)
1( Enter )

- 60 -
+ESC

(2)
2
CPU RTC

ESC

- 61 -
(3)AD
3 AD
W1 W2( AIN0
AIN1) AD

ESC
(4)
4 K1-K6

- 62 -
ESC
(5)
LCD LCD
5

ESC
(6)LCD VGA

- 63 -
2440test 6
LCD

(7)I2C
7 I2C AT24C08
AT24C08 0x-0xFF


(8)

- 64 -
8
XP

+ESC

(9)SD
SD SD
SD SD
9 SD

- 65 -
SD
(11) CMOS
CAM130 CMOS
CAM130 CAMERA
10
7 VGA LCD

- 66 -
NEC3.5CMOS

- 67 -
2.4 Linux Qtopia 2.2.0 ()

Qtopia 2.2.0 Qt Qt/Embedded 2.3 PDA ()


Qtopia 2.2.0 Qt PDA
Qtopia Qt 2009.3 Qtopia PDA
Qt/Embedded ( QtE)
QtE http://qt.nokia.com/QtE-4.6.3

Linux+Qtopia 2.2.0+QtE-4.6.3

VGA USB
USB Host
USB USB


+ 3.5 LCD
3.5

- 68 -
2.4.1

USB


1 Qtopia

W35

2 ->

240x320 W35
()
( Qtopia bug
)->->Restart Server Qtopia

- 69 -
2.4.2

Qtopia

Qtopia /

- 70 -

2.4.3 Mp3

Audio
mp3 Mp3
Audio Documents
Documents

2.4.4

Video

Video Documents
Documents

- 71 -
2.4.5


SD
3 SD

Qtopia 2.2.0 Qtopia 1.7.0

- 72 -


90

- 73 -

Documents
Documents

- 74 -
2.4.6 SD

SD ( 32G) USB

Windows
MMC/SD

MMC/SD Qtopia 2.2.0


MMC/SD
VFAT/FAT32/FAT16 SD VFAT/FAT32/FAT16

->Storage SD

- 75 -
2.4.7


Simple, Fraction, Scientific, Conversion

- 76 -
2.4.8

Linux Linux


Linux
Linux
LCD CRT
PC

(GUI)
GUI


USB ( USB ) Linux
Option

- 77 -
2.4.9


Qtopia-2.2.0 Qtopia-1.7.0

- 78 -
2.4.10


z IP 192.168.1.230
z 255.255.255.0
z 192.168.1.1
z DNS IP 192.168.1.1
z MAC
MAC 08:90:90:90:90:90
Save
/etc/eth0-setting
/etc/eth0-setting Save
ifconfig
IP
Qtopia
Qtopia

Qtopia (
)

- 79 -
2.4.11 WiFi

Linux Linux USB


WiFi

2.4.11.1

- 80 -
2.4.11.2 AP()

AP AP
SSID APScan

AP WiFi ESSID
AP

AP Connect

- 81 -
AP Connected

(ifconfig eth0 down)


WiFi Yes
Save
ifconfig eth0 up

- 82 -
Net Detail IP DNS

Close
WIFI

WiFi

- 83 -
2.4.11.3

Disconnect

2.4.11.4 IP

Configure IP IP

DHCP IP IP

- 84 -
Save

2.4.12 Ping

DNS
ping Ping

DNS IP ping
4 ping forever ping
ping DNS

- 85 -
Start pingStop pingPing
ping

ping Linux
MS Windows pingPing
ping

2.4.13


Ret()
Konqueror/Embedded
1 Qtopia (build-all
)

- 86 -
2.4.14 LED

LED

Stop led-player
led-player
LED LED

- 87 -
Stop led-playerStart led-player

LED
Control()
All On LEDAll Off LED
LED LED
LED led-player

2.4.15 EEPROM

I2C-EEPROM

- 88 -
EEPROM EEPROM

ASC Write
Data below into EEPROM via IIC
Read EEPROM Data via IIC

- 89 -
2.4.16 PWM

PWM-

PWM 1000HzStart
PWM
Stop PWM

- 90 -
2.4.17


z CON1,2,3 CPU UART0,1,2 UART0
RS232 DB9 COM0 console
CON2,3 RS232
PC (OneComRS232
) PC ()
OneCom COM.2 COM.3

z USB
USB
USB Host
/dev/ttyUSB0,1,2,3 USB Hub USB

ttySAC1 115200 8N1 [C]

- /dev/ttySAC1 CPU UART1


- 115200
- 8
-
- 1
- [C][H] 16

- 91 -

USB Qtopia
Connect /dev/ttySAC1
Send Windows
( 115200 8N1)

Disconnect Setting

Comm Port CPU /dev/ttySAC0,1,2 USB


/dev/ttyUSB0,1,2,3
Speed
Data 8 /7 8
Hex 16

- 92 -
2.4.18 3G

3G
z WCDMA : 3G
z CDMA2000:
z TD-SCDMA: 3G
3G 3G Modem
USB 3G Modem
USB 3G USB
USB ( 3G )

HUAWEI E1750
Step1 3G SIM

Step2 SIM

Step3 USB Host


Step4 3G OK

- 93 -
Step5Connect IP DNS

Step6Minimize

Mini6410 USB 3G

OK USB 3G
Huawei E169 (CDMA2000)
Huawei E1750/E1550 (WCDMA)
ZTE AC581 (CDMA2000)
ZTE AC8710 (CDMA2000)
ZTE MU351 (TD-SCDMA)

USB 3G
ZTE 6535-Z
ZTE AC2710 (EVDO)
ZTE AC2726
ZTE K3520-Z
ZTE K3565
ZTE MF110 (Variant)
ZTE MF112

- 94 -
ZTE MF620 (aka "Onda MH600HS")
ZTE MF622 (aka "Onda MDC502HS")
ZTE MF628
ZTE MF638 (aka "Onda MDC525UP")
ZTE WCDMA Stick from BNSL
HuaXing E600 (NXP Semiconductors "Dragonfly")
Huawei E1612
Huawei E1690
Huawei E180
Huawei E270+ (HSPA+ modem)
Huawei E630
Huawei EC168C (from Zantel)
Huawei K3765
Huawei K4505
Huawei R201
Huawei U7510 / U7517
Huawei U8110 (Android smartphone)
Onda MW833UP
A-Link 3GU
AT&T USBConnect Quicksilver (made by Option, HSO driver)
AVM Fritz!Wlan USB Stick N
Alcatel One Touch X020 (aka OT-X020, aka MBD-100HU, aka Nuton 3.5G), works with Emobile
D11LC
Alcatel X200/X060S
Alcatel X220L, X215S
AnyDATA ADU-500A, ADU-510A, ADU-510L, ADU-520A
Atheros Wireless / Netgear WNDA3200
BSNL Capitel
BandLuxe C120
BandRich BandLuxe C170, BandLuxe C270
Beceem BCSM250
C-motech CGU-628 (aka "Franklin Wireless CGU-628A" aka "4G Systems XS Stick W12")
C-motech CHU-629S
C-motech D-50 (aka "CDU-680")
Cricket A600
EpiValley SEC-7089 (featured by Alegro and Starcomms / iZAP)
Franklin Wireless U210
Hummer DTM5731
InfoCert Business Key (SmartCard/Reader emulation)
Kyocera W06K CDMA modem

- 95 -
LG HDM-2100 (EVDO Rev.A USB modem)
LG L-05A
LG LDU-1900D EV-DO (Rev. A)
LG LUU-2100TI (aka AT&T USBConnect Turbo)
Motorola 802.11 bg WLAN (TER/GUSB3-E)
MyWave SW006 Sport Phone/Modem Combination
Nokia CS-10
Nokia CS-15
Novatel MC990D
Novatel U727 USB modem
Novatel U760 USB modem
Novatel Wireless Ovation MC950D HSUPA
ONDA MT505UP (most likely a ZTE model)
Olivetti Olicard 100 and others
Olivetti Olicard 145
Option GlobeSurfer Icon 7.2
Option GlobeSurfer Icon 7.2, new firmware (HSO driver)
Option GlobeTrotter EXPRESS 7.2 (aka "T-Mobile wnw Express II")
Option GlobeTrotter GT MAX 3.6 (aka "T-Mobile Web'n'walk Card Compact II")
Option GlobeTrotter HSUPA Modem (aka "T-Mobile Web'n'walk Card Compact III')
Option iCON 210
Option iCON 225 HSDPA
Philips TalkTalk (NXP Semiconductors "Dragonfly")
Rogers Rocket Stick (a Sony Ericsson device)
Royaltek Q110 - UNCONFIRMED!
ST Mobile Connect HSUPA USB Modem
Sagem F@ST 9520-35-GLR
Samsung GT-B3730
Samsung SGH-Z810 USB (with microSD card)
Samsung U209
Sierra Wireless AirCard 881U (most likely 880U too)
Sierra Wireless Compass 597
Siptune LM-75 ("LinuxModem")
Solomon S3Gm-660
Sony Ericsson MD300
Sony Ericsson MD400
Toshiba G450
UTStarcom UM175 (distributor "Alltel")
UTStarcom UM185E (distributor "Alltel")
Vertex Wireless 100 Series

- 96 -
Vodafone (Huawei) K4605
Vodafone (ZTE) K3805-Z
Vodafone MD950 (Wisue Technology)
Zydas ZD1211RW WLAN USB, Sphairon HomeLink 1202 (Variant 1)
Zydas ZD1211RW WLAN USB, Sphairon HomeLink 1202 (Variant 2)

2.4.19

REC
STOP

- 97 -
PLAYWAV

Qtopia 2.2.0

2.4.20 USB

USB

- 98 -
USB
USB Host USB
Snap

2.4.21 CMOS

CMOS CAM130
CAMERA CMOS

- 99 -
Snap Snap Continue
(
/root/Documents/image/jpeg ) Qtopia

2.4.22 LCD

LCD LCD

- 100 -
3
LCD


Auto-loop

Manual-control

2.4.23

- 101 -
LCD
( LCD
)

2.4.24 A/D

Samsung S3C2440 8 A/D


AIN4AIN5AIN6AIN7 YMYPXMXP
( S3C2440 16-5 ) AIN0-3 CON4
1.3. AIN0 W1

A/D

- 102 -
W1 10
0 1024
A/D 1
A/D AIN0
W1 LCD LCD

2.4.25


Buttons

- 103 -
()

2.4.26

LCD

- 104 -

( 1 pixel) File->Save
png ( Documents
/Documents/image/png/) 001 999

- 105 -
2.4.27

USB (Barcode Scanner)


HID USB USB

USB

USB
()

2.4.28

Qtopia 2.2.0 Qtopia 1.7.0

- 106 -
3 English
OKYesQtopia
No()

- 107 -
2.4.29 ---

,, CPU
(RTC),,,

Set time

- 108 -
ClockStop Watch


OK

2.4.30

- 109 -

OK
Qtopia Qtopia
Qtopia
LCD

- 110 -
2.4.31

Qtopia Qtopia
Windows ->

Qtopia ( Qtopia )

Auto Start
Save(
->->Reboot)

- 111 -
CleanClose
Yes

2.4.32


ShutdownLinux

- 112 -
CPU

Reboot NOR FLASH


Supervivi NAND FLASH
Qtopia
Reboot

Restart Server Qtopia Linux


Terminates Server Qtopia

Qtopia 2.2.0 ShutdownReboot

2.4.33

S3C2440

- 113 -
Start

15
Feed

- 114 -
2.4.34 QtE-4.6.3

Qtopia-2.2.0 QtE-4.6.3
Qtopia-2.2.0 QE-4.6.3
QtE-4.6.3 Qtopia-2.2.0

QtE-4.6.3 CoverFlow
Cover

Exit Embedded Demo QtE-4.6.3 Qtopia-2.2.0

- 115 -

2.5

Linux
Linux 99%
Linux

2.1.3

Linux
Linux

- 116 -
2.5.1 mp3

madplay
madplay.tgz
Linux\madplay.tgz
Arm-linux-gcc-4.4.3 with EABI

madplay mp3

#madplay your.mp3
your.mp3 ( your.mp3
)
/ shanghaitan.mp3
madplay -h

2.5.2

Ctrl+c Ctrl
c
madplay mp3

- 117 -
Ctrl+c
kill

2.5.3 /

/udisk

/dev/udisk/udisk
FAT32/VFAT

- 118 -
2.5.4 SD

SD SD

- 119 -
/sdcard SD

- 120 -
2.5.5 PC

rz sz PC

(1) sz PC

sz /shanghaitan.mp3 PC /
shanghaitan.mp3 ()

(2) rz
rz PC

- 121 -

md5sum

- 122 -
2.5.6 LED

led-player leds
led-player.c led.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/leds
Linux-2.6.32.2/drivers/char/mini2440_leds.c

leds.cgi
Leds.cgi
\www

leds.cgi shell leds.html

root_default.tgz www leds.cgi leds.html


( Windows
)

Led-player LED SBC2410

2410/2440

(1) LED
LED (/etc/rc.d/init.d/leds)
led-player led-player /tmp
led-control led
#echo 0 0.2 > /tmp/led-control
4 led 0.2
#echo 1 0.2 >/tmp/led-control
4 led 0.2
#/etc/rc.d/init.d/leds stop
4 led
#/etc/rc.d/init.d/leds start
4 led

(2) LED
/bin/leds led leds led-player

- 123 -

#/etc/rc.d/init.d/leds stop
led-player led led
[root@fa /]# led
Usage: leds led_no 0|1
led_no led( 0123)0 1
#led 2 1
LED3

2.5.7

buttons
Buttons_test.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/buttons
Linux-2.6.32.2/drivers/char/mini2440_buttons.c

buttons

- 124 -
2.5.8 2 3

armcomtest
Comtest.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/ttySAC0,1,2
/dev/ttyUSB0,1,2,3
Linux-2.6.32.2/drivers/serial/s3c2440.c

armcomtest linux
armv4


0,1,2 /dev/ttySAC0,1,2

2 PC(
) COM2 PC PC 115200


#armcomtest d /dev/ttySAC1 -o
PC
3 COM3
#armcomtest d /dev/ttySAC2 -o

- 125 -
2.5.9

pwm_tset
Pwm_test.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/pwm
Linux-2.6.32.2/drivers/char/pwm.c

pwm_test
+-
ESC

- 126 -
2.5.10 LCD


LCD /dev/backlight

echo 0 > /dev/backlight LCD


echo 1 > /dev/backlight LCD

2.5.11 I2CEEPROM

i2c
Eeprom.c 24cXX.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/i2c/0
Linux-2.6.32.2/drivers/i2c/busses/i2c-s3c2440.c


I2C-EEPROM /dev/i2c/0

- 127 -
i2c w 24C08 0x00-0xff

i2c r 24C08

- 128 -
2.5.12 AD

adc-test
Adc-test.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/adc
Linux-2.6.32.2/drivers/char/mini2440_adc.c

adc-test ADC
W1

2.5.13 CMOS

camtest
camtest.c
linux\examples.tgz
Arm-linux-gcc-4.4.3 with EABI
/dev/camera

- 129 -
Linux-2.6.32.2/drivers/media/video/s3c2440camif.c

CAM130 CAMERA
camtest CMOS

2.5.14 telnet bbs

telnet telnet
telnet telnet
bbs
IP 192.168.1.230

- 130 -
IProute add default gw 192.168.1.1
telnet bbs

- 131 -
2.5.15

IP
192.168.1.1 route
# route add default gw 192.168.1.1
IP ping BBS( IP
202.112.17.137)
#ping 202.112.17.137
ping

- 132 -
ping
DNS IP ()

- 133 -
DNS IP 202.96.128.86
#rm /etc/resolv.conf ;
#touch /etc/resolv.conf resolv.conf
#echo nameserver 202.96.128.86 >> /etc/resolv.conf ; DNS IP
resolv.conf
/etc/resolv.conf vi

2.5.16 MAC

MAC ifconfig

ifconfig mac
#ifconfig ;

- 134 -
mac 089090909090
mac
mac ifconfig mac
#ifconfig eth0 down
#ifconfig eth0 hw ether 00:11:AA:BB:CC:DD ;a,b,c,d,e,f
ifconfig mac ping

#ifconfig eth0 up
#ifconfig
#ping 192.168.1.1

- 135 -
2.5.17 Telnet

Telnet

Windows telnet 192.168.1.230root


()

- 136 -
2.5.18 ftp

Linux windows ftp


ftp ftp
ftp ftp PC

ftp test.mp3
ftp plg plg
/home/plg test.mp3

2.5.19 LED

web server LED LED

- 137 -
LED CGI
LED 2
web
#/etc/rc.d/init.d/httpd stop

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

2.5.20 NFS

4.3 NFS
IP 192.168.1.111
#mount t nfs o nolock 192.168.1.111:/opt/FriendlyARM/mini2440/root_qtopia
/mnt
/mnt

#umount /mnt

- 138 -
2.5.21 USB

Linux-2.6.32.2 USB
TP-Link USB WiFi TL-WN321G+

6.3

USB
[root@FriendlyARM /]# usb 1-1: new full speed USB device using s3c2410-ohci and
address 2
usb 1-1: New USB device found, idVendor=148f, idProduct=2573
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: 54M.USB.......
usb 1-1: Manufacturer: Ralink
usb 1-1: configuration #1 chosen from 1 choice
wmaster0 (rt73usb): not using net_device_ops yet
wlan0 (rt73usb): not using net_device_ops yet

[root@FriendlyARM /]#

- 139 -

(1) DM9000
[root@FriendlyARM /]# ifconfig eth0 down
(2) USB WiFi
[root@FriendlyARM /]# ifconfig wlan0 up
rt73usb 1-1:1.0: firmware: requesting rt73.bin
[root@FriendlyARM /]#
(3)
[root@FriendlyARM /]# iwlist scanning | grep ESSID
lo Interface doesn't support scanning.

eth0 Interface doesn't support scanning.

wmaster0 Interface doesn't support scanning.

ESSID:"FRIENDLY-ARM"
ESSID:"NETGEAR"
ESSID:"TP-LINK"
[root@FriendlyARM /]#
(4)
[root@FriendlyARM /]# iwconfig wlan0 essid "FRIENDLY-ARM"
(5)
[root@FriendlyARM /]# iwconfig wlan0 key s:12345
(6) AP()
[root@FriendlyARM /]# iwconfig wlan0 ap auto
(7) IP
[root@FriendlyARM /]# ifconfig wlan0 192.168.1.120
(8) ping
[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

[root@FriendlyARM /]# usb 1-1: new full speed USB device using s3c2410-ohci and
address 2
usb 1-1: New USB device found, idVendor=148f, idProduct=2573
usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
usb 1-1: Product: 54M.USB.......
usb 1-1: Manufacturer: Ralink
usb 1-1: configuration #1 chosen from 1 choice

- 140 -
wmaster0 (rt73usb): not using net_device_ops yet
wlan0 (rt73usb): not using net_device_ops yet

[root@FriendlyARM /]# ifconfig eth0 down


[root@FriendlyARM /]# ifconfig wlan0 up
rt73usb 1-1:1.0: firmware: requesting rt73.bin
[root@FriendlyARM /]# iwconfig wlan0 key s:12345
[root@FriendlyARM /]# iwconfig wlan0 essid "FRIENDLY-ARM"
[root@FriendlyARM /]# iwconfig wlan0 ap auto
[root@FriendlyARM /]# ifconfig wlan0 192.168.1.120
[root@FriendlyARM /]# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
64 bytes from 192.168.1.1: seq=0 ttl=64 time=42.804 ms
64 bytes from 192.168.1.1: seq=1 ttl=64 time=5.020 ms
64 bytes from 192.168.1.1: seq=2 ttl=64 time=5.021 ms
^C
--- 192.168.1.1 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 5.020/17.615/42.804 ms
[root@FriendlyARM /]#

2.5.22

Linux date S3C2440 linux


hwclock
(1) date -s 042916352007 # 2007-04-29 16:34
(2) hwclock -w # S3C2440 RTC
(3). hwclock -s linux RTC,
/etc/init.d/rcS
hwclock s rcS

2.5.23 Flash

yaffs( Flash
)

#cp / shanghaitan.mp3 /home/plg


/home/fa
/home/plg

- 141 -
2.5.24


Windows Autobat /etc/init.d/rcS
()
#! /bin/sh

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

#
# Trap CTRL-C &c only in this shell so we can interrupt subprocesses.
#
trap ":" INT QUIT TSTP
/bin/hostname FriendlyARM

/bin/mount -n -t proc none /proc


/bin/mount -n -t sysfs none /sys
/bin/mount -n -t usbfs none /proc/bus/usb
/bin/mount -t ramfs none /dev

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

- 142 -
/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

/sbin/ifconfig lo 127.0.0.1
/etc/init.d/ifconfig-eth0 IP vi

#/bin/qtopia &
echo " " > /dev/tty1
echo "Starting Qtopia, please waiting..." > /dev/tty1

2.5.25

snapshot LCD png


#snapshot pic.png
LCD pic.png

- 143 -
2.6 WindowsCE5/6

WindowsCE6 \images\wince6.0
wince (
NK_T35.bin W35 LCD NK_W35.bin
) S2
Nand Flash
bootloader Nboot
WindowsCE

Logo CE

- 144 -
2.6.1

buttons
BSP mini2440\Src\Drivers\Userkey

Visual Studio 2005 with Platform Builder 6


/dev/buttons


Buttons

()

- 145 -
2.6.2 LED

LED-Test.exe
BSP Mini2440\SRC\DRIVERS\LEDdriver

Visual Studio 2005 with Platform Builder 6

LED

LED

2.6.3 ADC

AD-Convert
BSP Mini2440\SRC\DRIVERS\Touch

Visual Studio 2005 with Platform Builder 6

ADC

Samsung S3C2440 8 A/D


AIN4AIN5AIN6AIN7 YMYPXMXP
( S3C2440 16-5 ) AIN0-3 CON4
1.3. AIN0 W1

- 146 -
A/D

W1 10
0 1024
A/D 1
A/D AIN0
W1 LCD LCD

2.6.4 I2C-EEPROM

I2C-EEPROM.exe
BSP \Mini2440\SRC\DRIVERS\IIC

Visual Studio 2005 with Platform Builder 6


/dev/buttons

I2C-EEPROM

- 147 -
EEPROM EEPROM

ASC Write
Read

2.6.5 PWM

PWM-Buzzer.exe
BSP Mini2440\SRC\DRIVERS\PWM

Visual Studio 2005 with Platform Builder 6

- 148 -

PWM-buzzer

PWM 1000HzStart
PWM
Stop PWM

2.6.6

Watchdog.exe
BSP Mini2440\SRC\DRIVERS\WDT

Visual Studio 2005 with Platform Builder 6

- 149 -

S3C2440
WindwsCE6 BSP

Start

15
Feed

- 150 -
2.6.7 LCD

LCD-Test.exe
BSP Mini2440\SRC\DRIVERS\Display

Visual Studio 2005 with Platform Builder 6

LCD LCD
3
LCD


Auto-loop

Manual-control

2.6.8 CMOS

CMOS-Camera.exe
BSP Mini2440\SRC\DRIVERS\Camera

Visual Studio 2005 with Platform Builder 6

- 151 -
CMOS CAM130
CAMERA CMOS

CMOS-Camera CMOS
CMOS

Snap Snap Continue


( My Documents
bmp) SD
PC

- 152 -
2.6.9

Recorder.exe
BSP Mini2440\SRC\DRIVERS\Wavedev

Visual Studio 2005 with Platform Builder 6

Recorder

- 153 -

2.6.10

LCD

LCD mini2440\Src\Drivers\Display

Rotate

- 154 -
Rotate 90

Close

2.6.11

SerialPort.exe
BSP Mini2440\SRC\DRIVERS\Serial

Visual Studio 2005 with Platform Builder 6

- 155 -
BSP 2,3

SerialPort

COM2 115200
()
COM2 PC PC

PC


PC ()

- 156 -
COM3

2.6.12

BSP
Mini2440\SRC\DRIVERS\Touch

wince 3.5LCD

USB ->->

- 157 -

OK

->

- 158 -
2.6.13


BSP Mini2440\SRC\DRIVERS\dm9000

Visual Studio 2005 with Platform Builder 6

IP DNS

Windows ->

DM9CE1

- 159 -
DM9CE1 IP
IP

2.6.14


BSP Mini2440\SRC\DRIVERS\Backlight

Visual Studio 2005 with Platform Builder 6

WindowsCE6

- 160 -

2

->->

1 HMI

- 161 -
2.6.15


BSP Mini2440\SRC\COMMON\Rtc

Visual Studio 2005 with Platform Builder 6


OK

2.6.16

google
WinCE

AutoRun-Setting

- 162 -
Apps Browser
AD-Convert
AD-Convert.exe \Windows

OKClose

- 163 -
AD-Convert

2.6.17

wince windows WINCE


USB Host

- 164 -
2.6.18 SD/MMC

BSP 32G SD
SD/MMC SD SD Storage
Card SD/MMC

2.6.19 ActiveSync USB

USB \windows \CE


USB
9.3 ActiveSync
WINCE USB Device
USB PC

- 165 -
2.6.20 USB

WinCE6 USB USB


2009-8-23 WinCE5

2.7

WinCE6

mini2440-20100110\WindowsCE

- 166 -
WindowsCE SD

\Software

2.7.1

2.7.1.1

.cab
.cab

- 167 -
Microsoft WordPad

2.7.2

2.7.2.1

\software\\\

- 168 -
2.7.2.2

\software\\\

2.7.2.3

\software\\\

- 169 -
2.7.2.4

\software\\\

2.7.3

2.7.3.1

\software\\OFFIC docviewer.exe word

- 170 -
2.7.3.2

\software\\OFFIEC XLS.exe Excel

2.7.3.3

\software\\OFFIEC presviewer.exe
ppt

- 171 -
2.7.3.5

\software\\OFFIEC imageviewer.exe
My Documents

2.7.3.5 pdf

\software\\OFFIEC pdfviewer.exe
pdf

- 172 -
2.7.4

2.7.4.1 TCPMP

\software\\TCPMP PLAYER

2.7.4.2 CorePlayer

\software\\CorePlayer PLAYER

- 173 -
2.7.4.3 Flash

\software\\Flash swFlash32.exe

2.7.5

2.7.5.1 Photoshop

\Software\\Photoshop PocketArtist.exe

- 174 -
2.7.6

2.7.6.1 UCWEB

\Software\\UCWEB6.7
UCWEB.EXE

- 175 -
2.7.7

2.7.7.1 BUBBLETS

\Software\\BUBBLETS BUBBLETS.EXE

2.7.7.2

\Software\\.exe

- 176 -
2.7.7.3 (33 )

33

2.8 WindowsCE 5.0

WindowsCE5 \images\wince5.0
wince (
NK_T35.bin W35 LCD NK_W35.bin
) S2
Nand Flash
bootloader Nboot
WindowsCE

Logo CE

2.8.1

buttons
BSP mini2440\Src\Drivers\Userkey

Platform Builder 5 with 2007 Patch


/dev/buttons

- 177 -

Buttons

()

2.6.2 LED

LED-Test.exe
BSP Mini2440\SRC\DRIVERS\LEDdriver

Platform Builder 5 with 2007 Patch

- 178 -
LED

LED

2.8.3 ADC

AD-Convert
BSP Mini2440\SRC\DRIVERS\Touch

Platform Builder 5 with 2007 Patch

ADC

Samsung S3C2440 8 A/D


AIN4AIN5AIN6AIN7 YMYPXMXP
( S3C2440 16-5 ) AIN0-3 CON4
1.3. AIN0 W1

A/D

- 179 -
W1 10
0 1024
A/D 1
A/D AIN0
W1 LCD LCD

2.8.4 I2C-EEPROM

I2C-EEPROM.exe
BSP \Mini2440\SRC\DRIVERS\IIC

Platform Builder 5 with 2007 Patch


/dev/buttons

I2C-EEPROM

- 180 -
EEPROM EEPROM

ASC Write
Read

2.8.5 PWM

PWM-Buzzer.exe
BSP Mini2440\SRC\DRIVERS\PWM

Platform Builder 5 with 2007 Patch

- 181 -

PWM-buzzer

PWM 1000HzStart
PWM
Stop PWM

2.8.6

Watchdog.exe
BSP Mini2440\SRC\DRIVERS\WDT

Platform Builder 5 with 2007 Patch

- 182 -

S3C2440
WindwsCE6 BSP

Start

15
Feed

- 183 -
2.8.7 LCD

LCD-Test.exe
BSP Mini2440\SRC\DRIVERS\Display

Platform Builder 5 with 2007 Patch

LCD LCD
3
LCD


Auto-loop

Manual-control

2.6.8 CMOS

CMOS-Camera.exe
BSP Mini2440\SRC\DRIVERS\Camera

Platform Builder 5 with 2007 Patch

- 184 -
CMOS CAM130
CAMERA CMOS

CMOS-Camera CMOS
CMOS

Snap Snap Continue


( My Documents
bmp) SD
PC

- 185 -
2.8.9

Recorder.exe
BSP Mini2440\SRC\DRIVERS\Wavedev

Platform Builder 5 with 2007 Patch

Recorder

- 186 -

2.8.10

LCD

LCD mini2440\Src\Drivers\Display

Rotate

- 187 -
Rotate 90

Close

2.8.11

SerialPort.exe
BSP Mini2440\SRC\DRIVERS\Serial

Platform Builder 5 with 2007 Patch

- 188 -
BSP 2,3

SerialPort

COM2 115200
()
COM2 PC PC

PC


PC ()

- 189 -
COM3

2.8.12

BSP
Mini2440\SRC\DRIVERS\Touch

wince 3.5LCD

USB ->->

- 190 -

OK

->

- 191 -
2.8.13


BSP Mini2440\SRC\DRIVERS\dm9000

Platform Builder 5 with 2007 Patch

IP DNS

Windows ->

DM9CE1

- 192 -
DM9CE1 IP
IP

2.8.14


BSP Mini2440\SRC\DRIVERS\Backlight

Platform Builder 5 with 2007 Patch

WindowsCE6

- 193 -

2

->->

1 HMI

- 194 -
2.8.15


BSP Mini2440\SRC\COMMON\Rtc

Platform Builder 5 with 2007 Patch


OK

2.8.16

google
WinCE

AutoRun-Setting

- 195 -
Apps Browser
AD-Convert
AD-Convert.exe \Windows

OKClose

- 196 -
AD-Convert

2.8.17

wince windows WINCE


USB Host

- 197 -
2.8.18 SD/MMC

BSP 32G SD
SD/MMC SD SD Storage
Card SD/MMC

2.8.19 ActiveSync USB

USB \windows \CE


USB
ActiveSync
WINCE USB Device
USB PC

- 198 -
2.8.20 USB

WINCE5 (: VNUWLC41)
USB Host

FriendlyARM
()
OK

- 199 -
FriendlyARM

IP

- 200 -

USB


Linux
PC Windows
5
2

Windows/2000/XP

3.1

64M NandFlash mini2440/micro2440


128M-1Gb Nand Flash mini2440/micro2440
Linux
3.2

3.1.1

USB Nor
Flash
Flash

(1) BIOS

- 201 -
(2) [u] Nand Flash

(3) DNW USB DNW [USBOK] USB


DNW Usb Port Backup NandFlash to File

- 202 -
( backup.bin)

- 203 -
DNW

- 204 -
66M byte, Nand Flash
Nand Flash
Nand Flash mini2440/micro2440

- 205 -
3.1.2

USB Nor
Flash

Nand Flash


(1) BIOS

- 206 -
(2) [r] Nand Flash

(3) DNW USB DNW [USBOK] USB


DNW Usb Port Transmit/Restore

- 207 -
( backup.bin)

- 208 -
Nand Flash

3.2 Linux

USB NOR
Flash Nand Flash

Linux images\linux
Linux
(1) Nand Flash
(2) bootloader
(3)
(4)

3.2.1

Nand Flash
(1) BIOS

- 209 -
(2) [f] Nand Flash
Nand Flash supervivi

Nand Flash
Nand Flash
Flash (Samsung_Nand_Flash.pdf) Flash
Nand Flash

- 210 -
3.2.2 bootloader

NOR FLASH BIOS


Linux bootloadervboot supervivi
vboot
64M/128M-1Gb Nand Flash mini2440/micro2440 vivi
64M
Supervivi vivi 64M 128M-1GB supervivi-64M
supervivi-128M supervivi

(1) DNW USB DNW [USBOK] USB


[v] supervivi

- 211 -
(3)USB Port->Transmit/Restore supervivi(
images/linux/)

(4)BIOS supervivi Nand Flash

- 212 -
3.2.3 Linux

Linux 64M/128M-1Gb Nand Flash mini2440/micro2440


(1) BIOS [k] linux zImage

(2) USB Port->Transmit zImage(


images\linux\)

zImage_w35 3.5(LQ035Q1DG06 )
zImage_x35 Sony 3.5LCD
zImage_n35 NEC3.5LCD
zImage_t35 3.5LCD
zImage_l80 Sharp 8LCD()
zImage_a70 7 800x480
zImage_VGA1024x768 VGA 1024x768
images\linux readme.txt

- 213 -
(3) BIOS Nand Flash

3.2.4

64M/128M-1Gb mini2440/micro2440

- 214 -
root_qtopia-64M.img root_qtopia-128M.img
(mkyaffs2image) root-qtopia.img
(1) BIOS [y] yaffs

(2) USB Port->Transmit/Restore


root_qtopia.img( images\linux )

root_qtopia-64M.img
- USB
VGA NFS 64M Nand Flash mini2440/micro2440
root_qtopia-128M.img
- USB
VGA NFS 128M-1GB Nand Flash mini2440/micro2440

- 215 -
(3) BIOS Nand Flash

2-3

- 216 -
USB

BIOS [b]
Nand Flash

3.3 WinCE


WinCE5 \images\wince5.0
WinCE6 \images\wince6.0
WindowsCE5/6
WindowsCE

WindowsCE
(1) bootloader
(2) BootLogo(bmp )
(3) WindowsCE

BIOS

3.3.1 Bootloader

NOR FLASH BIOS

bootloader WINCEsupervivi nboot.bin

Bootloader : Supervivi-64M Nboot.bin


Supervivi-128M
\images\wince5.0 \images\wince5.0
\images\wince6.0 \images\wince6.0
WindowsCE5.0\NBOOT

WindowsCE6.0\NBOOT
Nboot.mcp
Arm-linux-gcc ADS1.2
BIOS z WindowsCE(
supervivi 6-10 )
nboot 2-3 z Logo( USB

- 217 -
Logo bmp )
z (

)

z supervivi
z NBOOT 4.6
z Nboot Nboot_W35.bin, Nboot_N35.bin Nboot_X35.bin
Nboot_T35.binNboot_L80.binNboot_A70.binNboot_VGA1024x768.bin
LCD Nboot LCD

Nboot_T35.bin ( Nboot.bin) Nboot.bin


(1) DNW USB DNW [USBOK] USB
[n] Nboot.bin

(3)USB Port->Transmit Nboot.bin(


\images\wince6.0 )

- 218 -
(4)BIOS Nboot.bin Nand Flash Block 0

3.3.2 BootLogo

WindowsCE LogoBootLogo StartLogo BootLogo


Nboot Nboot BootLogo
StartLogo BSP (StartLogo.c)
mini2440\Src\Kernel\Oal init.c StartLogo.c
StartLogoMaker.exe
BootLogo Supervivi [l] Nand Flash 24bit
bmp ( bmp ) 2M 240x320 1024x768

(1) BIOS [l] bmp BootLogo(


BootLogo.bmp )

- 219 -
(2) USB Port->Transmit/Restore bootlogo.bmp

(3) BIOS bootlogo.bmp Nand Flash

3.3.3 wince

Supervivi WinCE (

- 220 -
Eboot )Supervivi USB NK.bin Nand Flash
(NK.bin NandFlash BINFS )( WinCE
ResidentFlash FAT )
WinCE 64M/128M-1Gb mini2440/micro2440
WinCE
(1) BIOS [w] WINCE

(2) USB Port->Transmit/Restore NK.bin(


\images\wince5.0\images\wince6.0)
WINCE
NK_W35.bin 3.5LCD(LQ035Q1DG06 )
NK_X35.bin Sony 3.5" LCD
NK_N35.bin NEC 3.5" LCD
NK_T35.bin 3.5LCD
NK_L80.bin Sharp 8LCD()
NK_A70.bin 7LCD
NK_VGA1024x768.bin VGA 1024x768
images\wince5.0images\wince6.0
readme.txt

- 221 -
BIOS Nand Flash WinCE
WinCE

- 222 -
3.4

Supervivi 2440testuCos2Linux WinCE


USB
Nand Flash

3.4.1 2440test


\images\2440test\ 2440test_W35.bin W35
2440test_N35.bin NEC3.5LCD
2440test_T35.bin 3.5LCD
2440test_A70.bin 7LCD
2440test_L80.bin Sharp
8LCD()
2440test_VGA1024x768.bin
VGA 1024x768
0x30000000
\2440test
2440test.mcp NEC3.5
ADS1.2

z Nand Flash supervivi [a]


z \\2440test\inc\Option.h LCD_TYPE
LCD
(1)USB S2 Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 223 -
(3) DNW Configuration USB 0x30000000

(4) BIOS [d] USB

- 224 -
(5) DNW USB PortTransmit 2440test_T35.bin (
images\2440test LCD )

(6) 2.3

- 225 -
LCD

3.4.2 uCos2


\images\uCos22440uCos2.bin 2440uCos2_W35.bin W35
2440uCos2_N35.bin NEC3.5LCD
2440uCos2_X35.bin Sony 3.5LCD
2440uCos2_T35.bin 3.5LCD
2440uCos2_L80.bin Sharp
8LCD()
2440uCos2_A70.bin 7LCD
2440uCos2_VGA1024x768.bin VGA
1024x768
0x30000000
uCos2\uCos2
uCOS_2440.mcp NEC3.5
ADS1.2

z Nand Flash supervivi [a]


z uCos2\uCos2\S3C2440\includes\option.h LCD_TYPE
LCD

- 226 -
(1)USB S2 Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

(3) DNW Configuration USB 0x30000000

- 227 -
(4) BIOS [d] USB

(5) DNW USB PortTransmit 2440uCos2_T35.bin


( images\uCos2 LCD )

- 228 -
(6) LCD

- 229 -
3.4.3 Linux


\images\linux zImage_W35 W35( )
zImage_N35 NEC3.5LCD
zImage_X35 Siny 3.5LCD
zImage_T35 3.5LCD
zImage_L80 Sharp 8LCD()
zImage_A70 7LCD
zImge_VGA1024x768 VGA
1024x768
0x30008000 dnw
linux-2.6.32.2-mini2440-20100106.tgz

Arm-linux-gcc-4.4.3
8

linux linux ( zImage )


USB linux
NFS() yaffs( supervivi y
root_default.img )

linux NFS
supervivi q supervivi
( 5.1.4 )
Supervivi>param set linux_cmd_line "console=ttySAC0 root=/dev/nfs
nfsroot=192.168.1.111:/opt/FriendlyARM/mini2440/root_qtopia
ip=192.168.1.70:192.168.1.111:192.168.1.111:255.255.255.0:MINI2440.arm9.net:eth0:off"

USB linux
root_qtopia.img
(1)USB S2 Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 230 -
(3) BIOS [z] USB

(4) DNW USB PortTransmit zImage_t35 zImage_A70


( images\linux )
()[z] zImage 0x30008000
0x200000[q] supervivi load ram 0x30008000 0x200000
u

- 231 -
(5) supervivi [g]
[g] supervivi boot ram supervivi
boot ram
supervivi [y]
root_qtopia.img NFS

- 232 -
3.4.4 WinCE

WindowsCE5/6 NK.bin NK.nb0


NK.bin Nand Flash
NK.nb0 NK.nb0
Nand Flash USB 0x30200000

\images\ wince5.0\ NK_W35.nb0 W35()
NK_N35.nb0 NEC3.5LCD
\images\ wince6.0\ NK_X35.nb0 Sony 3.5LCD
NK_T35.nb0 3.5LCD
NK_L80.nb0 Sharp8LCD()
NK_A70.nb0 7LCD
NK_VGA1024x768.nb0 VGA
1024x768
0x30200000 dnw
WindowsCE5.0\mini2440

WindowsCE6.0\mini2440
mini2440.pbxml
Platform Builder 5.0/6.0
mini2440 () wince 5.0/6.0 BSPmini2440.pbxml
9/10 wince nk.bin nk.nb0.

nk.nb0 wince
Nand Flash

USB WINCE
(1)USB S2 Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 233 -
(3) DNW Configuration USB 0x30200000

(4) BIOS [d] USB

- 234 -
(5) DNW USB PortTransmit NK.nb0 (
images\wince5.0images\wince6.0)

(6) supervivi PC USB


USB

- 235 -
ADS1.2
ARM ADS ARM Developer Suite ARM ARM
ADS 1.2 ADS1.1 ADS1.0
WindowsNT/2000/98/95/XP

4.1 ADS LED

ADS
Flash bin

4.1.1

ADS File->New

7
ARM Excuteable Image ARM ELF

- 236 -

ARM Object Library ARM armar
Empty Project
Makefile Importer Wizard Visual C nmake GNU make
CodeWarrior IDE
Thumb ARM Excutable Image ARM Thumb
ELF
Thumb Excutable image Thumb ELF
Thumb Object Library Thumb armar

ARM Executable ImageProject name


myledLocationSet(
D:\work) myled
myled.mcp D:\work
myled myled.mcp D:\work\myled

- 237 -
(
\myled) myled

myled.mcp ADS Project->Add Files

- 238 -

- 239 -
ADS target DebugRel
target Realse Debug
DebugRel
Debug

Release
DebugRel
main.c myled.mcp

- 240 -
4.1.2

Edit DebugRel
Setting

- 241 -

z Target Setting
Target Name
Linker ARM Linker
armlink
Linker None
ARM Librarian ARM
ARM Linker
Pre-Linker ADS
Post-Linker
Flash ARM fromELF
fromELF ELF

Target Setting

- 242 -
z Language Settings
ARM Assembler
ADS armasm ARM
ARM7TDMI ARM920T

- 243 -
C ARM C Compiler ARM
C Compiler ADS armcc
ARM ARM7TDMI ARM920T

CodeWarrior

- 244 -
DOS

z Linker
ADS
ARM Linker

Output Linktype Partial


Simple
ELF
Scattered scatter
ELF

Simple

RO Base RO 0x8000
SDRAM
SDRAM SDRAM
0x3000000-0x34000000 0x30000000
RW Base RW ZI split
RW Base
RW ZI

- 245 -
Ropi RO
armlink

Rwpi RW ZI

/

Region$$Table ZISection$$Table sb
RW Base 0
Split Image RO RW 2
RO RW
RW Base RW Base 0
Relocatable
Options Image entry point

-entry 0x0
-entry
int_handler armlink
offset+object(section)
-entry8+startup(startuoseg) ELF
main
Image dose not have an entry point(Not specified or not set due to multiple choice)
Layout asm.o Init
ARM Linker

Linker ARM fromELF


fromELF
ELF ROM

Target Post-linker
Output format Plain
binary Flash
Output file name Choose...

make
CodeWarrior IDE fromELF
make

- 246 -
CodeWarrior IDE Project make

D:\work\myled\myled_Data\DebugRel
myled.bin myled.axf

- 247 -
4.2 HJTAG

2.7 H-JTAG

4.2.1 HJTAG AXDDEBUGGER

(1) AXD Debugger


ADS1.2 AXD Debugger

- 248 -
AXD Debugger

(2) AXD Debugger


Options->Confiuguer Target

Add H-JTAG
H-JTAG.dll

- 249 -
Choose Target H-JTAG OK AXD Debugger

4.2.4 HJTAG ADS1.2

AXD Debugger File->Load Image


(*.axf ) myled.axf
Jtag AXD Debugger
CPU
ADS VisualC++

- 250 -
4.3 2440test

2440test
GPIO
ARM 2440test ADS1.2
Linux wince
0x30000000 Nand Flash
2440test

2440test 64M/128M-1GB Nand Flash


mini2440/micro2440
2440test LCD \2440test\inc\Option.h
LCD_TYPE // LCD
//#define LCD_N35
//#define LCD_L80
//#define LCD_T35
#define LCD_X35
//#define LCD_W35
//#define LCD_A70
//#define LCD_VGA1024768
LCD_TYPE_N35
2440test

4.3.1 HJTAG 2440test

JTAG JTAG
H-JTAG

- 251 -
2440test
( D:\work) ADS1.2 File->Open
2440test.mcp

- 252 -
Project->Debug F5 2440test AXD
Debugger 2440test.axf JTAG
2440test.axf

- 253 -

Execute->Go F5 Main

- 254 -

- 255 -
4.3.2 USB 2440test

USB 2440test JTAG Supervivi Download


& Run
(1)USB NOR Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

(3) DNW Configuration USB 0x30000000

- 256 -
(4) BIOS [d] USB

(5) DNW USB PortTransmit(


\images\2440test)

- 257 -
(6) LCD

4.4.3 2440test NandFlash

2440test 64M/128M Nand Flash mini2440/micro2440


LCD
Supervivi [a] 2440test.bin Nand Flash

- 258 -

(1)USB NOR Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

(3) BIOS [a] USB

- 259 -
(4) DNW USB PortTransmit(
\images\2440test\)
Supervivi Nand Flash 0 Block 0
Nand Flash

- 260 -
4.5uCos2

uCos2 2440
2410 2440
2440test 64M/128M-1GB Nand Flash
mini2440/micro2440
uCos2 uCos2
(
)
uCos2 LCD
uCos2\S3C2440\includes\option.h LCD_TYPE //
LCD
//#define LCD_N35
//#define LCD_L80
//#define LCD_T35
#define LCD_X35
//#define LCD_W35
//#define LCD_A70
//#define LCD_VGA1024768
LCD_TYPE_N35

4.5.1 uCos2

uCos2uCos2(
ADS1.2 File->Open uCOS_2440.mcp
D:\work)

- 261 -

ProjectMake F7 uCos2
D:\work\uCos2\uCOS_2440_Data\DebugRel 2440ucos2.bin

- 262 -

4.5.2 uCos2

(1)USB Nor Flash


DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 263 -
(3) DNW Configuration USB 0x30000000

(4) BIOS [d] USB

- 264 -
(5) DNW USB PortTransmit(
images\uCos2\)

- 265 -
(6) LCD

4.5.3 uCos2 Nand Flash

PC Supervivi
[a](Absolute User Application) Nand Flash
(1)USB Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 266 -
(3) BIOS [a] USB

(4) DNW USB PortTransmit(


\images\uCos2\)

- 267 -
supervivi Nand Flash block 0 S2 NAND
Nand Flash uCos2

- 268 -
Linux
/PC Fedora 9.0 Linux

Linux-2.6.29+Qtopia-2.2.0 (Linux-2.6.32.2)
Fedora9
Linux

Fedora 9(: Fedora-9-i386-DVD.iso)


(http://www.arm123.com.cn/iso/Fedora-9-i386-DVD.iso )

Linux

Fedora 9:
Fedora 9 root
()Fedora 10
root Linux Fedora 8
Fedora 9
(ubuntu ) Fedora 9

5.1 Fedora 9.0

Fedora 9.0 DVD


http://www.arm123.com.cn/iso/Fedora-9-i386-DVD.iso
()
Step1 BIOS ,

- 269 -
Step2, , , Skip

Step3, Next .

- 270 -
Step4,

Step5,

- 271 -
Step6

Edit DHCP, IP,


IP

- 272 -
OK DNS

Step7System clock uses UTC

- 273 -
Step8 root 6

Step9

- 274 -
Next
Vmware Write changes to disk

- 275 -
Step11Next

Step12 Servers

- 276 -
Step13

Step14

- 277 -
Step15Reboot

Step16

- 278 -
Step17Forward

Continue

- 279 -
Step18

Step19Finish

- 280 -

Step20 root root

- 281 -

root
Continue

- 282 -
Windows Ubuntu

5.2

Linux
Linux

- 283 -
5.2.1


Step1

Step2

Step3Add User

- 284 -
OK plg /home plg

Add User

- 285 -
5.2.2 Windows

Fedora9 Windows

GuestBridges

Windows
Step1 Windows share_f9()

- 286 -
Step2 Fedora9

- 287 -
Service type Windows share

Windows IP

- 288 -
Connect

Connect Windows

- 289 -

TAB

- 290 -
5.3

Linux Qtopiabootloader


Linux-2.6.29 (
Linux-2.6.32.2) arm-linux-gcc-4.4.3

Step1 linux\ arm-linux-gcc-4.4.3.tgz tmp\

#cd /tmp
#tar xvzf arm-linux-gcc-4.4.3.tgz C /
C C Change

arm-linux-gcc /usr/loca/arm/4.4.3

- 291 -
Step2
#gedit /root/.bashrc
/root/.bashrc
export PATH=$PATH: /opt/FriendlyARM/toolschain/4.4.3/bin

(->logout )
arm-linux-gcc v

- 292 -
5.4


- Linux
- Qropia-2.2.0 ( x86 arm )
- QtE-4.6.3 (ARM )
- busybox-1.13
- Linux ()
- Linux bootloader vboot
- bootloader( Linux)
- boa(web server), madplay( mp3 )
-
- mkyaffsimage
- Linux logo logomaker


arm-linux-gcc-4.3.2 ()

5.4.1

/opt/FriendlyARM/mini2440
mkdir p /opt/FriendlyARM/mini2440

- 293 -

(1) Linux
Fedora9 /tmp /tmp/linux
#mkdir /tmp/linux
linux /tmp/linux

(2) Linux
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/linux-2.6.32.2-mini2440-20100106.tar.gz
linux-2.6.32.2 Linux-2.6.32.2
20100106

(3) qtopia
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/x86-qtopia.tgz
#tar xvzf /tmp/linux/arm-qtopia.tgz
x86-qtopia arm-qtopia
20100108
qtopia mouse() tp()
konquor

- 294 -
Qt

(4) QtE-4.6.1
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/arm-qte-4.6.3-20100802.tar.gz
arm-qte-4.6.3
arm-qte

(5) busybox
Busyboxlinuxbusybox-1.13.3
(http://www.busybox.net)
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/busybox-1.13.3-mini2440.tgz
busybox-1.13.3
fa.config

(6) Linux
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/examples-20100108.tgz
examples linux
20100108 examples

(7) vboot
64M/128M mini2440/micro2440 Linux
bootloadervboot vivi
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/vboot-src-20100106.tar.gz
vboot bootloader Makefile
20100106

(8) bootloader
vboot Bootloader()
vivi u-boot Linux

- 295 -
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/bootloader.tgz
bootloader vivi u-boot bootloader
vivi 64M Nand Flash mini2440/micro2440 u-boot

5.4.2

/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/ rootfs_qtopia_qt4-20100816.tar.gz
rootfs_qtopia_qt4
20100816
4 root_default, root_nfs, root_qtopia_tp, root_qtopia_mouse

qtopia busybox

- NFS
- USB
-

- SD ( 32G)
- Qtopia-2.2.0 QtE-4.6.1

5.4.3

(1) mkyaffs2image
rootfs_qtopia_qt4
mkyaffs2image

64M 128M/256M/512M/1GB mini2440/mcro2440 2


mkyaffs2image mkyaffs2image-128M mkyaffs2image 64M
mkyaffs2image-128M
128M/256M/512M/1GB
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/mkyaffs2image.tgz C /
C C C

- 296 -
yaffs yaffs2
mkyaffs2image
/usr/sbin 2 mkyaffs2image mkyaffs2image-128M

(2) LogoMaker
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#tar xvzf /tmp/linux/logomaker.tgz C /
C C C
LogoMaker linux logo
bmp, jpg, png linux logo
Fedora9
LogoMaker /usr/sbin
logomaker

5.5 NFS

Fedora 9 NFS
NFS

- 297 -
5.5.1

5.4.2 root_qtopia

(1)

#gedit /etc/exports
nfs ()
/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4 *(rw,sync,no_root_squash)

/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4 nfs
nfs
*
rw
no_root_squash root

5.5.2 NFS

NFS NFS
Fedora NFS
lokkit

- 298 -
(*)DisabledOK
NFS
(1) nfs

#/etc/init.d/nfs start
nfs nfs
# mount -t nfs localhost: /opt/FriendlyARM/mini2440/rootfs_qtopia_qt4 /mnt/
/mnt
/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4
nfs
#/etc/init.d/nfs stop
(2) NFS

# serviceconf
nfs
Enable

5.5.3 NFS

NFS NFS
NFS

- 299 -
Linux
Nand Flash
K1-K6 vivi

Supervivi> param set linux_cmd_line "console=ttySAC0 root=/dev/nfs


nfsroot=192.168.1.111:/opt/FriendlyARM/mini2440/rootfs_qtopia_qt4
ip=192.168.1.70:192.168.1.111:192.168.1.111:255.255.255.0:sbc2440.arm9.net:eth0:off"
param set linux_cmd_line linux

nfsroot IP
ip=
(192.168.1.70) IP( IP )
(192.168.1.111) IP
(192.168.1.111)(GW)
(255.255.255.0)
()
eth0
nfs.txt

boot nfs

- 300 -
- 301 -
Linux
Linux

Linux
Linux

Fedora 9

Linux-2.6.32.2

6.1

LCD

config_mini2440_w35 3.5 LCD( W35)


config_mini2440_x35 Sony 3.5 LCD
config_mini2440_t35 3.5 LCD
config_mini2440_l80 Sharp 8 LCD()
config_mini2440_n35 NEC3.5 LCD
config_mini2440_n43 NEC4.3 LCD
config_mini2440_a70 7 LCD
config_mini2440_vga1024x768 VGA ( 1024x768(

ls

- 302 -
config_w35
#cp config_mini2440_w35 .config w35 .
config
make menuconfig

- 303 -
<Exit>


#make zImage

arch/arm/boot linux zImage

zImage

- 304 -
6.2

(linux-2.6.32.2 tgz )mini2440


linux-2.6.32.2 100%
(1)DM9000
Linux-2.6.32.2/drivers/net/dm9000.c
(2)( 0,1,2/dev/ttySAC0,1,2)
Linux-2.6.32.2/drivers/serial/s3c2440.c
(3) RTC
Linux-2.6.32.2/drivers/rtc/rtc-s3c.c
(4)LED
Linux-2.6.32.2/drivers/char/mini2440_leds.c
(5)
Linux-2.6.32.2/drivers/char/mini2440_buttons.c
(6)
Linux-2.6.32.2/drivers/input/touchscreen/s3c2410_ts.c
(7)yaffs2
Linux-2.6.32.2/fs/yaffs2
(8)USB
Linux-2.6.32.2/drivers/usb/hid
(9)SD/MMC ( 32G SD )
Linux-2.6.32.2/drivers/mmc
(10)Nand Flash
Linux-2.6.32.2/drivers/mtd/nand
(11)UDA1341
Linux-2.6.32.2/sound/soc/s3c24xx
(12)LCD
Linux-2.6.32.2/drivers/video/s3c2410fb.c
(13)
Linux-2.6.32.2/drivers/usb/storage
(14) USB
Linux-2.6.32.2/drivers/media/video/gspca
(15)I2C-EEPROM
inux-2.6.32.2/drivers/i2c
(16)
Linux-2.6.32.2/drivers/video/mini2440_backlight.c
(17)PWM
Linux-2.6.32.2/drivers/char/mini2440_pwm.c
(18)
Linux-2.6.32.2/drivers/watchdog/s3c2410_wdt.c

- 305 -
(19)AD
Linux-2.6.32.2/drivers/char/mini2440_ad.c
(20)CMOS
Linux-2.6.32.2/drivers/media/video/s3c2440camif.c
(21)USB (TL-WN321G+)
Linux-2.6.32.2/drivers/net/wireless/rt2x00
(22)USB
Linux-2.6.32.2/drivers/usb/serial/pl2302.c

6.3 Linux

Linux

6.1
config_mini2440_w35

make menuconfig

6.3.1 CPU

System Type

- 306 -
S3C2410 S3C2410 S3C2440

S3C2440
S3C2400 Machines

S3C2440 FriendlyARM
Mini2440 development board

- 307 -
arch/arm/mach-s3c2440/mach-*
mach-mini2440.c MACH_TYPE
arch/arm/tools/mach-types 1999 vivi
include/platform/smdk2440.h MACH_TYPE

- 308 -
6.3.2 LCD

Device Drivers

Backlight()

- 309 -
LCD select
config_mini2440_t35 3.5 LCD(3.5 inch 240x320 Toppoly LCD)
LCD

Device Drivers

- 310 -
6.3.3

VGA1024x768
Device Drivers Input device support

Touchscreens

- 311 -
<Exit> Device Drivers

6.3.4 USB

Device Drivers

- 312 -
USB <Exit> Deice Drivers

6.3.5

SCSI SCSI
Device Drivers SCSI device support

- 313 -

Device Drivers USB support USB support

<*> USB Mass Storage support

<Exit> Device Drivers

- 314 -
6.3.6 USB

Device Drivers Multimedia devices

* Video capture adapters

- 315 -
* GSPCA based webcams

GSPCA USB
USB
Video

- 316 -
<Exit> Device Drivers <Exit>

6.3.7 CMOS

CMOS CAM130 OV9650

Device Drivers Multimedia devices

- 317 -
* Video capture adapters OV9650

CAM130 VL4 V4L2

- 318 -
6.3.8


Netwoking support

Networking options

- 319 -
TCP/IP

Device Drivers
Network device support

Ethernet (10 or 100Mbit)

- 320 -

<*> Generic Media Independent Interface device support
<*> DM9000 support

<Exit> Device Drivers

- 321 -
6.3.9 USB

Linux-2.6.32.2 USB
TP-Link VIA

Netwoking support

Wireless

- 322 -
*

Device Drivers

- 323 -

Wireless LAN(IEEE 802.11)

- 324 -
USB
Ralink USB

- 325 -
<Exit> Device Drivers

6.3.10

Device Drivers Sound card supprt

- 326 -
ALSA (Advanced Linux Sound Architecture)

OSS Mixer API OSS API

- 327 -
ALSA for Soc audio support

ALSA

- 328 -
<Exit> Device Drivers

6.3.11 SD/MMC

Device Drivers SD/MMC

<*> MMC/SD

- 329 -
SD 32G

<Exit> Device Drivers

6.3.12

Device Drivers Watchdog

- 330 -

<Exit> Device Drivers

6.3.13 LED

Device Drivers Character devices - - -> LEDs

- 331 -
6.3.14

Device Drivers Character devices - - -> Buttons

- 332 -
6.3.15 PWM

Character devices buzzer

6.3.16 AD

Character devices ADC

- 333 -
6.3.17

Character devices Serial drivers - - ->

- 334 -
6.3.18 RTC

Device Drivers Real Time Clock

- 335 -
2440 RTC

6.3.19 I2C-EEPROM

Device Drivers I2C support

- 336 -
I2C Hardware Bus support

S3C2410 I2C Driver

- 337 -
6.3.20 yaff2s

yaffs2 nand flash Device drivers


MTD

<*>

- 338 -
NAND Device Support

Nand Flash

- 339 -
File systems

Miscellaneous filesystems

- 340 -
YAFFS2

<Exit> File systems

6.3.21 EXT2/VFAT/ NFS

File System Network File Systems

- 341 -
NFS

SD FAT32
File Systems DOS/FAT/NT Filesystems

- 342 -
VFAT FAT32

- 343 -
6.3.22 Linux logo

Linux

Linux Logo
linux-2.6.32.2/drivers/video/logo/linux_logo_clut224.ppm
logo
LogoMaker Fedora 9 bmppngjpg

logomaker logomaker

- 344 -
File->Open a picture file Ctrl+O

- 345 -
logomaker

File->Convert the picture to a Linux Logo File Crtl+C

linux_logo_clut224.ppm linux-2.6.32.2/drivers/video/logo

- 346 -
LogoMaker (help->About)

6.4

5.4.3 mkyaffs2image
rootfs_qtopia_qt4.img yaffs2

- 347 -
/opt/FriendlyARM/mini2440
#cd /opt/FriendlyARM/mini2440
#mkyaffs2image-128M rootfs_qtopia_qt4 rootfs_qtopia_qt4.img
rootfs_qtopia_qt4.img
USB 128M/256M/512M/1GB Nand Flash mini2440/micro2440

64M Nand Flash

mkyaffs2image
(1) qtopia-2.2.0
rootfs_qtopia_qt4/usr/local/Trolltech
(2) QtE-4.6.1 /opt

- 348 -
Linux
Linux Linux

Linux
Linux
arm-linux-gcc-4.3.2 with EABI

arm-linux-gcc v

7.1Hello,World!

7.1.1 Hello,World

Hello,World linux/examples.tgz
/opt/FriendlyARM/mini2440/examples/hello

- 349 -
Hello, World :
#include <stdio.h>

int main(void) {
printf("hello, FriendlyARM!\n");
}

7.1.2 Hello,World


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

#arm-linux-gcc o hello main.c

#make
hello file hello
ARM

7.1.3 Hello,World


()
()

NFS()

(1)

- 350 -
/bin

Step1
PC USB
#mount /dev/sda1 /mnt
#cp hello /mnt
#umount /mnt
Step2
USB Host /udisk
hello
#cd /udisk
#./hello hello
umount /udisk

(3) ftp ()
ftp

PC

- 351 -

(4)
2.5

- 352 -
hello

#chmod +x hello
USB
ftp

(4) NFS
Linux NFS
hello
NFS
4.3 NFS
IP 192.168.1.111
#mount t nfs o nolock 192.168.1.111:/opt/FriendlyARM/mini2440/root_qtopia
/mnt
/mnt PC Linux hello
opt/FriendlyARM/mini2440/root_qtopia
#cd /mnt
#./hello

7.2 Linux

Linux
copyright

7.2.1 LED


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_leds.c
misc
/dev/leds
/opt/FriendlyARM/mini2440/examples/leds
led.c
led
LED insmod


#include <stdio.h>

- 353 -
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>

int main(int argc, char **argv)


{
int on;
int led_no;
int fd;

/* led */
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);
}

/*/dev/leds */
fd = open("/dev/leds0", 0);
if (fd < 0) {
fd = open("/dev/leds", 0);
}
if (fd < 0) {
perror("open device leds");
exit(1);
}

/* ioctl led*/
ioctl(fd, on, led_no);
/**/
close(fd);
return 0;
}

hello led

7.2.2

- 354 -
/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_buttons.c
misc
/dev/buttons
/opt/FriendlyARM/mini2440/examples/buttons
buttons_test.c
buttons
insmod


#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/select.h>
#include <sys/time.h>
#include <errno.h>

int main(void)
{
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);

- 355 -
}

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;
}
hello buttons

7.2.3 PWM


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_pwm.c
misc
/dev/pwm
/opt/FriendlyARM/mini2440/examples/pwm
pwm_test.c
Pwm_test
PWM insmod


#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <stdlib.h>

- 356 -
#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);
}
return ch;
}

static int fd = -1;


static void close_buzzer(void);

- 357 -
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)


{

- 358 -
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;
}
}
}

- 359 -
7.2.4 I2C-EEPROM


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/i2c/busses
I2c-s3c2410.c

/dev/i2c/0
/opt/FriendlyARM/mini2440/examples/i2c
eeprog.c 24cXX.c
I2c
I2C insmod

24cXX.c
/***************************************************************************
copyright : (C) by 2009 Guangzhou FriendlyARM, in China
email : capbily@163.com
website : http://www.arm9.net

***************************************************************************/

#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);

- 360 -
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)


{
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(" ");

- 361 -
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 "
"(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;
}

- 362 -
7.2.5


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/serial/
S3c2440.c
/dev/ttySAC0,1,2
/opt/FriendlyARM/mini2440/examples/comtest
comtest.c
armcomtest
x86 arm
comtest
linux minicom
Arm-linux PC linux
linux

# 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);
}

- 363 -
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");
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));
}

- 364 -
}

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;
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;

- 365 -
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");

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");

- 366 -
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);
}
}

- 367 -
}

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;
}

7.2.6 UDP


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/net/

- 368 -
dm9000.c

eth0 (/dev )
/opt/FriendlyARM/mini2440/examples/udptak
udptalk.c
udptalk.c

x86 arm

TCP/IP UDP(User Datagram Protocol


)UDP TCP socket socket

socket
SOCK_DGRAM
sockfd=socket(AF_INET, SOCK_DGRAM, 0);
socket
Sendto recvfrom

int sendto(int s, const void *msg, int len, unsigned int flags, const struct sockaddr *to, int
tolen);
int recvfrom(int, s, void *buf, int len, unsigned int flags, struct sockaddr *from, int
fromlen);
s socketmsg buf len
flags 0 to from
IP tolen fromlen to from socket
-1

- 369 -
UDP

IP ( IP )

read() write() recvfrom() sendto() TCP


0 sendto()
msg NULL len 0
udp
/*
* udptalk Example for Matrix V ; mini2440
*
* Copyright (C) 2004 capbily - friendly-arm
* capbily@hotmail.com
*/
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <stdio.h>

#define BUFLEN 255

- 370 -
int main(int argc, char **argv)
{
struct sockaddr_in peeraddr, /* IP socket */
localaddr;/* socket */
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);
}
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){

- 371 -
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{
/**/
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);
}
}
}

udptalk.c /opt/FriendlyARM/mini2440/examples/udptalk
Makefile x86-udptalk
arm-udptalk make arm-udptalk
( Linux ) IP
192.168.1.108 IP 192.168.1.230

#./x86-udptalk 192.168.1.230 2000 192.168.1.108 2000

#arm-udptalk 192.168.1.108 2000 192.168.1.230 2000

- 372 -
x86-udptalk

- 373 -
arm-udptalk

7.2.7


/opt/FriendlyARM/mini2440/examples/math
mathtest.c
mathtest

math.h
libm

#include <stdio.h>
#include <stdlib.h>
#include <math.h> ;

int main(void)
{

- 374 -
double a=8.733243;

printf("sqrt(%f)=%f\n", a, sqrt(a));

return 0;
}

Makefile
CROSS=arm-linux-

all: mathtest

# libm,
mathtest:
$(CROSS)gcc -o mathtest main.c -lm

clean:
@rm -vf mathtest *.o *~

hello mathtest

7.2.8


/opt/FriendlyARM/mini2440/examples/pthread
pthread_test.c
pthread_test
pthread.h
libpthread


#include<stddef.h>
#include<stdio.h>
#include<unistd.h>
#include"pthread.h" ;

void reader_function(void);
void writer_function(void);
char buffer;

- 375 -
int buffer_has_item=0;
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-

- 376 -
all: pthread

# libphread,
pthread:
$(CROSS)gcc -static -o pthread main.c -lpthread

clean:
@rm -vf pthread *.o *~

hello pthread

7.2.9 - LED


/opt/FriendlyARM/mini2440/examples/led-player
led-player.c
led-player

LED
IPC(InterProcess Communication)

(1)
(2)
(3)
(4)
(5).
Linux IPC
Linux
LED LED
led-player /tmp/ led-control(
mknod )
( type period) LED
leds.cgi ping
counter stop slow 0.25mnormal
0.125mfast 0.0625m
echo /tmp/ led-control LED

#include <stdio.h>

- 377 -
#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:
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++) {

- 378 -
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);


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);

- 379 -
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') {
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;
}
}
}

- 380 -
close(led_fd);
return 0;
}

make led-player
/sbin

Leds.cgi (/www/leds.cgi)
shell leds.html action

#!/bin/sh

type=0
period=1

case $QUERY_STRING in
*ping*)
type=0
;;
*counter*)
type=1
;;
*stop*)
type=2
;;
esac

case $QUERY_STRING in
*slow*)
period=0.25
;;
*normal*)
period=0.125
;;
*fast*)
period=0.0625
;;
esac

/bin/echo $type $period > /tmp/led-control

- 381 -
echo "Content-type: text/html; charset=gb2312"
echo
/bin/cat led-result.template

exit 0

7.2.10 C++ Hello,World


/opt/FriendlyARM/mini2440/examples/c++
cplus.c++
cplus



#include <iostream>
#include <cstring>
using namespace std;

class String
{
private:
char *str;
public:
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;
}

- 382 -
};

int main(void)
{
String s1="I like FriendlyARM.";
cout << "s1=";
s1.display();
return 0;
double num, ans;

cout << "Enter num:";


}

hello cplus

7.3 Linux

7.1 Linux Hello,World


Hello, World

7.3.1 Hello,Module


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_hello_module.c





dev

- 383 -
#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");

7.3.2 Hello,Module

2.6
()
Step1 Kconfig make menuconfig
linux-2.6.32.2/drivers/char/Kconfig

- 384 -
linux-2.6.32.2 make menuconfig Device
Drivers Character devices <M>
<*>
<M>

Step2
mini2440_hello_module.c Makefile

- 385 -
linux-2.6.32.2/drivers/char/Makefile

Step3 linux-2.6.32.2 make modules


mini2440_hello_module.ko

- 386 -
7.3.3 Hello, Module

rz mini2440_hello_module.ko
/lib/modules/2.6.29.4-FriendlyARM
#modprobe mini2440_hello_module
( modprobe ko
)

#rmmod mini2440_hello_module

/lib/modules/2.6.29.4-FriendlyARM

/lib/modules/2.6.29.4-FriendlyARM

7.4 Linux

Hello,Module

- 387 -
Linux

7.4.1 LED


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_leds.c
Led misc
/dev/leds
/opt/FriendlyARM/mini2440/examples/leds
led.c
led
LED insmod


LED
4 LED
LED IO CPU
LED1 GPB5 K2
LED2 GPB6 L5
LED3 GPB7 K7
LED4 GPB8 K5

IO
s3c2410_gpio_cfgpin
S3C2410 S3C2440
S3C2410 Linux


linux-2.6.32.2/arch/arm/mach-s3c2410/include/mach/hardware.h
linux-2.6.32.2/arch/arm/plat-s3c24xx/gpio.c
void s3c2410_gpio_cfgpin(unsigned int pin, unsigned int function)
{
void __iomem *base = S3C24XX_GPIO_BASE(pin);
unsigned long mask;

- 388 -
unsigned long con;
unsigned long flags;

if (pin < S3C2410_GPIO_BANKB) {


mask = 1 << S3C2410_GPIO_OFFSET(pin);
} else {
mask = 3 << S3C2410_GPIO_OFFSET(pin)*2;
}

switch (function) {
case S3C2410_GPIO_LEAVE:
mask = 0;
function = 0;
break;

case S3C2410_GPIO_INPUT:
case S3C2410_GPIO_OUTPUT:
case S3C2410_GPIO_SFN2:
case S3C2410_GPIO_SFN3:
if (pin < S3C2410_GPIO_BANKB) {
function -= 1;
function &= 1;
function <<= S3C2410_GPIO_OFFSET(pin);
} else {
function &= 3;
function <<= S3C2410_GPIO_OFFSET(pin)*2;
}
}

/* modify the specified register wwith IRQs off */

local_irq_save(flags);

con = __raw_readl(base + 0x00);


con &= ~mask;
con |= function;

__raw_writel(con, base + 0x00);

local_irq_restore(flags);
}

- 389 -

CPU Linux

s3c2410_gpio_cfgpin
misc_register
file_operations Hello,Module module_init module_exit
Linux
LED

#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>
#include <asm/uaccess.h>
#include <asm/atomic.h>
#include <asm/unistd.h>

#define DEVICE_NAME "leds"

static unsigned long led_table [] = {


S3C2410_GPB5,
S3C2410_GPB6,
S3C2410_GPB7,

- 390 -
S3C2410_GPB8,
};

static unsigned int led_cfg_table [] = {


S3C2410_GPB5_OUTP,
S3C2410_GPB6_OUTP,
S3C2410_GPB7_OUTP,
S3C2410_GPB8_OUTP,
};

static int sbc2440_leds_ioctl(


struct inode *inode,
struct file *file,
unsigned int cmd,
unsigned long arg)
{
switch(cmd) {
case 0:
case 1:
if (arg > 4) {
return -EINVAL;
}
s3c2410_gpio_setpin(led_table[arg], !cmd);
return 0;
default:
return -EINVAL;
}
}

static struct file_operations dev_fops = {


.owner = THIS_MODULE,
.ioctl = sbc2440_leds_ioctl,
};

static struct miscdevice misc = {


.minor = MISC_DYNAMIC_MINOR,
.name = DEVICE_NAME,
.fops = &dev_fops,
};

static int __init dev_init(void)

- 391 -
{
int ret;

int i;

for (i = 0; i < 4; i++) {


s3c2410_gpio_cfgpin(led_table[i], led_cfg_table[i]);
s3c2410_gpio_setpin(led_table[i], 0);
}

ret = misc_register(&misc);

printk (DEVICE_NAME"\tinitialized\n");

return ret;
}

static void __exit dev_exit(void)


{
misc_deregister(&misc);
}

module_init(dev_init);
module_exit(dev_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("FriendlyARM Inc.");

7.4.2


/opt/FriendlyARM/mini2440/linux-2.6.32.2/drivers/char
mini2440_buttons.c
Misc
/dev/buttons
/opt/FriendlyARM/mini2440/examples/buttons
buttons_test.c
buttons
insmod

- 392 -
IO
K1 GPG0 EINT8
K2 GPG3 EINT11
K3 GPG5 EINT13
K4 GPG6 EINT14
K5 GPG7 EINT15
K6 GPG11 EINT19

#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 <linux/interrupt.h>
#include <asm/uaccess.h>
#include <mach/regs-gpio.h>
#include <mach/hardware.h>
#include <linux/platform_device.h>
#include <linux/cdev.h>
#include <linux/miscdevice.h>

#define DEVICE_NAME "buttons"

struct button_irq_desc {
int irq;
int pin;
int pin_setting;
int number;
char *name;
};

static struct button_irq_desc button_irqs [] = {


{IRQ_EINT8 , S3C2410_GPG0 , S3C2410_GPG0_EINT8 , 0, "KEY0"},
{IRQ_EINT11, S3C2410_GPG3 , S3C2410_GPG3_EINT11 , 1, "KEY1"},
{IRQ_EINT13, S3C2410_GPG5 , S3C2410_GPG5_EINT13 , 2, "KEY2"},
{IRQ_EINT15, S3C2410_GPG7 , S3C2410_GPG7_EINT15 , 3, "KEY3"},
{IRQ_EINT14, S3C2410_GPG6 , S3C2410_GPG6_EINT14 , 4, "KEY4"},

- 393 -
{IRQ_EINT19, S3C2410_GPG11, S3C2410_GPG11_EINT19, 5, "KEY5"},
};

static volatile char key_values [] = {'0', '0', '0', '0', '0', '0'};

static DECLARE_WAIT_QUEUE_HEAD(button_waitq);

static volatile int ev_press = 0;

static irqreturn_t buttons_interrupt(int irq, void *dev_id)


{
struct button_irq_desc *button_irqs = (struct button_irq_desc *)dev_id;
int down;

// udelay(0);
down = !s3c2410_gpio_getpin(button_irqs->pin);

if (down != (key_values[button_irqs->number] & 1)) { // Changed

key_values[button_irqs->number] = '0' + down;

ev_press = 1;
wake_up_interruptible(&button_waitq);
}

return IRQ_RETVAL(IRQ_HANDLED);
}

static int s3c24xx_buttons_open(struct inode *inode, struct file *file)


{
int i;
int err;

for (i = 0; i < sizeof(button_irqs)/sizeof(button_irqs[0]); i++) {


err = request_irq(button_irqs[i].irq, buttons_interrupt,
IRQ_TYPE_EDGE_BOTH,
button_irqs[i].name, (void *)&button_irqs[i]);
if (err)
break;

- 394 -
}

if (err) {
i--;
for (; i >= 0; i--) {
disable_irq(button_irqs[i].irq);
free_irq(button_irqs[i].irq, (void *)&button_irqs[i]);
}
return -EBUSY;
}

ev_press = 1;

return 0;
}

static int s3c24xx_buttons_close(struct inode *inode, struct file *file)


{
int i;

for (i = 0; i < sizeof(button_irqs)/sizeof(button_irqs[0]); i++) {


free_irq(button_irqs[i].irq, (void *)&button_irqs[i]);
}

return 0;
}

static int s3c24xx_buttons_read(struct file *filp, char __user *buff, size_t count, loff_t
*offp)
{
unsigned long err;

if (!ev_press) {
if (filp->f_flags & O_NONBLOCK)
return -EAGAIN;
else
wait_event_interruptible(button_waitq, ev_press);
}

- 395 -
ev_press = 0;

err = copy_to_user(buff, (const void *)key_values, min(sizeof(key_values), count));

return err ? -EFAULT : min(sizeof(key_values), count);


}

static unsigned int s3c24xx_buttons_poll( struct file *file, struct poll_table_struct *wait)
{
unsigned int mask = 0;
poll_wait(file, &button_waitq, wait);
if (ev_press)
mask |= POLLIN | POLLRDNORM;
return mask;
}

static struct file_operations dev_fops = {


.owner = THIS_MODULE,
.open = s3c24xx_buttons_open,
.release = s3c24xx_buttons_close,
.read = s3c24xx_buttons_read,
.poll = s3c24xx_buttons_poll,
};

static struct miscdevice misc = {


.minor = MISC_DYNAMIC_MINOR,
.name = DEVICE_NAME,
.fops = &dev_fops,
};

static int __init dev_init(void)


{
int ret;

ret = misc_register(&misc);

printk (DEVICE_NAME"\tinitialized\n");

return ret;
}

- 396 -
static void __exit dev_exit(void)
{
misc_deregister(&misc);
}

module_init(dev_init);
module_exit(dev_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("FriendlyARM Inc.");

7.5 Qtopia-2.2.0

Qtopia-2.2.0
build Qtopia
runx86 arm

7.5.1

5.4

7.5.2 x86 Qtopia-2.2.0


#cd /opt/FriendlyARM/mini2440/x86-qtopia
#./build-all ( 30 )
./build-all Qtopia ./build
./build-konq
Qtopia

#./run /.

- 397 -
Qtopia
x86

7.5.3 arm Qtopia-2.2.0

arm-linux-gcc-4.4.3 Fedora 9

#cd /opt/FriendlyARM/mini2440/arm-qtopia
#./build-all ( 30 )

- 398 -
#./mktarget (
target-qtopia-konq.tgz)
./build-all Qtopia
JpegGIFPNG ./build ./build-konq

Qtopia /opt
target-qtopia-konq.tgz
ftp /home/plg
#tar xvzf /home/plg/target-qtopia-konq.tgz C /
C Change C/
FriendlyARM
Qtopia
/etc/pointercal

build-all

7.6 QtE-4.6.3

7.6.1

5.4

- 399 -
7.6.2 arm QtE-4.6.3

arm-linux-gcc-4.4.3 Fedora9
Fedora9 5.1

Qtopia-2.2.0 QtE-4.6.3 build-all

#cd /opt/FriendlyARM/mini6410/linux/arm-qte-4.6.3
#./build-all

mktarget
QtE-4.6.3 target-qte-4.6.3.tgz

#tar xvzf target-qte-4.6.3.tgz C /


/usr/local/ Trolltech

Linux QtE-4.6.3
/usr/local/Trolltech rm
QtE-4..6.3 Qtopia-2.2.0
Terminate Server Qtopia-2.2.0

/etc/init.d/rcS qtopia
killall (/opt

qtopia-2.2.0 qt4 QtE-4.6.3

- 400 -
- 401 -
bootloader
S3C2440/2410 bootloader
z Vivi mizi arm-linux-gcc
S3C24xx ARM
Linux
z Supervivi vivi
vivi CRAMFSYAFFS
USB LinuxWinCE, uCosVxwork

2440/2410 bootloader
z Vboot Linux vboot
64M/128M Nand Flash mini2440/micro2440
z YL-BIOS 24xxmon
ADS USB CRAMFS
Linux WinCE
bootloader

z U-Boot Linux bootloader
arm-linux-gcc (U-Boot
2440/2410
USB )
U-Boot 2440/2410
Nand Flash U-Boot

Bootloader PC BIOS

supervivi

BIOS

8.1 vboot

vivi
/opt/FriendlyARM/mini2440/vboot
vboot
#cd /opt/FriendlyARM/mini2440/vboot
#make

- 402 -
vboot.bin

vboot.bin vboot.bin
Nand Flash Linux

8.2 vivi

Linux arm-linux-gcc-4.3.2
vivi 64M Nand Flash mini2440/micro2440

vivi
/opt/FriendlyARM/mini2440/bootloader/vivi

#cd /opt/FriendlyARM/mini2440/bootloader/vivi
#cp fa.config .config fa.config
#make menuconfig

- 403 -
<Exit>

<Yes>
make
#make

- 404 -
vivi vivi
Nand Flash

8.3 U-Boot

U-Boot

U-Boot
1. S3C2410 S3C2440
2. xmodem
3. USB PC dnw
4. CS8900
5. NAND Flash
6. Nor/Nand Flash
7. yaffs
8.
9. CS8900 DM9000
include/configs/100ask24x0.h
#if 0
#define CONFIG_DRIVER_CS8900 1 /* we have a CS8900 on-board */
#define CS8900_BASE 0x19000300
#define CS8900_BUS16 1 /* the Linux driver does accesses as shorts */
#endif

- 405 -
#if !defined(CONFIG_DRIVER_CS8900)
#define CONFIG_DRIVER_DM9000 1
#define CONFIG_DM9000_USE_16BIT 1
#define CONFIG_DM9000_BASE 0x20000000
#define DM9000_IO 0x20000000
#define DM9000_DATA 0x20000004
#endif

8.3.1 U-Boot

Linux arm-linux-gcc-4.3.2

u-boot
/opt/FriendlyARM/mini2440/bootloadder/u-boot-1.1.6

#cd /opt/FriendlyARM/mini2440/bootloader/u-boot-1.1.6
#make open24x0_config U-Boot
#make
u-boot.bin

- 406 -
8.3.2 U-Boot

U-Boot S2 Nor Flash USB

a DNW USB OK UsbPortTransmit/Restore


u-boot.bin
Nand Flash
linux U-Boot
U-Boot ( 3 )

- 407 -
U-Boot supervivi .
linux u-boot
u-boot U-Boot

- 408 -
8.4 ADS YL-BIOS

BIOS ADS
YL-BIOS BIOS
BIOS

8.4.1 ADS YL-BIOS

(1)YL-BIOS2440 /OpenSourceBootloader
D:\work
(2) ADS YL2440A_MON.mcp

(3) ProjectMake F7
D:\work\YL-BIOS2440\YL2440A_MON_Data\DebugRel yl-bios2440.bin

- 409 -
8.4.2 YL-BIOS

S2 Nor Flash
d

DNW 0x30100000 ( YL-BIOS )

- 410 -
Usb Port Transmit/Restore yl-bios2440.bin USB

- 411 -
YL-BIOS

- 412 -
8.4.3 YL-BIOS

YL-BIOS Nand Flash


(1) Nor Flash
supervivi BIOS a

(2) DNW USB OK UsbPortTransmit/Restore


yl-bios2440.bin
(3) Nand Flash

- 413 -
YL-BIOS

- 414 -

YL-BIOS Nand Flash
BIOS supervivi YL-BIOS
YL-BIOS
YL-BIOS
SJF2440 YL-BIOS
H-JTAG Nand Flash

- 415 -
WindowsCE 6.0

9.1 WindowsCE 6.0

Microsoft Windows 7 Windows


(ISO )

Windows CE 6.0 ()


CPUIntel Core Duo E8400
DDR2 4GB
500GB

( Windows Embedded 6.0 CE 6


)
9 Visual Studio 2005
(
http://download.microsoft.com/download/e/1/4/e1405d9e-47e3-404c-8b09-489437b27
fb0/En_vs_2005_Pro_90_Trial.img )
9 Visual Studio 2005 Service Pack 1(VS80sp1-KB926601-X86-ENU.exe)

- 416 -

http://www.microsoft.com/downloads/details.aspx?familyid=bb4a75ab-e2d4-4c96-b39
d-37baf6b5b1dc&displaylang=en
9 Visual Studio 2005 Service Pack 1 Update for Windows Vista
(VS80sp1-KB932232-X86-ENU.exe)

http://www.microsoft.com/downloads/details.aspx?FamilyID=90E2942D-3AD1-4873-
A2EE-4ACC0AACE5B6&displaylang=en )
9 Visual Studio 2005 Service Pack 1 ATL Security Update
(VS80sp1-KB971090-X86-INTL.exe)

http://www.microsoft.com/downloads/details.aspx?familyid=7C8729DC-06A2-4538-
A90D-FF9464DC0197&displaylang=en
9 Windows Embedded CE 6.0

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=7e2868
47-6e06-4a0c-8cac-ca7d4c09cb56
9 Windows Embedded CE 6.0 Platform Builder Service Pack 1

http://www.microsoft.com/downloads/details.aspx?FamilyId=BF0DC0E3-8575-4860-
A8E3-290ADF242678&displaylang=en
9 Windows Embedded CE 6.0 R2

http://www.microsoft.com/downloads/details.aspx?FamilyId=F41FC7C1-F0F4-4FD6-
9366-B61E0AB59565&displaylang=en
9 Windows Embedded CE 6.0 R3

http://www.microsoft.com/downloads/details.aspx?FamilyID=BC247D88-DDB6-4D4
A-A595-8EEE3556FE46&amp;displaylang=ja&displaylang=en
9 QQ()

http://www.microsoft.com/downloads/details.aspx?FamilyID=527042f7-bb5b-4831-a6
ad-5081808824ec&displaylang=en
9 WesttekFileViewers6.exe(office )

http://www.microsoft.com/downloads/details.aspx?FamilyID=d2fd14eb-7d5c-428b-95
1c-343f910047c1&displaylang=en

Visual Studio 2005


Windows CE 6.0

- 417 -
Windows CE 6.0 Platform Builder Windows CE 5.0/4.2
VS2005
VS2005 VS2005

9.1.1 Visual Studio 2005

Step1 Visual Studio 2005 setup.exe

Step2Install Visual Studio 2005

- 418 -
Step3Next

- 419 -
Step4Next

- 420 -
Step5FullNext

- 421 -
Step6 Visual Studio 2005

- 422 -
Step7Visual Studio 2005 Finish

- 423 -
- 424 -
Exit

- 425 -
Step8 Visual Studio 2005 Service Pack 1
VS80sp1-KB926601-X86-ENU.exe

Step9OK

- 426 -
Step10I accept

Step11

Step12OK

- 427 -
Step13 Visual Studio 2005 Service Pack 1 Update for Windows Vista
VS80sp1-KB932232-X86-ENU.exe

Step14OK

Step15I accept

- 428 -
Step16

Step17OK

Step18 Visual Studio 2005 Service Pack 1 ATL Security Update


VS80sp1-KB971090-X86-INTL.exe

- 429 -
Step19OK

Step20I accept

- 430 -
Step21

Step22OK

Windows7 Visual Studio 2005

- 431 -
9.1.2 Windows CE 6.0

Windows CE 6.0 Platform Builder Windows 7


Windows CE 6.0

Step1->->

Step2Windows Embedded
CE 6.0.msi

- 432 -
Step3Next

- 433 -
Step4Next

- 434 -
Next
Step5I accept

Step6Next

- 435 -
Step7Next

- 436 -
Step8Install

- 437 -
Step9

Step10Finish

- 438 -
Step11 Windows CE 6.0 Windows Embedded CE 6.0 Platform Builder
Service Pack 1.msi Step1
Windows Embedded CE 6.0 Platform Builder Service Pack 1.msi

- 439 -
Step12Next

- 440 -
Next
Step13I accept

Step14Next

- 441 -
Step15

- 442 -
Step16Finish

Step17 Windows CE 6.0 Windows Embedded CE 6.0 R2.msi


Step1
Windows Embedded CE 6.0 R2.msi
Windows Embedded CE 6.0 R2.msi
50MB help.cab
R2 122
1.01GB

- 443 -
Step18Next

- 444 -
Next
Step19I accept

- 445 -
Step20Next

- 446 -
Step21Next

- 447 -
Step22

Step23Finish

- 448 -
Step24 Windows CE 6.0 R3 Step1
Windows Embedded CE 6.0 R2.msi

Windows Embedded CE 6.0 R3

166 1.14GB

- 449 -
Step25Next

- 450 -
Next
Step26I accept

- 451 -
Step27Next

- 452 -
Step28

Step29Finish

- 453 -
9.1.3 QQ

Windows CE 6.0 R3
QQ File Viewers

http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=bc247d88-ddb6-4d4a-a595-8eee3
556fe46#filelist ()
QQ QQ


Step1 QQ setup.exe

- 454 -
Step2Next

- 455 -
Step3Next

- 456 -
Step4I accpetNext

- 457 -
Step5Next

- 458 -
Step6

- 459 -
Step7Close

- 460 -
9.1.4 BSP

Mini2440 BSPmini2440-ce6-suite-1033.exe(
1033 )BSP
http://www.arm9.net
BSP
Step1 mini2440-ce6-suite-1033.exe

- 461 -
Step2Install

Step3

- 462 -
Step4Close

WinCE600\PLATFORM mini2440 BSP

- 463 -
WinCE600\OSDesigns

:
Mini2440 , WinCE
Mini2440-with-QQ , QQ WinCE
Mini2440-en WinCE
Windows CE 6.0

9.1.5

Mini2440 BSP

(1) LED
\Mini2440\SRC\DRIVERS\LEDdriver
(2)
\Mini2440\SRC\DRIVERS\Userkey
(3)PWM
\Mini2440\SRC\DRIVERS\PWM
(4)ADC
\Mini2440\SRC\DRIVERS\Touch
ADC
(5)I2C
\Mini2440\SRC\DRIVERS\IIC
(6)RTC
\Mini2440\SRC\COMMON\Rtc
RTC BSP
(7)()

- 464 -
\Mini2440\SRC\DRIVERS\Serial
(8)
\Mini2440\SRC\DRIVERS\Touch
(9)USB
\Mini2440\SRC\DRIVERS\Usb
USB Slave USB Host( USB )
(10)SD
\Mini2440\SRC\DRIVERS\SDHC
SD 32GB
(11)DM9000
\Mini2440\SRC\DRIVERS\dm9000
(12)
\Mini2440\SRC\DRIVERS\Wavedev

(13)LCD
\Mini2440\SRC\DRIVERS\Display
(14)
\Mini2440\SRC\DRIVERS\Backlight

(15)CMOS
\Mini2440\SRC\DRIVERS\Camera

9.2 WindowsCE 6.0 Bootloader

Windows CE6
Windows CE 2
images\wince6.0

BSP 30MB QQ
2 mini2440 mini2440-with-QQ
SQL QQ
mini2440()
QQ

9.2.1

- 465 -
9.2.2

VS2005 mini2440 BSP VS2005

Step1->->Microsoft Visual Studio 2005-> Microsoft Visual


Studio 2005( VS2005)

Step2Continue
Exit Visual Studio

- 466 -
Step3 VS2005 ->->VS2005
->VS2005

- 467 -
Step4

- 468 -
Step5->->VS2005->VS2005
Contonue VS2005

- 469 -
Step6 VS2005
VS2005

- 470 -
Step7 File->Open->Project/Solution

- 471 -
Step8 mini2440 (
C:\WINCE600\OSDesigns\Mini2440)Open

- 472 -
Step9mini2440

- 473 -
Step10Build->Advanced Build Commands->Clean Sysgen

Step11 NK.bin NK.nb0


C:\WINCE600\OSDesigns\Mini2440\Mini2440\RelDir\Mini2440_ARMV4I_Release

- 474 -
- 475 -
9.2.3 QQ

QQ VS2005

Step1->->VS2005->VS2005 VS2005

- 476 -
Step2 File->Open->Project/Solution

- 477 -
Step3 mini2440 (
C:\WINCE600\OSDesigns\Mini2440-with-QQ)Open

- 478 -
Step4mini2440

- 479 -
Step5Build->Advanced Build Commands->Clean Sysgen

- 480 -
Step6 NK.bin NK.nb0
C:\WINCE600\OSDesigns\Mini2440-with-QQ\Mini2440-with-QQ\RelDir\Mini2440_ARMV4I_R
elease

- 481 -
- 482 -
9.2.4 BootLoader NBOOT

Nboot WindowsCE5/6 Nboot

Nboot ADS Windows 7


Windows XP Mode Windows XP

Nboot bootloader 4K Nand Flash


Block 0 WinCE Nboot

z 64M/128M/256M/1G mini2440/micro2440
z
z WinCE
z WinCE 5-10
Nboot
(BootLogo) WinCE

- 483 -
Nboot
option.h

// LCD , W35,
W35(LQ035Q1DG06)
//#define LCD_N35
//#define LCD_L80
//#define LCD_T35
//#define LCD_X35
#define LCD_W35
//#define LCD_A70
//#define LCD_VGA1024768

//
#define BACKGROUND_R 0x00
#define BACKGROUND_G 0x00
#define BACKGROUND_B 0x00

//
#define PROGRESS_BAR_R 0xFF
#define PROGRESS_BAR_G 0xFF
#define PROGRESS_BAR_B 0x00

//
#define LOGO_POS_TOP 0
#define LOGO_POS_LEFT 0

//
#define PROGRESS_BAR_TOP 260
#define PROGRESS_BAR_LEFT 20
#define PROGRESS_BAR_WIDTH 200
#define PROGRESS_BAR_HEIGHT 12
Nboot

Nboot
WindowsCE6.0NBOOT
( D:\work) ADS1.2 File->Open
nboot.mcp

- 484 -
ProjectMake F7 nboot

- 485 -
D:\work\NBOOT\nboot_Data\DebugRel nboot.bin

- 486 -
NBOOT Nand Flash
(1)USB S2 Nor Flash
DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 487 -
(3) BIOS [n] USB

(4) DNW USB PortTransmit(

- 488 -
images\wince6.0)
supervivi Nand Flash block 0 S2 NAND
Nand Flash WINCE
wince
NBOOT wince

9.2.5 BSP LCD

BSP
z 3.5 LCD (LQ035Q1DG06 W35)
z NEC3.5
z 3.5LCD
z Sharp 8LCD()
z 7
z VGA 1024x768
mini2440\Src\Inc\options.h LCD_TYPE
LCD
//#define LCD_N35 NEC3.5LCD
//#define LCD_L80 Sharp 8LCD()
//#define LCD_T35 3.5LCD
//#define LCD_X35 Sony 3.5LCD(LQ035Q1DG06 W35)
#define LCD_W35 3.5LCD
//#define LCD_A70 7LCD
//#define LCD_VGA1024768 LCD2VGA 1024x768
LCD LCD_T35

options.h
( 1 2)
#define KITL_NONE
//#define KITL_SERIAL_UART0
//#define KITL_SERIAL_UART1
//#define KITL_USBSERIAL

- 489 -
//#define KITL_ETHERNET
1

//#define KITL_NONE
#define KITL_SERIAL_UART0
//#define KITL_SERIAL_UART1
//#define KITL_USBSERIAL
//#define KITL_ETHERNET

9.2.6 Windows CE Logo


WindowsCE LogoBootLogo StartLogo BootLogo
Nboot Nboot BootLogo
StartLogo BSP (StartLogo.c)
mini2440\Src\Kernel\Oal init.c StartLogo.c
StartLogoMaker.exe
StartLogoMaker Linux Logo LogoMaker( Fedora9)
WindowsXP/Vista
bmp,jpg,png mini2440 BSP StartLogo.c
BSP WindowsCE StartLogo.c

// Automatic generated by StartLogo.exe from FriendlyARM Co., Ltd.

static const unsigned short StartLogoData[] = {


240, 320,
0x965, 0x945, 0x164, 0x9C4, 0x1246, 0x22CA, 0x22A8, 0x2AA7,

StartLogoMaker.exe StartLogo.c
Step1windows \StartLogoMaker StartLogoMaker.exe

- 490 -
Step2 File->Open

- 491 -
Step3 File->Convert

StartLogo.c

- 492 -
Step5 BSP ( mini2440-BSP\ Src\Kernel\Oal
) WinCE

- 493 -
9.2.7 SDK

SDK VS2005 Windows CE 6.0 Platform


Builder VS2005 mini2440 SDK
Embedded Visual C++ SDK
VS2005 SDK
SDK VS2005 EVC VS2008
SDK
Step1 VS2005 mini2440,
Mini2440-CE6-SDK Build SDK

Step2SDK

- 494 -
Step3 C:\WINCE600\OSDesigns\Mini2440\Mini2440\SDKs\SDK1
Mini2440-CE6-SDK.msi

- 495 -
9.2.8 SDK

VS2005 mini2440 SDK


Step1 Mini2440-CE6-SDK.msiNext

- 496 -
Step2I acceptNext

- 497 -
Step3Next

Step4Complete

- 498 -
Step5Next

Step6Install

- 499 -
Step7

- 500 -
Step8Finish

SDK

9.3 PC ( Windows 7)

Windows 7 ActiveSync
Windows 7 PC Windows Mobile (
) ActiveSync

- 501 -
Windows 7

WinCE6 Windows XP ActiveSync


Windows 7

9.3.1 Windows Mobile PC

WinCE6 Windows 7 PC
USB

- 502 -

- 503 -

- 504 -

SD

- 505 -
9.4 VS2005 ,

VS2005

9.4.1

(1) VS2008

(2)Visual Basic
my2440

- 506 -
(3)Windows CE
.NET Compact Framework .NET Compact Framework Version 2.0

(4)

- 507 -
FormForm

- 508 -
(5)Button1
Button1

9.4.2

(1) PC ()

- 509 -
(2) VS2008

Windows CE

- 510 -
TCP/IP VS2008

(3) VS2008

VS2008

- 511 -
VS2008

9.4.3

(1) F5

(2) my2440Windows CE

- 512 -
(3)Button1

VS2008 Visual Basic Visual C# Visual C++

- 513 -
WindowsCE 5.0

10.1 WindowsCE5.0

WindowsCE 5.0 Platform Builder 5.0


BSP
Platform Builder 5 Windows Vista/2007
Windows XP.

10.1.1 Platform Builder 5.0( 2007 )

: Windows Embedded 6.0 CE 6

9
http://www.microsoft.com/downloads/details.aspx?FamilyID=486E8250-D311-4F67-9FB3-23E8B
8944F3E&displaylang=en
9 Platform Builder 5.0 2008
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=6dccd9fc-a7ac-4fa3
-a9bd-fcc7a83f5311
2007
2008 2008 Platform
Builder 5.0 2007 \WindowsCE5.0\PB5 2007

PB5

WindowsXP Platform Builder 5.0( PB5)


WINCE PB 5-7G

Step1: PB5dotnet framework1.1

- 514 -
PB5

Step2: PB5Microsoft Windows CE 5.0.msi.exe


PB5

Step3: Next

- 515 -
Step4: License AgreementI accept the terms in the license
agreementNext

Step5: Next

- 516 -
Step6: Next

Step7: Next

- 517 -
Step8: , ARMV4I
Shared Source for Windows CE 5.0."Next"

Step9: I accept the terms in the license agreement


Next

- 518 -
Step10: Next

Step11:

- 519 -
Step12:

Step13: PB5WindowsCE 5.0\PB5


2007

- 520 -
Step14: Next

Step15: I accept the terms in the license agreement


Next

- 521 -
Step16: I accpetNext

Step17: Next

- 522 -
Step18: Next

Step19:

- 523 -
Step20:

Step21:

- 524 -
10.1.2 BSP

WindowsCE5 BSP WindowsCE5.0\mini2440-ce5-bsp-20100816



mini2440
BSP
z W35(LQ035Q1DG06 ) W35
z NEC3.5 N35
z 3.5LCD T35
z Sharp 8LCD() L80
z 7 A70
z VGA 1024x768 VGA1024x768
mini2440\Src\Inc\options.h LCD_TYPE
LCD
//#define LCD_N35 NEC3.5LCD
//#define LCD_L80 Sharp 8LCD()
//#define LCD_T35 3.5LCD
//#define LCD_X35 Sony 3.5LCD
#define LCD_W35 W35(LQ035Q1DG06 W35)
//#define LCD_A70 7LCD
//#define LCD_VGA1024768 LCD2VGA 1024x768

- 525 -
LCD LCD_T35

PB5 WINCE BSP


BSP
Step1WindowsCE 5.0mini2440
C:\WINCE500\PLATFORM

Step6Platform Builder 5.0FileManage CatalogFeatures

- 526 -
Importplatform\mini2440\mini2440.cec

Step7CatalogThird PartyMini2440 From


FriendlyARM:ARMV4IBSP

- 527 -
10.1.3

mini2440.pbxml
WinCE
VNT-6656G6A40 USB

WindowsCE\\
VNUWLC5-ARM.msi
Step1: Next

- 528 -
Step2: C:\WINCE500

Step3:

- 529 -
Step4: Finish

Step5: PB5Catalog

- 530 -
10.1.4

Step1: C:\WINCE420\PBWorkspaces ()
mini2440 WindowsCE 5.0 mini2440.pbxml
C:\WINCE420\PBWorkspaces\mini2440

- 531 -
Step2: PB File Open Workspace
pbxml

mini2440.pbxml

PB

- 532 -
Step3: Build OS Sysgen

- 533 -
Step4: nk.binnk.nb0 nk.bin
nk.nb0 nk.bin
C:\WINCE500\PBWorkspaces\mini2440\RelDir\mini2440_ARMV4I_Release

- 534 -

10.1.5 SDK

SDK

SDK Embedded Visual C++( EVC)


\WindowsCE5.0\SDK SDK


Step1: Platform SDK New SDK

- 535 -
Step2: Export SDK Wizard

Step3: Prodect Properties

- 536 -
Step4: Development Language

Step5: Fnish

- 537 -
Step6: Platform SDK Configure SDK
CPU

Step7: Edit

- 538 -
Step8: OK PB5 Platform SDK Build SDK

Step9: SDK

- 539 -
Step10: Done

- 540 -
Step11: SDK

10.1.6 Embedded Visual C++(EVC)

API WinCE EVC SDK


EVC
(1)EVC Embedded VisualC++\ setup.exe

- 541 -
(2)Next

(3)I accept the agreementNext

- 542 -
(4)Next

(5)Next

- 543 -
(6)Next

(7)

- 544 -
(8) EVC

(9)EVC OK

(10) EVC Continue

- 545 -
(11) ID OK

(12)Next

(13)

- 546 -
(14)OK

Microsoft eMbedded Visual C++ 4.0 eMbedded


Visual C++ 4.0
SDK

10.1.7 EVC SDK

SDK EVC SP4


\Embedded VisualC++\SP\evc4sp4\DISK1
SDK

- 547 -
(1) SP4 setupNext

(2)Next

- 548 -
(3) SP4Next

(4)

- 549 -
(5)

(6) SDK
( WindowsCE5.0\SDK
mini2440_SDK.msi.exe)Next

- 550 -
(7)Close

Next
(8)Accpet

- 551 -
(9)Customer InformationNext

(10)Complete

- 552 -
(11)Next

(12) Ready to Install,Install

- 553 -
(13)

(14)Finish

- 554 -
Microsoft eMbedded Visual C++ 4.0 eMbedded Visual
C++ 4.0 EVC

- 555 -
10.1.8 CE

BSP SDK
WinCE
WinCE

(1) PB5 File New Platform

(2)my2440Next

- 556 -
(3) BSP 2440 Next

(4)Mobile HandheldNext

- 557 -
(5)
Standard SDK for WindowsCENext

(6)Next

- 558 -
(7)Next

(8)Finish

- 559 -
(9) PB5

- 560 -
(10) Platform Setting

- 561 -
(11)Locale

- 562 -
(12)Build OptionsEnable CE Target Control SupportEnable
KITLOK

- 563 -
(13) USB Catalog Core OS Windows
CE device Core OS Services USB Host Support USB Human Input Device(HID) Class
DriverAdd to OS DesignUSB HID Keyboard and Mouse

- 564 -
(14) USB

- 565 -
(15) Core OS File Systems and Data Store File System
Internal (Choose I) RAM and ROM File System FAT32
FAT File System

- 566 -
(16) Core OS File Systems and Data Store Registry
Storage (Choose I) Hive-based Registry,

(17) IP platform.reg
IP DNS

- 567 -
(18) bmp
C:\WINCE500\Platform\SMDK2440\Files bliss.bmp

platform.bib FILES bliss.bmp

- 568 -
(19) File Save Build OS Sysgen

- 569 -

10.1.9 WindowsCE StartLogo


WindowsCE LogoBootLogo StartLogo BootLogo
Nboot Nboot BootLogo
StartLogo BSP (StartLogo.c)
mini2440\Src\Kernel\Oal init.c StartLogo.c
StartLogoMaker.exe
StartLogoMaker Linux Logo LogoMaker( Fedora9)
WindowsXP/Vista
bmp,jpg,png mini2440 BSP StartLogo.c
BSP WindowsCE StartLogo.c

// Automatic generated by StartLogo.exe from FriendlyARM Co., Ltd.

static const unsigned short StartLogoData[] = {

- 570 -
240, 320,
0x965, 0x945, 0x164, 0x9C4, 0x1246, 0x22CA, 0x22A8, 0x2AA7,

StartLogoMaker.exe StartLogo.c
Step1windows \StartLogoMaker StartLogoMaker.exe

Step2 File->Open

- 571 -
Step3 File->Convert

StartLogo.c

- 572 -
Step5 BSP ( mini2440-BSP\ Src\Kernel\Oal
) WinCE

- 573 -
10.1.10 BootLoader Nboot

Nboot WindowsCE5/6 Nboot

Nboot ADS Windows 7


Windows XP Mode Windows XP

Nboot bootloader 4K Nand Flash


Block 0 WinCE Nboot

z 64M/128M mini2440/micro2440
z
z WinCE
z WinCE 5-10
Nboot
(BootLogo) WinCE
Nboot
option.h

// LCD , T35
//#define LCD_N35
//#define LCD_L80
#define LCD_T35
//#define LCD_X35
//#define LCD_W35
//#define LCD_A70
//#define LCD_VGA1024768

//
#define BACKGROUND_R 0x00
#define BACKGROUND_G 0x00
#define BACKGROUND_B 0x00

//
#define PROGRESS_BAR_R 0xFF
#define PROGRESS_BAR_G 0xFF
#define PROGRESS_BAR_B 0x00

//

- 574 -
#define LOGO_POS_TOP 0
#define LOGO_POS_LEFT 0

//
#define PROGRESS_BAR_TOP 260
#define PROGRESS_BAR_LEFT 20
#define PROGRESS_BAR_WIDTH 200
#define PROGRESS_BAR_HEIGHT 12
Nboot

Nboot
WindowsCE5.0NBOOT
( D:\work) ADS1.2 File->Open
nboot.mcp

ProjectMake F7 nboot

- 575 -
D:\work\NBOOT\nboot_Data\DebugRel nboot.bin

- 576 -
10.1.11 NBOOT Nand Flash

(1)USB S2 Nor Flash


DNW
(2) USB ( USB )
DNW [USBOK][USBx]

- 577 -
(3) BIOS [n] USB

(4) DNW USB PortTransmit(

- 578 -
images\wince5.0)
supervivi Nand Flash block 0 S2 NAND
Nand Flash WINCE
wince
NBOOT wince

10.2 ActiveSync PC

ActiveSync
PC

10.2.1 ActiveSync

windows ActiveSync
ActiveSync_4.1_setup.exe

- 579 -

- 580 -

- 581 -

ActiveSync

- 582 -
10.2.2 USB

WINCE
USB PC

\Windows \CE USB


Step1

- 583 -
Step2

Step3
\Windows \CE USB

- 584 -
Step4
USB

- 585 -
Step5 ActiveSync ActiveSync

- 586 -
10.2.3 ActiveSync

USB PC

(1) PC
PC ActiveSync

ActiveSync

- 587 -
ResidentFlash mp3
30M ResidentFlash

- 588 -
Windows

(2)
Mp3 ResidentFlash
USB ->ResidentFlash

- 589 -
10.2.4 ActiveSync Platform Builder

PC ActiveSync
(!)

WINCE

- 590 -
->->

usb
S3C2440 USB Cable

OK usb

- 591 -
->->
PC PC

usb
OK

- 592 -
PC ActiveSync
PB Tools -> Remote zoom-in

Remote zoom-in
Connection->Configure windows ce platform manager

- 593 -
mini2440

Propertionsmini2440

TransportConfigure TCP/IP HOST IP


IP WINCE IP ( 192.168.1.230) PC
IP

- 594 -
OK Remote Zoom-in Connection->Connect to
Device

- 595 -

- 596 -
File-Save as

10.2.5 ActiveSync Platform Builder

PB Tools
Remote Registry Editor wince

- 597 -
10.3 EVC Hello,World,

EVC USB
EVC Hello, World

mini2440_SDK EVC PB5

(1) EVC File New

- 598 -
(2) WCE MFC AppWizard(exe) Project Name
Location OK

(3)Next

- 599 -
(4)Next

(5)Next

- 600 -
(6)Finish

(7) New Project Information OK

- 601 -
(8) EVC Build Set Active Platform

- 602 -
(9) mini2440_SDK
OK

(10) PC ()

- 603 -
(11) EVC Build Rebuild All

(12)(
)

- 604 -
10.4 VS2005/2008 ,

PB5 .NET 2.0


VS2005/2008 (
)

- 605 -
VS2008

10.4.1

(1) VS2008

(2)Visual Basic
my2440

(3)Windows CE
.NET Compact Framework .NET Compact Framework Version 2.0

- 606 -
(4)

FormForm

- 607 -
(5)Button1
Button1

10.4.2

(1) PC ()

- 608 -
(2) VS2008

Windows CE

- 609 -
TCP/IP VS2008

(3) VS2008

VS2008

- 610 -
VS2008

10.4.3

(1) F5

(2) my2440Windows CE

- 611 -
(3)Button1

VS2008 Visual Basic Visual C# Visual C++

10.5 LED

LED BSP \mini2440\Src\Drivers\LEDdriver


LED LEDDriver.cpp
LED \WindowsCE \LEDtest

- 612 -
LED Windows CE
IO

10.5.1

4 LED

CPU GPB GPB S3C2440

GPB ( S3C2440.pdf 276 )

GPBCON ( S3C2440.pdf 284 )

GPBDAT ( S3C2440.pdf 284 )

- 613 -
GPB5~8
(1) GPBCON IO
(2) LED, GPBDAT 0
(3) LED, GPBDAT 1

10.5.2 LED

WinCE
DeviceManager IOCTL

( PB5 )

Programming element Description

XXX_Close (Device Manager) This function is required to access the device with
CreateFile. If you implement XXX_Close, you must
implement XXX_Open.

XXX_Deinit (Device Manager)


This function is required by drivers loaded by
ActivateDeviceEx, ActivateDevice, or RegisterDevice.

- 614 -
XXX_Init (Device Manager) This function initializes a device. It is called by Device
Manager.

This function is required by drivers loaded by


ActivateDeviceEx, ActivateDevice, or
RegisterDevice.

XXX_IOControl (Device Manager) This function sends a command to a device.

This function might or might not be required, depending


on the device capabilities that the driver exposes. This
function requires an implementation of XXX_Open and
XXX_Close.

XXX_Open (Device Manager) This function opens a device for reading, writing, or
both. An application indirectly invokes this function
when it calls CreateFile to obtain a handle to a device.

This function is required to access the device with


CreateFile.

XXX_PowerDown (Device Manager) Optional. This function ends power to the device. It is
useful only with devices that can be shut off under
software control.

XXX_PowerUp (Device Manager) Optional. This function restores power to a device.

XXX_Read (Device Manager) This function reads data from the device identified by
the open context.

This function might or might not be required, depending


on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open


and XXX_Close.

XXX_Seek (Device Manager) This function moves the data pointer in the device.

This function might or might not be required, depending


on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open


and XXX_Close.

XXX_Write (Device Manager) This function writes data to the device.

This function might or might not be required, depending

- 615 -
on the device capabilities that the driver exposes.

This function requires an implementation of XXX_Open


and XXX_Close.

LED
#include <windows.h>
//#include <ceddk.h>
#include <nkintr.h>
#include <pm.h>
#include "pmplatform.h"
#include "Pkfuncs.h"
#include "s2440.h"

#define IO_CTL_LED_1_ON 0x01


#define IO_CTL_LED_2_ON 0x02
#define IO_CTL_LED_3_ON 0x03
#define IO_CTL_LED_4_ON 0x04
#define IO_CTL_LED_ALL_ON 0x05
#define IO_CTL_LED_1_OFF 0x06
#define IO_CTL_LED_2_OFF 0x07
#define IO_CTL_LED_3_OFF 0x08
#define IO_CTL_LED_4_OFF 0x09
#define IO_CTL_LED_ALL_OFF 0x0a

volatile IOPreg *s2440IOP = (IOPreg *)IOP_BASE;


volatile INTreg *s2440INT = (INTreg *)INT_BASE;

BOOL mInitialized;
void Virtual_Alloc(); // Virtual allocation

void Virtual_Alloc()
{

// GPIO Virtual alloc


s2440IOP = (volatile IOPreg *) VirtualAlloc(0,sizeof(IOPreg),MEM_RESERVE, PAGE_NOACCESS);
if(s2440IOP == NULL) {
RETAILMSG(1,(TEXT("For s2440IOP: VirtualAlloc faiLED!\r\n")));
}
else {
if(!VirtualCopy((PVOID)s2440IOP,(PVOID)(IOP_BASE),sizeof(IOPreg),PAGE_READWRITE |

- 616 -
PAGE_NOCACHE )) {
RETAILMSG(1,(TEXT("For s2440IOP: VirtualCopy faiLED!\r\n")));
}
}

BOOL WINAPI
DllEntry(HANDLE hinstDLL,
DWORD dwReason,
LPVOID /* lpvReserved */)
{
switch(dwReason)
{
case DLL_PROCESS_ATTACH:
DEBUGREGISTER((HINSTANCE)hinstDLL);
return TRUE;
case DLL_THREAD_ATTACH:
break;
case DLL_THREAD_DETACH:
break;
case DLL_PROCESS_DETACH:
break;
#ifdef UNDER_CE
case DLL_PROCESS_EXITING:
break;
case DLL_SYSTEM_STARTED:
break;
#endif
}

return TRUE;
}

BOOL LED_Deinit(DWORD hDeviceContext)


{
BOOL bRet = TRUE;

RETAILMSG(1,(TEXT("USERLED: LED_Deinit\r\n")));

- 617 -
return TRUE;
}

BOOL LEDGpioInit()
{
RETAILMSG(1,(TEXT("LED_Gpio_Setting----\r\n")));
s2440IOP->rGPBCON = (s2440IOP->rGPBCON &~(3 << 10)) | (1<< 10); // GPB5 == OUTPUT.
s2440IOP->rGPBCON = (s2440IOP->rGPBCON &~(3 << 12)) | (1<< 12); // GPB6 == OUTPUT.
s2440IOP->rGPBCON = (s2440IOP->rGPBCON &~(3 << 14)) | (1<< 14); // GPB7 == OUTPUT.
s2440IOP->rGPBCON = (s2440IOP->rGPBCON &~(3 << 16)) | (1<< 16); // GPB8 == OUTPUT.
return TRUE;
}

DWORD LED_Init(DWORD dwContext)


{

RETAILMSG(1,(TEXT("LED_Init----\r\n")));

// 1. Virtual Alloc
Virtual_Alloc();

LEDGpioInit();

mInitialized = TRUE;
return TRUE;
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
BOOL LED_IOControl(DWORD hOpenContext,
DWORD dwCode,
PBYTE pBufIn,
DWORD dwLenIn,
PBYTE pBufOut,
DWORD dwLenOut,
PDWORD pdwActualOut)

- 618 -
{
LEDGpioInit();
switch(dwCode)
{
case IO_CTL_LED_1_ON:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0x1<<5);
break;
case IO_CTL_LED_2_ON:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0x1<<6);
break;
case IO_CTL_LED_3_ON:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0x1<<7);
break;
case IO_CTL_LED_4_ON:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0x1<<8);
break;
case IO_CTL_LED_ALL_ON:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&~(0xF<<5);
break;
case IO_CTL_LED_1_OFF:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT|(0x1<<5);
break;
case IO_CTL_LED_2_OFF:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT|(0x1<<6);
break;
case IO_CTL_LED_3_OFF:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT|(0x1<<7);
break;
case IO_CTL_LED_4_OFF:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT|(0x1<<8);
break;
case IO_CTL_LED_ALL_OFF:
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT|(0xF<<5);
break;
default:
break;
}

RETAILMSG(1,(TEXT("LED:Ioctl code = 0x%x\r\n"), dwCode));


return TRUE;
}

- 619 -
//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
DWORD LED_Open(DWORD hDeviceContext, DWORD AccessCode, DWORD ShareMode)
{
RETAILMSG(1,(TEXT("USERLED: LED_Open\r\n")));
return TRUE;
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
BOOL LED_Close(DWORD hOpenContext)
{
s2440IOP->rGPBDAT=s2440IOP->rGPBDAT&(0xF<<5);
RETAILMSG(1,(TEXT("USERLED: LED_Close\r\n")));
return TRUE;
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void LED_PowerDown(DWORD hDeviceContext)
{
RETAILMSG(1,(TEXT("USERLED: LED_PowerDown\r\n")));

//RETAILMSG(1,(TEXT("CAMERA: LED_PowerDown, m_Dx = D%u, init %d \r\n"), m_Dx,


mInitialized));
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
void LED_PowerUp(DWORD hDeviceContext)
{
RETAILMSG(1,(TEXT("USERLED: LED_PowerUp\r\n")));

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
DWORD LED_Read(DWORD hOpenContext, LPVOID pBuffer, DWORD Count)
{
RETAILMSG(1,(TEXT("USERLED: LED_Read\r\n")));

- 620 -
return TRUE;
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
DWORD LED_Seek(DWORD hOpenContext, long Amount, DWORD Type)
{
RETAILMSG(1,(TEXT("USERLED: LED_Seek\r\n")));
return 0;
}

//-----------------------------------------------------------------------------
//-----------------------------------------------------------------------------
DWORD LED_Write(DWORD hOpenContext, LPCVOID pSourceBytes, DWORD NumberOfBytes)
{
RETAILMSG(1,(TEXT("USERLED: LED_Write\r\n")));
return 0;
}

10.5.3 LED BSP

LED LED

(1) LED
mini2440\DRIVERS LEDdriver dirs
bsp
(2) LED Makefile
Makefile
mini2440\DRIVERS\LEDriver\ makefile
#
# DO NOT EDIT THIS FILE!!! Edit .\sources. if you want to add a new source
# file to this component. This file merely indirects to the real make file
# that is shared by all the components of Peg
#
!INCLUDE $(_MAKEENVROOT)\makefile.def

(3) LED source


source
mini2440\DRIVERS\LEDriver\ source
!if 0

- 621 -
File: sources

Author: jeffmi

Copyright (c) 1995-2002 Microsoft Corporation. All rights reserved.


!endif

RELEASETYPE=PLATFORM
TARGETNAME=LEDDriver
TARGETTYPE=DYNLINK
DLLENTRY=DllEntry

TARGETLIBS= \
$(_COMMONSDKROOT)\lib\$(_CPUINDPATH)\coredll.lib \

MSC_WARNING_LEVEL = $(MSC_WARNING_LEVEL) /W3 /WX

INCLUDES= \
$(_TARGETPLATROOT)\inc; \
$(_COMMONOAKROOT)\inc; \

$(_PUBLICROOT)\common\oak\inc;$(_PUBLICROOT)\common\sdk\inc;$(_PUBLICROOT)\co
mmon\ddk\inc; \
..\..\inc

SOURCES= \
leddriver.cpp \

(4) leddriver.def Dll


leddriver.def
;
; Windows CE LED Driver. Written by capbily

LIBRARY userLED
EXPORTS
LED_Close
LED_Deinit
LED_Init
LED_IOControl
LED_Open
LED_PowerDown

- 622 -
LED_PowerUp
LED_Read
LED_Seek
LED_Write
(5) LED
platform.bib
;leddriver
leddriver.dll $(_FLATRELEASEDIR)\leddriver.dll NK SH
(6) LED
platform.reg
[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\LEDdriver]
"Prefix"="LED"
"Dll"="LEDdriver.dll"
(7)
PB5 Build OS Sysgen
LED NK.bin NK.nb0

10.5.4 LED

\Windows CE5.0\LEDtest
eMbedded Visual C++ 4.0 + SP4 + Mini2440-CE5-SDK
SP4 \Embedded VisualC++\SP\evc4sp4\DISK1
Mini2440-CE5-SDK \WindowsCE5.0\SDK

IO Control

HANDLE
leddriver=CreateFile(L"LED1:",GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_E
XISTING,0,NULL );
ReadFile(leddriver..)
DeviceIoControl(leddriver,IO_CTL_LED_CLEAR,NULL,0,NULL,0,NULL,NULL);


CreateFile XXX_Open
ReadFile XXX_Read
DeviceIoControl XXX_IOContrl, IO_CTL_XXX

LED 10 IOControl 10 1~4


LED 1~4 LED
LED

- 623 -
#define IO_CTL_LED_1_ON 0x01
#define IO_CTL_LED_2_ON 0x02
#define IO_CTL_LED_3_ON 0x03
#define IO_CTL_LED_4_ON 0x04
#define IO_CTL_LED_ALL_ON 0x05
#define IO_CTL_LED_1_OFF 0x06
#define IO_CTL_LED_2_OFF 0x07
#define IO_CTL_LED_3_OFF 0x08
#define IO_CTL_LED_4_OFF 0x09
#define IO_CTL_LED_ALL_OFF 0x0a

void CKEYTESTDlg::OnButton1()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_1_ON, NULL,0,NULL,0,NULL,NULL);

void CKEYTESTDlg::OnButton2()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_2_ON,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton3()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_3_ON,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton4()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_4_ON,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton5()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_ALL_ON,NULL,0,NULL,0,NULL,NULL);
}

- 624 -
void CKEYTESTDlg::OnButton6()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_1_OFF,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton7()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_2_OFF,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton8()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_3_OFF,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton9()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_4_OFF,NULL,0,NULL,0,NULL,NULL);
}

void CKEYTESTDlg::OnButton10()
{
// TODO: Add your control notification handler code here
DeviceIoControl(leddriver,IO_CTL_LED_ALL_OFF,NULL,0,NULL,0,NULL,NULL);
}

LEDtest
(1) LEDtest D:\Work
(2) EVC File Open LEDtest

- 625 -
(3) 9.4 (ActiveSync )
Build Rebuild All LEDtest.exe EVC
\Windows D:\work\lcdtest\ARMV4IRel LCDtest.exe
LCDtest LED

10.5.5 LED

LEDtest.exe NK.bin/NK.nb0

- 626 -
(1) LEDtest.exe mini2440\FILES
(2) Windows LEDtest.lnk
.lnk
<length>#<command line> length #LEDtest.lnk

20#\Windows\LEDtest.exe
LEDtest.lnk .lnk
mini2440\FILES
(3) platform.bib
LEDtest.exe $(_FLATRELEASEDIR)\QQtest.exe NK U
LEDtest.lnk $(_FLATRELEASEDIR)\QQtest.lnk NK U
SYSGEN
\Windows
(4) platform.dat
Directory("\windows\"):-File("LED .lnk","\windows\LEDtest.lnk")
LED LEDtest.lnk
LEDtest.lnk
(5) Builder Sysgen NK.bin NK.nb0
LED

Linux WindowsCE

- 627 -

- 628 -
H-JTAG BIOS

1. 1 H-JTAG

H-JTAG H-Jtag
http://www.hjtag.com
ARM ARM

ARM
flash
ARM

AXD

ARM
H-JTAG ARM
keil
H-JTAG twentyone
http://www.hjtag.com/

0.4.4( H-JTAG )
1. RDI 1.5.0 1.5.1;
2. ARM7 ARM9 ARM9E-S ARM9EJ-S;
3. thumb arm ;
4. little-endian big-endian;
5. semihosting;
6. wiggler, sjf-jtag ;
7. WINDOWS 9.X/NT/2000/XP;
8. flash

H-JTAG NOR Flash

JTAG SJF-JTAG

- 629 -
2. 2 H-JTAG

USB
PCI

(1) H-JTAG
H-JTAG Windows \H-JTAG

H-JTAG H-Flasher H-JTAG


JTAG

- 630 -
(2) JTAG
H-JTAG Setting->Jtag Settings OK

(3)
Windows \H-JTAG FriendlyARM2440.his
H-Flasher_mini2440.hfc H-JTAG

- 631 -
H-JTAG Script->Init Script Init Script
Load FriendlyARM2440.his

- 632 -
Init Script Enable Auto Init
OK H-JTAG

(4)

- 633 -
USB
PCI

JTAG JTAG
Operations->Detect Target

CPU

2. 3 Flash BIOS

Nor Flash

(1) H-JTAG Flasher Start H-Flasher H-Flasher

- 634 -
(2) H-Flasher Load
H-Flasher_mini2440.hfc
NOR Flash Flasher
H-Flasher_S29AL016T.hfc/H-Flasher_SST39VF1601.hfc

- 635 -
(3) Flash H-Flasher

H-Flasher 4 Programming

- 636 -
(4) CheckH-Flasher Nor Flash
SST39VF1601( mini2440/micro24440 AM29LV160DB
)

- 637 -
(5) Type Plain Binary Format

Src File supervivi Dst Addr


0,

- 638 -
(6)Program supervivi


StopCloseClose JTAG

- 639 -
(7) BIOS Nor Flash
( H-JTAG ) Jtag
Check FlashProgram
H-JTAG Nor Flash Nand Flash
Nor Flash
BIOS

2. 4

H-JTAG NOR FLASH

NOR FLASH H-JTAG


Supervivi NOR FLASH
H-JTAG
H-Flaser Progarm NOR
FLASH

- 640 -

You might also like