1. 主页
  2. 文档
  3. 操作系统手册
  4. Cortex-A9
  5. Android 6.0

Android 6.0

Chipsee Embedded Industrial Computer

Android 6.0 User Manual

V1.0.1

This manual is used to provide users with a fast guide of Chipsee Embedded Industrial Computer about Android6.0 OS development. Through this manual, users can quickly understand the hardware resources; users can build a complete compilation of Android development environment; users can debug Android6.0 OS via serial, USB OTG and Internet.

1. Chipsee Embedded Industrial Computer Development Kit

Hardware:
(1)Chipsee Embedded Industrial Computer
(2)12V power adapter
(3)USB A-A cable (used only if the hardware configured as OTG)
(4)Common serial cable or USB to serial cable
(5)TF (at lease 4GB)

Software:
(1)Chipsee Android 6.0 Image file
(2)Android Studio 2.3.3 for Windows
(3)Mfgtools_Kernel3.14.52

2. Getting started and Tests

Notes:Through this part of the content, the user can use the image files of Android6.0 we provided and MFGTools for system burning , system start, and begin basic software and hardware test.

2.1. Boot configuration select

CS-IMX6 has a boot configuration select switch, where you can select three modes:

(eMMC Boot)

2.2.Prepare Manufacturing Tool and Image

The manufacturing tool, named MFGTool, is a tool that runs on a Windows PC and is used to download prebuilt images to eMMC on an Chipsee board. The tar.gz file can be found in the tools directory.

MFGTool

Windows download tool

Kernel Image emmc-flash/emmc/boot-imx6q.img
U-boot Image emmc-flash/emmc/u-boot-imx6q.imx
Recovery Image emmc-flash/emmc/recovery-imx6q.img
Android File System emmc-flash/emmc/system.img
Android logo emmc-flash/emmc/xxx.bmp
Industrial Computer one
USB OTG Cable one
12V-2A power adapter one

2.3. Downloading Images by using MFGTool

2.3.1. Configuring MFGTool

Unzip Mfgtools_Kernel3.14.52_V1.0.rar, Edit “Mfgtools_Kernel3.14.52_V1.0\cfg.ini” (Figure1), make sure the name is “eMMC-Android”(Figure2).

Figure 1

Figure 2

2.3.2.Copy Image To Android Directory

Unzip prebuilt-imxv1-csXXXXXfXXXvX-android6-emmc-YYYYMMDD.tar.gz , you will get boot-imx6q.img, recovery-imx6q.img, system.img, u-boot-imx6q.imx android6_xxx.bmp from emmc-flash/emmc directory,copy them to “Mfgtools_Kernel3.14.52_V1.0\Profiles\Linux\OS Firmware\files\android” directory(Figure3).

Figure 3

2.3.3. Using MFGTool

(1)Connect a USB OTG cable from a PC to the USB OTG port on the board.
(2)Boot configure select (0 1 1 0) (Figure4).

Figure 4

(3) Connect 12V-2A power adapter to power port on board.
(4) Run MfgTool2.exe in Mfgtools_Kernel3.14.52 directory. (Figure 5)

Figure 5

Figure 6 Prepare to Start

Notes:No Device Connected” indicates that your USB-OTG cable is not ready. Please check it. (Figure 7)

Figure 7 The USB-OTG cable is not connected correctly.

(5) Click “Start ” to download the Image

Figure 8 Loading Kernel and Formatting rootfs partition

Notes:If the PC OS is Window7, there is a message that asks you to format the disk. Please ignore or cancel it.

(6)Click "Stop" to stop download Image and exit. (Figure 9)

Figure 9 Download Image is finished.

2.4. Downloading Images by using the TF card

2.4.1. Copy prebuilt file to linux environment, like ubuntu1404.

2.4.2. Insert TF card in ubuntu1404, check the device node, such as /dev/sdc.

$ sudo ./mksdcard.sh --device /dev/sdc

2.4.3. Now you get one bootable TF card, insert it in Chipsee board, change the switch S1 to TF card boot mode, you can reference 2.1 boot config select.

2.4.4. Power on, take a look at the display, indicating that you have downloaded the image in emmc.

Note: the flash system will reboot one time. It’s normal.

>>>>>>> eMMC Flashing Completed <<<<<<<

2.4.5. Power off and switch the S1 to eMMC boot mode, you can reference 2.1 boot config select.

2.5. Booting Android OS And Test(USE 7″ as example)

Figure 10 Android Desktop (USE 7″ as example)

2.5.1. SD Test

SD Card is supported in hot plug. Figure 11 shows the message when you plug the SD card on board. The SD Card will be mounted to /mnt/media_rw/ and /storage/ directory.

Figure 11 Serial message

2.5.2. USB Flash Disk Test

USB Flash Disk is similar to SD Card, will be mounted to /mnt/media_rw/ and /storage/ directory.

Figure 12 USB Message

2.5.3. Network Test

The network uses DHCP to obtain an IP address. You can use ethernet app set a static IP, check the obtained IP from the router, and set the proxy. If you want to change the MAC address, you can reference Android6.0_MAC_Address_User_Guide.pdf

Figure 13 Ethernet app

2.5.4. HDMI Test

For HDMI Test just reference IMX6Q U-boot Setting Hdmi Output For Android6.0.pdf.
Notes: HDMI is not supported in hot plug, and the sound comes from the HDMI monitor, not the speaker or the headset on board.

2.5.5. WIFI Test

Please make sure your board has SDIO WIFI module before you test WIFI. If your board has SDIO WIFI Module, just connect the WIFI and open the browser to Test.

2.5.6. ADB Test

Android6.0 enables the USB Debug default. You just insert the OTG cable, and allow USB debugging.
You can use the adb tool to test the adb which you can find in tools directory. Unzip it to the root directory of Windows PC’s C:\ disk, like Figure 14.

Figure 14 Unzip adb.rar to c:\

You need to set the environment variable like in the following Figure:

Connect the USB-OTG cable to the PC, you will get a message: “Allow USB debugging?”. Please select “Always allow from this computer” and click “OK”.

You can use the following command to list the devices attached.

$ adb devices

You can use adb command to install an app from the PC, like in the following figure:
<pre”>$ adb install XXX.apk

2.5.7.Touch Screen Test

Run MultiTouchTest App, the screen will show the number and position of the touch point when touching the screen. Resistive screen expansion board only supports single-touch, capacitive screen expansion board supports five-point touch like follow Figure.

Notes: The 21.5 inches, 19 inches, 17 inches capacitive screen supports ten-point touch.

2.5.8. Serial Test

Serial ports in system

Serial Port Driver
COM1(RS232 Debug) /dev/ttymxc0
COM2(RS485) /dev/ttymxc1
COM3(RS232) /dev/ttymxc2
COM4(RS485) /dev/ttymxc3
COM5(RS485) /dev/ttymxc4

Notes:COM2(RS485)share pin with Bluetooth. If you use COM2(RS485), you can’t use Bluetooth.

1. Connect the COM which you want to test on board to PC. Use software “SecureCRT” or “Putty” or some others in the PC. Run “Serial Port” App to communicate with PC. Click “Setup”, set “Device” and “Baud rate” set the device to what you want to test, set Baud rate 115200, as in the following image.

2. Click the “Loopback” You will see something in the PC serial console, like in the following figure.

3. Click the “Console” button, and you can send what you want over Windows PC’s serial console, and you can receive it from the console on board, like in the following figure.

2.5.9. GPIO

For the CS12800F101 board, there are 8 gpio ports, the LOW is 0V, the HIGH is 3.3V. Please check “GPIO Connector” in Chipsee_F101C-Manual – V1.0.pdf to know the position. The following is the gpio number.

For the CS10600F070 board, There are 8 gpio ports, the LOW is 0V, the HIGH is 3.3V. Please check “GPIO Connector” in Chipsee_F7C-Manual – V1.0.pdf to know the position. The following is the gpio number.

Note: The V1 and V2 of CS10600F070 GPIO is not same.

You can use GPIODemo to test the GPIO.

This system support keeps the logo from the u-boot to the kernel feature. You can change the logo by yourself. There are two ways:

  • Replace the logo file in prebuilt images packages, and download images.
  • Change the logo without downloading images.

NOTELogo file is one 32bpp, format is bmp.

Downloading images

Replace the prebuilt-xxx/emmc-flash/emmc/logo.bmp and reference 2.2 and 2.3 to flash the image.

Don’t Download Images

We will use MFGTools and logoflasher images to change the logo.

Use MFGTools to Change LOGO

Replace MFGTools Mfgtools-K31452-V1.0\Profiles\Linux\OS Firmware\files\ubuntu\logo.bmp. Change Mfgtools-K31452-V1.0\cfg.ini configuration “name” to “eMMC-Android-Logo”. Like follow:

CS12800F101 P18
Pin Number GPIO Number Devices File Direction
3 gpio106 /dev/chipsee-gpio7 IN
4 gpio30 /dev/chipsee-gpio3 OUT
6 gpio95 /dev/chipsee-gpio6 IN
7 gpio87 /dev/chipsee-gpio4 OUT
8 gpio29 /dev/chipsee-gpio1 OUT
9 gpio28 /dev/chipsee-gpio2 OUT
11 gpio94 /dev/chipsee-gpio5 IN
12 gpio130 /dev/chipsee-gpio8 IN
CS10600F070V1 P21
in number GPIO number Device File Direction
21 gpio106 /dev/chipsee-gpio7 IN
22 gpio29 /dev/chipsee-gpio1 OUT
23 gpio30 /dev/chipsee-gpio3 OUT
24 gpio28 /dev/chipsee-gpio2 OUT
27 gpio95 /dev/chipsee-gpio6 IN
28 gpio94 /dev/chipsee-gpio5 IN
29 gpio87 /dev/chipsee-gpio4 OUT
30 gpio130 /dev/chipsee-gpio8 IN
CS10600F070V2 P21
in number GPIO number Device File Direction
21 gpio29 /dev/chipsee-gpio1 OUT
22 gpio106 /dev/chipsee-gpio7 IN
23 gpio28 /dev/chipsee-gpio2 OUT
24 gpio30 /dev/chipsee-gpio3 OUT
27 gpio130 /dev/chipsee-gpio8 IN
28 gpio87 /dev/chipsee-gpio4 OUT
29 gpio94 /dev/chipsee-gpio5 IN
30 gpio95 /dev/chipsee-gpio6 IN

Use Logoflasher to Change Logo
You can get prebuilt-imx6qdl-bootfile-update-xxx.tar.gz from DVD\Android6.0\Tools, use these tools to make one bootable TF card.
• Use follow command to make bootable TF card.

$ sudo  tar  zxvf  prebuilt-imx6qdl-bootfile-update-xxx.tar.gz
$ sudo  cd  prebuilt-imx6qdl-bootfile-update-xxx
$ sudo  ./mksdcard.sh  --device  /dev/sdX --display 1024600     // resolution

• Put your logo file in the first partition “boot-flash” directory of TF Card.
• Set boot mode to “TF” card, you can reference 2.1.Boot configuration select
• Power on, and if you see this message, you’re done:
>>>>>>> eMMC Flashing Completed <<<<<<<

3. Android system debug in Windows

In this chapter we will describe how to view Android system via the serial port and how to debug the system via USB OTG. We can also install applications via USB OTG. The following operation under Windows 7 x64 environment, similar to other Windows platforms.

3.1. View Android system via the serial port

3.1.1.Connect the COM1 on board to PC

You can reference How_To_Connect_Board_By_Serial.pdf.

3.1.2. Open software “SecureCRT” or “Putty” in Windows and set it like follow figure.

3.1.3. Power on the board, you can see the serial output of information like in the following figure.

4. When the system is fully booted, you can communicate with it.

3.2. Adb connect via USB OTG

Please refer to the 2.4.9 ADB Test chapter to set the ADB. You can use the following command to log in the board and communicate with it.

$ adb shell

The 2.4.9 chapter tell you how to install the app via adb, and in this chapter you can see other adb debug ways.

3.2.1. Use adb command to uninstall user APP.

Use command “pm list” to get the full name of the app, like in the following Figure. Then use the “uninstall” command to uninstall the app.

> adb shell pm list packages

> adb uninstall com.rovio.angrybirds

3.2.2. Use adb command to uninstall default app.

3.2.3 Use the adb command to transport the files between the board and the PC

“adb pull” and “adb push”

Board to PC: <remote> is the file or folder on board, <local> is the file or folder in PC.

>adb pull <remote> <local>

PC to board:

>adb push <local> <remote>

For example copy \sdk\platform-tools\chipsee.txt to board:

>adb push chipsee.txt /chipsee.txt

Opposite, board to PC:

>adb pull /testFile.txt testFile.txt

3.3. Adb connect via internet

1. Make sure the Ethernet port on board and host machine are connected to the network. Check Ethernet configuration for the board.

# netcfg

lo       UP              127.0.0.1/8   0x00000049 00:00:00:00:00:00

can0     DOWN          0.0.0.0/0   0x00000080 00:00:00:00:00:00

eth0     UP             192.168.6.176/24  0x00001043 1e:ed:19:27:1a:b3

2. If the Ethernet was not configured, configure the Ethernet of the board using ifconfig/netcfg as shown below.

# netcfg eth0 dhcp

3. Configure the ADB Daemon to use an ethernet connection using setprop as shown below.

# setprop service.adb.tcp.port 5555

4. If the network is configured successfully (as in the steps above) then restart the service adbd on the target.

# stop adbd
# start adbd

5. On the host machine use following commands to establish adb connection.

$ adb kill-server
$ adb start-server
$ adb connect :5555

6. Verify device connectivity, by executing the following commands. If connected, find the device name listed as a “IPADDRESS:PORT”

$ adb devices
List of devices attached
192.168.6.176:5555      device

7. An example of using adb to install software for Android. Make sure **.apk at the current folder, and export the adb path.

$ adb –s 192.168.1.117:5555 install **.apk

Use the argument –s to appoint the device over the internet.

4. Android App development

In this chapter, we introduce the development of Android with Android Studio for Windows.

4.1. Example—HelloWorld

1. Start a new Android Studio project:

2. Configure your new project:

3. Select the form factors your application will run on:

4. Select one Empty Activity:

5. Customize the Activity:

6. Develop the APP.

7. Run on target board.

这篇文章对您有用吗?