Table of Contents

Advertisement

Quick Links

LxNETES™ User's Guide
ConnectCore 9P 9360/9750

Advertisement

Table of Contents
loading

Summary of Contents for Digi 9P 9360/9750

  • Page 1 LxNETES™ User’s Guide ConnectCore 9P 9360/9750...
  • Page 3 The Digi logo is a registered trademarks of Digi International, Inc. All other trademarks mentioned in this document are the property of their respective owners. Information in this document is subject to change without notice and does not represent a commitment on the part of Digi International.
  • Page 5: Table Of Contents

    Contents • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Chapter 1 Introduction...
  • Page 6 Manual Installation ...27 Chapter 4 Building the First Project... 29 Building the Default Project ...29 Step 1: Run configure ...29 Example: ...29 Step 2: Run make...30 Step 3: Run make install ...30 Chapter 5 Application Development... 31 Writing applications...31 Adding your own applications...31 Example: ...31 Using C++...32 Included example applications ...32...
  • Page 7 Introduction...44 U-Boot ...44 ConnectCore 9P 9360/9750 ...45 Linux boot methods ...46 TFTP/NFS...46 NAND-Flash ...46 NOR Flash ...47 USB...47 Linux boot process...48 Passing arguments to the kernel...50 Automating the image download ...50 Updating the Flash memory...50 Updating a running system (the easy way) ...51 Updating a running system manually ...51...
  • Page 8 LCD interface ...62 Touch screen interface ...62 CC9P9360/9750...62 Compact flash interface ...63 CC9P6360/9750...63 SD card interface ...63 Real time clock (RTC)...63 How to set the initial system date and time ...63 PCI interface ...64 Appendix A ... 65 Related documentation ...65 CD contents ...65 Readme.txt ...66 RelNotes.txt ...66...
  • Page 9: Chapter 1 Introduction

    Introduction Overview The LxNETES package enables you to easily develop software under Linux 2.6 for Digi International and FS Forth-Systeme embedded modules supported in this release of LxNETES. This document assumes that you have basic knowledge of Linux. In addition, it is recommended that you have experience with compiling a standard Linux kernel on your host PC.
  • Page 10: Linux Kernel Sources

    O v e r v i e w Linux kernel sources The LxNETES package contains the complete source code of the Linux kernel. This allows you to configure, modify, and create a custom kernel to your specific embedded system’s needs. Although the kernel sources are the official distribution, some modifications have been made to adapt the sources to the supported platforms.
  • Page 11: Features

    Features What’s new in LxNETES 3.2? Linux Kernel Linux Kernel 2.6.12.5 Added touch screen driver for the ConnectCore 9P family Added RTC driver for the ConnectCore 9P family Build process based on autoconf Bootloader New U-Boot boot loader, based on version 1.1.3 Tool chain gcc-3.4.4 cross compiler for NET+ARM, ARM, and XScale processors For existing LxNETES customers: LxNETES 3.2 uses a different uClibc than...
  • Page 12 F e a t u r e s Drivers for the following module components and interfaces: – SDRAM memory – Flash memory – Ethernet – USB Host – Serial – – – GPIO – Watchdog – LCD Framebuffer – Compact Flash Cards –...
  • Page 13: Conventions Used In This Manual

    Autoconf driven build process All building can be done without root access This LxNETES version can coexist with older installations of LxNETES Conventions used in this manual The following is a list of the typographical conventions used in this manual: Style Style Style...
  • Page 14: Acronyms And Abbreviations

    F e a t u r e s This is a target session And this is what you must input (in bold) Acronyms and abbreviations CRAMFS ROOTFS Common Gateway Interface Compressed ROM File system DHCP Dynamic Host Configuration Protocol (RFC 2131) GNU debugger GPIO General Purpose Input/Output...
  • Page 15: Chapter 2 Requirements

    Requirements System Requirements/Prerequisites System requirements Your development system should be a reasonably fast x86-based host PC with an Ethernet interface, a serial port, and a parallel port. Different Linux distributions such as SuSE, Debian, or RedHat can be used for the development.
  • Page 16: Disk Space

    S y s t e m R e q u i r e m e n t s / P r e r e q u i s i t e s DOS or DOS-emulator (such as dosemu) Optional but recommended components: Qt3 development tools For using LxNETES, a recent Linux distribution based on GNU C Library glibc version 2.3 (a free implementation of the Standard C Library) is needed.
  • Page 17: Applications & Services

    Applications & Services To use this software, your system has to be configured to build a standard Linux 2.6. If you can build a kernel for your development platform, you can be sure that all the necessary software is installed. Depending on the network services used during the development, additional daemons may have to be installed.
  • Page 18: Nfs Server

    S y s t e m R e q u i r e m e n t s / P r e r e q u i s i t e s NFS server Use the network file system (NFS) to simplify application debugging on the target. NFS allows your target to mount its root file system with read/write permissions from the host computer over Ethernet.
  • Page 19: Jtag-Booster

    R e q u i r e m e n t s After modifying the exports file, the NFS server has to be restarted with the following command: /etc/init.d/nfs-kernel-server restart JTAG-Booster The JTAG-Booster software for hardware Flash updates is a DOS application. It must be installed on a native DOS / Windows host or a virtual machine like "dosemu"...
  • Page 20 S y s t e m R e q u i r e m e n t s / P r e r e q u i s i t e s L x N E T E S U s e r ’ s G u i d e...
  • Page 21: Chapter 3 Getting Started

    Getting Started Introduction This chapter describes how to configure and test your host PC and development board (target) and how to start up the device for the very first time. Connecting host PC with development board Step 1: Connect serial port Connect the host PC to the development board (target) using a serial null-modem cable.
  • Page 22: Minicom

    I n t r o d u c t i o n To use a terminal client as non-root user, either you need read/write access to /dev/ttyS<n> or the client has to be setuid root. Unless otherwise stated, it is assumed your target is connected to the first serial port (COM 1, ttyS0) of your host.
  • Page 23: Step 4: Connect Power

    G e t t i n g S t a r t e d Figure 3-2: Seyon Settings Step 4: Connect power Connect the included power supply to the development board. After power-on, the LEDs on the board will light up and 2-4 seconds later the system will print boot messages on the console.
  • Page 24: Step 5: Test Ethernet Configuration

    I n t r o d u c t i o n U-Boot 1.1.3 U-Boot code: 20F00000 -> 20F1529C RAM Configuration: Bank #0: 20000000 32 MB AM29LV128M (16MB) Flash: 16 MB serial Out: serial Err: serial Hit any key to stop autoboot: ## Booting image at 20100000 ...
  • Page 25: Installing Lxnetes

    The target network parameters can be changed in U-Boot using the "setenv" command. You can see the IP address of the target by issuing this command: ifconfig eth0 Link encap:Ethernet inet addr:192.168.42.10 UP BROADCAST RUNNING MULTICAST RX packets:3453 errors:0 dropped:0 overruns:0 frame:0 TX packets:62 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:399740 (390.3 KiB)
  • Page 26: Guided Installation

    G u i d e d I n s t a l l a t i o n The mount point of the CD drive depends on your distribution. SuSE e.g. uses "/mnt/cdrom" as the default mount point. Check your "/etc/fstab" or ask your Administrator to do this for you.
  • Page 27: Manual Installation

    G e t t i n g S t a r t e d Manual Installation Instead of using the installation script you can do the installation manually. Just copy the directory "LxNETES" on the CDROM to a directory on your host PC.
  • Page 28 M a n u a l I n s t a l l a t i o n L x N E T E S U s e r ’ s G u i d e...
  • Page 29: Chapter 4 Building The First Project

    Building the First Project Building the Default Project Until now you have worked with the pre-loaded, default kernel image on the target. The next step is to rebuild it on your development host PC to familiarize yourself with the build process. Step 1: Run configure Start a new shell and change into your LxNETES installation directory.
  • Page 30: Step 2: Run Make

    B u i l d i n g t h e D e f a u l t P r o j e c t ConnectCore 9P 9750: cc9p9750dev Please check if the script used the correct platform and detected the right directory to install the kernel and the nfsroot directory.
  • Page 31: Chapter 5 Application Development

    Application Development Writing applications The user applications are stored in subdirectory apps/ of the project folder. The template project includes several demo applications for use as templates to begin developing your own programs. They will automatically build and copy to the folder “/usr/bin/”...
  • Page 32: Using C

    W r i t i n g a p p l i c a t i o n s Using C++ A sample C++ application “hello_world” is included in “apps/misc/src/hello_world”. You can use this sample application as a template to develop your own C++ applications. Just use add_app as above and adapt the Makefile.in according to hello_world_cpp/ Makefile.in Included example applications...
  • Page 33 A p p l i c a t i o n D e v e l o p m e n t Table 6-3: /proc/cpuinfo contents...
  • Page 34: Debugging Applications

    D e b u g g i n g a p p l i c a t i o n s Debugging applications The purpose of a debugger is to allow you to see what is going on his own programs while they execute.
  • Page 35 In the debug interface type (gdb) set architecture ARCHITECTURE (gdb) set solib-absolute-prefix <INSTALL_DIR> (gdb) target remote TARGET.IP:2001 The supported architectures can be displayed with the following command: (gdb) set architecture Requires an argument. Valid arguments are arm, armv2, armv2a, armv3, armv3m, armv4, armv4t, armv5, armv5t, armv5te, xscale, ep9312, iwmmxt, auto.
  • Page 36: Included Pre-Built Applications

    D e b u g g i n g a p p l i c a t i o n s Included pre-built applications The sources for the included applications can be found in the software folder on the LxNETES CD. Shell applications: busybox The “busybox”...
  • Page 37: Nano-X/Microwindows

    Nano-X/microwindows Nano-X makes it possible to write applications using the framebuffer with an API similar to Xlib. There are two demo applications. To use either you must start with the nano-X server. nano-X & and then the application. nanox_bar & On targets with small flash, nano-X is disabled by default.
  • Page 38: Useful Applications

    U s e f u l a p p l i c a t i o n s Useful applications With this application you can read and write the contents of the SDRAM. All the options of this tool are accessible through a command line. Just type an 'h' to list all the available commands: ->...
  • Page 39: Chapter 6 Kernel Development

    Kernel Development Writing kernel modules What is a kernel module? Modules are pieces of code that can be loaded and unloaded into the kernel upon demand. They are useful because they extend the functionality of the kernel without the need to reboot the system. A typical kernel module is the device driver, which allows the kernel to access hardware connected to the system.
  • Page 40: Add The Module To The Build Environment

    W r i t i n g k e r n e l m o d u l e s Add the module to the build environment You have to edit "my_kmodule/Makefile.in" so that the build environment knows what files to build. To include them for the target build, append them to obj-m like "obj-m += my_module.o".
  • Page 41: Chapter 7 Advanced Topics

    Advanced Topics Modifying the default project The following information is the default kernel configuration for LxNETES: serial baudrate 38400 bps Ethernet enabled uses devfs per default The default configuration is made up of 2 layers: Kernel command line parameters: set by U-Boot Kernel configuration: lowest priority The kernel command line parameters can overwrite some configurations.
  • Page 42 M o d i f y i n g t h e d e f a u l t p r o j e c t Once you have configured the kernel to your system needs, save the configuration and exit.
  • Page 43: Building A Custom Project

    Building a custom project To create a custom project, that is a project for your custom hardware, first configure the default project. Follow the steps described in "Building the Default Project" up to running configure. Then run: ~/LxNETES-3.2/build$ bin/add_platform –b cc9p9360dev custom checking whether make sets $(MAKE)...
  • Page 44: Boot Process

    B o o t p r o c e s s Boot process This chapter describes the boot process of U-Boot and Linux. Introduction A boot loader is a small piece of software that executes soon after powering up a computer.
  • Page 45: Connectcore 9P 9360/9750

    ConnectCore 9P 9360/9750 On the ConnectCore 9P 9360 and ConnectCore 9P 9750 modules, the SPI boot loader is loaded from the SPI EEPROM which initializes the RAM. Then additional code (~1kB) is loaded into RAM (address 0x0). This code loads U-Boot from NAND flash and executes In the next step, U-Boot configures the serial console, the Ethernet interface and the Flash memory and loads the settings stored as environment variables in the nonvolatile memory.
  • Page 46: Linux Boot Methods

    L i n u x b o o t m e t h o d s Linux boot methods Linux is booted by U-Boot in one of the following ways: TFTP/NFS Flash memory USB storage device (e.g. an USB memory stick) The following information describes each boot method.
  • Page 47: Nor Flash

    A faster way to do this is to use the "boot_flash" macro. NOR Flash Use the following commands if you have NOR Flash (similar to booting from NAND). setenv bootargs console=... ip=$(ipaddr):$(serverip)::$(netmask):2440:eth0:off root=/dev/mtdblock2 rootfstype=jffs2 cp.b <start flash> <load_addr> <kernel_image_size> bootm <load_addr> A faster way to do this is to use the "boot_flash"...
  • Page 48: Linux Boot Process

    L i n u x b o o t p r o c e s s Update the kenel from the USB stick to the memory and write it to flash memory. run update_kernel_usb Linux boot process The command “bootm” uncompress the kernel and runs the function start_kernel(). Once the kernel is started, several options are given to the kernel: machine type, command line and ATAG list.
  • Page 49 A d v a n c e d T o p i c s Uncompressing Linux... done, booting the kernel. Linux version 2.6.12.5-fs.1 (jdietsch@onyx.fsforth.de) (gcc version 3.4.4) #1 Mon Sep 19 17:30:44 CEST 2005 CPU: ARM926EJ-Sid(wb) [41069264] revision 4 (ARMv5TEJ) CPU0: D VIVT write-back cache CPU0: I cache: 8192 bytes, associativity 4, 32 byte lines, 64 sets CPU0: D cache: 4096 bytes, associativity 4, 32 byte lines, 32 sets...
  • Page 50: Passing Arguments To The Kernel

    L i n u x b o o t p r o c e s s If a wrong command line parameter for "console=" is used, nothing will be displayed after "done, booting the kernel". The system may continue to boot. You may connect to the target by Telnet after telnetd is configured .
  • Page 51: Updating A Running System (The Easy Way)

    Updating a running system (the easy way) On a running system, that is a system able to start the boot loader, U-Boot contains pre- defined macros that can update the on-module flash memory. If the boot loader is corrupted, you have to first use a debugger to restore the boot loader which then can be used to restore the remaining images.
  • Page 52: Step 1: Download The New Image File To Ram

    L i n u x b o o t p r o c e s s Step 1: Download the new image file to RAM The first step is to download the image into RAM. Specify the start address, the end address, and the size of the image in RAM, for example: mw.l <start address in RAM>...
  • Page 53: Connectcore 9P 9360/9750

    A d v a n c e d T o p i c s For modules with NOR flash, use this command: cp.b <start address in RAM> <start address in Flash> <image size> ConnectCore 9P 9360/9750 The following commands are to update the U-Boot loader, Kernel image, and Root file system.
  • Page 54: Updating A Corrupted System Using A Debugger

    U p d a t i n g a c o r r u p t e d s y s t e m u s i n g a d e b u g g e r Updating a corrupted system using a debugger ConnectCore 9P 9360/9750 If the Flash memory has become corrupted and the system cannot boot anymore, then the Flash memory must be re-programmed using the JTAG interface and the JTAG-Booster.
  • Page 55: Chapter 8 Root File System Types

    Root File System Types The following describes the different possibilities which can be used as root file system. The type of rootfs must be passed as an argument to kernel by means of the bootargs environment variable of U-Boot. NFSROOT The rootfs may be in a different computer on the network and not within the target.
  • Page 56: Step 1: Set Bootargs To Be Passed To The Kernel

    run boot_net This script does three steps (that you can also do manually): Step 1: Set bootargs to be passed to the kernel The environmental variable bootargs must be updated to tell Linux that the rootfs is taken via NFS. To manually do this enter the following commands (it is supposed that the network variables serverip and nfspath have been already set).
  • Page 57: Jffs2

    JFFS2 JFFS is a log-structured journaling flash file system which was designed to be used on Flash devices in embedded systems. It was originally developed for the 2.0 kernel by Axis Communications. JFFS2 is an improved version of JFFS which includes compression and improved read/write access.
  • Page 58: Step 1: Set Bootargs To Be Passed To The Kernel

    jffs2_get_inode_nodes(): Data CRC failed on node at 0xXX XXXXXX: Read 0xXXXXXXXX, calculated 0xXXXXXXXX The message above is printed if the file system was not cleanly unmounted. The system should not be powered off before all partitions are unmounted. After a clean unmount, the message should disappear.
  • Page 59 R o o t F i l e S y s t e m T y p e s You should use a separate data partition for your data which is frequently updated so your rootfs does not get corrupted.
  • Page 60 L x N E T E S U s e r ’ s G u i d e...
  • Page 61: Chapter 9 Interfaces & Devices

    Interfaces & Devices The following interfaces and devices are supported in the current LxNETES version: a9m2410 Compact Flash Ethernet I2C Interface SD card Serial Touch screen USB Host Refer to the documentation that came with the development board for the location of the interfaces on the board as well as any board configuration required to enable these interfaces.
  • Page 62: Usb Host Interface

    USB host interface A USB host driver is included and enabled in the default kernel configuration. To operate multiple USB devices simultaneously, connect a USB hub to the USB host port. A memory stick can be mounted as followed lxmount usb ls -l /media/usbdisk I2C interface A driver for the I2C interface is included and enabled in the default kernel configuration.
  • Page 63: Compact Flash Interface

    Compact flash interface CC9P6360/9750 A driver for the internal Compact Flash (CF) card interface is included and enabled in the default kernel configuration. A CF card can be mounted as follows lxmount cf ls -l /media/cf SD card interface A SD card can be mounted as follows: lxmount sd ls -l /media/sd Real time clock (RTC)
  • Page 64: Pci Interface

    The next step is to store this information into the RTC. Use the application hwclock: hwclock Fri Jun 3 13:22:44 UTC 2005 0.000000 seconds Now you can reset or power off your target. The small battery on the development board will keep the correct time/date values and are saved when you power up your target again.
  • Page 65: Appendix A

    Appendix A • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • Related documentation http://www.modarm9.com http://www.fsforth.de...
  • Page 66: Readme.txt

    R e l a t e d d o c u m e n t a t i o n There following folders are on the CD: Readme.txt Briefly describes LxNETES and lists the CD contents. RelNotes.txt Contains the last release information. install.sh A script to install LxNETES on your host computer.
  • Page 67: Connectcore 9P 9360 (Cc9P9360)

    ConnectCore 9P 9360 (CC9P9360) File u-boot-cc9p9360dev.bin U-Boot boot loader image for the ConnectCore 9P 9360 module on the ConnectCore 9P development board. uImage-cc9p9360dev.bin Linux kernel image for the ConnectCore 9P 9360 module on the ConnectCore 9P development board. rootfs-cc9p9360dev.jffs2 Root file system for the ConnectCore 9P 9360 module. ConnectCore 9P 9750 (CC9P9750) File u-boot-cc9p9750dev.bin...
  • Page 68: Upstream

    M e m o r y l a y o u t s upstream LxNETES is based on various open source projects. The original source code from these projects is stored in this folder. The following source code is included: Linux Buildroot U-Boot...
  • Page 69: Connectcore 9P 9360 / Connectcore 9P 9750

    ConnectCore 9P 9360 / ConnectCore 9P 9750 RAM Start Address 0x00000000 0x00080000 0x00080000 0x00080000 0x000C0000 0x00100000 0x00108000 RAM End Description Address U-Boot stack TEXT_BASE U-Boot default load address in U- Boot for Linux kernel entry point of the decompressed kernel Used by U-Boot Linux...
  • Page 70 M e m o r y l a y o u t s L x N E T E S U s e r ’ s G u i d e...
  • Page 71: Appendix B

    Appendix B • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • • U-Boot command reference This chapter gives an overview of common used U-Boot commands.
  • Page 72 U - B o o t c o m m a n d r e f e r e n c e help - alias for 'help' autoscr - run script from memory base - print or set address offset bdinfo - print Board Info structure boot...
  • Page 73 Each of these commands has additional help available, which can be viewed by entering help <command>. All numeric values, which are needed for different commands, are interpreted as HEX values. Entering 30100000 means 0x30100000.To speed up programming, the real size of the image files can be used. In the commands above we have used the maximum size of the partition instead of the actual size of the image files (0x180000 words = 3 Mb) The following table explains some of the more often used commands:...
  • Page 74 U - B o o t c o m m a n d r e f e r e n c e fatload usb DEV:PART ADDR image help help ITEM Note that not all U-Boot commands are supported by every platform. The following table shows which are available: a u t o s c r b a s e...
  • Page 75: User Keys

    The command “run” allows to execute variables as sequence od commands. Here values of other variables could be used to simplify the scripts. (e.g. $(filesize) ) Example (A9M24x0): The following variables are available: ipaddr = 192.168.42.10 serverip = 192.168.42.1 loadaddress = 0x30100000 bootfile = uImage-a9m2410dev setenv bootcmd tftp\;bootm This command is identical with:...

This manual is also suitable for:

Connectcore 9p 9360Connectcore 9p 9750

Table of Contents