SBC8600B User Manual


Add to my manuals
127 Pages

advertisement

SBC8600B User Manual | Manualzz

SBC8600B

Single Board Computer

User Manual

Version 1.0

– Dec. 12, 2012

Embest Technology Co., Ltd

i

Copyright Statement:

 Devkit8600B and its related intellectual property are owned by Shenzhen

Embest Technology Co., Ltd.

 Shenzhen Embest Technology has the copyright of this document and reserves all rights. Any part of the document should not be modified, distributed or duplicated in any approach and form with the written permission issued by

Embest Technology Co., Ltd.

 Microsoft, MS-DOS, Windows, Windows95, Windows98, Windows2000 and

Windows Embedded Compact 7 are trademarks of Microsoft Corporation.

Revision History:

Version

1.0

Date

2012-12-21

Description

Initial Version

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd

ii

Table of Contents

CHAPTER 1 PRODUCT OVERVIEW ................................................................................. 1

1.1

I

NTRODUCTION

............................................................................................................. 1

1.2

H

ARDWARE

O

VERVIEW

................................................................................................. 1

1.2.1 Mini8600B ............................................................................................................ 1

1.2.2 Extension Board .................................................................................................. 3

1.3

M

ODULES

S

UITABLE FOR THE

E

XTENSION

B

OARD

......................................................... 5

CHAPTER 2 HARDWARE SYSTEM .................................................................................. 6

2.1

CPU ............................................................................................................................ 6

2.1.1 Instroduction to CPU ........................................................................................... 6

2.1.2 CPU Features ...................................................................................................... 6

2.2

I

NTRODUCTION TO

P

ERIPHERALS

.................................................................................. 8

2.2.1 NAND Flash H27U4G8F2DTR-BC ..................................................................... 8

2.2.2 DDR H5TQ2G83CFR-H9C ................................................................................. 8

2.2.3 Ethernet AR8035 ................................................................................................. 8

2.2.4 MAX3232 ............................................................................................................. 9

2.3

H

ARDWARE

I

NTERFACES

............................................................................................. 10

2.3.1 Mini8600B .......................................................................................................... 10

2.3.2 Extension Board ................................................................................................ 16

CHAPTER 3 LINUX OPERATING SYSTEM .................................................................... 25

3.1

I

NTRODUCTION

........................................................................................................... 25

3.2

S

OFTWARE

R

ESOURCES

............................................................................................. 25

3.3

S

OFTWARE

F

EATURES

................................................................................................ 26

3.4

S

YSTEM

D

EVELOPMENT

.............................................................................................. 27

3.4.1 Establishment of development environment ..................................................... 27

3.4.2 System Compilation .......................................................................................... 29

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd

iii

3.4.3 System Customization ....................................................................................... 31

3.5

I

NTRODUCTION OF

D

RIVER

.......................................................................................... 34

3.5.1 NAND ................................................................................................................. 34

3.5.2 SD/MMC ............................................................................................................ 35

3.5.3 LCDC ................................................................................................................. 36

3.5.4 Audio in/out ........................................................................................................ 37

3.6

D

RIVER

D

EVELOPMENT

.............................................................................................. 38

3.6.1 GPIO_keys Driver.............................................................................................. 38

3.6.2 GPIO_leds Driver .............................................................................................. 43

3.7

S

YSTEM

U

PDATE

........................................................................................................ 46

3.7.1 Update of TF Card System Image .................................................................... 46

3.7.2 Update of NAND Flash ...................................................................................... 50

3.8

I

NSTRUCTIONS

........................................................................................................... 53

3.8.1 Selecting Display Mode ..................................................................................... 53

3.8.2 Testing ............................................................................................................... 55

3.8.3 Demo ................................................................................................................. 70

3.9 The Development of Applications ......................................................................... 73

CHAPTER 4 WINDOWS EMBEDDED COMPACT 7 OPERATING SYSTEM ................ 76

4.1

I

NTRODUCTION

........................................................................................................... 76

4.2

S

OFTWARE

R

ESOURCES

............................................................................................. 76

4.3

F

EATURES

.................................................................................................................. 77

4.4

S

YSTEM

D

EVELOPMENT

.............................................................................................. 78

4.4.1 Installation of IDE (Integrated Development Environment) ............................... 78

4.4.2 Extract BSP and project files to IDE .................................................................. 78

4.4.3 Sysgen & BSP Compilation ............................................................................... 79

4.4.4 Introduction of Drivers ....................................................................................... 79

4.5

U

PDATE OF

S

YSTEM

I

MAGE

......................................................................................... 80

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd

iv

4.5.1 Update of TF Card ............................................................................................. 81

4.5.2 Update of NAND Flash Image ........................................................................... 86

4.6

I

NSTRUCTIONS FOR

U

SE

............................................................................................. 87

4.6.1 How to use openGL ES demo ........................................................................... 87

4.7

A

PPLICATION

D

EVELOPMENT

....................................................................................... 87

4.7.1 Application Interfaces and Examples ................................................................ 88

4.7.2 GPIO Application Interfaces and Examples ...................................................... 88

APPENDIX ......................................................................................................................... 91

A

PPENDIX

I H

ARDWARE

D

IMENSION

.................................................................................. 91

A

PPENDIX

I

NSTALLATION OF

U

BUNTU

........................................................................... 93

A

PPENDIX

III I

NSTALLATION OF

L

INUX

USB E

THERNET

/RNDIS G

ADGET

.......................... 109

A

PPENDIX

IV F

ORMATING

L

INUX

B

OOT

D

ISK

.................................................................... 112

A

PPENDIX

V S

ETUP OF

TFTP S

ERVER

............................................................................ 117

A

PPENDIX

VI FAQ .......................................................................................................... 119

TECHNICAL SUPPORT AND WARRANTY ................................................................... 120

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 1

Chapter 1

Product Overview

1.1 Introduction

Measuring only 60mm by 27mm, the Mini8600B processor card is a small form-factor controller board based on TI’s Sitara AM3359 ARM Cortex-A8 processor. The tiny module integrates 2*256MBytes DDR3 SDRAM and 512Mbytes NAND Flash and uses two

0.4mm space 2*40-pin board-to-board male expansion connectors to bring out many hardware peripheral signals and GPIOs from the CPU.

Embest has designed a single board computer SBC8600B which has an expansion board to carry the Mini8600B. The flexible design allows the fast and easy way of realizing and upgrading the controller’s capabilities. In additional to those features offered by Mini8600B, the SBC8600B features 5 serial ports (including 2 RS232 and 3 TTL), 2 USB Host and 1

USB OTG, 2 Ethernet ports, CAN, RS485, LCD, Touch screen, Audio, ADC and more other peripherals. The SBC8600B is a ready-to-run platform to support for Linux 3.2.0,

Android 2.3 and WinCE 7 operating systems.

1.2 Hardware Overview

The following sections list out all the hardware features of the two parts of SBC8600B respectively.

1.2.1 Mini8600B

Electric Features

 Working Temperature: 0 °C~ 70°C

 Working Humidity: 20% ~ 90%, Non-Condensing

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 2

 Dimesions: 60mm x 27mm

 Input Voltage: 3.3V

Processor

 720-MHz ARM Cortex ™-A8 32-Bit RISC Microprocessor

 NEON ™ SIMD Coprocessor

 32KB/32KB of L1 Instruction/Data Cache with Single-Error Detection

(parity)

 256KB of L2 Cache with Error Correcting Code (ECC)

 SGX530 Graphics Engine

 Programmable Real-Time Unit Subsystem

Memories

 512MB NAND Flash

 2*256MB DDR3 SDRAM

Expansion Interfaces and Signals Routed to Pins

 Two 0.4-pitch 2*40-pin DIP Interfaces

 A TFT LCD Interface (Support LCDs with 24-bpp parallel RGB interface)

 Two USB2.0 High-Speed OTG Interfaces

 Six UART Interfaces

 A SPI Interface

 Two 10/100 /1000Mb/s Ethernet MAC(EMAC) with Management Data

Input/Output(MDIO) Module

 A Multichannel Audio Serial Ports (McASP)

 8-Channel 12bit ADC Interface

 Three IIC Signals

 Two 4-line SD/MMC card interfaces

 GPMC Signals

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 3

Note:

 Some of the pins are multiplexed for UART、IIC、SPI、CAN. Please refer to the CPU datasheet and schematics in the DVD-ROM for details.

Figure 1-1 Mini8600 Structure Chart

1.2.2 Extension Board

Electric Features

 Working Temperature: 0 °C~ 70°C

 Working Humidity: 20% ~ 90%, Non-Condensing

 Dimesions: 95m x 95m

 Input Voltage: 12V/1.25A

Audio/Video Interfaces

 LCD/4-Line Resistive Touch-Screen Interface (50-pin FPC connector with

24-bit RGB output)

 An Audio Input Interface (3.5mm connector)

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 4

 An Dual-Channel Audio Output Interface (3.5mm connector)

Data Transfer Interface

 Two 10/100/1000Mbps Ethernet Interface (WinCE 7 support only one

Ethernet interface)

 A CAN 2.0 Interface and a RS485 Interface (8-pin Phoenix Contact

Connector)

 A USB 2.0 High-Speed OTG Ports with Integrated PHY (480Mbps, Mini

USB Interface)

 Two USB 2.0 High-Speed HOST Ports with Integrated PHY (480Mbps,

USB-A Interfaces)

 A TF Slot (SD/MMC compatible, 3.3V logic level)

Serial Interfaces

 UART0, 3-Line RS232 Level, DB9 Debugging Serial Interface

 UART2, 3-Line RS232 Level, DB9 General-Purpose Serial Interface

 UART3, 3-Line TTL Level, DIP Interface

 UART4, 3-Line TTL Level, DIP Interface

 UART5, 3-Line TTL Level, DIP Interface

 GPIO Interfaces

Input Interfaces and others

 Two Customizable Buttons (MENU and BACK)

 A Reset Button

 A Buzzer

 A Power Indication LED

 Two Customizable LEDs

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 5

Figure 1-2 Mini8600 Structure Chart

1.3 Modules Suitable for the Extension Board

Names Linux

VGA8000

WF8000-U

CAM8100-U

YES*

YES*

YES*

CDMA8000-U YES*

WCDMA8000-U YES*

LVDS8000 YES*

Table 1

Android

YES*

NO

NO

NO

NO

WinCE

YES*

NO

NO

NO

NO

YES* YES*

Relevant Materials

Available in DVD-ROM

Available in DVD-ROM

Available in DVD-ROM

Download

Download

Available in DVD-ROM and on website

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 6

Chapter 2

Hardware System

2.1 CPU

2.1.1 Instroduction to CPU

The AM335x microprocessors, based on the ARM Cortex-A8, are enhanced with image, graphics processing, peripherals and industrial interface options such as EtherCAT and

PROFIBUS. The device supports the following high-level operating systems (HLOSs) such as Linux, WinCE and Android.

The AM335x microprocessor contains these subsystems:

 Microprocessor unit (MPU) subsystem based on the ARM Cortex-A8 microprocessor.

 POWERVR SGX™ Graphics Accelerator subsystem for 3D graphics acceleration to support display and gaming effects.

 The Programmable Real-Time Unit and Industrial Communication

Subsystem (PRU-ICSS) is separate from the ARM core, allowing independent operation and clocking for greater efficiency and flexibility.

2.1.2 CPU Features

Clock

AM3359 has two clock inputs, OSC1 and OCC0, and two clock outputs, LCKOUT1 and

LCKOUT2.

OSC1 provides RTC with a 32.768KHz reference clock. And it is used to connect

RTC_XTALIN terminal to RTC_XTALOUT terminal.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 7

OSC0 provides reference clocks such as 19.2-MHz, 24-MHz, 25-MHz or 26-MHz for the clocks without RT function. It is also used to connect XTALIN terminal and XTALOUT terminal.

Reset

Reseting is controlled by PWRONRSTn signals from CPU. The device is reset when it is a low level signal.

General-Purpose Interfaces

There are 4 GPIO banks, each of which has 32 I/O pins, and therefore the total pin number of GPIO would be 128 (4x32).

Programmable Real-Time Unit Subsystem

The PRUSS of AM3359 consists of 2 programmable real-time units, a 12KB shared RAM with single-error detection (parity), tree 120B register bank that can be accessed by each

PRU, an interrupt controller module used to process input events of the system, and the following peripherals:

 An UART with data flow control and maximum rate of 12Mbps

 Two MII Ethernet interface with support to industrial Ethernet such as

EtherCAT™

 A MDIO interface

 An enhanced capture module (eCAP)

3D Graphics Engine

POWERVR® SGX graphics acceleration subsystem is used to improve 3D image processing, as well as provide regular display and gaming effect. The subsystem features:

 Tile-Based Architecture Delivering Up to 20 MPloy/sec

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 8

 Universal Scalable Shader Engine is a Multi-Threaded Engine Incorporating

Pixel and Vertex Shader Functionality

 Advanced Shader Feature Set in Excess of Microsoft VS3.0, PS3.0 and

OGL2.0

 Industry Standard API Support of Direct3D Mobile, OGL-ES 1.1 and 2.0,

OpenVG 1.0, and OpenMax

2.2 Introduction to Peripherals

2.2.1 NAND Flash H27U4G8F2DTR-BC

H27U4G8F2DTR-BC is a 512M NAND Flash used on SBC8600B.

If you need more information about the NAND Flash, please refer to

H27U4G8F2DTR-BC.pdf under Disk-SBC8600B\HW design\datasheet\ NAND Flash\

2.2.2 DDR H5TQ2G83CFR-H9C

H5TQ2G83DFR-H9C is a 256MB DDR3 SDRAM used on SBC8600B. There are two

H5TQ2G83DFR-H9C on SBC8600B.

If you need to know more about the SDRAM, please refer to H5TQ2G83DFR.pdf under

Disk-SBC8600B\HW design\datasheet\DDR\.

2.2.3 Ethernet AR8035

AR8035 is a low-power and low-cost Ethernet PHY used on SBC8600B and integrated with a 10/100/1000Mb transceiver. It is a single-port tri-speed Ethernet PHY and supports

MAC.TM RGMII interfaces.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 9

AR8035 is compliant with the IEEE 802.3az Energy Efficiency Enthernet Standard and the

Atheros’s proprietary SmartEEE standard, which allows traditional MAC/SoC devices incompatible with 802.3az to function as a complete 802.3az system.

SBC8600B can be connected to a hub with a straight-though network cable, or connected to a computer with a crossover cable.

If you need know more about the Ethernet chip, please refer to AR8035.pdf under

Disk-SBC8600B\HW design\datasheet\LAN\.

2.2.4 MAX3232

MAX3232 is used to convert TTL levels into RS232 levels so that the board can communicate with the RS232 interfaces of PCs.

SBC8600B uses UART0 as debugging serial interface. The default voltage of UART0 is

1.8V, which needs to be boosted up to 3.3V for satisfying the external use.

If you need to know more about the this chip, please refer to MAX3232CSE.pdf under

Disk-SBC8600B\HW design\datasheet\ Serial\.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 10

2.3 Hardware Interfaces

2.3.1 Mini8600B

2.3.1.1 CN1 Interface

7

8

9

10

11

12

13

PIN

1

2

3

4

5

6

14

15

16

Figure 2-1

Mini8600B CN1 Interface

Table 2

CN1 Interface

CN1

Signal

GND

VDDS_RTC

CLK_OUT1

CLK_OUT2

MMC0_DAT0

MMC0_DAT1

Function

GND

Supply voltage for RTC

Clock out1

Clock out2

MMC0 data bus

MMC0 data bus

MMC0_DAT2

GLOBLE_RESETN

MMC0_DAT3

MMC0 data bus

SYS_RESET IN/ OUTPUT

MMC0 data bus

AM335X_PWRON_RESETN CPU PWRON Reset

GND GND

GND GND

AM355X_PRU_UART0_CTS PRU UART0 Clear To Send

AM355X_PRU_UART0_RX PRU UART0 receive data

AM355X_PRU_UART0_RTS PRU UART0 request to send

AM355X_PRU_UART0_TX PRU UART0 transmit data

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 11

23

24

25

26

27

28

29

30

31

PIN

17

18

19

20

21

22

32

33

34

43

44

45

46

47

48

49

35

36

37

38

39

40

41

42

Signal

AM355X_UART0_RX

AM355X_UART3_RX

AM355X_UART0_TX

AM355X_UART3_TX

AM355X_CAN0_RX

AM355X_I2C0_SDA

AM355X_CAN0_TX

AM355X_I2C0_SCL

AM355X_UART4_RX

AM355X_UART1_RX

AM355X_UART4_TX

AM355X_UART1_TX

GND

GND

MII1_COL

CN1

AM355X_USB0_DRVVBUS

MII1_TX_CLK

AM355X_USB1_DRVVBUS

MII1_TX_EN

MII1_REF_CLK

MII1_TXD3

MII1_CRS

MII1_TXD2

MII1_RX_ER

MII1_TXD1

MII1_RX_DV

MII1_TXD0

MII1_RX_CLK

MII_MDIO

MII1_RXD3

MII_MDC

MII1_RXD2

GND

Function

UART0 receive data

UART3 receive data

UART0 transmit data

UART3 transmit data

CAN0 receive data

I2C0 master serial data

CAN0 transmit data

I2C0 master serial clock

UART4 receive data

UART1 receive data

UART4 transmit data

UART1 transmit data

GND

GND

MII1 collision detect

USB0 controller VBUS control output

MII1 transmit clock

USB1 controller VBUS control output

MII1 transmit enable

MII1 reference clock

MII1 transmit data

MII1 carrier sense

MII1 transmit data

MII1 receive data error

MII1 transmit data

MII1 receive data valid

MII1 transmit data

MII1 receive clock

MII MDIO DATA

MII1 receive data

MII MDIO CLK

MII1 receive data

GND

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 12

75

76

77

78

71

72

73

74

79

80

67

68

69

70

63

64

65

66

56

57

58

59

60

61

62

PIN

50

51

52

53

54

55

GPMC_A0

GPMC_A7

GPMC_A5

GPMC_A11

GPMC_A4

GPMC_A10

GPMC_A3

GPMC_A9

GPMC_A2

GPMC_A8

GPMC_A6

GPMC_A1

GND

GND

VDD_3V3

VDD_3V3

VDD_3V3

VDD_3V3

Signal

MII1_RXD1

AM355X_USB0_DM

MII1_RXD0

AM355X_USB0_DP

MMC0_CMD

GND

USB0_VBUS

AM355X_USB1_DM

AM355X_USB1_ID

AM355X_USB1_DP

AM355X_USB0_ID

GND

USB1_VBUS

CN1

Function

MII1 receive data

USB0 DM-

MII1 receive data

USB0 DP

MMC0 Command Signal

GND

USB0 bus voltage

USB1 data-

USB1 ID

USB1 data+

USB0 ID

GND

USB1 bus voltage

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GPMC address

GND

GND

Power

Power

Power

Power

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 13

2.3.1.2 CN2 Interface

10

11

12

13

14

6

7

8

9

3

4

5

PIN

1

2

15

16

17

18

19

20

21

22

Figure 2-2

SBC8600B CN2 Interface

Table 3

CN2 Interface

CN2

MODE1

GND

GND

MCASP0_AHCLKX

MCASP0_ACLKX

MCASP0_FSX

MCASP0_AXR0

MCASP0_AHCLKR

MMC0_CLK

MCASP0_FSR

MCASP0_AXR1

GND

GND

VDDA_ADC

AM355X_ADC0

AM355X_ADC1

AM355X_ADC2

AM355X_ADC3

AM355X_ADC4

AM355X_ADC5

AM355X_ADC6

AM355X_ADC7

GND_ADC

Function

GND

GND

MCASP0 transmit master clock

MCASP0 transmit bit clock

MCASP0 transmit frame sync

MCASP0 serial data(I/O)

MCASP0 receiver master clock

MMC0 clock

MCASP0 receive frame sync

MCASP0 serial data(I/O)

GND

GND

Supply voltage range for ADC

ADC0

ADC1

ADC2

ADC3

ADC4

ADC5

ADC6

ADC7

GND ADC

Copyright © 2012 Embest Technology SBC8600B User Manual

48

49

50

51

44

45

46

47

40

41

42

43

36

37

38

39

52

53

54

55

56

29

30

31

32

33

34

35

PIN

23

24

25

26

27

28

Embest Technology Co., Ltd 14

MODE1

GND

GND

LCD_DATA1

LCD_DATA12

LCD_DATA0

LCD_DATA10

LCD_DATA5

LCD_DATA13

LCD_DATA4

LCD_DATA11

LCD_DATA6

LCD_DATA14

LCD_DATA8

LCD_VSYNC

GND

GND

LCD_DATA9

LCD_PCLK

LCD_DATA15

GPMC_AD11

LCD_DATA3

GPMC_AD15

LCD_DATA2

GPMC_AD14

LCD_DATA7

GPMC_WAIT0

LCD_HSYNC

GPMC_BEN1

GND

GND

LCD_EN

GPMC_WPN

GPMC_AD13

GPMC_CSN3

CN2

Function

GND

GND

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD data bus

LCD vertical sync

GND

GND

LCD data bus

LCD pixel clock

LCD data bus

GPMC address & data

LCD data bus

GPMC address & data

LCD data bus

GPMC address & data

LCD data bus

GPMC wait0

LCD horizontal sync

GPMC byte enable 1

GND

GND

LCD AC bias enable chip select

GPMC write protect

GPMC address & data

GPMC chip select

Copyright © 2012 Embest Technology SBC8600B User Manual

63

64

65

66

PIN

57

58

59

60

61

62

67

68

69

75

76

77

78

79

80

70

71

72

73

74

Embest Technology Co., Ltd 15

MODE1

GPMC_AD9

GPMC_CSN2

GPMC_AD10

GPMC_CLK

GPMC_AD8

GPMC_AD6

GPMC_AD12

GND

GND

GPMC_CSN1

GPMC_ADVN_ALE

GPMC_AD5

CN2

GPMC_BEN0_CLE

GPMC_AD4

GPMC_OEN_REN

GPMC_AD1

GPMC_AD2

GPMC_AD0

GPMC_AD3

GPMC_CSN0

GPMC_AD7

GPMC_WEN

GND

GND

Function

GPMC address & data

GPMC chip select

GPMC address & data

GPMC clock

GPMC address & data

GPMC address & data

GPMC address & data

GND

GND

GPMC chip select1

GPMC address valid/address latch enable

GPMC address & data

GPMC byte enable 0/Command latch enable

GPMC address & data

GPMC output /read enable

GPMC address & data

GPMC address & data

GPMC address & data

GPMC address & data

GPMC chip select0

GPMC address & data

GPMC write enable

GND

GND

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 16

2.3.2 Extension Board

Figure 2-3

Extension board interfaces

The interface is on the bottom of the board

The interface is on the top of the board

2.3.2.1 Power Jack

Pin

1

2

3

Singal

GND

+12V

NC

Table 4

Power Jack

CON1

Description

GND

Power supply (+12V)

NC

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 17

22

23

24

25

18

19

20

21

26

27

14

15

16

17

10

11

12

13

6

7

8

9

3

4

5

Pin

1

2

28

29

30

2.3.2.2 TFT_LCD Interface

R3

R4

R5

R6

GND2

R0

R1

R2

R7

GND3

G4

G5

G6

G7

G0

G1

G2

G3

Singal

B0

B1

B2

B3

B4

B5

B6

B7

GND1

DEN

Table 5

TFT_LCD Interface

HSYNC

VSYNC

J3

Description

GND

GND

GND

LCD Pixel data bit 0

LCD Pixel data bit 1

LCD Pixel data bit 2

LCD Pixel data bit 3

LCD Pixel data bit 4

GND

GND

GND

LCD Pixel data bit 5

LCD Pixel data bit 6

LCD Pixel data bit 7

LCD Pixel data bit 8

LCD Pixel data bit 9

LCD Pixel data bit 10

GND

GND

GND

GND

LCD Pixel data bit 11

LCD Pixel data bit 12

LCD Pixel data bit 13

LCD Pixel data bit 14

LCD Pixel data bit 15

GND

AC bias control (STN) or pixel data enable (TFT)

LCD Horizontal Synchronization

LCD Vertical Synchronization

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 18

Pin

31

32

37

38

39

40

33

34

35

36

45

46

47

48

41

42

43

44

49

50

Singal

GND

CLK

Y-

NC

NC

NC

GND4

X+

X-

Y+

NC

IIC_CLK

IIC_DAT

GND5

VDD1

VDD2

VDD3

VDD4

RESET

PWREN

J3

Description

GND

LCD Pixel Clock

GND

X+ Position Input

X- Position Input

Y+ Position Input

Y- Position Input

NC

NC

NC

NC

IIC master serial clock

IIC serial bidirectional data

GND

3.3V

3.3V

5V

5V

Reset

Backlight enable

Note:

 Please do NOT disconnect the LCD flat cable when the board is powered on.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 19

2.3.2.3 Audio Output Interface

3

4

5

Pin

1

2

Singal

GND

NC

Right

NC

Left

Table 6

Audio Output Interface

HEADPHONE1

Description

GND

NC

Right output

NC

Left output

2.3.2.4 Audio Input Interface

Pin

1

2

3

4

5

Singal

GND

NC

MIC IN

NC

MIC IN

Table 7

Audio Input Interface

MIC1

Description

GND

NC

Input

NC

Input

2.3.2.5 USB HOST Interface

Pin

1

2

3

4

Singal

VBUSA

DA-

DA+

GNDA

Table 8

USB HOST Interface

CON3

Description

+5V

USB Data-

USB Data+

GND

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 20

2.3.2.6 USB OTG Interface

3

4

5

Pin

1

2

2.3.2.7 TF Card Interface

Singal

VB

D-

D+

ID

G1

Table 9

USB OTG Interface

CON2

Description

+5V

USB Data-

USB Data+

USB ID

GND

6

7

8

9

Pin

1

2

3

4

5

2.3.2.8 LAN Interface

Singal

DAT2

CD/DAT3

CMD

VDD

CLOCK

VSS

DAT0

DAT1

CD

Table 10

TF Card Interface

TF1

Description

Card data 2

Card data 3

Command Signal

VDD

Clock

VSS

Card data 0

Card data 1

Card detect

Pin

1

2

3

4

5

Singal

TD1+

TD1-

TD2+

TD2-

TCT

Table 11

LAN Interface

J1,J2

Description

Transmit Data1+

Transmit Data1-

Transmit Data2+

Transmit Data2-

Transmit common terminal

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 21

Pin

6

7

8

9

10

11

12

13

14

2.3.2.9 Serial Interface

Singal

RCT

RD1+

RD1-

RD2+

RD2-

GRLA

GRLC

YELC

YELA

J1,J2

Description

Receive common terminal

Receive Data1+

Receive Data1-

Receive Data2+

Receive Data2-

+2.5V

LINK active LED

100M linked LED

+2.5V

6

7

8

9

Pin

1

2

3

4

5

2.3.2.10 CAN&RS485 接口

Table 12

Serial Interface

Singal

J4(UART0), J5(UART2)

Description

NC NC

RXD

TXD

NC

GND

Receive data

Transmit data

NC

GND

NC

RTS

CTS

NC

NC

Request To Send

Clear To Send

NC

3

4

5

Pin

1

2

Singal

+12V

GND

GND2

485B1

485A1

Table 13

CAN&RS485 Interface

U22

Description

+12V

GND

Isolated GND

485B

485A

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 22

6

7

8

GND1

CANL1

CANH

2.3.2.11 ADC Interface

Isolated GND

CANL

CANH

4

5

6

7

8

Pin

1

2

3

9

10

2.3.2.12 SPI Interface

Singal

GND

GND

ADC_CH1

ADC_CH3

VDDA_ADC

VDDA_ADC

ADC_CH2

ADC_CH4

GND

GND

Table 14

ADC Interface

J9

Description

GND

GND

ADC1

ADC3

Power

Power

ADC2

ADC4

GND

GND

7

8

9

10

3

4

5

6

Pin

1

2

Singal

+3.3V

+3.3V

SPI0_D1

SPI0_CLK

SPI0_CS0

SPI0_D0

GND

GND

GND

GND

Table 15

SPI Interface

J8

Description

3.3V

3.3V

SPI0 data1

SPI0 clock

SPI enable0

SPI data0

GND

GND

GND

GND

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 23

2.3.2.13 Extension Interface

7

8

9

10

3

4

5

6

Pin

1

2

Table 16

Extension Interface

Singal

VIO_3V3

VIO_3V3

J6

Description

+3.3V

+3.3V

UART3_TX_3V3 UART3 Transit data 3.3V level

UART4_TX_3V3 UART4 Transit data 3.3V level

UART3_RX_3V3 UART3 receive data 3.3V level

UART4_RX_3V3 UART4 receive data 3.3V level

GND

GND

GND

GND

GND

GND

GND

GND

7

8

9

10

3

4

5

6

Pin

1

2

Table 17

Extension Interface

Singal

VIO_3V3

VIO_3V3

J7

Description

+3.3V

+3.3V

UART5_TX_3V3 UART5 Transit data 3.3V level

GPIO0_9 GPIO

UART5_RX_3V3 UART5 receive data 3.3V level

GPIO2_0 GPIO

GND

GND

GND

GND

GND

GND

GND

GND

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 24

2.3.2.14 Buttons

Pin

S2

S3

S4

2.3.2.15 LED

Singal

MENU

BACK

Reset

Table 18

Buttons

S1-3

Description

System menu key

System back key

System Reset key

LED

1

2

3

Definition

D4

D35

D36

Table 19

LED

LEDs

Description

Power Indicator

User Custom LED

User Custom LED

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 25

Chapter 3 Linux Operating System

3.1 Introduction

This chapter will introduce the Linux software system of SBC8600B by the following sections:

 Introducing the software resources provided along with SBC8600B;

 Introducing the software features.

 Introducing the creation of development environment, system development, driver principles and development.

 Details of system updating.

 Notes for the use of system.

 Introducing the development of upper layers.

Note:

 It is recommended refering to Appendix Ⅱ for details of Ubuntu Linux installation and learning about embedded Linux development technology before you get started.

3.2 Software Resources

This section provides an overview of software system components of SBC8600B. A basic software system consists of four parts: x-loader, u-boot, kernel and rootfs. The Figure 3-1 shows the structure of the system:

spl u-boot kernel rootfs user area

Figure 3-1

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 26

Features and functions of each part of the system are listed below:

1) spl is a first level bootstrap program. After the system starts up, the ROM inside the CPU will copy spl to internal RAM and perform its routine work. Its main function is to initialize the CPU, copy u-boot into the memory and let u-boot lead the booting process;

2) u-boot is a second level bootstrap program. It is used for interacting with users and updating images and boot the kernel;

3) A Linux version with kernel 3.2.0 is employed here and it can be customized based onSBC8600B;

4) Rootfs employs open-source system ubifs. It is small in capacity and powerful, very suitable for embedded systems;

3.3 Software Features

Name

BIOS spl u-boot

Kernel

Device Driver

Linux-3.2.0 serial rtc net can flash lcd touch screen mmc/sd

Table 20

Note

NAND

MMC/SD

FAT

NAND

MMC/SD

FAT

NET

Supports ROM/CRAM/EXT2/EXT3/FAT/NFS/

JFFS2/UBIFS and various file systems

Seires driver

Hardware clock driver

10/100M/1000M Ethernet driver

Can bus driver nand flash driver (supports nand boot)

TFT LCD driver

4-line touch-screen controller driver mmc/sd controller driver

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 27

Demo usb otg audio keypad led

Android

TISDK usb otg 2.0 driver

Audio driver (supports audio recording and playback)

Gpio keypad driver

User custom led driver android 2.3.4 system

TISDK system

3.4 System Development

3.4.1 Establishment of development environment

Before the software development based on SBC8600B, users have to establish a Linux cross development environment on PC. This section will take Ubuntu operating system as an example to introduce how to establish a cross development environment.

3.4.1.1 Installing Cross Compilation Tools

After you insert the DVD-ROM to your PC, Ubuntu will mount it automatically under the directory /media/cdrom. The cross compilation tools can be found under

/media/cdrom/linux/tools.

The following instructions are executed at the Ubuntu terminal to decompress the cross compilation tools under the directory $HOME:

Note:

 Each instruction has been put a bullets “” before it to prevent confusion caused by the long instructions that occupy more than one line in the context.

mkdir $HOME/tools

cd /media/cdrom/linux/tools

tar xvf arm-2009q1-203-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

-C $HOME/tools

tar xvf arm-eabi-4.4.0.tar.bz2 -C $HOME/tools

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 28

Some of the other development tools used for source code compilation are saved under the same directroy; the user can execute the following commands to copy them to local folder:

cp /media/cdrom/linux/tools/mkimage $HOME/tools

cp /media/cdrom/linux/tools/mkfs.ubifs $HOME/tools

cp /media/cdrom/linux/tools/ubinize $HOME/tools

cp /media/cdrom/linux/tools/ubinize.cfg $HOME/tools

3.4.1.2 Addition of environment variables

After all above tools are installed, it is necessary to use the following commands to add them in the temporary environment variables:

export

PATH=$HOME/tools/arm-2009q1/bin:$HOME/tools/arm-eabi-4.4.0/bin:$HO

ME/tools:$PATH

Note:

 The instructions can be added in the .bashrc file located at the user directory, so that the addition of environment variables will be loaded automatically when the system is booting up; command echo $PATH can be used to check the path.

3.4.1.3 Establishment of Android Development Environment

Apart from the cross compilation tools and environment variables, there are a few additional software packages need to be installed and configurations to be set in Ubuntun system before Android system source code could be compiled. Please visit http://source.android.com/source/initializing.html

for more information.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 29

3.4.2 System Compilation

3.4.2.1 Preparation

Source codes of all components of the system are saved under the directory linux/source in the disc; user has to decompress them in the Ubuntu system before executing development:

mkdir $HOME/work

cd $HOME/work

tar xvf /media/cdrom/linux/source/u-boot-2011.09-psp04.06.00.03.tar.bz2

tar xvf /media/cdrom/linux/source/linux-3.2.0-psp04.06.00.08.sdk.tar.bz2

tar xvf

/media/cdrom/linux/demo/android/source/linux-3.1.0-android.tar.bz2

sudo tar xvf /media/cdrom/linux/source/rootfs.tar.bz2

tar xvf

/media/cdrom/linux/demo/android/source/rowboat-android-gingerbread-a m335xevm.tar.bz2

When the above steps are finished, the directories u-boot-2011.09-psp04.06.00.03,

Linux-3.2.0-psp04.06.00.08.sdk, Linux-3.1.0-android, rootfs and rowboat-android-ginge rbread-am335xevm will be created under current directory.

Note:

 Please make sure the uncompressed source code is saved under the directroy specified in the above instructions, or errors might occur in compilation p r ocess.

3.4.2.2 Compilation of booting code

SBC8600B can boot up from TF card or NAND Flash, with the former as first boot-up device and the latter as the secondary.

We will introduce the generation of booting code image files for both the boot-up devices.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 30

cd u-

boot

-2011.09-psp04.06.00.03

make distclean

make

sbc8600

_config

make

When the above steps are finished, two files named MLO and u-boot.img can be found under current directory.

3.4.2.3 Kernel compilation

The operations for Linux system are as follows:

cd Linux-3.2.0-psp04.06.00.08.sdk

make distclean

make sbc8600_defconfig

make uImage

The operations for Android system are as follows:

cd Linux-3.1.0-android

make distclean

make sbc8600_android_defconfig

make uImage

After above operations are executed, a uImage file will be generated under the directory arch/arm/boot.

3.4.2.4 Generation of file system

1) Ramdisk file

Please visit http://www.elinux.org/DevKit8600_FAQ for details of how to generate Ramdisk file.

2) UBI file

cd $HOME/work

sudo $

HOME

/too l s/mkfs.ubifs -r rootfs -m 2048 -e 126976 -c 812 -o ubifs.img

sudo $HOME/tools/ubinize -o ubi.img -m 2048 -p 128KiB -s 512 -O 2048

$HOME/ tools

/ubinize.cfg

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 31

After above operations are executed, a ubi.img file will be generated under the current directory.

3.4.2.5 Android system compilation

1) Execute the following instructions to start compilation of Android system;

cd rowboat-android-

gingerbread

-am335xevm

make TARGET_

PRODUCT

=am335xevm clean

make TARGET_

PRODUCT

=am335xevm OMAPES=4.x

2) Modify Rules.make under hardware/ti/sgx/ ;

Vi hardware/ti/sgx/Rules.make

Replace

“KERNEL_INSTALL_DIR=$(HOME)/work/Linux-3.1.0-android” with

“KERNEL_INSTALL_DIR=/home/user_name/work/Linux-3.1.0-android”

/home/user_name is the directory where usernames are saved, in other words, it’s the value of $(HOME). To view the value, please enter whoami in the terminal window of Linux system.

3) Please enter the following instructions to start making ubi file system;

source ./build_ubi.sh

ubi.img can be found under temp/.

Note:

 Before the compilation of Android file system, the Androind kernel source code

Linux-3.1.0-android needs to compile first, or errors might occur during the process.

3.4.3 System Customization

As Linux kernel has many kernel configuration options, users can add or remove drivers and some kernel features in the default configuration to meet specific requirement. The common process of system customization will be described with examples below.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 32

3.4.3.1 Modification of kernel configuration

A default configuration file is provided in the factory kernel source codes:

Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/configs/sbc8600_defconfig

Users can carry out system customization based on it:

cd Linux-3.2.0-psp04.06.00.08.sdk

cp arch/arm/configs/sbc8600_defconfig .

config

make menuconfig

Note:

 If an error occurs when command 'make menuconfig' is executed, you might need to install 'ncurse' in the Ubuntu system; 'ncurse' is a character graphic library required to generate configuration menu; please enter the following instruction to install the library:

sudo apt-get install ncurses-dev

Select the configuration below: The system customization will be described below by taking an example of usb mass storage device emulated with usb gadget:

-> Device Drivers

-> USB support

-> USB Gadget Support

-> USB Gadget Drivers

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 33

Figure 3-2

Type <M> for “File-backed Storage Gadget”, and select Save when you exit, and compile the kernel again.

3.4.3.2 Compilation

Save configuration, execute the following commands to recompile kernel:

make uImage

make modules

After above operations are finished, a new kernel image uImage will be generated under the directory arch/arm/boot, and a module file g_file_storage.ko can be found under the directory drivers/usb/gadget.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 34

3.5 Introduction of Driver

3.5.1 NAND

App,System call

VFS

MTD user module

JFFS2 JFFS Char device Block device

User

Memory technology device

Generic NAND driver

MTD chip driver

NAND flash chip driver

CFI flash driver

RAM,ROM

Chips etc

Kernel

GPMC module NAND flash

Hardware

Figure 3-3

Modular structure for NAND

The solid-state memory used in embedded systems is typically a flash; it is NAND Flash in this system.

NAND Flash is used as a block device, on which the file system is established; interaction between user and NAND Flash is mainly realized by a specific file system. In order to realize compatibility with different Flash memories, an MTD subsystem is used to

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 35 implement management between the file system and the specific flash driver for management.

Therefore, users need to access NAND Flash through the following process:

User->System Call->VFS->Block Device Driver->MTD->NAND Flash Driver->NAND

Flash。

Drivers and relevant documents:

Linux-3.2.0-psp04.06.00.08.sdk/drivers/mtd/nand/

Linux-3.2.0-psp04.06.00.08.sdk/drivers/mtd/nand/omap2.c

3.5.2 SD/MMC

App,System call

User

Kernel (Generic disk handler,File system)

BUFFER_CACHE

MMC/SD CORE

MMC_QUEUE

MMC_BLOCK

Kernel

MMC/SD CONTROLLER DRIVER

HARDWARE(MMC/SD/SDIO CONTROLLER)

Figure 3-4

Modular structure for SD/MMC

Hardware

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 36

SD/MMC card drivers for Linux mainly include SD/MMC core, mmc_block, mmc_queue and SD/MMC driver:

1 SD/MMC core realizes the codes unrelated to structure in the SD/MMC card operation.

2 mmc_block realizes driver structure when SD/MMC card is used as a block device.

3 mmc_queue realizes management of request queue.

4 SD/MMC driver realizes specific controller driver.

Drivers and relevant documents:

Linux-3.2.0-psp04.06.00.08.sdk/drivers/mmc/

Linux-3.2.0-psp04.06.00.08.sdk/drivers/mmc/host/omap_hsmmc.c

3.5.3 LCDC

The LCD controller (LCDC) of AM335x is the latest version integrated in OMAP-L138 SoC which has differences as follows comparing with OMAP-L138.

1 Different interrupt configuration and status register

2 2048*2048 Higher display resolution of up to 2048*2048

3 24-bit active TFT grating per pixel

So da8xx-fb LCD driver can be used to improve the LCD_VERSION2 code. By reading

PID register, the update of LCDC version can be found.

Drivers and relevant documents:

Linux-3.2.0-psp04.06.00.08.sdk/drivers/video/

Linux-3.2.0-psp04.06.00.08.sdk/drivers/video/da8xx-fb.c

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 37

3.5.4 Audio in/out

Native ALSA application

ALSA LIBRARY

User

PCM

ALSA KERNEL API

CONTROL

ALSA SOC CORE

Kernel

CODEC

DRIVER

MACHINE

DRIVER

PLATFORM

DRIVER

HARDWARE

Hardware

Figure 3-5

Modular structure for Audio

ASoC embedded audio system basically consists of three components:

1) Codec driver: The codec driver is platform independent and contains audio controls, audio interface capabilities, codec dapm definition and codec IO functions.

2) Platform driver: The platform driver contains the audio dma engine and audio interface drivers (e.g. I2S, AC97, PCM) for that platform.

3) Machine driver: The machine driver handles any machine specific controls and audio events i.e. turning on an amp at start of playback.

Drivers and relevant documents:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 38

Linux-3.2.0-psp04.06.00.08.sdk/sound/soc/

Linux-3.2.0-psp04.06.00.08.sdk/sound/soc/davinci/davinci-evm.c

Linux-3.2.0-psp04.06.00.08.sdk/sound/soc/codecs/sgtl5000.c

3.6 Driver Development

3.6.1 GPIO_keys Driver

1 Device Definition

Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xevm.c define gpio0.20 as “menu” key, return value as “KEY_F1”, triggered by low level; gpio2.1 as “back” key, return value as “KEY_ESC”, triggered by low level static struct gpio_keys_button gpio_key_buttons[] = {

{

.code = KEY_F1,

.gpio = GPIO_TO_PIN(0, 20),

.active_low = true,

.desc = "menu",

.type = EV_KEY,

// .wakeup = 1,

},

{

.code = KEY_ESC,

.gpio = GPIO_TO_PIN(2, 1),

.active_low = true,

.desc = "back",

.type = EV_KEY,

// .wakeup = 1,

},

}; static struct gpio_keys_platform_data gpio_key_info = {

.buttons = gpio_key_buttons,

.nbuttons = ARRAY_SIZE(gpio_key_buttons),

}; static struct platform_device gpio_keys = {

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 39

.name = "gpio-keys",

.id = -1,

.dev = {

.platform_data = &gpio_key_info,

},

};

2GPIO pinmux Configuration

Define the GPIO0.20 and GPIO2.1 as MODE7 (GPIO mode) and

AM33XX_PIN_INPUT (configuration input).

Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xevm.c static struct pinmux_config gpio_keys_pin_mux[] = {

{"xdma_event_intr1.gpio0_20",OMAP_MUX_MODE7 | AM33XX_PIN_INPUT},

{"gpmc_clk.gpio2_1",OMAP_MUX_MODE7|AM33XX_PIN_INPUT},

{NULL, 0},

};

3Driver Design

Linux-3.2.0-psp04.06.00.08.sdk/drivers/input/keyboard/gpio_keys.c

a) Call platform_driver_register to register gpio_keys driver static struct platform_driver gpio_keys_device_driver = {

.probe = gpio_keys_probe,

.remove = __devexit_p(gpio_keys_remove),

.driver = {

.name = "gpio-keys",

.owner = THIS_MODULE,

.pm = &gpio_keys_pm_ops,

.of_match_table = gpio_keys_of_match,

}

}; static int __init gpio_keys_init(void)

{

return platform_driver_register(&gpio_keys_device_driver);

} static void __exit gpio_keys_exit(void)

{

platform_driver_unregister(&gpio_keys_device_driver);

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 40

} late_initcall(gpio_keys_init); module_exit(gpio_keys_exit);

MODULE_LICENSE("GPL");

MODULE_AUTHOR("Phil Blundell <[email protected]>");

MODULE_DESCRIPTION("Keyboard driver for GPIOs");

MODULE_ALIAS("platform:gpio-keys");

b) Call input_register_device to register input driver static int __devinit gpio_keys_probe(struct platform_device *pdev)

{

input = input_allocate_device();

for (i = 0; i < pdata->nbuttons; i++) {

struct gpio_keys_button *button = &pdata->buttons[i];

struct gpio_button_data *bdata = &ddata->data[i];

unsigned int type = button->type ?: EV_KEY;

bdata->input = input;

bdata->button = button;

error = gpio_keys_setup_key(pdev, bdata, button);

if (error)

goto fail2;

if (button->wakeup)

wakeup = 1;

input_set_capability(input, type, button->code);

}

error = sysfs_create_group(&pdev->dev.kobj, &gpio_keys_attr_group);

if (error) {

dev_err(dev, "Unable to export keys/switches, error: %d\n",

error);

goto fail2;

}

error = input_register_device(input);

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 41

if (error) {

dev_err(dev, "Unable to register input device, error: %d\n",

error);

goto fail3;

}

c) Apply for gpio and define the gpio as input, and register gpio interrupt. static int __devinit gpio_keys_setup_key(struct platform_device *pdev,

struct gpio_button_data *bdata,

struct gpio_keys_button *button)

{

const char *desc = button->desc ? button->desc : "gpio_keys";

struct device *dev = &pdev->dev;

unsigned long irqflags;

int irq, error;

setup_timer(&bdata->timer, gpio_keys_timer, (unsigned long)bdata);

INIT_WORK(&bdata->work, gpio_keys_work_func);

error = gpio_request(button->gpio, desc);

if (error < 0) {

dev_err(dev, "failed to request GPIO %d, error %d\n",

button->gpio, error);

goto fail2;

}

error = gpio_direction_input(button->gpio);

if (error < 0) {

dev_err(dev, "failed to configure"

" direction for GPIO %d, error %d\n",

button->gpio, error);

goto fail3;

}

if (button->debounce_interval) {

error = gpio_set_debounce(button->gpio,

button->debounce_interval * 1000);

/* use timer if gpiolib doesn't provide debounce */

if (error < 0)

bdata->timer_debounce = button->debounce_interval;

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 42

}

irq = gpio_to_irq(button->gpio);

if (irq < 0) {

error = irq;

dev_err(dev, "Unable to get irq number for GPIO %d, error %d\n",

button->gpio, error);

goto fail3;

}

irqflags = IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING;

/*

* If platform has specified that the button can be disabled,

* we don't want it to share the interrupt line.

*/

if (!button->can_disable)

irqflags |= IRQF_SHARED;

error = request_threaded_irq(irq, NULL, gpio_keys_isr, irqflags, desc, bdata);

if (error < 0) {

dev_err(dev, "Unable to claim irq %d; error %d\n",

irq, error);

goto fail3;

}

return 0; fail3:

gpio_free(button->gpio); fail2:

return error;

}

d) Interrupt processing

When button is pressed, an interrupt is generated and key value is displayed.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 43 static irqreturn_t gpio_keys_isr(int irq, void *dev_id)

{

… schedule_work(&bdata->work);

} static void gpio_keys_work_func(struct work_struct *work)

{

} gpio_keys_report_event(bdata);

… static void gpio_keys_report_event(struct gpio_button_data *bdata)

{

struct gpio_keys_button *button = bdata->button;

struct input_dev *input = bdata->input;

unsigned int type = button->type ?: EV_KEY;

int state = (gpio_get_value(button->gpio) ? 1 : 0) ^ button->active_low;

input_event(input, type, button->code, !!state);

input_sync(input);

}

3.6.2 GPIO_leds Driver

1 Device Definition

Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xevm.c

Configure GPIO1.30 as ”sys_led” ( system indicator ) and GPIO1.31 as

“user_led”, both lighted up by high level signal. static struct gpio_led gpio_leds[] = {

{

.name = "sys_led",

.default_trigger = "heartbeat",

.gpio = GPIO_TO_PIN(1, 30),

},

{

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 44

.name = "user_led",

.gpio = GPIO_TO_PIN(1, 31),

},

}; static struct gpio_led_platform_data gpio_led_info = {

.leds = gpio_leds,

.num_leds = ARRAY_SIZE(gpio_leds),

}; static struct platform_device leds_gpio = {

.name = "leds-gpio",

.id = -1,

.dev = {

.platform_data = &gpio_led_info,

},

};

2 GPIO pinmux Configuration

Linux-3.2.0-psp04.06.00.08.sdk/arch/arm/mach-omap2/board-am335xevm.c

Configure GPIO1.30 and GPIO1.31 as MODE7 (gpio mode) and

AM33XX_PIN_OUTPUT (configuration output) static struct pinmux_config gpio_led_pin_mux[] = {

{"gpmc_csn1.gpio1_30", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},

{"gpmc_csn2.gpio1_31", OMAP_MUX_MODE7 | AM33XX_PIN_OUTPUT},

{NULL, 0},

};

3 Driver Design

Linux-3.2.0-psp04.06.00.08.sdk/drivers/leds/leds-gpio.c

a) Call platform_driver_register to register gpio_leds driver static struct platform_driver gpio_led_driver = {

.probe = gpio_led_probe,

.remove = __devexit_p(gpio_led_remove),

.driver = {

.name = "leds-gpio",

.owner = THIS_MODULE,

.of_match_table = of_gpio_leds_match,

},

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 45

};

MODULE_ALIAS("platform:leds-gpio"); static int __init gpio_led_init(void)

{

return platform_driver_register(&gpio_led_driver);

} static void __exit gpio_led_exit(void)

{

platform_driver_unregister(&gpio_led_driver);

} module_init(gpio_led_init); module_exit(gpio_led_exit);

MODULE_AUTHOR("Raphael Assenat <[email protected]>, Trent Piepho

<[email protected]>");

MODULE_DESCRIPTION("GPIO LED driver");

MODULE_LICENSE("GPL");

b) Apply for gpio and call led_classdev_register to led_classdev driver static int __devinit gpio_led_probe(struct platform_device *pdev)

{

if (pdata && pdata->num_leds) {

priv = kzalloc(sizeof_gpio_leds_priv(pdata->num_leds),

GFP_KERNEL);

if (!priv)

return -ENOMEM;

priv->num_leds = pdata->num_leds;

for (i = 0; i < priv->num_leds; i++) {

ret = create_gpio_led(&pdata->leds[i],

&priv->leds[i],

&pdev->dev,

pdata->gpio_blink_set);

if (ret < 0) {

/* On failure: unwind the led creations */

for (i = i - 1; i >= 0; i--)

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 46

delete_gpio_led(&priv->leds[i]);

kfree(priv);

return ret;

}

}

}

} static int __devinit create_gpio_led(const struct gpio_led *template,

struct gpio_led_data *led_dat, struct device *parent,

int (*blink_set)(unsigned, unsigned long *, unsigned long *))

{

ret = gpio_request(template->gpio, template->name);

ret = gpio_direction_output(led_dat->gpio, led_dat->active_low ^ state);

ret = led_classdev_register(parent, &led_dat->cdev);

}

c) Users may access the file named brightness under

/sys/class/leds/xxx/brightness, and call gpio_led_set to configure LED status static void gpio_led_set(struct led_classdev *led_cdev,

enum led_brightness value)

{

gpio_set_value(led_dat->gpio, level);

}

3.7 System Update

3.7.1 Update of TF Card System Image

1 Formatting TF Card

HP USB Disk Storage Format Tool 2.0.6 is recommended as the formatting tooll:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 47

Please download it from: http://www.embedinfo.com/english/download/SP27213.exe

a) Insert TF card into a card reader and then insert the reader into your PC.

b) Open HP USB Disk Storage Format Tool to show the following window:

Figure 3-6 c)

Select “FAT32” file system

d)

Click “Start”

e)

When formatting is complete, click “OK”

Note:

 HP USB Disk Storage Format Tool will erase partitions of TF card. If you want to maintain the partitions, please use the formatting software of Windows.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 48

2 Image update

Copy all files under the directory linux\image to the TF card, insert it on the board, and then power up the board. The information on serial interface will be shown as below:

Note:

 The default display is a 4.3-inch LCD. If you are working with the LCDs of other size, please enter u-boot when the board is booting up to configure the display mode, and then type boot to continue boot-up process. Please refer to 3.8.1 Selecting Display Mode for more details

 If there is alrealy an image in NAND Flash, you need to short the jumper JP5 on the board so as to make it boot up from TF card. Disconnect JP5 after successful boot-up of the system.

Booting from MMC...

OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img

U-Boot 2011.09-svn55 (Dec 04 2012 - 09:29:02)

I2C: ready

DRAM: 512 MiB

WARNING: Caches not enabled

Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board

NAND: HW ECC Hamming Code selected

512 MiB

MMC: OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

Net: cpsw

Hit any key to stop autoboot: 0

SD/MMC found on device 0 reading uEnv.txt

** Unable to read "uEnv.txt" from mmc 0:1 **

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 49 reading uImage

3224184 bytes read reading ramdisk.gz

12514633 bytes read

## Booting kernel from Legacy Image at 80007fc0 ...

Image Name: Linux-3.2.0

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 3224120 Bytes = 3.1 MiB

Load Address: 80008000

Entry Point: 80008000

Verifying Checksum ... OK

XIP Kernel Image ... OK

OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

Linux version 3.2.0 (luofc@TIOP) (gcc version 4.3.3 (Sourcery G++ Lite 2009q1-203) )

#17 Fri Dec 7 10:04:07 CST 2012

………

………

RAMDISK: gzip image found at block 0

VFS: Mounted root (ext2 filesystem) on device 1:0.

Freeing init memory: 260K

INIT: version 2.86 booting

Starting udevudevd (741): /proc/741/oom_adj is deprecated, please use

/proc/741/oom_score_adj instead. tar: removing leading '/' from member names

Remounting root file system... mount: mounting /dev/root on / failed: Invalid argument mount: mounting /dev/root on / failed: Invalid argument root: mount: mounting rootfs on / failed: No such file or directory

Setting up IP spoofing protection: rp_filter.

Configuring network interfaces... udhcpc (v1.11.3) started

Sending discover... udhcpc: sendto: Network is down

Sending discover... udhcpc: sendto: Network is down

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 50

Sending discover... udhcpc: sendto: Network is down

No lease, failing done.

Tue Jan 27 08:47:00 UTC 2009

INIT: Entering runlevel: 5

Starting syslogd/klogd: done

.-------.

| | .-.

| | |-----.-----.-----.| | .----..-----.-----.

| | | __ | ---'| '--.| .-'| | |

| | | | | |--- || --'| | | ' | | | |

'---'---'--'--'--. |-----''----''--' '-----'-'-'-'

-' |

'---'

The Angstrom Distribution SBC8600 ttyO0

Angstrom 2008.1-test-20090127 SBC8600 ttyO0

SBC8600 login: (

Type ”root”)

The above information indicates a successful boot-up of Linux from TF card.

3.7.2 Update of NAND Flash

Update of NAND boot-up image is accomplished by u-boot. No matter whether NAND

Flash has data or not, u-boot can be used to update NAND Flash images.

1) Preparation

a) Format the TF card as FAT or FAT32 file system by using HP USB Disk

Storage Format Tool 2.0.6

b) Copy files MLO, u-boot.img, uImage and ubi.img from DVD-ROM into TF card.

2) Update

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 51

a) Insert the TF card which contians the system images into the development board, and then connect power supply. Press any key on keyboard to enter the u-boot when a message "Hit any key to stop autoboot" appears:

Note:

 You may short the jumper JP5 on the board to allow SBC8600B boot up from TF card and enter uboot to write the image in NAND Flash, and then disconnect JP5 to allow system boot up from NAND Flash.

 Alternatively, you may leave JP5 disconnected and intert TF card on the board to boot up from NAND Flash, and then write the image in NAND Flash through uboot.

U-Boot SPL 2011.09-svn55 (Nov 20 2012 - 10:37:42)

Texas Instruments Revision detection unimplemented

Booting from MMC...

OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img

U-Boot SPL 2011.09-svn55 (Nov 20 2012 - 10:37:42)

I2C: ready

DRAM: 512 MiB

WARNING: Caches not enabled

Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board

NAND: HW ECC Hamming Code selected

512 MiB

MMC: OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

Net: cpsw

Hit any key to stop autoboot: 0 (press any key to enter uboot)

b) After entering the uboot command line, type “run updatesys” to start update process of the system:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 52

SBC8600# run updatesys

NAND erase.chip: device 0 whole chip

Erasing at 0x7fe0000 -- 100% complete.

OK reading MLO

36079 bytes read

HW ECC BCH8 Selected

NAND write: device 0 offset 0x0, size 0x8cef

36079 bytes written: OK reading u-boot.img

234896 bytes read

HW ECC BCH8 Selected

NAND write: device 0 offset 0x80000, size 0x39590

234896 bytes written: OK reading uImage

3224184 bytes read

HW ECC BCH8 Selected

NAND write: device 0 offset 0x280000, size 0x313278

3224184 bytes written: OK reading ubi.img

14811136 bytes read

SW ECC selected

NAND write: device 0 offset 0x780000, size 0xe20000

Skip bad block 0x00ce0000

14811136 bytes written: OK

Flashing LED on the board indicates that the update has been finished; please remove TF and reboot the board.

3) U-boot configuration

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 53

The system image has a default setting for 4.3-inch LCD. You can change the settings in UBOOT according to the detailed instructions contained in 3.8.1

Selecting Display Mode.

3.8 Instructions

3.8.1 Selecting Display Mode

System supports a wide range of display mode. Users can change the display mode by modifying the U-Boot configure parameters.

How to enter the u-boot command mode:

Power on the board and press any key on PC’s keyboard to enter u-boot when you see

“Hit any key to stop autoboot” in your terminal window.

U-Boot SPL 2011.09-svn55 (Nov 20 2012 - 10:37:42)

Texas Instruments Revision detection unimplemented

Booting from MMC...

OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img

U-Boot SPL 2011.09-svn55 (Nov 20 2012 - 10:37:42)

I2C: ready

DRAM: 512 MiB

WARNING: Caches not enabled

Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board

NAND: HW ECC Hamming Code selected

512 MiB

MMC: OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

Net: cpsw

Hit any key to stop autoboot: 0 (press any key to enter uboot)

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 54

3.8.1.1 Using a

4.3”LCD Display

Modify the parameter by executing the command as follows in the U-boot command mode.

SBC8600# setenv dispmode 4.3inch_LCD

SBC8600# saveenv

3.8.1.2 Using a

7”LCD Display

Modify the parameter by executing the command as follows in the U-boot command mode.

SBC8600# setenv dispmode 7inch_LCD

SBC8600# saveenv

3.8.1.3 Using a VGA Display

Modify the parameter by executing the command as follows in the U-boot command mode.

SBC8600# setenv dispmode VGA

SBC8600# saveenv

3.8.1.4 Using a LVDS Display

Modify the parameter by executing the command as follows in the U-boot command mode.

SBC8600# setenv dispmode LVDS

SBC8600# saveenv

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 55

3.8.2 Testing

3.8.2.1 LED Testing

The D35 LED on the board is the system indicator, D36 is an user custom LED.

The following operations are accomplished in HyperTerminal:

4) Controlling system indicator root@SBC8600:~# echo 1 > /sys/class/leds/sys_led/brightness root@SBC8600:~# echo 0 > /sys/class/leds/sys_led/brightness

5) Controlling user custom LED root@SBC8600:~# echo 1 > /sys/class/leds/user_led/brightness root@SBC8600:~# echo 0 > /sys/class/leds/user_led/brightness

The LED will respond accordingly to the instructions.

3.8.2.2 KEYPAD Testing

The board has two user custom keys, BACK and MENU. You can test them by executing the following instructions. root@SBC8600:~# evtest /dev/input/event1

Input driver verevdev: (EVIOCGBIT): Suspicious buffer size 511

Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100

Input device name: "gpio-keys"

Supported events:

Event type 0 (Sync)

Event type 1 (Key)

Event code 1 (Esc)

Event code 59 (F1)

Testing ... (interrupt to exit)

Event: time 1233046135.256046, type 1 (Key), code 1 (Esc), value 1

Event: time 1233046135.256053, -------------- Report Sync ------------

Event: time 1233046135.426967, type 1 (Key), code 1 (Esc), value 0

Event: time 1233046135.426970, -------------- Report Sync ------------

Event: time 1233046136.373255, type 1 (Key), code 59 (F1), value 1

Event: time 1233046136.373260, -------------- Report Sync ------------

Event: time 1233046136.548841, type 1 (Key), code 59 (F1), value 0

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 56

Event: time 1233046136.548844, -------------- Report Sync ------------

Note:

 Press Ctrl+C to quit the test. These combined keys can be used to quit any following test.

3.8.2.3 Touch Screen Testing

This test requires that Linux system boots up from NAND Flash.

1) Execute the following instruction to test touch-screen root@SBC8600: # ts_calibrate

The information on LCD will guide you to click the icon "+" for 5 times to complete the calibration.

2) Calibration is complete, enter the following commands for Touch Panel Test root@SBC8600: # ts_test

Select drawing dots or drawing lines from the prompt information to start testing.

3.8.2.4 Backlight Testing

The backlight brightness has a range from 0 to 100, in which 100 means highest brightness, 0 means lowest.

Execute the following instructions to test backlight brightness.

1 View the default brightness root@SBC8600:~# cat /sys/class/backlight/pwm-backlight/brightness

80

2 Set the brightness to 0

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 57 root@SBC8600:~# echo 0 > /sys/class/backlight/pwm-backlight/brightness root@SBC8600:~# cat /sys/class/backlight/pwm-backlight/brightness

0

Now backlight is turned off and the LCD shows a black screen.

3 Set the brightness to 100 root@SBC8600:~# echo 100 > /sys/class/backlight/pwm-backlight/brightness root@SBC8600:~# cat /sys/class/backlight/pwm-backlight/brightness

100

The screen is turned on.

3.8.2.5 RTC Testing

The development board contains hardware clock to save and synchronize the system time.

Test can be accomplished with the following steps:

1) Set the system time as Mar 22 20:00:00 2012

root@SBC8600: # date 032220002012

Thu Mar 22 20:00:00 UTC 2012

2) Write the system clock into RTC

root@SBC8600: # hwclock -w

3) Read the RTC

root@SBC8600: # hwclock

Thu Mar 22 20:00:10 2012 0.000000 seconds

We can see that the RTC clock has been set as Mar 22, 2012; the system clock will be saved in the hardware clock.

4) Restart the system; enter the following commands to update the system clock

root@SBC8600: # hwclock -s root@SBC8600: # date

Thu Mar 22 20:01:30 2012 0.000000 seconds

We can see the system time is set as hardware time.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 58

Note:

 You may found the RTC stop running in the scenario where the board is powered off and then powered on again. This is caused by the bug of the CPU. Please refer to the errata provide by TI.

 The development board does not have a RTC battery (model CR1220) by default; and users need to use a battery of their own.

3.8.2.6 TF Card Testing

1 After inserting TF card, the system will mount the TF card under the directory

/media automatically: root@SBC8600:~# df -h

Filesystem Size Used Available Use% Mounted on rootfs 31.0M 19.7M 11.3M 64% /

/dev/root 31.0M 19.7M 11.3M 64% / none 250.6M 684.0k 249.9M 0% /dev tmpfs 250.6M 20.0k 250.6M 0% /var/volatile tmpfs 250.6M 0 250.6M 0% /dev/shm tmpfs 250.6M 3.0M 247.6M 1% /media/ram

/dev/mmcblk0p1 1.8G 101.8M 1.8G 5% /media/mmcblk0p1

2 Enter the following command to see the contents inside the TF card: root@SBC8600:~# ls /media/mmcblk0p1 u-boot.img mlo uImage ramdisk.gz ubi.img

3)Unmount TF card manually. root@SBC8600:~# umount /media/mmcblk0p1

4)Mount TF card manually. root@SBC8600:~# mount -t vfat /dev/mmcblk0p1 /mnt/cf root@SBC8600:~# df -h

Filesystem Size Used Available Use% Mounted on rootfs 31.0M 19.7M 11.3M 64% /

… tmpfs 250.6M 3.0M 247.6M 1% /media/ram

/dev/mmcblk0p1 1.8G 101.8M 1.8G 5% /media/cf root@SBC8600:~# ls /media/cf

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 59 u-boot.img mlo uImage ramdisk.gz ubi.img

Note:

 The system can mount the TF card automatically when you insert it on the board. However, we recommend mounting it manually because automatic mounting leads to slow writing speed.

3.8.2.7 USB DEVICE Testing

USB DEVICE testing is accomplished by using a cable to connect the miniUSB interface of the development board to the USB interface on PC; The development board is recognized by PC as a network device so that the two ends may communicate by Ping command.

1) Afte system boot-up, please use a USB cable to connect the development board to your PC. The Linux USB Ethernet driver needs to be installed on PC. Please

refer to Appendix III Installation of Linux USB Ethernet/RNDIS Gadget for

detailed information

2) Executing the following commands in the HyperTerminal: root@SBC8600:~# ifconfig usb0 192.168.1.115 root@SBC8600:~# ifconfig lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:26 errors:0 dropped:0 overruns:0 frame:0

TX packets:26 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:2316 (2.2 KiB) TX bytes:2316 (2.2 KiB) usb0 Link encap:Ethernet HWaddr 5E:C5:F6:D4:2B:91

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 60

inet addr:192.168.1.115 Bcast:192.168.1.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:253 errors:0 dropped:0 overruns:0 frame:0

TX packets:43 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:35277 (34.4 KiB) TX bytes:10152 (9.9 KiB)

3) After the development board is configured, please click My Computer > Network

Neighborhood > Check Network Connection, a virtual network adapter will be added into the PC.

4) Rightclick virtual network adapter on PC and select “Attribute”, and then doubleclick the “Internet Protocol (TCP/IP)” to configure the IP address of the virtual network adapter:

Figure 3-7

5) Use ping command in the HyperTerminal to test whether the settings of the development board are successful:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 61 root@SBC8600:~# ping 192.168.1.15

PING 192.168.1.15 (192.168.1.15): 56 data bytes

64 bytes from 192.168.1.15: seq=0 ttl=128 time=0.885 ms

64 bytes from 192.168.1.15: seq=1 ttl=128 time=0.550 ms

6) The above information indicates a successful testing.

Note:

 IP address of the network adapter configured in OTG should not be as same as that of Ethernet interface.

3.8.2.8 USB HOST Testing

1) After inserting USB flash disk on the board, the system will mount disk under the directory /media automatically; root@SBC8600:~# df -h

Filesystem Size Used Available Use% Mounted on rootfs 31.0M 19.7M 11.3M 64% /

/dev/root 31.0M 19.7M 11.3M 64% / none 250.6M 684.0k 249.9M 0% /dev tmpfs 250.6M 20.0k 250.6M 0% /var/volatile tmpfs 250.6M 0 250.6M 0% /dev/shm tmpfs 250.6M 3.0M 247.6M 1% /media/ram

/dev/sda1 99.2M 3.3M 95.9M 3% /media/sda1 root@SBC8600:~# ls /media/sda1/

MLO u-boot.img uImage

2) Unmount USB disk manually; root@SBC8600:~# cd /home/root root@SBC8600:~# umount /media/sda1/

3) Type command df. The absence of directory /media/sda1/ indicates that the

USB disk is unmounted successfully;

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 62 root@SBC8600:~# df

Filesystem 1k-blocks Used Available Use% Mounted on rootfs 31729 20185 11544 64% /

/dev/root 31729 20185 11544 64% / none 256624 684 255940 0% /dev

/dev/mmcblk0p1 1939712 104316 1835396 5% /media/mmcblk0p1 tmpfs 256624 20 256604 0% /var/volatile tmpfs 256624 0 256624 0% /dev/shm tmpfs 256624 3104 253520 1% /media/ram

4) Mount USB disk manually; root@SBC8600:~# mount -t vfat /dev/sda1 /mnt/card/ root@SBC8600:~# df -h

Filesystem Size Used Available Use% Mounted on rootfs 31.0M 19.7M 11.3M 64% /

/dev/root 31.0M 19.7M 11.3M 64% / none 250.6M 684.0k 249.9M 0% /dev tmpfs 250.6M 20.0k 250.6M 0% /var/volatile tmpfs 250.6M 0 250.6M 0% /dev/shm tmpfs 250.6M 3.0M 247.6M 1% /media/ram

/dev/sda1 99.2M 3.3M 95.9M 3% /media/card

3.8.2.9 AUDIO Testing

The board has audio input and output interfaces. Users can enter the following instructions to test alsa-utils audio player and recorder in the file system:

1) Audio Recorder Testing

Plug in a microphone to test the audio recorder. root@SBC8600:~# arecord -t wav -c 1 -r 44100 -f S16_LE -v k

Recording WAVE 'k' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

Plug PCM: Route conversion PCM (sformat=S16_LE)

Transformation table:

0 <- 0*0.5 + 1*0.5

Its setup is:

stream : CAPTURE

access : RW_INTERLEAVED

format : S16_LE

subformat : STD

channels : 1

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 63

rate : 44100

exact rate : 44100 (44100/1)

msbits : 16

buffer_size : 32768

period_size : 2048

period_time : 46439

tstamp_mode : NONE

period_step : 1

avail_min : 2048

period_event : 0

start_threshold : 1

stop_threshold : 32768

silence_threshold: 0

silence_size : 0

boundary : 1073741824

......

2) Playback Testing

Plug in a headphone to listen to what you recorded. root@SBC8600:~# aplay -t wav -c 2 -r 44100 -f S16_LE -v k

Playing WAVE 'k' : Signed 16 bit Little Endian, Rate 44100 Hz, Mono

Plug PCM: Route conversion PCM (sformat=S16_LE)

Transformation table:

0 <- 0

1 <- 0

Its setup is:

stream : PLAYBACK

access : RW_INTERLEAVED

format : S16_LE

subformat : STD

channels : 1

rate : 44100

exact rate : 44100 (44100/1)

msbits : 16

buffer_size : 32768

period_size : 2048

period_time : 46439

tstamp_mode : NONE

period_step : 1

avail_min : 2048

period_event : 0

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 64

start_threshold : 32768

stop_threshold : 32768

silence_threshold: 0

silence_size : 0

boundary : 1073741824

......

3.8.2.10 Network Testing

1 There are two Ethernet interfaces, NET1 (J1) and NET2 (J2), associated with two device nodes, eth0 and eth1. Please use two network cables to connect the interfaces to a network and ensure that the IP addresses of the interfaces are set in different network segments.

Note:

 the IP addresses of the two network interfaces need to be set in different network segments, or the testing would be failed..

[root@SBC8600/]# ifconfig eth0 192.192.192.200

[root@SBC8600/]# ifconfig eth0 Link encap:Ethernet HWaddr D4:94:A1:8D:EB:25

inet addr:192.192.192.200 Bcast:192.192.192.255 Mask:255.255.255.0

UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1

RX packets:137 errors:0 dropped:4 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:13792 (13.4 KiB) TX bytes:0 (0.0 B)

Interrupt:40 lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

[root@SBC8600/]# ping 192.192.192.170

PING 192.192.192.170 (192.192.192.170): 56 data bytes

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 65

64 bytes from 192.192.192.170: seq=0 ttl=128 time=4.486 ms

64 bytes from 192.192.192.170: seq=1 ttl=128 time=0.336 ms

[root@SBC8600/]# ifconfig eth1 192.168.168.116

[root@SBC8600/]# ifconfig eth1 Link encap:Ethernet HWaddr 00:17:EA:96:34:D5

net addr:192.168.168.116 Bcast:192.168.168.255

Mask:255.255.255.0

UP BROADCAST MULTICAST MTU:1500 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:1000

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

Lo Link encap:Local Loopback

inet addr:127.0.0.1 Mask:255.0.0.0

UP LOOPBACK RUNNING MTU:16436 Metric:1

RX packets:0 errors:0 dropped:0 overruns:0 frame:0

TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

collisions:0 txqueuelen:0

RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)

[root@SBC8600/]# ping 192.168.168.121

PING 192.168.168.121 (192.168.168.121): 56 data bytes

64 bytes from 192.168.168.121: seq=0 ttl=64 time=7.969 ms

64 bytes from 192.168.168.121: seq=1 ttl=64 time=0.319 ms

2 The above information indicates a successful network testing.

3.8.2.11 CAN Testing

SBC8600B can be working as a CAN deivce. Please connect the CAN interfaces on your

SBC8600B and another CAN device according to the board schematic and the figure shown below:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 66

Figure 3-8

Follow the steps listed below to complete CAN testing

1) Set the communication bit rate to 125KBPS for both SBC8600B and the other

CAN device, and enable CAN devices. root@SBC8600:~# canconfig can0 bitrate 125000 ctrlmode triple-sampling on root@SBC8600:~# canconfig can0 start

2) Transmit and receive data on the two devices respectively by typing the following instructions. root@SBC8600:~# cansend can0 -i 0x10 0x11 0x22 0x33 0x44 0x55 0x66 0x77 0x88

Note:

 The instruction sends data only once. Type it again to send another date package.

 The receiving device needs to remain in receiving status so that the received information can be shown in the terminal window.

3) Receiving data package; root@SBC8600:~# candump can0

The terminla window will print the information of the received data package

4) Stop the CAN device

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 67 root@SBC8600:~# canconfig can0 stop

Users can test with different bit rates by using the instructions above. CAN device need to be stopped before it is reconfigured. The following list contains the bit rate that can be used to testing.

25KBPS(250000)

50KBPS(50000)

125KBPS(125000)

500KBPS(500000)

650KBPS(650000)

1MKBPS(1000000 )

You can also try other bit rates that have not been listed here.

Note:

 Same bit rate has to be applied when testing over two development boards.

3.8.2.12 RS485 Testing

Please connect the RS485 interfaces on both SBC8600B and another device according to board schematic and the figure shown below:

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 68

Figure 3-9

RS485 interface works under half-duplex mode, which means each of two ends can only send or receive data at a time. Copy the file uart_test under linux\example\uart_test into

TF card, and then insert the card on SBC8600B and execute the following instructions; root@SBC8600:~# cd /media/mmcblk0p1/ root@SBC8600:/media/mmcblk0p1# ./uart_test -d /dev/ttyO1 -b 115200

/dev/ttyO1 SEND: 1234567890

/dev/ttyO1 RECV 10 total

/dev/ttyO1 RECV: 1234567890

/dev/ttyO1 SEND: 1234567890

/dev/ttyO1 RECV 10 total

/dev/ttyO1 RECV: 1234567890

/dev/ttyO1 SEND: 1234567890

/dev/ttyO1 RECV 10 total

/dev/ttyO1 SEND: 1234567890

/dev/ttyO1 RECV 10 total

3.8.2.13 Serial Interface Testing

Short the pins RX3V3 and TX3V3 of J5 on the board and copy the file uart_test under linux\example\uart_test into TF card, and then intert it on the board. Execute the following instructions in the terminal window; root@SBC8600:~# cd /media/mmcblk0p1/

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 69 root@SBC8600:/media/mmcblk0p1# ./uart_test -d /dev/ttyO2 -b 115200

The following information in the terminal window indicates a successful testing. dev/ttyO2 SEND: 1234567890

/dev/ttyO2 RECV 10 total

/dev/ttyO2 RECV: 1234567890

/dev/ttyO2 SEND: 1234567890

/dev/ttyO2 RECV 10 total

/dev/ttyO2 RECV: 1234567890

/dev/ttyO2 SEND: 1234567890

/dev/ttyO2 RECV 10 total

/dev/ttyO2 RECV: 1234567890

/dev/ttyO2 SEND: 1234567890

/dev/ttyO2 RECV 10 total

/dev/ttyO2 RECV: 1234567890

/dev/ttyO2 SEND: 1234567890

/dev/ttyO2 RECV 10 total

/dev/ttyO2 RECV: 1234567890

The same testing method can be applied on serial interface 3, 4 and 5 of J6 and J7 on

SBC8600B

3.8.2.14 Buzzer Testing

1 Enable the buzzer; root@SBC8600:~# echo 1 > /sys/class/misc/buzzer_ctl/state

2 Disable the buzzer root@SBC8600:~# echo 0 > /sys/class/misc/buzzer_ctl/state

3.8.2.15 CDMA8000-U Module

CDMA8000-U is an optional module. You can download the relevant materials at http://www.timll.com/chinese/uploadFile/cdma8000.rar

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 70

3.8.3 Demo

3.8.3.1 Android System Demonstration

SBC8600B provides Android system demonstration, please follow the steps listed below:

1 Copy all files under the directory \linux\demo\Android\image of the DVD-ROM to a TF card;

2 Insert the TF card on the board and short jumper JP5, and then power on the board. The debugging tool will show the following information:

CCCCCCCC

U-Boot SPL 2011.09-svn55 (Dec 04 2012 - 09:36:25)

Texas Instruments Revision detection unimplemented

Booting from MMC...

OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img

U-Boot 2011.09-svn55 (Nov 22 2012 - 11:35:28)

I2C: ready

DRAM: 512 MiB

WARNING: Caches not enabled

Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board

NAND: HW ECC Hamming Code selected

512 MiB

MMC: OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

NAND erase.chip: device 0 whole chip

Skipping bad block at 0x03620000

Erasing at 0x1ffe0000 -- 100% complete.

OK reading MLO

36079 bytes read

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 71

HW ECC BCH8 Selected

NAND write: device 0 offset 0x0, size 0x8cef

36079 bytes written: OK reading flash-uboot.img

234620 bytes read

HW ECC BCH8 Selected

NAND write: device 0 offset 0x80000, size 0x3947c

234620 bytes written: OK reading uImage

2719416 bytes read

HW ECC BCH8 Selected

NAND write: device 0 offset 0x280000, size 0x297eb8

2719416 bytes written: OK reading ubi.img

72744960 bytes read

SW ECC selected

NAND write: device 0 offset 0x780000, size 0x4560000

72744960 bytes written: OK

3 When the writing process is complete, on-board LED will be flashing. Please remove TF card and the jumper cap.

4 Power on the board again to load Android operating system;

5 U-boot configuration

The system image has a default setting for 4.3-inch LCD. You can change the settings in UBOOT according to the detailed instructions contained in 3.8.1

Selecting Display Mode.

3.8.3.2 TISDK System Demonstration

1) Format a TF card into two partitions by following the steps described in Appendix

IV Formating Linux Boot Disk;

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 72

2) Insert DVD-ROM and TF card on PC, and then execute the following instructions;

cp /media/cdrom/linux/demo/tisdk/image/MLO /media/LABEL1 cp /media/cdrom/linux/demo/tisdk/image/u-boot.img /media/LABEL1 cp /media/cdrom/linux/demo/tisdk/image/uImage/media/LABEL1/uImage rm -rf /media/LABEL2/* sudo tar xvf

/media/cdrom/linux/demo/tisdk/image/tisdk-rootfs-am335x-evm.tar.gz -C

/media/LABEL2 sync umount /media/LABEL1

umount /media/LABEL2

3) After the above instructions are executed, please short jumer JP5 and insert TF card on the board, and then plug in the power supply. The boot-up information is shown as below:

CCCCCCCC

U-Boot SPL 2011.09-svn55 (Dec 04 2012 - 09:33:23)

Texas Instruments Revision detection unimplemented

Booting from MMC...

OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img

U-Boot 2011.09-svn55 (Dec 04 2012 - 09:33:23)

I2C: ready

DRAM: 512 MiB

WARNING: Caches not enabled

Did not find a recognized configuration, assuming General purpose EVM in Profile 0 with Daughter board

NAND: HW ECC Hamming Code selected

512 MiB

MMC: OMAP SD/MMC: 0

*** Warning - bad CRC, using default environment

Net: cpsw

Hit any key to stop autoboot: 0

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 73

Booting from dvsdk ... reading uImage

3175384 bytes read

## Booting kernel from Legacy Image at 80007fc0 ...

Image Name: Linux-3.2.0

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 3175320 Bytes = 3 MiB

Load Address: 80008000

Entry Point: 80008000

Verifying Checksum ... OK

XIP Kernel Image ... OK

OK

Starting kernel ...

…… //Omitted part

Arago Project http://arago-project.org am335x-evm ttyO0

Arago 2011.09 am335x-evm ttyO0 am335x-evm login: root //Type root to log in

4) TISDK file system is featured with some applications running on QT which allow users find and run example programs easily through a friendly graphic interface.

5) U-boot configuration

The system image supports 4.3-inch display by default. If you are working with a display of other size, you need to modify the parameters in UBOOT. Please refer to 3.8.1 Selecting Display Mode for details.

3.9 The Development of Applications

This section mainly introduces the development of application programs, and illustrates the general process of application programs development through examples.

Development example of LED application program

1) Composing Source Code

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 74

The following sentences are led_acc.c source code: control the three LEDs on the development board to flash in a way of accumulator.

}

#include <stdio.h>

#include <unistd.h>

#include <sys/types.h>

#include <sys/ipc.h>

#include <sys/ioctl.h>

#include <fcntl.h>

#define LED1 "/sys/class/leds/sys_led/brightness"

#define LED2 "/sys/class/leds/user_led/brightness" int main(int argc, char *argv[])

{ int f_led1, f_led2; unsigned char i = 0; unsigned char dat1, dat2; if((f_led1 = open(LED1, O_RDWR)) < 0){ printf("error in open %s",LED1); return -1;

}

} if((f_led2 = open(LED2, O_RDWR)) < 0){ printf("error in open %s",LED2); return -1;

} for(;;){ i++; dat1 = i&0x1 ? '1':'0'; dat2 = (i&0x2)>>1 ? '1':'0'; write(f_led1, &dat1, sizeof(dat1)); write(f_led2, &dat2, sizeof(dat2)); usleep(300000);

2) Cross compiling

arm-none-linux-gnueabi-gcc led_acc.c -o led_acc

3) Downloading and running

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 75

Downloading to the development board system through TF card, USB flash disk or network and enter the directory where the led_acc file is saved, and then execute the following instructions to run led_acc in the background.

./led_acc &

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 76

Chapter 4

Windows Embedded

Compact 7 Operating System

4.1 Introduction

This section mainly introduces SBC8600B system and application development of

Windows Embedded Compact 7, as well as software resources in DVD-ROM, software features, and installation of development environment, and how to compile project and build BSP (board support package)

4.2 Software Resources

BSP (Board Support Package)

CD\WINCE700\BSP\SBC8600.rar

CD\WINCE700\BSP\COMMON_TI_V1.rar

CD\WINCE700\BSP\3rdParty.rar

CD\WINCE700\BSP\PowerVR.rar

Windows Embedded Compact 7 sample project

CD\WINCE700\project\SBC8600

Example applications

CD\WINCE700\app\

Pre-complied image

CD\WINCE700\Image\

MLO First bootloader for TF card boot

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 77 xldrnand.nb0

Ebootsd.nb0

Ebootnd.nb0

Nk.bin

First bootloader for NAND flash boot

Second bootloader for TF card boot

Second bootloader for NAND flash boot

WinCE runtime image

4.3 Features

Resources in BSP

Table 21

Catalog Item

X-Loader

(First boot loader)

EBOOT

(Second loader) boot

NAND

SD

NAND

SD

OAL

Driver

Boot parameter

KILT(EMAC)

Serial debug

REBOOT

Watchdog

RTC

Kernel profiler

System timer

Interrupt controller

MMU

NLED driver

GPIO/I2C/SPI/MCASP driver

Serial port driver

Audio driver

NAND driver

Display driver

TOUCH driver

SD/MMC/SDIO driver

EMAC driver

USB OTG driver

Source code / binary

Source

Source

Source source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Source

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 78

GPIO keyboard driver

DMA driver

Backlight driver

Battery driver

RPU driver powerVR DDK & SDK SDK

4.4 System Development

Source

Source

Source

Source

Source

Binary & Source

4.4.1 Installation of IDE (Integrated Development Environment)

Please install the software listed below under windows XP

1) Visual Studio 2008

2) Visual Studio 2008 SP1

3) Windows Embedded Compact 7

4) Windows Embedded Compact 7 Updates

5) ActiveSync 4.5

Note:

 The DVDROM doesn’t contain the IDE for Windows Embedded Compact 7. Please download it from http://www.microsoft.com/download/en/default.aspx.

4.4.2 Extract BSP and project files to IDE

Please follow the steps listed below:

1) Uncompress [CD\WINCE700\BSP\SBC8600.rar] to [C:\WINCE700\PLATFORM] to 2) Uncompress [CD\WINCE700\BSP\COMMON_TI_V1.rar]

[C:\WINCE700\PLATFORM\COMMON\SRC\SOC]

3) Uncompress [CD\WINCE700\BSP\3rdParty.rar] to [C:\WINCE700]

4) Uncompress [CD\WINCE700\BSP\powerVR.rar] to [C:\WINCE700\public]

5) Copy [CD\WINCE700\project\SBC8600] to [C:\WINCE700\OSDesigns]

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 79

Note:

 The default instsllation directory of Windows Embedded Compact 7 is [C:\WINCE700] hereafter.

4.4.3 Sysgen & BSP Compilation

Pleae follow the steps listed below to build Sysgen and BSP:

1) Open the existing project

[C:\WINCE700\OSDesigns\SBC8600] file SBC8600.sln under

2) Select [Build-> Build Solution] in VS2008 to start the process of sysgen and BSP compilation。

3) Copy the files MLO, EBOOTSD.nb0 and NK.bin under

[C:\WINCE700\OSDesigns\SBC8600\SBC8600\RelDir\SBC8600_ARMV7_Rele ase] to the TF card after compilation is done.

4) Insert TF card on SBC8600B and power it on.

4.4.4 Introduction of Drivers

This table lists out all the drivers and the directories under which they are saved:

NLED driver

GPIO

I2C

SPI

MCASP driver

Serial port driver

Audio driver

NAND driver

Table 22

BSP\SBC8600\SRC\DRIVERS\NLED

BSP\SBC8600\SRC\DRIVERS\GPIO

BSP\COMMON_TI_V1\COMMON_TI_AMXX\GPIO

BSP\COMMON_TI_V1\COMMON_TI_AMXX\OAL\OALI2C

BSP\COMMON_TI_V1\COMMON_TI_AMXX\SPI

BSP\SBC8600\SRC\DRIVERS\MCSPI

BSP\COMMON_TI_V1\COMMON_TI_AMXX\MCASP

BSP\COMMON_TI_V1\COMMON_TI_AMXX\SERIAL

BSP\SBC8600\SRC\DRIVERS\UART

BSP\SBC8600\SRC\DRIVERS\WAVEDEV2

BSP\SBC8600\SRC\DRIVERS\BLOCK

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 80

Display driver

TOUCH driver

SD/MMC/SDIO driver

EMAC driver

USB OTG driver

GPIO keyboard driver

Backlight driver

Battery driver

PRU driver

DMA driver

BSP\COMMON_TI_V1\COMMON_TI_AMXX\BLOCK

BSP\COMMON_TI_V1\COMMON_TI_AMXX\DSS_Netra

BSP\SBC8600\SRC\DRIVERS\DISPLAY

BSP\SBC8600\SRC\DRIVERS\TOUCH

BSP\SBC8600\SRC\DRIVERS\SDHC

BSP\COMMON_TI_V1\COMMON_TI_AMXX\SDHC

BSP\COMMON_TI_V1\COMMON_TI\SDHC

BSP\COMMON_TI_V1\AM33X\CPSW3Gminiport

BSP\SBC8600\SRC\DRIVERS\EMAC

BSP\SBC8600\SRC\DRIVERS\USB

BSP\COMMON_TI_V1\AM33X\USB

BSP\SBC8600\SRC\DRIVERS\KEYPAD

BSP\SBC8600\SRC\DRIVERS\BACKLIGHT

BSP\SBC8600\SRC\DRIVERS\BATTERY

BSP\COMMON_TI_V1\AM33X\PRU

BSP\SBC8600\SRC\DRIVERS\PRU

BSP\SBC8600\SRC\DRIVERS\EDMA

BSP\COMMON_TI_V1\COMMON_TI_AMXX\EDMA

If users want to see more examples of driver development under Windows Embedded

Compact 7, please refer to the reference document provided with PB7.0.

You can find the document on your PC by clicking:

Start->

All Programs->

Microsoft Visual Studio 2008->

Microsoft Visual Studio 2008 Document->

Content(C) ->

Windows Embedded Compact 7->Device Driver.

4.5 Update of System Image

SBC8600B can boot up from TF card and NAND Flash; this section will introduce two different ways of system update respectively.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 81

4.5.1 Update of TF Card

1) Formatting TF card

HP USB Disk Storage Format Tool 2.0.6 is recommended as the formatting tool;

You can download it from http://www.embedinfo.com/english/download/SP27213.exe

a) Insert TF card into a card reader and then insert the reader into PC. b) Open the HP USB Disk Storage Format Tool, the following window will appears.

Figure 4-1 c)

Select “FAT32” file system d)

Click “Start” e)

Click “OK” when it’s complete

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 82

Note:

 HP USB Disk Storage Format Tool will erase partitions of TF card. If you want to maintain the partitions, please use the formatting software of Windows.

2) Copy runtime image

Copy MLO, EBOOTSD.nb0 and NK.bin image files under CD\WINCE700\image to the TF card;

3) System Boot-up

Insert TF card and short jumper JP5, reboot the system from TF card and press Space in a few seconds to enter to the EBOOT menu as shown below:

a) Enter EBOOT Menu

CCCCCCCC

Texas Instruments Windows CE SD X-Loader33X

Built Jul 27 2012 at 11:25:59

Version BSP_WINCE_ARM_A8 02.30.00.03 open ebootsd.nb0 file

Init HW: controller RST

SDCARD: requested speed 1000000, actual speed 1000000

SDCARD: requested speed 25000000, actual speed 19200000 read ebootsd.nb0 file jumping to ebootsd image

Microsoft Windows CE Bootloader Common Library Version 1.4 Built Jul 27 2012

11:23:05

I2C EEPROM returned wrong magic value 0xffffffff

INFO:OALLogSetZones: dpCurSettings.ulZoneMask: 0x8409

Texas Instruments Windows CE EBOOT for AM33x, Built Jul 27 2012 at 11:25:53

EBOOT Version 0.0.1, BSP BSP_WINCE_ARM_A8 02.30.00.03

AHCLKX pinmux:0

AHCLKX CTRL:0x8001 pin function:0x0 pin dir:0x8000000

TI AM33X

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 83 ecc type:3

System ready!

Preparing for download...

INFO: Predownload....

Checking bootloader blocks are marked as reserved (Num = 18)

BOOT_CFG_SIGNATURE is different, read -1, expect 1111705159

WARN: Boot config wasn't found, using defaults

INFO: SW3 boot setting: 0x04

IsValidMBR: MBR sector = 0x480 (valid MBR)

OpenPartition: Partition Exists=0x1 for part 0x20.

>>> Forcing cold boot (non-persistent registry and other data will be wiped) <<< e0311800 56e4 -> 0 18 31 e0 e4 56 e0311800 57e4 -> 0 18 31 e0 e4 57

Hit space to enter configuration menu [56] 5...(press SPACE to enter EBOOT menu)

b) Type [2]->[2] to set the board to boot up from TF card

--------------------------------------------------------------------------------

Main Menu

--------------------------------------------------------------------------------

[1] Show Current Settings

[2] Select Boot Device

[3] Select KITL (Debug) Device

[4] Network Settings

[5] SDCard Settings

[6] Set Device ID

[7] Save Settings

[8] Flash Management

[9] Enable/Disable OAL Retail Messages

[a] Select Display Resolution

[b] Select OPP Mode

[0] Exit and Continue

Selection: 2

--------------------------------------------------------------------------------

Select Boot Device

--------------------------------------------------------------------------------

[1] Internal EMAC

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 84

[2] NK from SDCard FILE

[3] NK from NAND

[0] Exit and Continue

Selection (actual Internal EMAC): 2

Boot device set to NK from SDCard FILE

c) Type [a] to enter “Select Display Resolution” menu and select LCD\LVDS as the output

--------------------------------------------------------------------------------

Main Menu

--------------------------------------------------------------------------------

[1] Show Current Settings

[2] Select Boot Device

[3] Select KITL (Debug) Device

[4] Network Settings

[5] SDCard Settings

[6] Set Device ID

[7] Save Settings

[8] Flash Management

[9] Enable/Disable OAL Retail Messages

[a] Select Display Resolution

[b] Select OPP Mode

[0] Exit and Continue

Selection: a

--------------------------------------------------------------------------------

Select Display Resolution

--------------------------------------------------------------------------------

[1] LCD 480x272 60Hz //For 4.3-inch LCD

[2] DVI 640x480 60Hz(N/A)

[3] DVI 640x480 72Hz(N/A)

[4] LCD 800x480 60Hz //For 7-inch LCD

[5] DVI 800x600 60Hz(N/A) //For LVDS

[6] DVI 800x600 56Hz(N/A)

[7] VGA 1024x768 60Hz //For VGA

[8] DVI 1280x720 60Hz(N/A)

[0] Exit and Continue Selection (actual LCD 480x272 60Hz): 4

d) Type [0] to continue the boot-up process

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 85

--------------------------------------------------------------------------------

Main Menu

--------------------------------------------------------------------------------

[1] Show Current Settings

[2] Select Boot Device

[3] Select KITL (Debug) Device

[4] Network Settings

[5] SDCard Settings

[6] Set Device ID

[7] Save Settings

[8] Flash Management

[9] Enable/Disable OAL Retail Messages

[a] Select Display Resolution

[b] Select OPP Mode

[0] Exit and Continue

Selection: 0 mode = 3

LcdPdd_LCD_GetMode:3 mode = 3

LcdPdd_LCD_Initialize:3

OEMPreDownload: Filename nk.bin

Init HW: controller RST

SDCARD: requested speed 1000000, actual speed 1000000

SDCARD: requested speed 25000000, actual speed 19200000

BL_IMAGE_TYPE_BIN

+OEMMultiBinNotify(0x8feb24d8 -> 1)

Download file information:

-----------------------------------------------------------

[0]: Address=0x80002000 Length=0x03c9e9bc Save=0x80002000

-----------------------------------------------------------

Download file type: 1

+OEMIsFlashAddr(0x80002000) g_eboot.type 1

.........................................................................................................................................

.................................................................................................................................................

............................................................rom_offset=0x0.

..ImageStart = 0x80002000, ImageLength = 0x3c9e9bc, LaunchAddr = 0x8000b6a0

Completed file(s):

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 86

-------------------------------------------------------------------------------

+OEMIsFlashAddr(0x80002000) g_eboot.type 1

[0]: Address=0x80002000 Length=0x3c9e9bc Name="" Target=RAM

ROMHDR at Address 80002044h

Launch Windows CE image by jumping to 0x8000b6a0...

Windows CE Kernel for ARM (Thumb Enabled)

CPU CP15 Control Register = 0xc5387f

CPU CP15 Auxiliary Control Register = 0x42

I2C EEPROM returned wrong magic value 0xffffffff

+OALTimerInit(1, 24000, 200)

--- High Performance Frequecy is 24 MHz---

4.5.2 Update of NAND Flash Image

1) Formatting TF card

Please refer to the contents of 4.5.1 Update of TF Card.

2) Copy runtime image

Copy MLO, EBOOTND.nb0, NK.bin, XLDRNAND.nb0 and EBOOTSD.nb0 image files under CD\WINCE700\image to the TF card.

3) Update of NAND Flash image files

Insert TF card and short jumper JP5, reboot the system from TF card and press

Space in a few seconds to enter to the EBOOT menu, and then follow the steps listed below:

Type [8] to enter the Flash menu;

Type [9]->[4]->[A], [9]->[3]->[B] and [9]->[2]->[C] to write XLDR, EBOOT and NK images;

Type [0] to return to the main menu, and then type [2] and [3] to select boot-up from NAND Flash; Type [A] to select LCD/DVI display mode;

Type [7] and [y] to save the boot-up settings;

Remove TF card and the jumper cap, reboot the system. The system will boot from NAND

Flash.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 87

4.6 Instructions for Use

4.6.1 How to use openGL ES demo

1) Check PowerVR in the Catalog Items View of VS2008 as shown below;

Figure 4-2

2) Select [Build-> Build Solution] in the menu bar of VS2008, and then replace the nk.bin in the TF card with the newly generated nk.bin after sysgen and BSP compilation is complete.

3) Copy C:\WINCE700\PUBLIC\PowerVR\oak\target\Rev125\ARMV4I\retail\*.exe to the windows embedded compact 7 system of SBC8600B, and then double-click the demo to start testing.

4.7 Application Development

This chapter introduces how to develop Windows Embedded Compact 7 applications for

SBC8600B.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 88

4.7.1 Application Interfaces and Examples

API used for development of SBC8600B applications is the standard application interface defined by Windows Embedded Compact 7. SBC8600B has extended the interface definition of GPIO based on the standard API. You can find the applications used to control the satus of GPIO pins under \WINCE700\app\GPIOAppDemo of the DVD-ROM.

Pleaes refer to the help documents for MSDN Windows Embedded Compact 7 API to learn about the definitions of Windows Embedded Compact 7 standard API.

4.7.2 GPIO Application Interfaces and Examples

GPIO application interfaces and examples:

Table 23

IOCTL code

IOCTL_GPIO_SETBIT

IOCTL_GPIO_CLRBIT

IOCTL_GPIO_GETBIT

Description

Set GPIO pin as 1

Set GPIO pin as 0

Read GPIO pin

IOCTL_GPIO_SETMODE Set the working mode of GPIO pin

IOCTL_GPIO_GETMODE Read the working mode of GPIO pin

IOCTL_GPIO_GETIRQ Read the corresponding IRQ of GPIO pin

Please follow the steps listed below:

1) Enable GPIO device

HANDLE hFile = CreateFile (_T ("GIO1:"), (GENERIC_READ|GENERIC_WRITE),

(FILE_SHARE_READ|FILE_SHARE_WRITE), 0, OPEN_EXISTING, 0, 0);

2) Configure GPIO operating mode

DWORD id = 48, mode = GPIO_DIR_OUTPUT;

Configure GPIO operating mode

DWORD pInBuffer [2]; pInBuffer [0] = id; pInBuffer [1] = mode;

DeviceIoControl (hFile, IOCTL_GPIO_SETMODE, pInBuffer, sizeof (pInBuffer),

NULL, 0, NULL, NULL);

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 89

Read mode of GPIO:

DeviceIoControl (hFile, IOCTL_GPIO_GETMODE, &id, sizeof(DWORD), &mode, sizeof(DWORD), NULL, NULL);

"id" refers to the pin code of GPIO, "mode" refers to the mode definition of GPIO, including:

Table 24

Mode Definition

GPIO_DIR_OUTPUT

GPIO_DIR_INPUT

GPIO_INT_LOW_HIGH

GPIO_INT_HIGH_LOW

GPIO_INT_LOW

GPIO_INT_HIGH

GPIO_DEBOUNCE_ENABLE

Table 4-4

Description

Output mode

Input mode

Rising edge trigger mode

Falling edge trigger mode low level trigger mode high level trigger mode

Jumping trigger enable

3) Output of GPIO pins

DWORD id = 48, pinState = 0;

a) High level output:

DeviceIoControl (hFile, IOCTL_GPIO_SETBIT, &id, sizeof (DWORD), NULL, 0,

NULL, NULL);

b) Low level output

DeviceIoControl (hFile, IOCTL_GPIO_CLRBIT, &id, sizeof (DWORD), NULL, 0,

NULL, NULL);

c) Read the pin state

DeviceIoControl (hFile, IOCTL_GPIO_GETBIT, &id, sizeof (DWORD), &pinState, sizeof (DWORD), NULL, NULL);

"id" refers to the pin code of GPIO, "pin" return the pin state。

4) Other Operations

Read the corresponding IRP number of GPIO pin:

DWORD id = 0, irq = 0;

DeviceIoControl (hFile, IOCTL_GPIO_GETIRQ, &id, sizeof (DWORD), &irq, sizeof

(DWORD), NULL, NULL);

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 90

"id" refers to pin code of GPIO, "irq returns IRQ number.

5) Disable GPIO device

CloseHandle (hFile);

Note:

 Definition of GPIO pin: 0~127 MPU Bank0~3 GPIO pin.

 GPIO pins 0~127 must be configured as GPIO in bsp_padcfg.h located at

SBC8600/SRC/inc/.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 91

Appendix

Appendix I Hardware Dimension

Figure 1 Mini8600B hardware dimension

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 92

Figure 2 SBC8600B hardware dimension

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 93

Appendix Installation of Ubuntu

As we all know, an appropriate development environment is required for software development. The CD-ROM attached with product has contained a development environment which needs to be installed under Linux system. If you are working on a PC running Windows, you have to create a Linux system first, and then you can install the environment. Here we recommend using VirtualBox

– a virtual machine software to accommodate Ubuntu Linux system under Windows. The following sections will introduce the installation processes of VirtualBox and Ubuntu system.

Installing VirtualBox

You can access http://www.virtualbox.org/wiki/Downloads to download the latest version of VirtualBox. VirtualBox requires 512MB memory space at least. A PC with memory space of more than 1GB would be preferred.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 94

1 The installation process is simple and will not be introduced. Please start

VirtualBox from the Start menu of Windows, and then click New in VirtualBox window. A pop-up window Create New Virtual Machine will be shown as below;

Figure 3 Create new virtual machine

Click Next to create a new virtual machine.

2 Enter a name for the new virtual machine and select operating system type as shown below;

Figure 4 Name and OS type of virtual machine

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 95

Enter a name in the Name field, e.g. Ubuntu, and select Linux in the

Operating System drop-down menu, and then click Next.

3 Allocate memory to virtual machine and then click Next;

Figure 5 Memory allocation

Note:

 If the memory of your PC is only 1GB or lower, please keep the default setting;

 If the memory of your PC is higher than 1GB, you can allocate 1/4 or fewer to virtual machine, for example, 512MB out of 2GB memory could be allocated to virtual machine.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 96

4 If this is the fist time you install VirtualBox, please select Create new hard

disk in the following window, and then click Next;

Figure 6 Create new hard disk

5 Click Next in the following window;

Figure 7 Wizard of new virtual disk creation

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 97

6 Selecting Fixed-size storage in the following window and click Next;

Figure 8 Select the second option

7 Define where the hard disk data is stored and the default space of the virtual disk (8G at least), and then click Next;

Figure 9 Virtual disk configuration

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 98

8 Click Finish in the following window;

Figure 10 Virtual disk summary

9 PC is creating a new virtual disk;

Figure 11 Virtual disk creation in process

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 99

10 A window with summary of the newly created virtual machine will be shown as below when the creation process is done. Please click Finish to complete the whole process.

Figure 12 Virtual machine is ready

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 100

Installing Ubuntu Linux System

After virtualBox is installed, we can start the installation of Ubuntu Linux system now.

Please access http://www.Ubuntu.com/download/Ubuntu/download to download the ISO image file of Ubuntu, and then follow the steps。

1 Start VirtualBox from the Start menu and click Setting on the VirtualBox window. A Settings window will be shown as below;

Figure 13 Setting window

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 101

2 Select Storage on the left in the Setting window and click the CD-like icon next to the option Empty under IDC controller in the right part of the window, and then find the ISO file you downloaded;

Figure 14 Find ISO file

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 102

3 Select the ISO file you added in and click OK as shown below;

Figure 15 Select ISO file

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 103

4 Click Start on the VirtualBox window, the installation program of Ubuntu will be initiating as shown below;

Figure 16 Ubuntu initiating window

Some prompt windows will interrupt in during the initiating process. You just need to click OK all the way to the end of the process.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 104

5 Click Install Ubuntu to start installation when the following window appears;

Figure 17 Ubuntu installation window

6 Click Forward to continue the process;

Figure 18 Information before installation

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 105

7 Select Erase disk and install Ubuntu and click Forward;

Figure 19 Options before installation

Note:

 Selecting this option will not lead to any content loss on your hard drive.

8 Click Install Now in the following window to start installation;

Figure 20 Confirm installation

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 106

9 Some simple questions need to be answered during the installation process.

Please enter appropriate information and click Forward. The following window is the last question that will appear during the process;

Figure 21 Enter appropriate information

After all the required information is properly entered in to the fields, select Log

in automatically and click Forward.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 107

10 The installation of Ubuntu may take 15 minutes to about 1 hour depending on your PC

’s performance. A prompt window will be shown as below after installation is done. Please select Restart Now to restart Ubuntu system.

Figure 22 Restart Ubuntu

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 108

11 Ubuntu system is ready for use after restarting. Normally the ISO file shown in

Figure 15 will be ejected automatically by VirtualBox after restarting Ubuntu. If

it doesn’t, you could eject the ISO file manually in the Setting window of

VirtualBox. The following window shows how it looks after the ISO file is ejected.

Figure 23 ISO file ejected

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 109

Appendix III Installation of Linux USB Ethernet/RNDIS

Gadget

1

If you don’t install driver of Linux USB Ethernet/RNDIS Gadget, PC will find the new hard ware and give you a hint on the screen, please select “From list or designated location”, then click “Next”.

Figure 24

2 Designate a path for the usb driver, and the usb driver directory is [\linux\tools] of the DVD-

ROM, then click “Next”

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 110

Figure 25

3 When the following appe ars, select “Continue”;

Figure 26

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 111

4 Please wait until the installation is completed;

Figure 27

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 112

Appendix IV Formating Linux Boot Disk

How to create a dual-partition card for SBC8600B to boot Linux from first partition and have root file system at second partition.

1. Introduction

This guide is meant for those looking to create a

dual-partition

card, booting from a FAT partition that can be read by the OMAP3 ROM bootloader and Linux/Windows, then utilizing an ext3 partition for the Linux root file system.

2. Details

Note: Text marked with [] shows user input.

1 Determine which device the TF Card Reader is on your system

Plug the TF Card into the TF Card Reader and then plug the TF Card Reader into your system. After doing that, do the following to determine which device it is on your system.

$

[dmesg | tail]

...

[ 6854.215650] sd 7:0:0:0: [sdc] Mode Sense: 0b 00 00 08

[ 6854.215653] sd 7:0:0:0: [sdc] Assuming drive cache: write through

[ 6854.215659] sdc: sdc1

[ 6854.218079] sd 7:0:0:0: [sdc] Attached SCSI removable disk

[ 6854.218135] sd 7:0:0:0: Attached scsi generic sg2 type 0

...

In this case, it shows up as /dev/sdc (note sdc inside the square brackets above).

2 Check to see if the automounter has mounted the TF card

Note there may be more than one partition (only one shown in the example below).

$

[df -h]

Filesystem Size Used Avail Use% Mounted on

...

/dev/sdc1 400M 94M 307M 24% /media/disk

...

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 113

Note the "Mounted on" field in the above and use that name in the umount commands below.

3 If so, unmount it

$ [umount /media/disk]

4 Start fdisk

Be sure to choose the whole device (/dev/sdc), not a single partition (/dev/sdc1).

$

[sudo fdisk /dev/sdc]

following expert mode steps to redo the TF Card:

a) Go into expert mode.

Command (m for help):

[x]

5 Print the partition record

So you know your starting point.

Make sure to write down the number of bytes on the card (in this example, 2021654528).

Command (m for help):

[p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 * 1 246 1974240+ c W95 FAT32 (LBA)

Partition 1 has different physical/logical endings:

phys=(244, 254, 63) logical=(245, 200, 19)

6 Delete any partitions that are there already

Command (m for help):

[d]

Selected partition 1

7 Set the Geometry of the TF Card

If the print out above does not show 255 heads, 63 sectors/track, then do the

b) Set the number of heads to 255.

Expert Command (m for help):

[h]

Number of heads (1-256, default xxx):

[255]

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 114

c) Set the number of sectors to 63.

Expert Command (m for help):

[s]

Number of sectors (1-63, default xxx):

[63]

d) Now Calculate the number of Cylinders for your TF Card.

#cylinders = FLOOR (the number of Bytes on the TF Card (from above) / 255 / 63 / 512 )

e) Set the number of cylinders to the number calculated.

Expert Command (m for help):

[c]

Number of cylinders (1-256, default xxx):

[enter the number you calculated]

...

f) Return to Normal mode.

Expert Command (m for help):

[r]

8 Print the partition record to check your work

Command (m for help):

[p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

9 Create the FAT32 partition for booting and transferring files from Windows

Command (m for help):

[n]

Command action

e extended

p primary partition (1-4)

[p]

Partition number (1-4):

[1]

First cylinder (1-245, default 1):

[(press Enter)]

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-61, default 61):

[+5]

Command (m for help):

[t]

Selected partition 1

Hex code (type L to list codes):

[c]

Changed system type of partition 1 to c (W95 FAT32 (LBA))

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 115

10 Mark it as bootable

Command (m for help):

[a]

Partition number (1-4):

[1]

11 Create the Linux partition for the root file system

Command (m for help):

[n]

Command action

e extended

p primary partition (1-4)

[p]

Partition number (1-4):

[2]

First cylinder (7-61, default 7):

[(press Enter)]

Using default value 52

Last cylinder or +size or +sizeM or +sizeK (7-61, default 61):

[(press Enter)]

Using default value 245

12 Print to Check Your Work

Command (m for help):

[p]

Disk /dev/sdc: 2021 MB, 2021654528 bytes

255 heads, 63 sectors/track, 245 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sdc1 * 1 6 409626 c W95 FAT32 (LBA)

/dev/sdc2 7 61 1558305 83 Linux

13 Save the new partition records on the TF Card

This is an important step. All the work up to now has been temporary.

Command (m for help):

[w]

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

WARNING: If you have created or modified any DOS 6.x

partitions, please see the fdisk manual page for additional

information.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 116

Syncing disks.

14 Format the partitions

The two partitions are given the volume names LABEL1 and LABEL2 by these commands. You can substitute your own volume labels.

$

[sudo mkfs.msdos -F 32 /dev/sdc1 -n LABEL1]

mkfs.msdos 2.11 (12 Mar 2005)

$

[sudo mkfs.ext3 -L LABEL2 /dev/sdc2]

mke2fs 1.40-WIP (14-Nov-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

195072 inodes, 389576 blocks

19478 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=402653184

12 block groups

32768 blocks per group, 32768 fragments per group

16256 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912

Writing inode tables: done

Creating journal (8192 blocks): done

Writing superblocks and filesystem accounting information:

Note:

 After formatting and dividing into FAT and EXT3 under Ubuntu system, the FAT needs reformatting under windows system, otherwise, start-up with TF card can be realized.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 117

Appendix V Setup of TFTP Server

1) Installing client

$>sudo apt-get install tftp-hpa

$>sudo apt-get install tftpd-hpa

2) Installing inet

$>sudo apt-get install xinetd

$>sudo apt-get install netkit-inetd

3) Configuring server

Firstly

, create tftpboot under root directory, and set the properties as “any user can write and read”

$>cd /

$>sudo mkdir tftpboot

$>sudo chmod 777 tftpboot

Secondly, add a line in /etc/inetd.conf as shown below:

$>sudo vi /etc/inetd.conf //把下面的语句添加的此文件里 tftpd dgram udp wait root /usr/sbin/in.tftpd /usr/sbin/in.tftpd -s /tftpboot

Then, reload inetd process:

$>sudo /etc/init.d/inetd reload

Finally, enter directory /etc/xinetd.d/, and create a new file tftp and add some lines in it;

$>cd /etc/xinetd.d/

$>sudo touch tftp

$>sudo vi tftp service tftp

{

disable = no

socket_type = dgram

protocol = udp

wait = yes

//进入目录 /etc/xinetd.d/

//新建文件 tftp

//编辑文件 tftp,把下面内容加入 tftp 文件中

user = root

server = /usr/sbin/in.tftpd

server_args = -s /tftpboot -c

per_source = 11

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 118

cps = 100 2

}

4) Reboot the server:

$>sudo /etc/init.d/xinetd restart

$>sudo in.tftpd -l /tftpboot

5) Test the server

Test the server by creating a new file under /tftpboot

$>touch abc

Enter another folder

$>tftp 192.168.1.15 (192.168.1.15 为本机 IP)

$>tftp> get abc

A successful download indicates that the server is working properly.

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 119

Appendix VI FAQ

Please visit http://www.elinux.org/SBC8600_FAQ

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 120

Technical Support and Warranty

Technical Support

Embest Technology provides its product with one-year free technical support including:

 Providing software and hardware resources related to the embedded products of

Embest Technology;

 Helping customers properly compile and run the source code provided by

Embest Technology;

 Providing technical support service if the embedded hardware products do not function properly under the circumstance that customers operate according to the instructions in the documents provided by Embest Technology;

 Helping customers troubleshoot the products.

The following conditions will not be covered by our technical support service. We will take appropriate measures accordingly:

 Customers encounter issues related to software or hardware during their development process;

 Customers encounter issues caused by any unauthorized alter to the embedded operating system;

 Customers encounter issues related to their own applications;

 Customers encounter issues caused by any unauthorized alter to the source code provided by Embest Technology;

Warranty Conditions

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 121

1) 12-month free warranty on the PCB under normal conditions of use since the sales of the product;

2) The following conditions are not covered by free services; Embest Technology will charge accordingly:

A. Customers fail to provide valid purchase vouchers or the product identification tag is damaged, unreadable, altered or inconsistent with the products.

B. Products are damaged caused by operations inconsistent with the user manual;

C. Products are damaged in appearance or function caused by natural disasters

(flood, fire, earthquake, lightning strike or typhoon) or natural aging of components or other force majeure;

D. Products are damaged in appearance or function caused by power failure, external forces, water, animals or foreign materials;

E. Products malfunction caused by disassembly or alter of components by customers or, products disassembled or repaired by persons or organizations unauthorized by Embest Technology, or altered in factory specifications, or configured or expanded with the components that are not provided or recognized by Embest Technology and the resulted damage in appearance or function;

F. Product failures caused by the software or system installed by customers or inappropriate settings of software or computer viruses;

G. Products purchased from unauthorized sales;

H. Warranty (including verbal and written) that is not made by Embest

Technology and not included in the scope of our warranty should be fulfilled by the party who committed. Embest Technology has no any responsibility;

3) Within the period of warranty, the freight for sending products from customers to

Embest Technology should be paid by customers; the freight from Embest to

Copyright © 2012 Embest Technology SBC8600B User Manual

Embest Technology Co., Ltd 122 customers should be paid by us. The freight in any direction occurs after warranty period should be paid by customers.

4) Please contact technical support if there is any repair request.

Note:

 Embest Technology will not take any responsibility on the products sent back without the permission of the company.

Contact Information

Hotline: +86-755-25635626-872/875/897

Fax: +86-755-

25635626-666

Pre-sales: [email protected]

After-sales: [email protected]

Website: http://www.armkits.com

or http://www.embest-tech.com

Address: Tower B 4/F, Shanshui Building, Nanshan Yungu Innovation Industry Park,

Liuxian Ave. No. 1183, Taoyuan St., Nanshan District, Shenzhen, China (518055)

Copyright © 2012 Embest Technology SBC8600B User Manual

advertisement

Was this manual useful for you? Yes No
Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Related manuals