Hide thumbs Also See for Orange Pi:

Advertisement

Quick Links

Orange Pi Manual
Copy right by Shenzhen Xunlong Software Co., Ltd
Orange Pi Manual
www.orangepi.org
1
www.xunlong.tv

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Orange Pi and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Shenzhen Orange Pi

  • Page 1 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi Manual www.orangepi.org www.xunlong.tv...
  • Page 2: Table Of Contents

    Copy right by Shenzhen Xunlong Software Co., Ltd Content I.Orange Pi Introduction ..........................4 1.What is Orange Pi? ........................4 2.What can I do with Orange Pi? … ....................4 3.Whom is it for? ..........................4 4.Hardware specification ........................ 4 5.Using Method ..........................9 6.Configuration Software ......................23...
  • Page 3 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1.Device driver and application demo code ...................67 2.Compile device driver ........................69 3.Corss-complile or compiled Application code ................73 4.Running demo ..........................75 VI.Using Debug tools on OrangePi ......................77 Operation Steps on Windows ......................78 a.
  • Page 4: I.orange Pi Introduction

    Pretty much anything else, because Orange Pi is open source Whom is it for? Orange Pi is for anyone who wants to create with technology– not just consuming. It's a simple, fun, useful tool and you can use it to take control of the world around you.
  • Page 5 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd H3 Quad-core Cortex-A7 H.265/HEVC 4K · Mali400MP2 GPU @600MHz · Supports OpenGL ES 2.0 Memory (SDRAM) 2GB DDR3 (shared with GPU) On-board Storage TF card (Max. 64GB) /?MMC card slot, up to 2T on 2.5 SATA disk...
  • Page 6 Power button: Next to Reset button UBoot button (optional): Behind HDMI connector Android Lubuntu, Debian, Raspberry Pi Image Supported OS Interface definition 107mm × 60mm Product size Weight Orange Pi™ is a trademark of the Shenzhen Xunlong Software CO., Limited www.orangepi.org www.xunlong.tv...
  • Page 7 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd View of Hardware: Top view Bottom view www.orangepi.org www.xunlong.tv...
  • Page 8 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Interface instructions: www.orangepi.org www.xunlong.tv...
  • Page 9: Using Method

    Orange Pi. Start your Orange Pi need to complete the following steps. Step 1: Prepare Accessories Needed The first time you use the Orange Pi, you need at least some parts for the following: No. Items Requirements and Instructions ...
  • Page 10 Ethernet cable/USB Network is optional, It makes more convenient to WiFi(Optional) mount and upgrade software in your Orange Pi PC. DC power adapter 5V,2V min. high qualified power adapter, OTG can not used a power supply. Audio cable (Optional) You can select an audio cable with 3.5mm jack to feel...
  • Page 11 DC power adapter Step 2: Prepare a TF Card In order to be able to use Orange Pi normally, you must install the operating system in the TF card first. The following instructions will teach you how to write the operating system image file to the Windows and Linux environments.
  • Page 12 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd iii. In the options settings option set the format type option to quick formatting. Logical size adjustment option to open “(ON)" Make sure the inserted TF card codes are in accordance with the chosen codes.
  • Page 13 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd i. Right click to download the file, select " Unzip file". 5) Write image to TF card i. Download tools to write image, such as Win32 Diskimager, http://sourceforge.net/projects/win32diskimager/files/Archive/, install and open the tool.
  • Page 14 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Linux will format TF card automatic. Besides, you could use tool to select Format to normal to formatting TF card. PhoenixCard 3) Download the image OS from download page, http://www.orangepi.cn/`downloadresourcescn/...
  • Page 15 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3) Please make sure the inserted TF card is in accordance with the chosen, click “restore” button for TF card format. Successfully to format the TF card to normal, click the “OK” button.
  • Page 16 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Click the “Burn” button for writing to TF card and wait for it finish Burn Android OS image to TF card successfully. Click “Exit”. d. Write Armbian image file into TF card www.orangepi.org...
  • Page 17 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1) Insert TF card into computer, please note that the TF card capacity must bigger than the operating system image, usually need 8GB or greater capacity 2) Download the OS image file from the download page: http://www.armbian.com/download/...
  • Page 18 Click the "start" button and wait for the mirror to write. iii. After the image is written, click the "close" button Step 3: Start your OrangePi According to the following diagram, you can easily start your Orange Pi. www.orangepi.org www.xunlong.tv...
  • Page 19 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Hardware connection sketch map www.orangepi.org www.xunlong.tv...
  • Page 20 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi runs on Android 4.4 system Orange Pi runs on Debian system www.orangepi.org www.xunlong.tv...
  • Page 21 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Orange Pi runs on Ubuntu system Hardware connection diagram www.orangepi.org www.xunlong.tv...
  • Page 22 It is the network port in the middle of 3USB interfaces, which you can access Orange Pi to the wired network e. It is the power input interface on the right side for connecting a 5V and at least 2A or bigger than 2A power adapter. Avoid using smaller power GSM mobile phone charger, it is not able to output 2A even if it marked "2A 5V".
  • Page 23: Configuration Software

    –h It will be safety to turn off the Orange Pi. If directly use the power button to shut down the system may damage the file system on TF Card. After the system is closed, the power can be cut off by more than 5 seconds’...
  • Page 24 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 4) $ mv /home/ornagepi /home/zhangsan Change directory of original orangepi 5) $ usermod -d /home/orangepi orangepi Set this directory to orangepi user's home directory 6) $ cat /etc/passwd It should be shown as below: After the modification of the above iterms, it can be used the new account Zhangsan to land.
  • Page 25 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd http://unix.stackexchange.com/questions/134797/how-to-automatically- mount-an-usb-device-on-plugin-time-on-an-already-running-sy c. Configuration system source Configuration system source is domestic sources which can be updated, the installation of software is much faster. Take Ubuntu as an example: 1) Open the source file $ sudo vi /etc/apt/sources.list...
  • Page 26 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-backports main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-proposed main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-security main multiverse restricted universe deb-src http://mirrors.ustc.edu.cn/ubuntu-ports/ xenial-updates main multiverse restricted universe (Note: xenial is the version of the code name in this source, if the other version of Ubuntu needs to replace the corresponding version code which can be found on the internet.)
  • Page 27 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3) Open one or more of the desktops by vncserver or vncserver:1(vncserver:2)… you can also transfer more parameters through the full command as below: vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565...
  • Page 28 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Established above folders respectively, noted that path consistency and assigned to read and write permissions. In order for convenient, it could be Chmod 755, such as sudo Chmod 755 /nas path...
  • Page 29 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3) Installation method of version 1.0.31: The xxx is the directory for installation file $ cd /xxx/xunlei of Xunlei $ chmod 755 portal iii. $ ./portal 4) You will get an activation code after booting like the following interface 5) Copy this activation code to http://yuancheng.xunlei.com (Which...
  • Page 30 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 6) Setting start up $ sudo nano /etc/rc.loacl add the following contents before exit 0 cd /xx/xunlei ./portal & And then ctrl +o, Enter, ctrl +x to save and exit.
  • Page 31 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Setting start up sudo nano /etc/rc.loacl add the following contents before exit 0 cd /xx/xunlei ./etm_monitor & ctrl +o and enter, ctrl +x to save and exit. It could be remote downloading on computer, mobile phone or tablet by login yuancheng.xunlei.com...
  • Page 32 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1. Start to Linux,umount/dev/sdb1and /dev/sdb2, if there is prompt of busy disk, then use fuser to stop the running system.(Recommend using another Linux to boot for leading system) 2. Use fsck to check the file system(to make sure there is no wrong of file...
  • Page 33 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1. Use find directory to search to location of the following file, load modules in the specified order. insmod videobuf-core.ko insmod videobuf-dma-contig.ko insmod uvcvideo.ko insmod cci.ko insmod vfe_os.ko insmod vfe_subdev.ko insmod gc2035.ko...
  • Page 34 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 4. Configure wireless, you first need to know the ssid and psk(account and password), enter the corresponding wlan*, ssid, psk $ sudo nano /etc/network/interfaces (Ass the following contents) auto wlan0...
  • Page 35 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd How to use USB WIFI in official website? 1. Connect the USB wifi(Make sure the USB is on). Enter lsusb in the directory line to check the detail information of USB device.
  • Page 36 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 6. Restart and USB wifi will be available. Write image to EMMC 1. Image of Lubuntu and Raspbian in official website cannot use install_to_emmc script to copy image from OS to EMMC. You could use image in the following link: https://mega.nz/#F!wh8l2BjK!OBep3nMldBletvNNwkH2Jg...
  • Page 37: Gpio Specifications

    Copy right by Shenzhen Xunlong Software Co., Ltd GPIO Specifications 1. Orange Pi 40-pin GPIO A 40-pin GPIO interface on the Orange Pi is the same as Model A and Model B of Raspberry Pi. The picture below is GPIO pin define of Orange Orange_Pi(H3)
  • Page 38 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd CON3-P17 VCC-3V3 CON3-P18 CAN_RX CON3-P19 SPI0_MOSI CON3-P20 CON3-P21 SPI0_MISO CON3-P22 UART2_RTS CON3-P23 SPI0_CLK CON3-P24 SPI0_CS0 CON3-P25 CON3-P26 PA21 PA21 CON3-P27 TWI1-SDA PA19 CON3-P28 TWI1-SCK PA18 CON3-P29 CON3-P30 CON3-P31 CON3-P32...
  • Page 39 The CSI Camera Connector is a 24-pin FPC connector which can connect external camera module with proper signal pin mappings. The pin of CIS connector can be defined as follows. The connector marked with “CON 1” on the Orange Pi is camera connector. 2) OrangePi-CSI CON1-P01...
  • Page 40 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd CON1-P12 CSI-D7 PE11 CON1-P13 CSI-MCLK CON1-P14 CSI-D6 PE10 CON1-P15 CON1-P16 CSI-D5 CON1-P17 CSI-PCLK CON1-P18 CSI-D4 CON1-P19 CSI-D0 CON1-P20 CSI-D3 CON1-P21 CSI-D1 CON1-P22 CSI-D2 CON1-P23 CON1-P24 AFVCC-CSI www.orangepi.org www.xunlong.tv...
  • Page 41: Ii.linux Kernel Source Code Compilation

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd II. Linux Kernel Source Code Compilation Hardware: OrangePi series development board Card reader and a TF card In order to support the rapid development of the project, OrangePi will write the project configuration options to the binary file.
  • Page 42: Obtain The Source Code Of Development

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Note: * indicates wild-cards in this section and the following sections, you need to fill in the actual values according to their file storage path. 1. Obtain the Source Code of Development You could download the source code from the official website of OrangePi http://www.orangepi.org/downloadresources/...
  • Page 43: Compile Project

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd brandy: gcc-linaro, boot and uboot source code and open source cross compiler tool linux-3.4: Kernel source code tools: Tools of project compilation build.sh: compilation script 2. Compile Project You need to compile the entire project while it is your first time to use the source code.
  • Page 44 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Use the following command to compile the entire project $ ./build.sh config At this point the system will prompt the choice of the chip, as shown below, for OrangePi, select sun8iw7p1...
  • Page 45: Update The Kernel Image File And Library

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3. Update the kernel image file and Library After the compilation is complete, the following files will be generated in the directory boot: /lichee/tools/pack/chips/sun8iw7p1/bin/boot0_sdcard_sun8iw7p1.bin uboot: /lichee/tools/pack/chips/sun8iw7p1/bin/u-boot-sun8iw7p1.bin uImage: /lichee/out/sun8iw7p1/dragonboard/common/uImage libs: /lichee/linux-3.4/output/lib/modules Download image from official website:...
  • Page 46 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Write the image: $ dd bs=4M if=*.img of=/dev/sdb Pull out the card reader, and then insert it again. At this time, the SD card is inserted into a PC, view the SD card mount point (if you don't know how to get a mount point for the SD card, please refer to the diagram below).
  • Page 47 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd If this SD card system is mounted to the directory / dev / SDB, SD card will have two sub mount points, respectively are/dev/sdb1 and /dev/sdb2. Two partition of SD card will automatically mount to a PC /media/ directory, the first partition is the boot partition and the second partition is the rootfs.
  • Page 48 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Tips:What if it can not normally start? Question: Re-update the kernel after lib, what for the display does not react? Answer: Use the debugging serial assistant which mentioned on the previous chapter to check the problem, you will find that the debugging information will not continue after printed to the u-boot phase.
  • Page 49: Iii.android Kernel Source Code Compilation

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd III. Android Kernel Source Code Compilation Hardware: OrangePi series development board A card reader, a TF card and a power adapter Software Linux host computer, which hard disk space at least 50G (to meet a fully...
  • Page 50: Install Jdk

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Version 2.7.3 of Python; Version 3.81-3.82 of GNU Make; JDK 6; Version 1.7 or higher version of Git. 1. Install JDK a. Download and install JDK,you will get jdk-6u31-linux-x64.bin after downloaded: b.
  • Page 51: Install Platform Supported Software

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ export PATH=$PATH:/$JAVA_HOME/bin $ export CLASSPATH=.:$JAVA_HOME/lib $ export JRE_HOME=$JAVA_HOME/jre e. Command line input Jav and press tab to see whether it can auto completion (Java), which indicates it can successfully installed.
  • Page 52: Install The Compiler Tool Chain

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ tar –xf qin2-sync-yunos-v1.0.tar.gz Two contents after unzipped: 4. Install The Compiler Tool Chain The compiler tool chain has been integrated in Android SDK. Tool chain is on: lichee/brandy/gcc-linaro/ of Android SDK(already exist) 5.
  • Page 53: Compile Android Code

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Print information of successful compilation 6. Compile Android Code Input the command: $ cd android $ source ./build/envsetup.sh www.orangepi.org www.xunlong.tv...
  • Page 54 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ lunch dolphin_fvd_p1-eng # Select the scheme number $ extract-bsp # Copy the kernel and the drive module $ make –j8 # The rear values is for the simultaneous compilation...
  • Page 55 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ cd */lichee/tools/pack/ Insert U disk into the computer, check whether TF card mount first (ensure that the TF card was formatted) $ mount Write image: Copy the generated image file i to the SD card, switch to the windows operating system.
  • Page 56 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Download the compressed package, unzip and get the folder Enter the folder, open the program to run as Administrator Write Android image on windows by this tool: Insert the TF card with written image to OrangePi, turn on the computer then you could enter to Android system.
  • Page 57: Iv.use Project Configuration Files

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Use Project Configuration Files Configure hardware:sys_config.fex The sys_config.fex is a binary configuration file that used by the SOC kernel driver or LiveSuit for a particular target board, including how to set up a variety of peripherals, ports, and I/O which based on the target version.
  • Page 58: Update Boot And U-Boot

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ cd /lichee $ busybox unix2dos sys_config.fex $ cp ../tools/pack/chips/sun8iw7p1/bin/boot0_sdcard_sun8iw7p1.bin ./ $ cp ../tools/pack/chips/sun8iw7p1/bin/u-boot-sun8iw7p1.bin ./ $ tools/pack/pctools/linux/mod_update/script sys_config.fex >/dev/null $tools/pack/pctools/linux/mod_update/update_boot0boot0_sdcard_sun8iw7p 1.bin sys_config.bin SDMMC_CARD >/dev/null $tools/pack/pctools/linux/mod_update/update_ubootu-boot-sun8iw7p1.bin sys_config.bin >/dev/null $ mv sys_config.bin script.bin 2.
  • Page 59 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd How to modify the resolution Find the option to disp_init, modify the sub item screen0_output_mode, it will display different resolutions. For example: The output mode for Screen 0 is (used for tv/hdmi output, 0:480i 1:576i...
  • Page 60 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd disp_mode=1 screen1_output_type=2 screen1_output_mode=11 [tv_para] tv_used tv_dac_used=1 Modify sys_config, generate into script.bin and replace it. 2. Auto load tv.ko module while power on Enter the following command in /lib/ catalog...
  • Page 61 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd screen1_output_mode=xx Screen1 output mode (used for tv/hdmi output, 0:480i 1:576i 2:480p 3:576p 4:720p50 5:720p60 6:1080i50 7:1080i60 8:1080p24 9:1080p50 10:1080p60 11:pal 14:ntsc) fb0_format=xx fb0 format (4:RGB655 5:RGB565 6:RGB556 7:ARGB1555 8:RGBA5551 9:RGB888 10:ARGB8888...
  • Page 62 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd screen1_output_type screen1_output_mode = 4 fb0_framebuffer_num = 2 fb0_format = 10 fb0_pixel_sequence fb0_scaler_mode_enable = 0 fb1_framebuffer_num = 2 fb1_format = 10 fb1_pixel_sequence fb1_scaler_mode_enable = 0 CPU Frequency Setting max_freq The maximum frequency...
  • Page 63 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd LV1_volt Voltage setting at the first level LV2_freq Frequency at the second level LV2_volt Voltage setting at the second level LV3_freq Frequency at the third level Voltage setting at the third...
  • Page 64 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Capacitance touch panel (capacitor tp) Configuration Item Configuration Meaning Whether turn on capacitance touch panel, ctp_used=xx if so set the value as 1, and vice verso 0. Indicates the control scheme used in the...
  • Page 65 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd signal of capacitive touch panel ctp_wakeup=xx GPIO configuration of the wake-up signal of capacitive touch panel Capacitive screen IO signal, currently ctp_io_port=xx share with interrupt signal common pin Configuration samples:...
  • Page 66: Orangepi Driver Development

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd V.OrangePi Driver development Hardware: OrangePi series development board A card reader and a TF card In order to help developers become more familiar with OrangePi, this manual describes how to use simple device driver modules and applications on the development board.
  • Page 67: Device Driver And Application Demo Code

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1. Device driver and application demo code Write Miscellaneous Character Device Drivers and Applications a. Application Program (app.c): www.orangepi.org www.xunlong.tv...
  • Page 68 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd b. Driver Program (OrangePi_misc.c): www.orangepi.org www.xunlong.tv...
  • Page 69: Compile Device Driver

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2. Compile device driver Copy the OrangePi_misc.c to the */lichee/linux-3.4/driver/misc directory: Enter to */lichee/linux-3.4/drivers/misc/ www.orangepi.org www.xunlong.tv...
  • Page 70 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Modify Makefile on currently file, shown as following: There is Kconfig on the same sibling folders with Makefile. Each Kconfig respectively describes the the source directory file related kernel configuration menu.
  • Page 71 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Back to the source code directory: $ ./build.sh After compiled the kernel, there will be an orangepi_misc.ko file generated on the directory of lichee/linux-3.4/output/lib/modules/3.4.41 www.orangepi.org www.xunlong.tv...
  • Page 72 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd There is a .ko module which generated after compiled of OrangePi_misc.c on */lichee/linux-3.4/output/lib/modules/3.4.39/ Insert U disk (please note the SD card should have been written image) if the SD card system is mounted to the directory / dev / SDB, SD card will have two sub mount points, respectively are / dev / sdb1 and /dev/sdb2.
  • Page 73: Corss-Complile Or Compiled Application Code

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 3. Corss-complile or compiled Application code Check whether there is the cross compiler, if not, then download and install it. $ arm-linux-gnueabihf-gcc -v While compiling the application, you will fill that you need the cross compiler arm-linux-gnueabihf-gcc, download and install it.
  • Page 74 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Check the information after entering bin directory pwd hows the path and export it into the whole project $ ll /etc/environment shows that the file can only read, need to modify...
  • Page 75: Running Demo

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Compile the application with cross compiler $ arm-linux-gnueabihf-gcc app.c –o aq There will be an ap application generated in the directory, copy it to the development board file system(on the rootfs directory of /home/orangepi/) $ cp aq /media/*/home/orangepi/ 4.
  • Page 76 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd $ ll /dev/orangepimisc( Miscellaneous equipment automatically generated device files, the specific look at the driver code) Executive application (note the use of the application, the specific look at the code) $ ./aq /dev/orangepimisc...
  • Page 77: Using Debug Tools On Orangepi

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd VI.Using Debug tools on OrangePi Hardware: OrangePi series development board TTL to USB cable www.orangepi.org www.xunlong.tv...
  • Page 78: Operation Steps On Windows

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Operation Steps on Windows In order to get more debugging information in the project development process of using OrangePi, OrangePi default support for serial information debugging. For developers, you can simply get the serial port debugging information with the materials mentioned above.
  • Page 79: B.install Putty On Windows

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd b. Install putty on Windows 1) Download putty installation package 2) b. Unzip and install 3) Open program after installed, as shown below c. Connect style www.orangepi.org www.xunlong.tv...
  • Page 80: D.equipment Information Acquisition

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC d. Equipment information acquisition Start menu select control panel www.orangepi.org...
  • Page 81 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Click on the device manager to check the port number www.orangepi.org www.xunlong.tv...
  • Page 82: Open Putty Configuration

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd e. Open putty configuration Serial port should set to the corresponding port number (COM5), the speed should set to 115200 f. Start debug Power on and boot OrangePi, the serial port will automatic print debug log www.orangepi.org...
  • Page 83: Operation Steps On Linux

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Operation steps on Linux There are Minicom and Kermit serial debugging tools for Linux, this section will take Kermit as an example to have an illustrate. Install Kermit Install the Kermit by execute command: $ sudo apt-get install ckermit a.
  • Page 84 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd Add lines: set line /dev/ttyUSB1 set speed 115200 set carrier-watch off set handshake none set flow-control none robust set file type set file name set rec pack 1000 set send pack 1000 set window www.orangepi.org...
  • Page 85: B.connect Style

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd b. Connect style Use the TTL to the serial port cable, one end connected to OrangePi, the other end connected to PC c. Setting kermit Input command in the PC terminal to check the device number of...
  • Page 86: D.start Debug

    Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 1) It can be seen from the figure that TTL to the serial port cable is identified as ttyUSB0, configure the /ect/kermit/kermitc file, update the serial port information. $ sudo vi /etc/kermit/kermitc 2) Set the value of setline into /dev/ttyUSB0 d.
  • Page 87 Orange Pi Manual Copy right by Shenzhen Xunlong Software Co., Ltd 2) Power on and boot OrangePi, the serial port will automatic print debug www.orangepi.org www.xunlong.tv...

Table of Contents