AXIOMTEK rBOX630-FL Software User Manual

Linux din-rail fanless embedded system
Hide thumbs Also See for rBOX630-FL:

Advertisement

Quick Links

rBOX630-FL
Linux
Software User's Manual

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the rBOX630-FL and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for AXIOMTEK rBOX630-FL

  • Page 1 Linux Software User’s Manual...
  • Page 2: Disclaimers

    Axiomtek does not make any commitment to update the information in this manual. Axiomtek reserves the right to change or revise this document and/or product at any time without notice. No part of this document may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of Axiomtek Co., Ltd.
  • Page 3: Table Of Contents

    Table of Contents Disclaimers ..................... ii Chapter 1 Introduction ..........1 Specifications ..................2 Chapter 2 Getting Started ........5 Connecting the rBOX630 ..............5 2.1.1 Serial Console ..................... 6 2.1.2 SSH over Ethernet ..................8 How to Develop a Sample Program ..........10 2.2.1 Install Yocto Toolchain ................
  • Page 4 Compile Demo Program ..............29 4.4.1 Install Yocto Toolchain ................29 4.4.2 Run demo program ................... 29 Chapter 5 Board Support Package (BSP) ....31 Host Development System Installation ........... 31 5.1.1 Install Host System ..................31 5.1.2 Install Yocto development ................. 32 5.1.3 Build and Install Yocto toolchain ..............
  • Page 5: Chapter 1 Introduction

    rBOX630 Linux Chapter 1 Introduction The extreme compact rBOX630 supports the low power RISC-based module (iMX6) processor with extended temperature range of -40°C to +70°C for using in wide range operating environments. Multiple built-in serial ports, high-speed LANs and USB 2.0 ports enable fast and efficient data computation, communication and acquisition.
  • Page 6: Specifications

    Linux Specifications  OS: Linux  Kernel: 3.0.35 (with Freescale and Axiomtek hardware modified patch)  Support Protocol Types  ICMP.  TCP/IP.  UDP, DHCP, Telnet, HTTP, HTTPS, SSL, SMTP, ARP, NTP, DNS, PPP, PPPoE, FTP, TFTP, NFS.
  • Page 7 rBOX630 Linux  Utilities  Telnet: Telnet client program  FTP: FTP client program  TFTP: Trivial File Transfer Protocol client  Packages  busybox: Small collection of standard Linux command-line utilities  udev: A device manager for Linux kernel ...
  • Page 8 rBOX630 Linux This page is intentionally left blank. Introduction...
  • Page 9: Chapter 2 Getting Started

    You can connect the rBOX630 to personal computer (PC) in two ways:  Serial RS-232 console  SSH over Ethernet Please download below data from Axiomtek’s website as below list if you have the demand. BSP support package. Note http://www.axiomtek.com/products/ViewProduct.asp?view=8947...
  • Page 10: Serial Console

    rBOX630 Linux 2.1.1 Serial Console The serial console is a convenient interface for connecting rBOX630 to PC. First of all, it is very important to make sure that your desktop connects to rBOX630 by console cable. Please set the system as follows: Baudrate: 115200 bps Parity: None Data bits: 8...
  • Page 11 rBOX630 Linux The Bootloader default booting system setup to SD Card, If you don’t have bootable SD Card and want boot from eMMC, Try type this command on u-boot. If connection is established successfully, you should see the following image. To login, please enter ‘root’...
  • Page 12: Ssh Over Ethernet

    rBOX630 Linux 2.1.2 SSH over Ethernet Now, we are going to connect the rBOX630 to PC over Ethernet. The following ® illustrations show how to do it under Windows and Linux environment. Note: rBOX630 LAN2 default IP address is 192.168.0.254. ®...
  • Page 13 rBOX630 Linux To login rBOX630, please enter ‘root’ (with no password). For Linux users: Open terminal and keyin ‘ssh’ command. After the connection is established successfully. Getting Started...
  • Page 14: How To Develop A Sample Program

    rBOX630 Linux How to Develop a Sample Program In this section, learn how to develop a sample program for rBOX630 with the following step by step instructions. The sample program is named ‘hello.c’. 2.2.1 Install Yocto Toolchain Before you develop and compile sample program, you should install Yocto toolchain into development PC.
  • Page 15: Setting Up The Cross-Development Environment

    rBOX630 Linux Wait to installation. Press your password. Install finish. 2.2.2 Setting Up the Cross-Development Environment Before you can develop using the cross-toolchain, you need to set up the cross-development environment, and then you can find this script in the directory you chose for installation.
  • Page 16: How To Put And Run A Sample Program

    rBOX630 Linux How to Put and Run a Sample Program In this section, we provide 3 methods showing how to put the ‘hello’ program into rBOX630 and execute it. 2.3.1 Via FTP (Default disable) The rBOX630 has a built-in FTP server. Users can put ‘hello’ program to rBOX630 via FTP by following the steps below.
  • Page 17: Via Usb Flash Drive

    rBOX630 Linux ftp> put hello If the operation is successful, you can see ‘hello’ program at rBOX630’s /home/root directory. ~# chmod +x hello Run the ‘hello’ program. ~# ./hello 2.3.2 Via USB Flash Drive Another method of putting ‘hello’ program into rBOX630 is via USB flash drive. Please follow the instructions below.
  • Page 18: Via Tftp

    rBOX630 Linux 2.3.3 Via TFTP Originally the Host Development System Installation already has TFTP server installed. You can put the ‘hello’ program into rBOX630 via TFTP. Please follow the instructions below. ~$ cp hello /tftpboot ~# tftp -g -r hello 192.168.0.3 (tftp server IP) ~# chmod +x hello Run the ‘hello’...
  • Page 19: The Embedded Linux

    rBOX630 Linux Chapter 3 The Embedded Linux Embedded Linux Image Managing 3.1.1 System Version This section describes how to determine system version information including kernel and root filesystem version. Check kernel version with the following command: ~# uname -r Check root filesystem with the login screen: 3.1.2 System Time System time is the time value loaded from RTC each time the system boots up.
  • Page 20: External Rtc Time

    rBOX630 Linux 3.1.4 External RTC Time The external RTC time is read from RS5C372 external RTC. When system power is removed, this time value is kept as RS5C372 is powered by battery. Read external RTC time with the following command: ~# hwclock -r 3.1.5 Adjusting System Time...
  • Page 21: Networking

    rBOX630 Linux Networking FTP – File Transfer Protocol 3.2.1 FTP is a standard network protocol used to transfer files from one host to another host over TCP-based network. The rBOX630 comes with a built-in FTP server. Section 2.1 shows the steps to put ‘hello’ program to rBOX630 via FTP.
  • Page 22 rBOX630 Linux This page is intentionally left blank. The Embedded Linux...
  • Page 23: Programming Guide

    rBOX630 Linux Chapter 4 Programming Guide We release a set of application programming interface (API) functions for users to access/control hardware. With these API functions, users can more easily design their own software. This chapter includes detailed description of each API function and step-by-step code samples showing how it works.
  • Page 24 rBOX630 Linux Function: Get_BoardID() Function __u16 Get_BoardID(void); Description Get board ID. Arguments None. Return Board ID (in 2 bytes pattern). Others None. Function: Get_PowerStatus() Function int Get_PowerStatus(int number); Description Get power status. Arguments number: Power number. 0: Power1. 1: Power2. Return 0: Power fails.
  • Page 25 rBOX630 Linux Function: Get_COMType() Function int Get_COMType(int number); Description Get COM port communication mode type. Arguments number: COM port number. 1: COM1. 2: COM2. 3: COM3. 4: COM4. Return 0: Reserved. 1: RS232 Enable. 2: RS422/RS485_4W Enable. 3: RS485_2W Enable. Others None.
  • Page 26 rBOX630 Linux Function: Set_COMTermination() Function int Set_COMTermination(int number, int onoff); Description Set termination of specified COM port. Arguments number: COM port number. 1: COM1. 2: COM2. 3: COM3. 4: COM4. onoff: Enable or disable termination. 1: Enable termination. 0: Disable termination. Return 0: No error.
  • Page 27 rBOX630 Linux Function: CPLD_WDTStatus() Function __u8 CPLD_WDTStatus(void); Description Detect watchdog timer status. Arguments None. Return 0: If watchdog timer has not been triggered, return value = 0. 1: If watchdog timer has been triggered, return value = 1. Others None. Function: Get_DI() Function int Get_DI(__u8 *data);...
  • Page 28: Librb217 Api Examples

    rBOX630 Linux Function: Set_CANTermination() Function int Set_CANTermination(int number, int onoff); Description Set termination of specified CAN port. Arguments number: CAN port number. 0: CAN0. 1: CAN1. onoff: Enable or disable termination. 1: Enable termination. 0: Disable termination. Return 0: No error. 1: Function fails.
  • Page 29: Watchdog Timer

    rBOX630 Linux 4.2.3 Watchdog Timer Software stability is major issue in most application. Some embedded systems are not watched by human for 24 hours. It is usually too slow to wait for someone to reboot when system hangs. The systems need to be able to reset automatically when things go wrong.
  • Page 30: Digital Input And Output

    rBOX630 Linux 4.2.4 Digital Input and Output The digital related API functions allow users to set digital output signals to high or low and detect signal state from each digital channel. unsigned char xch; Get_DI(&xch); printf("Current Digital-Input Data is %2X\n",xch); Set_DO(0xAA);...
  • Page 31: Can Bus

    rBOX630 Linux CAN Bus The Controller Area Network (CAN) bus is a serial bus protocol that usually used in connecting intelligent industrial device networks and building smart automatic control systems. Use the SocketCAN API to read and write to CAN bus on rBOX630. An example program showing how it works is provided below.
  • Page 32 rBOX630 Linux char *ifname = "can0"; char *ifname1 = "can1"; if((s = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0) { perror("Error while opening socket"); return -1; if((s1 = socket(PF_CAN, SOCK_RAW, CAN_RAW)) < 0) { perror("Error while opening socket"); return -1; strcpy(ifr.ifr_name, ifname); strcpy(ifr1.ifr_name,ifname1);...
  • Page 33: Compile Demo Program

    rBOX630 Linux Compile Demo Program 4.4.1 Install Yocto Toolchain Before you develop and compile sample program, you should install Yocto toolchain into development PC. To do so, refer to Chapter 5 Board Support Package. To compile and build demo program for rBOX630, please do: Change to your project directory.
  • Page 34 rBOX630 Linux This page is intentionally left blank. Programming Guide...
  • Page 35: Board Support Package (Bsp)

    rBOX630 Linux Chapter 5 Board Support Package (BSP) Host Development System Installation 5.1.1 Install Host System Download Ubuntu 14.04 LTS iso image. Install Ubuntu 14.04. Install host packages needed by Yocto development as follows: ~$ sudo apt-get install wget git-core unzip texinfo libsdl1.2-dev gawk diffstat ~$ sudo apt-get install build-essential chrpath sed cvs subversion coreutils ~$ sudo apt-get install texi2html docbook-utils python-pysqlite2 help2man ~$ sudo apt-get install make gcc g++ desktop-file-utils libgl1-mesa-dev...
  • Page 36: Install Yocto Development

    ~$ mkdir fsl-community-bsp ~$ cd fsl-community-bsp ~$ repo init -u https://github.com/Freescale/fsl-community-bsp-platform -b dora ~$ repo sync Extract Axiomtek’s Yocto BSP source ~$ tar zxvf meta-axiomtek-x.x.x.tar.gz -C fsl-community-bsp/sources Update bblayers.conf ~$ vi fsl-community-bsp/sources/base/conf/bblayers.conf And add this line after ${BSPDIR}/sources/meta-fsl-demos \ ${BSPDIR}/sources/meta-axiomtek \...
  • Page 37: Build And Install Yocto Toolchain

    rBOX630 Linux 5.1.3 Build and Install Yocto toolchain Build the toolchain for rBOX630 from Yocto development. Change to Yocto development directory. ~$ cd fsl-community-bsp ~$ source setup-environment build ~$ bitbake meta-toolchain-sdk After these steps to generate the toolchain into the Build Directory. Install the toolchain into your host system /opt directory.
  • Page 38: U-Boot For Rbox630

    rBOX630 Linux U-Boot for rBOX630 5.2.1 Booting the System with an NFS Filesystem By default, U-Boot is configured to boot from SD CARD. To boot from NFS, first you must set some configurations. Press any key to break from the boot progress and set configurations.
  • Page 39: Booting The System From Emmc (Rbox630 Default)

    rBOX630 Linux 5.2.2 Booting the System from eMMC (rBOX630 default) MX6SDL Q7M120 U-Boot > run bootcmd_emmc 5.2.3 Booting the System from SD CARD MX6SDL Q7M120 U-Boot > run bootcmd_sd Board Support Package (BSP)
  • Page 40: Additional Information

    rBOX630 Linux Additional Information 5.3.1 Create a Bootable SD CARD for rBOX630 1. Copying the Boot Loader image. ~$ sudo dd if=./u-boot.bin of=/dev/sdb bs=512 seek=2 skip=2 conv=fsync The first 1KB of the SD card, that includes the partition table, will be preserved 2.
  • Page 41 rBOX630 Linux Board Support Package (BSP)
  • Page 42 rBOX630 Linux Run the following command to format the partition ~$ sudo mkfs.vfat /dev/sdb1 ~$ sudo mkfs.ext3 /dev/sdb2 Copy the target file system to the partition ~$ mkdir /home/user/mountpoint ~$ sudo mount /dev/sdb2 /home/user/mountpoint Extract rootfs package to certain directory ~$ sudo tar zxf rootfs.tar.gz -C /home/user/mountpoint Make sure that the device node is correct for the SD CARD.

Table of Contents