em210 - boardcon

61
EM210 Software Reference Guide V1.0 Boardcon Technology Limited www.boardcon.com

Upload: others

Post on 23-Apr-2022

7 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: EM210 - Boardcon

EM210Software Reference Guide V1.0

Boardcon Technology Limited

www.boardcon.com

Page 2: EM210 - Boardcon

1. Introduction

1.1. About this ManualThis manual is intended to provide the user with an overview of the board and benefits, complete features

specifications, and set up procedures. It contains important safety information as well.

1.2. Feedback and Update to this ManualTo help our customers make the most of our products, we are continually making additional and updated

resources available on the Boardcon website (www.boardcon.com , www.armdesigner.com).

These include manuals, application notes, programming examples, and updated software and hardware.

Check in periodically to see what’s new!

When we are prioritizing work on these updated resources, feedback from customers is the number one

influence, If you have questions, comments, or concerns about your product or project, please no

hesitate to contact us at [email protected].

1.3. Limited WarrantyBoardcon warrants this product to be free of defects in material and workmanship for a period of one year

from date of buy. During this warranty period Boardcon will repair or replace the defective unit in

accordance with the following process:

A copy of the original invoice must be included when returning the defective unit to Boardcon. This limited

warranty does not cover damages resulting from lighting or other power surges, misuse, abuse,

abnormal conditions of operation, or attempts to alter or modify the function of the product.

This warranty is limited to the repair or replacement of the defective unit .In no event shall Boardcon be

liable or responsible for any loss or damages, including but not limited to any lost profits, incidental or

consequential damages, loss of business, or anticipatory profits arising from the use or inability to use

this products.

Repairs make after the expiration of the warranty period are subject to a repair charge and the cost of

return shipping. Please contact Boardcon to arrange for any repair service and to obtain repair charge

information.

Page 3: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 2

Table of Contents1 Introduction..............................................................................................................................................................4

2 Overview..................................................................................................................................................................4

2.1 EM210 Hardware Introduction......................................................................................................................5

2.2 EM210 Software introduction........................................................................................................................5

2.3 Supported functions........................................................................................................................................6

2.4 The necessary accessories for Development............................................................................................ 6

2.5 Set boot mode................................................................................................................................................. 7

3 Compiler Environment...........................................................................................................................................7

3.1 Vmware7.0+ubuntu10.04...............................................................................................................................7

3.2 Install the Cross Compile toolchain..............................................................................................................7

3.3 Install JDK1.6...................................................................................................................................................7

3.4 Install the necessary tools............................................................................................................................. 8

4 Compile the Source................................................................................................................................................8

4.1 Compile u–boot............................................................................................................................................... 8

4.2 Compile kernel.................................................................................................................................................8

4.3 Compile android 4.0.3.................................................................................................................................... 9

5 Install Serial terminal tools....................................................................................................................................9

5.1 Configuration DNW.........................................................................................................................................9

5.2 Install SecureCRT.........................................................................................................................................11

6 Burn images to iNand..........................................................................................................................................13

6.1 Burn uboot.bin to iNand...............................................................................................................................13

6.2 Burn kernel and system...............................................................................................................................26

7 Android Application.............................................................................................................................................. 29

7.1 System Information.......................................................................................................................................29

7.2 Icons in status bar.........................................................................................................................................29

7.3 User button description................................................................................................................................29

7.4 Test SD (J16).................................................................................................................................................30

7.5 Test USB (J16).............................................................................................................................................. 30

7.6 Video player...................................................................................................................................................32

7.7 Music (J14).................................................................................................................................................... 33

7.8 Camera (CN13).............................................................................................................................................33

7.9 Wire network (P7).........................................................................................................................................34

7.10 Wi-Fi (U5).....................................................................................................................................................35

7.11 GPS (MU3)...................................................................................................................................................37

7.12 Recording (MIC1)....................................................................................................................................... 38

7.13 HDMI (PH2).................................................................................................................................................40

7.14 Test RS485 (COM2&COM3).....................................................................................................................41

7.15 Test WCDMA 3G module (CON5)............................................................................................................42

7.16 Automatic Test.............................................................................................................................................43

7.17 LCD...............................................................................................................................................................46

8 View proc Filesystem...........................................................................................................................................47

Page 4: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 3

8.1 View startup parameters..............................................................................................................................47

8.2 CPU Information Inquiry.............................................................................................................................. 48

8.3 RAM Information Inquiry..............................................................................................................................48

8.4 Disk partitions Information Inquiry..............................................................................................................49

8.5 Kernel Version Information Inquiry.............................................................................................................50

8.6 Network Equipment Information Inquiry....................................................................................................50

8.7 Kernel boot Information Inquiry.................................................................................................................. 51

9 Modify LOGO and control GPIO........................................................................................................................52

9.1 Replace the LOGO.......................................................................................................................................52

9.2 Control GPIO.................................................................................................................................................52

9.2.1 Compile led.ko......................................................................................................................529.2.2 Compile ledtest.c................................................................................................................. 579.2.3 Test GPIO..............................................................................................................................59

Page 5: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 4

1 Introduction

This document is part of a set of reference documents providing information necessary to operate and

program Boardcon EM210 SBC.

2 Overview

The EM210 integrates a high-performance, low-power 1GHz Samsung ARM Cortex-A8 S5PV210AH with

Samsung K4T1G164QF chipsets and Samsung KLM4G1FE3B-B001, delivering best

performance-per-watt for communication, healthcare, automation, transportation, multimedia advertising,

high performance POS machine, and surveillance applications.

The compact SBC offers a rich set of peripherals and interfaces including Ethernet, USB Host &OTG,

Camera, HDMI, Serial ports, Audio, LCD, Keypad, T-Flash, Buttons and etc. It brings a flexible array of

communications options including Wi-Fi, WCDMA and RFID. A SIM card slot is also included. Supporting

Linux 2.6.32, WinCE6.0 and Android 4.0, the EM210 can deliver a variety of features and APIs that allow

developers to highly customize their system designs in the low-profile and fully-configured embedded

devices.

The SBC has complete electronic documentation, schematics, demo applications, and third party

industry-standard C compilers and embedded development environments for evaluation. We are sure to

have the right single board computer for your applications.

Page 6: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 5

2.1 EM210 Hardware Introduction

Feature Specifications

CPU Samsung ARM Cortex-A8 S5PV210AH, 1GHz System Clock

GPU PowerVR SGX540@200MHz

Memory Default mounted 512MB DDR2

NAND Flash Default 4GB iNAND. 512MB~4GB SLC/MLC/eMMC NAND optional

Power DC 5V/2A power supply

CPU Dimension 60mm x 60mm

Serial Ports

(UARTs)

COM-0, five-wire DB9 RS232 serial port

COM-1, four-wire RJ11 serial port (RS232/RS485)

COM-2, four-wire RJ11 serial port (RS232/RS485)

LCD

The LCD connector integrated 4-wire resistive touch screen port. The board

comes with driver for

-- 4.3", 7", 10.1” and 10.4" resistive LCD

-- 4.3" and 7” capacitive LCD

Ethernet 10/100M High performance Ethernet, RJ45 interface

HDMI HDMI V1.3, 1080p@30fps

USB 2x USB2.0 Host, 1x USB2.0 OTG

Camera(optional) 1x 20-pin 3.1Mega pixels CMOS camera interface

JTAG 1x 10-pin JTAG Port

Mouse Mouse working via USB

Keyboard 6*7 Keypad interface

Audio codec Adopt WM9713 Audio chip, Audio I / O interface

RTC Real Time Clock, powered by external lithium battery

SD card 1x T-Flash card, 1x SIM card slot

GPIO 1x 30-pin SPI Expansion Connector

Buttons 6 Programmable User Buttons

WIFI(optional) 802.11 b/g/n

WCDMA(optional) Support GSM&WCDMA card make calls, send messages

GPS(optional) Thinkstar GPS

Carrier board

Dimension108mm x 141mm

2.2 EM210 Software introduction

The Development Kit provides complete Linux/Android/WinCE BSP for user.

List of Android resources

Source Description

Page 7: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 6

Bootloader Version: Uboot-1.3.4

Kernel Version: Linux 3.0.8

File system Android: 4.0.3

Driver

Serial ports, RTC, 4.3/ 7/ 10.1/10.4 inch LCD including Touch Screen, SD, USB

Host, USB OTG, LEDs, AC97, Keyboard, 3-axis accelerometer, PWM, IIC, SPI,

MFC, TVOUT, HDMI, JPEG, WIFI, 3G, GPS, DM9000

Embedded GUI Android4.0

ApplicationAlarm Clock, Browser, Gallery, Calculator, Camera, Phone, Email, Maps, ES File

Explorer, videoplayer, Music, Voice Dialer, etc

Cross compiler

EnvironmentArm-2009q3.tar.bz2, JDK1.6

Debug Tools DNW, MoviNAND_Fusing_Tool.exe, VmWare7.0, ADB

2.3 Supported functions

· Bluetooth

· Ethernet internet

· WIFI internet

· 3G internet

· HDMI output

· CMOS/CCD Camera photograph and video recording

· Hardware video codec, H263/H264/MPEG4/VC1

· Hardware JPEG codec

· 2D/3D graphics acceleration

· GPS and electronic maps

· Adjust LCD backlight

· Resistor touch screen

· Capacitive touch screen

· System sleep and wake up

· USB ADB

· LED program

· SD card expansion

· Audio playback and recording

· APP Market

. Google service

2.4 The necessary accessories for Development

Accessories Description

Mini USB cable Download image and ADB transfer file

Ethernet cable Network communication

Serial cable RS232 serial communication

Page 8: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 7

TF card (2G or above) Data storage

Power adaptor Power supply

2.5 Set boot mode

EM210 provides three boot modes by setting DIP switch JP106.

Boot mode settings

Boot Mode J1 J2 J3 J4 J5 J6

NAND ON ON ON ON OFF ON

iNAND ON ON OFF OFF ON ON

USB OFF ON ON ON OFF ON

3 Compiler Environment

3.1 Vmware7.0+ubuntu10.04

Install Vmware7.0 in windows OS, and then install ubuntu10.04 in vmware to compile. The installation

details please refer to << vmware+ubuntu install manual>>.

Note:Because the virtual machine is too slow, and memory is required, So suggest to install Ubuntu

directly to a computer to compile better.

3.2 Install the Cross Compile toolchain

Cross compile toolchain version: arm -2009q3

Location: CD:\ EM210\Linux\Source

Recommended to install the cross compile toolchain to /usr/local/arm/ (The makefile in the source has

been specified the directory).

User also can install other versions of the tool chain according the demands.

Installation commands

# mkdir /usr/local/arm

# tar xvjf arm-2009q3.tar.bz2 –C /usr/local/arm

# arm-linux-gcc -v

3.3 Install JDK1.6

# sudo apt-get install openjdk-6-jre-headless

# java –version

Page 9: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 8

3.4 Install the necessary tools

# sudo apt-get install build-essential

# sudo apt-get install zlib1g-dev

# sudo apt-get install flex

# sudo apt-get install libx11-dev

# sudo apt-get install gperf

# sudo apt-get install libncurses5-dev

# sudo apt-get install bison

# sudo apt-get install lsb-core

# sudo apt-get install lib32z1-dev

# sudo apt-get install g++-multilib

# sudo apt-get install lib32ncurses5-dev

# sudo apt-get install uboot-mkimage

# sudo apt-get install g++-4.4-multilib

4 Compile the Source

4.1 Compile u–boot

u-boot.bin provides the basic infrastructure to bring up a board to a point where it can load a kernel and

start booting the operating system.

Execute the commands to compile

# tar zxvf uboot_smdkv210.tar.gz

# cd uboot_smdkv210

# make distclean

# make smdkv210single_inand_config

# make

Then will get the u-boot. bin in the current path.

4.2 Compile kernel

android210.config is the configured file that can be used directly, default 7 inch LCD with resistive touch

screen.

Execute the commands# tar zxvf kernel.tar.gz

# cd kernel

# make clean

# cp android210.config .config

# make

Page 10: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 9

Then will get the zImage file in the folder arch/arm/boot.

4.3 Compile android 4.0.3

# tar zxvf androidfs.tar.gz

# cd android210-androidfs

# . ./build/envsetup.sh

# lunch

QXQ@boardcon-desktop:~/android210/android210-androifs$ lunch

You’re building on Linux

Lunch menu… pick a combo:

1. full_smdkc110-eng

2. full_smdkc210-userdebug

3. full_smdkv210-eng

4. full_smdkv310-eng

Which would you like? [full-eng] 3

Select 3, and Enter

# mm

# ./make_boardcon_inands.sh

Then will get the images in the current directory. (The images include system.img, ramdisk-uboot.img)

5 Install Serial terminal tools

The common serial terminal tools are DNW and SecureCRT. The serial terminal tools is use for board

interaction with the computer. It can view the board booting information or operation control some

interfaces and so on.

5.1 Configuration DNW

DNW can be used directly, without installation.

Copy DNW (path: tools\windows\DNW.exe) to the PC and open it.

Click Configuration --> Options

Page 11: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 10

Select the Band Rate and COM Port (The port Number is not fixed, please according to the actual.)

Then change [Download Address] to 0xd0020010

Click OK

Click Serial Port --> Connect

Page 12: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 11

5.2 Install SecureCRT

SecureCRT can be used directly after decompression. Suggest create a shortcut to the desktop for

SecureCRT.exe.

Copy SecureCRT (tools\windows\SecureCRT.exe) to the PC, click SecureCRT.exe to open.

Click the icon Quick Connect

Page 13: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 12

Set the parameters as follow.

Protocol: Serial

Port: To be specified by user PC

Baud rate: 115200

Please check XON/XOFF but not RTS/CTS

Check Save session

After all, click connect

Illusion1: When you open more than one serial port tools, and they use the same serial port, there will be

reported that the port is busy. Solution: turn off the serial tool that unnecessary.

Page 14: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 13

6 Burn images to iNand

6.1 Burn uboot.bin to iNand

It applies in the case of not uboot in iNAND or user wants to update the uboot.

Step 1,Set the EM210 boot mode as USB.

Boot modes setting

Boot Mode J1 J2 J3 J4 J5 J6

NAND ON ON ON ON OFF ON

iNAND ON ON OFF OFF ON ON

USB OFF ON ON ON OFF ON

Step 2,Connect EM210 to PC with serial cable and USB cable, and then insert the power adaptor (DC 5V/2A) to

the board.

Step 3,After power on, the PC will report that found new hardware if it never install the usb driver

(tools\windows\usb_download_driver).

USB Installation stepsClick Next

Click Browse, select the folder tools/windows/usb_download_driver

Page 15: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 14

Click OK Next

Select the driver as below

Page 16: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 15

Click Browse and select tools/windows/usb_download_driver/secusb2.sys.

Page 17: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 16

Page 18: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 17

Now, the USB download driver is installed successfully.

Step 4,Open DNW and configure as follows:

Serial Port --> Connect

Configuration --> Option

Select serial Port number and change [download address] to 0xd0020010

Then the DNW window will show as:

Now, download the image to the EM210 SBC.

Click USB Port --> transmit, transmit the file V210_USB.BL2.bin to the board.

Page 19: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 18

Change the download address again:

Configuration --> Option

Change [download address] to 0x23e00000

Page 20: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 19

Click USB Port --> transmit --> transmit uboot.bin.

The terminal will print out uboot boot information. Press any key in 3 seconds in serial console into uboot

command line.

Page 21: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 20

Step 5,Select eCreate 4 partitions for iNand in uboot console

Execute the command

fdisk -c 0

Execute the fastboot command

Page 22: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 21

If there is not usb fastboot driver, install it at first. (Path: tools\windows\usb_fastboot_driver)

Click Next and select the folder tools/windows/usb_fastboot_driver/

Page 23: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 22

Click Browse and select the file WinUSBCoInstaller.dll (Path: tools/windows/usb_fastboot_driver/i386/)

Page 24: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 23

Page 25: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 24

Now, the USB fastboot driver is installed successfully.

Note: Only copy the three files as follows from the directory Tools/windows/fastboot to

\\WINDOWS\system32\ the “fastboot” can be used.

Page 26: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 25

Step 6,Open cmd.exe of PC (Path: Android4.0\images\cmd.exe).

Execute the command to flash uboot.bin to iNand.

fastboot flash bootloader u-boot.bin

Page 27: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 26

6.2 Burn kernel and system

Step 1,Set the boot mode as iNAND by modify the boot switch (JP106):

Boot Mode J1 J2 J3 J4 J5 J6

iNAND ON ON OFF OFF ON ON

Step 2,Power on EM210 and press any key in 3 seconds in serial console.

Select u to access fastboot mode

Click the batch file Android4.0\images\write_all.bat on the PC to flash

zImage, ramdisk-uboot.img and system.img to iNand.

Page 28: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 27

Also user can burn images one by one using the following commands in cmd.exe:

fastboot flash kernel zImage

Page 29: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 28

fastboot flash ramdisk ramdisk-uboot.img

fastboot -w

fastboot flash system system.img

Restart the development board, press the space bar within 3s and then select e,

At uboot command line, execute the command

SMDKV210 # fatformat mmc 0

So far, all images have been flashed to iNand.

Restart the board to run Android system.

Note: User can clear partition system, user_data and cache in uboot command line with the command

ext3format as follows:

SMDKV210 # ext3format mmc 0:1

SMDKV210 # ext3format mmc 0:2

SMDKV210 # ext3format mmc 0:3

SMDKV210 # ext3format mmc 0:4

Note: If fails to start (eg. change OS from Linux to Android), it needs to set the startup parameters.

eg.After power on, the system is running, hit any key of PC in 3 seconds to enter the uboot command line,

Enter the Selection: e

Execute the commands

# setenv bootcmd "movi read kernel C0008000; movi read rootfs 40800000 180000; bootm C0008000

40800000"

# setenv bootargs "console=ttySAC2,115200 init=/init"

# saveenv

Page 30: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 29

7 Android Application

7.1 System Information

Open “settings About tablet” can view the system information.

7.2 Icons in status bar

Android 4.0 add three shortcuts: ESC, HOME and Recent.

7.3 User button description

There are five buttons on EM210 development board.

Function defined:

K5: Menu

K2: Home

Page 31: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 30

K3: Volume up

K1: Return

K4: Volume down

7.4 Test SD (J16)

Insert the SD card to the slot before startup, the system will automatically mount the SD card (it will take

some time).

After mounted, user can view the pictures or Play video stored in the SD.

It also supported running camera program to take pictures, or view the files in SD card through ES File

Explore.

Note: The SD card does not support hot-plug.

7.5 Test USB (J16)

The USB HOST is used to connect USB mouse, USB keyboard and USB storage device. But it does not

support automatically mount USB storage device, it needs to manually mount.

Manually mount:Insert the USB storage device to the USB host interface, start the system, it will found the usb device.

Terminal output information:

Page 32: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 31

Input the follow command to mount:

mount -t vfat /dev/block/sda1 /mnt/udisk

ls /mnt/udisk

After mounted, the files in the USB device can be operated:

Note: USB Storage device support hot-plug. But after plug user need to remount again.

Page 33: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 32

7.6 Video player

Copy the MP4 files to the SD Card, and then insert the card to the development board. Start up the board

and run Gallery, then click the video file to play.

Page 34: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 33

7.7 Music (J14)

Put some MP3 files to the SD card and insert the SD card to the development board. Start up the board

and run music player to play. The headphone and speaker will synchronize output sound.

7.8 Camera (CN13)

Insert camera module when the development board is de-energized, and then start the system. After the

Page 35: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 34

system running, click the Camera icon, then the program will run. (Please insert the SD card to store the

video files before running the camera)

Click the button to take photo.

Click the button to take video.

7.9 Wire network (P7)

Plug in an Ethernet cable (RJ45), start the system, execute the commands at serial terminal:

# netcfg eth0 up

# netcfg eth0 dhcp

# ping ip (or URL. eg. www.baidu.com) (User also can open Internet Browser to browse the Web)

Page 36: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 35

7.10 Wi-Fi (U5)

Step1, Connect WiFi antenna (The default WiFi module is WM-G-MR-09)

Step2, Turn on the WiFi. Settings WIRELESS&NETWORK Wi-Fi on. It will scan AP

automatically.

Step3, Select AP and type password

Page 37: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 36

Step4, Open Internet Browser to browse the Web

Page 38: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 37

7.11 GPS (MU3)

The default GPS module is TS-750CLPX.

Connect antenna to the GPS interface of EM210, and the GPS antenna head (Signal amplification) must

be placed outside to receive signals better. Open GPS-Test in menu, it will take some time to search

signals.

Page 39: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 38

7.12 Recording (MIC1)

Open the app “Hi-Q MP3 Recorder”

Note: Please do not plug in the headphone before recording.

Click the button to start recording.

Page 40: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 39

Click the button to stop recording.

Click the Management icon can view the files recorded.

Page 41: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 40

Insert the earphone and play the record files to test.

7.13 HDMI (PH2)

Connect EM210 and HDMI monitor with the HDMI cable, then start up the board. LCD and monitor will

sync output (Just the Screen, sound is not supported).

Page 42: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 41

7.14 Test RS485 (COM2&COM3)

Step 1, Connect COM2, COM3 with RS485 cable.

Step 2, Power on the board, and execute the commands at serial terminal:

# cd system

# cd vk3266

# ls

# chmod 777 test-serial.sh

# ./test-serial.sh

Now user can send any data at serial terminal and it can receiver immediately.

Page 43: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 42

7.15 Test WCDMA 3G module (CON5)

Step 1, Insert 3G module to PCI-E slot (3G model: ZTE-MF210).

Step 2, Connect antenna and insert SIM card.

Step 3, Power on EM210 and access the Android system.

Step4, Click Settings --> WIRELESS&NETWORK --> More… --> Mobile Network --> Check Data

enabled.

Page 44: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 43

Open Internet Browser to browse the Web.

7.16 Automatic Test

Boardcon provides EM210 features automatic test program.

1 Preparing for automatic testa, Install ADB and usb_adb_driver.

b, Copy MP4 file to SD card and named the file “test.mp4” .

c, Set the PC IP address as 192.168.0.2

Page 45: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 44

2 The necessary connectionUSB OTG, HDMI monitor, network (connect to the pc), U disk, serial port, RS485 port, SD card, SIM card,

3G antenna, GPS antenna, wifi antenna, camera, LCD

3 Test

Open cmd.exe of PC (Path: Test\cmd.exe). After power on, the PC will report that found new hardware if

it never install the usb adb driver (tools\windows\usb_adb_driver). At this time user need to install driver.

Note: Only copy the three files as follows from the directory Tools/windows/adb to

\\WINDOWS\system32\ the “adb” can be used.

After install driver execute the commands at cmd:

adb remount

adb push test /system/

Open serial terminal and execute the commands to check whether the file “test” loaded successfully to

Page 46: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 45

the board.

# cd system

#ls

Execute the commands to run the test program at serial terminal

# cd /systm

# chmod 777 test

# ./test

View the auto test result in LCD and serial terminal.

Page 47: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 46

7.17 LCD

The default factory program is 7-inch resistive LCD.

It can be switched to 4.3-, 10.1- or 10.4- inch LCD by modify the uboot environment variables.

Connect PC and board with serial cable and then power on. At serial terminal, type any key in 3 seconds

to enter uboot command line.

Enter your Selection: eExecute the commands at serial terminal as follow:

4.3 inch resistive LCD:

# setenv bootargs console=ttySAC2,115200 init =/init lcd=H43

# save

7 inch resistive LCD:

# setenv bootargs console=ttySAC2,115200 init =/init lcd=S70

# save

10.1 inch resistive LCD:

# setenv bootargs console=ttySAC2,115200 init=/init lcd=W101

# save

10.4 inch resistive LCD:

# setenv bootargs console=ttySAC2,115200 init =/init lcd=W104

Page 48: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 47

# save

7 inch capacitive LCD:

# setenv bootargs console=ttySAC2,115200 init =/init lcd=GT70

# save

4.3 inch capacitive LCD:

# setenv bootargs console=ttySAC2,115200 init =/init lcd=GS43

# save

8 View proc Filesystem

8.1 View startup parameters

View startup parameters.

Execute the command at serial terminal:

# cat /proc/cmdline

Page 49: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 48

8.2 CPU Information Inquiry

Inquiry CPU Information

Execute the command at serial terminal:

# cat /proc/cpuinfo

8.3 RAM Information Inquiry

Inquiry RAM Information

Execute the command at serial terminal:

# cat /proc/meminfo

Page 50: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 49

8.4 Disk partitions Information Inquiry

Inquiry Disk partitions

Execute the command at serial terminal:

# cat /proc/partitions

Page 51: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 50

8.5 Kernel Version Information Inquiry

Inquiry Kernel Version Information

Execute the command at serial terminal:

# cat /proc/version

8.6 Network Equipment Information Inquiry

Inquiry Network Equipment Information

Execute the command at serial terminal:

# cat /proc/net/dev

Page 52: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 51

8.7 Kernel boot Information Inquiry

Inquiry Kernel boot Information

Execute the command at serial terminal:

# cat /proc/kmsg

Page 53: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 52

9 Modify LOGO and control GPIO

9.1 Replace the LOGO

In EM210 user can replace the booting logo. In ubuntu replace the kernel source logo_linux_clut224.ppm

file at the path:

\kernel\drivers\video\logo\logo_linux_clut224.ppm

After change file user need to rebuild the kernel. The *.png picture change to *.ppm file as follow:

In ubuntu input the command:

# pngtopnm linux_logo.png > linux_logo.pnm

# pnmquant 224 linux_logo.pnm > linux_logo224.pnm

# pnmtoplainpnm linux_logo224.pnm > logo_linux_clut224.ppm

9.2 Control GPIOHere provide the example for control GPIO port.

Execute the commands in ubuntu:

# tar zxvf kernel.tar.gz

9.2.1 Compile led.koStep1: In “kernel/drivers/char” path compile the led.c file.

Page 54: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 53

The led.c file detail as follow:

#include <linux/kernel.h>

#include <linux/module.h>

#include <linux/cdev.h>

#include <linux/fs.h>

#include <linux/types.h>

#include <linux/moduleparam.h>

#include <linux/slab.h>

#include <linux/ioctl.h>

#include <linux/cdev.h>

#include <linux/delay.h>

#include <mach/gpio.h>

#include <mach/regs-gpio.h>

#include <plat/gpio-cfg.h>

#include <linux/uaccess.h>

#include <linux/pci.h>

#include <linux/proc_fs.h>

#define DEVICE_NAME "leds"

#define LED_MAJOR 259

#define ON 0

#define OFF 1

/* Register equipment */

struct leds_dev

{

struct cdev cdev;

unsigned char value;

};

Page 55: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 54

static unsigned long gpio_table [] =

{

S5PV210_GPH0(6),

S5PV210_GPH0(7),

};

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

{

s3c_gpio_cfgpin(S5PV210_GPH0(6), S3C_GPIO_SFN(1));

s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(1));

return 0;

}

static long leds_ioctl(struct file *file,

unsigned int cmd, unsigned long arg)

{

switch(cmd)

{

case ON:

gpio_direction_output(gpio_table[arg], 0);

printk("pull up \n");

return 0;

case OFF:

gpio_direction_output(gpio_table[arg], 1);

printk("pull down \n");

return 0;

default:

return -EINVAL;

}

}

static struct file_operations s3c6410_leds_fops =

{

.owner = THIS_MODULE,

.open = leds_open,

.unlocked_ioctl = leds_ioctl,

};

static int __init leds_init(void)

{

int ret;

struct class *my_class ;

ret = register_chrdev(LED_MAJOR, DEVICE_NAME, &s3c6410_leds_fops);

if (ret < 0)

{

Page 56: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 55

printk(DEVICE_NAME "can't register major number.\n");

return ret;

}

my_class = class_create(THIS_MODULE, "my_device_driver");

device_create(my_class, NULL, MKDEV(LED_MAJOR, 0), NULL, "leds");

printk(DEVICE_NAME "initialized.\n");

return 0;

}

static void __exit leds_exit(void)

{

unregister_chrdev(LED_MAJOR, DEVICE_NAME);

}

module_init(leds_init);

module_exit(leds_exit);

MODULE_AUTHOR("Gavin.S");

MODULE_DESCRIPTION("s3c6410 led driver test.");

MODULE_LICENSE("GPL");

Step 2: In “kernel/drivers/char” path modify the Makefile in the last add “obj-m += led.o” command.

Page 57: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 56

Step 3: In kernel root directory execute “make” compile the kernel and user can found the led.ko file in

“kernel/drivers/char” path.

Page 58: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 57

9.2.2 Compile ledtest.cStep 1: In “kernel/drivers/char” path compile the ledtest.c file.

The ledtest.c file detail as follow:

Page 59: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 58

#include <stdio.h>

#include <string.h>

#include <sys/types.h>

#include <sys/stat.h>

#include <fcntl.h>

#include <linux/input.h>

#define IOCTL_LED_ON 0

#define IOCTL_LED_OFF 1

void usage(char *exename)

{

printf("Usage:\n");

printf(" %s <led_no> <on/off>\n", exename);

printf(" led_no = 1, 2\n");

}

int main(int argc, char **argv)

{

unsigned int led_no;

int fd = -1;

if (argc != 3)

goto err;

fd = open("/dev/leds", O_RDWR); //

if (fd < 0)

{

printf("Can't open /dev/leds\n");

return -1;

}

led_no = strtoul(argv[1], 0, 0) - 1; //

if (led_no > 2) //

goto err;

if (!strcmp(argv[2], "on"))

{

ioctl(fd, IOCTL_LED_ON, led_no); //

// printf(" led_no = %d \n", led_no);

} else if (!strcmp(argv[2], "off"))

{

ioctl(fd, IOCTL_LED_OFF, led_no); //

// printf(" led_no = %d \n", led_no);

} else

{

goto err;

}

Page 60: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 59

close(fd);

return 0;

err:

if (fd > 0)

close(fd);

usage(argv[0]);

return -1;

}

Step 2: In the ““kernel/drivers/char” path execute “ arm-linux-gcc -o ledtest ledtest.c -static “ command to

produce “ledtest” file. And user will find the ledtest in current directory.

9.2.3 Test GPIO

Open cmd.exe of PC (Path: GPIO\cmd.exe). After power on, the PC will report that found new hardware if

it never install the usb adb driver (tools\windows\usb_adb_driver). At this time user need to install driver.

After install driver execute the commands at cmd:

adb remount

adb push led.ko /system/lib/

adb push ledtest /system/

Page 61: EM210 - Boardcon

www. boardcon.com

EM210 Android4.0 User Manual 60

Execute the commands to run the ledtest program at serial terminal

# chmod 777 /system/ledtest

# chmod 777 /system/lib/led.ko

# insmod /system/lib/led.ko

# cd system

# ./ledtest 1 on

# ./ledtest 2 on

# ./ledtest 1 off

# ./ledtest 2 off

User will found the D12,D11 in the EM210 board light on and off.