background image

Philips Semiconductors 

ISP1362 Linux Stack User’s Guide

 

 

 

UM10012-_2 

© Koninklijke Philips Electronics N.V. 2003. All rights reserved. 

User’s Guide 

Rev. 1.2—July 2003 

11 of 34  

 

3.2. 

ISP1362 Add-on Card for Intel PXA250 based Accelent IDP (Rev 04) 

Accelent Systems developed the IDP - Integrated Development Platform to speed up the embedded device 
development cycles. Accelent IDP provides a feature-rich, cost-effective development platform for embedded 
device application and product development. 

The ISP1362 Linux stack and the Accelent IDP do not support two or more boards at the same time. Therefore, 
for the ISP1362 OTG evaluation, you must have two Accelent IDPs. The ISP1362 Linux stack on Intel PXA250-
based Accelent IDP platform has been tested with AccelLinux kernel version 2.4.18. Linux kernel versions 2.4.19 
or above need a different kernel patch for OTG. Therefore, it is preferable to have Accelent IDP running on 
kernel version 2.4.18. 

The following figure shows the development environment for Intel PXA250 based Accelent IDP with the ISP1362 
evaluation kit. 

 
 
 
 
 
 
 
 
 
 

Figure 3-2 Development setup for Intel PXA250 Based Accelent IDP 

 
The following are the requirements for evaluating the ISP1362 stack on Accelent IDP: 

• 

Two Intel PXA250-based Accelents IDPs 

• 

PC host running the Linux operating system 

• 

Installation CD for Accelent IDP 

3.2.1. 

Setting Up the ISP1362 Add-On Card 

The ISP1362 add-on card can be configured in various modes of the ISP1362: the host-only mode and the OTG 
mode. The OTG mode is the default mode for the add-on card as well as the ISP1362 Linux stack. Make sure that 
the ISP1362 add-on card is configured in the OTG mode before using the software. For more information on 
hardware setup, refer to the 

ISP1362 OTG Add-On Evaluation Kit with Intel PXA250 IDP

 document. 

3.2.2. 

Host PC Setup 

 
Keep the Intel PXA250 based Accelent IDP installation CD on the CDROM drive. 

3.2.2.3.Kernel Requirements 

 
The Linux kernel on the Host PC should support ncurses library.  

3.2.2.4.ARM Cross Compiler 

 

The ARM toolchain can be copied from the CD provided by the Accelent (

arm-linux-gcc2953.tar.bz2

). 

Don't bother trying to build the tool chain from scratch. The toolchain version 2.95.3 works very well. Don’t use 
any of the gcc-3x compilers yet- they generate bad code for ARM in certain instances. Usually the ARM toolchain 
should be unzipped in the root directory / of the host PC, using command:  

Serial Port Cable

Ethernet Cable 

 
LAN 

PC Host 
Running Linux  

Accelent IDP 
Running Linux  

Summary of Contents for ISP1362

Page 1: ...uct Innovation Centre Visit www semiconductors philips com buses usb or www flexiusb com User s Guide Rev 1 2 Revision History Version Date Description Author 1 2 Jun 2003 Additions for Accelent IDP platform Rev 04 Srinivas Yarra 1 1 Nov 2002 Additions for Aaccelent IDP platform Srinivas Yarra 1 0 Oct 2002 First release Srinivas Yarra ...

Page 2: ...L WARRANTIES INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OF MERCHANT ABILITY FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT THE ENTIRE RISK ARISING OUT OF THE USE OR PERFORMANCE OF THE PRODUCT AND DOCUMENTATION REMAINS WITH THE RECIPIENT TO THE MAXIMUM EXTENT PERMITTED BY APPLICABLE LAW IN NO EVENT SHALL PHILIPS SEMICONDUCTORS OR ITS SUPPLIERS BE LIABLE FOR ANY CONSEQUENTIAL INCIDENT...

Page 3: ... 3 1 3 Setting Up the Software 9 3 2 ISP1362 ADD ON CARD FOR INTEL PXA250 BASED ACCELENT IDP REV 04 11 3 2 1 Setting Up the ISP1362 Add On Card 11 3 2 2 Host PC Setup 11 3 2 3 Accelent IDP Rev 04 Target Setup 13 3 3 ISP1362 ADD ON CARD FOR INTEL PXA250 BASED ACCELENT IDP REV 02 14 3 3 1 Setting Up the ISP1362 Add On Card 15 3 3 2 Host PC Setup 15 3 3 3 Accelent IDP Setup 18 4 OPERATING THE ISP1362...

Page 4: ...4 of 34 5 CONFIGURATION 30 5 1 COMPILATION FLAGS 30 5 1 1 Global 30 5 1 2 Host Controller Driver 30 6 INSIDE THE ISP1362 LINUX STACK 31 6 1 TOP LEVEL DIRECTORY 31 6 2 HOST 31 6 2 1 phci 31 6 3 DEVICE 31 6 3 1 pdc 32 6 3 2 devmscd 32 6 3 3 diskemu 32 6 4 OTG 32 6 5 HAL 33 6 5 1 x86pci 33 6 6 APPL 33 6 6 1 otgmsdemo 33 6 6 2 tools 34 6 7 OBJS 34 7 REFERENCES 34 ...

Page 5: ...osing the session after connected device data access 28 Figure 4 10 Operations with OTG A and B devices 29 Tables Table 4 1 OTG Command Line tool Options 26 Table 5 1 Global Compilation Flags 30 Table 5 2 Host Controller Driver Compilation Flags 30 Table 6 1 Top Level Directory Contents 31 Table 6 2 Contents of the host Directory 31 Table 6 3 Contents of the phci Directory 31 Table 6 4 Contents of...

Page 6: ... Using the ISP1362 Linux stack the ISP1362 can function as A standard USB full speed mass storage device when connected to a PC running any OS A USB full speed OTG mass storage device when connected to any OTG device A USB host when connected to USB peripherals OTG and non OTG The ISP1362 Linux stack is a group of kernel and application modules arranged such that the code can be easily ported to a...

Page 7: ...iver and the mass storage class driver The DCD is responsible for data transfer over the USB bus The USB protocol driver responds to the standard USB protocol requests The mass storage class driver adds the mass storage functionality to the USB device and responds to the mass storage class commands and protocol The mass storage needs to interface with the physical mass storage device to perform it...

Page 8: ...hese are written for the demo 2 5 Porting Modules 2 5 1 Hardware Access Layer Driver The core modules of the ISP1362 Host Controller Driver Device Controller Driver and OTG driver communicate with the ISP1362 hardware through this driver Since hardware access is mostly platform dependent this module must be ported to the target platform This driver provides an interface to the ISP1362 registers an...

Page 9: ...g Up the ISP1362 Evaluation Kit The ISP1362 PCI evaluation kit can be configured in various modes of the ISP1362 the host only mode the peripheral only mode and the OTG mode The OTG mode is the default mode for the evaluation kit as well as the ISP1362 Linux stack Make sure that the ISP1362 evaluation kit is configured in the OTG mode before using the software If you want to use any other mode of ...

Page 10: ... b Loadable module support enable all options c Loop back device support in block devices d Any other USB options that need to be enabled 5 Reboot the PC with the new kernel and the ISP1362 PCI evaluation kit 3 1 3 2 Setting Up the ISP1362 Linux Stack 1 Go to the ISP1362 Linux software stack source top directory cd usr src linux otg 1362 source 2 Edit the Rules Make file for any changes in the com...

Page 11: ...owing are the requirements for evaluating the ISP1362 stack on Accelent IDP Two Intel PXA250 based Accelents IDPs PC host running the Linux operating system Installation CD for Accelent IDP 3 2 1 Setting Up the ISP1362 Add On Card The ISP1362 add on card can be configured in various modes of the ISP1362 the host only mode and the OTG mode The OTG mode is the default mode for the add on card as wel...

Page 12: ...bin2bin foxfox mkfs jffs2 padkernel py 3 2 2 5 Linux Kernel source The Linux kernel can be installed in to the PC host from the source code provided by the Accelent CD Create a directory for the source code example usr src AccelentIDPRev4 and go to the directory cd usr src AccelentIDPRev4 bzip2 cd mnt cdrom Source kernel linux 2 4 18 tar bz2 tar xfv bzip2 cd mnt cdrom Source kernel patch 2 4 18 rm...

Page 13: ...age modules modules_install jffs_rootfs jffs_image As a result a number of files starting with nk_ will be created in the root Linux directory nk_jffs_flash bin This image includes the kernel and root filesystem nk_kernel_flash bin This image is just the kernel image useful if you already have a good root fs image and just need to reflash the new kernel nk_kernel bin This is an image that will be ...

Page 14: ... setup for the Accelent IDP for ISP1362 Linux stack Note that you need to execute this script for the first time only Connect the Accelent IDP to the Linux host system as a mass storage device and perform the following steps on the host system 4 Initialize and load the ISP1362 stack on to the target system as outlined in Section 4 2 and connect the Accelent IDP to the host Linux PC as a mass stora...

Page 15: ...tallation CD for Accelent IDP 3 3 1 Setting Up the ISP1362 Add On Card The ISP1362 add on card can be configured in various modes of the ISP1362 the host only mode and the OTG mode The OTG mode is the default mode for the add on card as well as the ISP1362 Linux stack Make sure that the ISP1362 add on card is configured in the OTG mode before using the software For more information on hardware set...

Page 16: ... root file system for loading into the target cp mnt cdrom tools utils bin cd bin chmod x bin2bin foxfox mkfs jffs2 padkernel py 3 3 2 10 Linux Kernel source The Linux kernel can be installed in to the PC host from the source code provided by the Accelent CD Copy the source code linuxtar bz2 from Accelent CD to known directory example usr src cd usr src bzip2 cd mnt cdrom source linuxtar bz2 tar x...

Page 17: ...an option otherwise some weird compile errors will occur make menuconfig While configuring the kernel enable the following options Make the default RAM Disk size from the options of block device Default Ram disk size to 20480 We are going to use the RAM disk as mass storage disk space Enable loopback device support from block device loopback device support Enable SCSI support and SCSI disk support...

Page 18: ... Accelent IDP A null modem cable is required to connect FFUART J5 port on Accelent IDP board and a COM port host PC Set Baud rate to 115200 data bits 8 Parity none Stop bits 1 Flow control hardware 3 3 3 Accelent IDP Setup Follow the instructions given in the Quick Start Guide IDP for Intel PXA250 Applications Processor Linux OS document from the Accelent CD to set up the Accelent IDP 1 The boot l...

Page 19: ...s been successfully installed using the procedures explained in the previous chapter In the OTG configuration the ISP1362 Linux stack will act as a USB host on the standard USB port USB mass storage device on the OTG port when connected to a standard USB host via a Mini B Standard B cable USB OTG mass storage device on the OTG port when connected to other OTG devices For the limitations of the sta...

Page 20: ...ally loaded and unloaded to the kernel 1 Log on to the system as root go to the ISP1362 object directory and use the script to load modules cd home 1362 objs imod 2 If you execute the sbin lsmod command you will notice that the following modules are loaded mscd pdc phci otg hal You should also see the msdisk application running as an application process when you list the current running processes ...

Page 21: ...inux source directory and use the script to unload module cd home 1362 objs rmod If you execute the sbin lsmod command you should not see any of the following modules as loaded mscd pdc phci otg hal Also you should not see the msdisk application as a running process when you list the current running processes ps 4 3 4 Closing the ISP1362 Stack Before the Accelent IDP is shutdown you need to close ...

Page 22: ...application to work with the connected device Explanation on setting of environment for various USB devices is beyond the scope of this document 4 5 ISP1362 Device Stack Once the ISP1362 modules are loaded you can connect the ISP1362 to any other PC USB host through the Mini B to Standard B cable The ISP1362 device will appear as a mass storage device removable disk The following figure shows the ...

Page 23: ...etup Figure 4 3 OTG Stack Evaluation Setup The otgmsapp application is the OTG mass storage demo application using GTK Go to the otgmsdemo directory and launch the application cd home 1362 objs otgmsapp This program will launch a new window Note this program will work only on machines that support GTK and Windows The Accelent IDP does not support this application The following is a snapshot of the...

Page 24: ...3 24 of 34 Figure 4 4 OTG Mass Storage Application in the IDLE State Snapshot Figure 4 5 OTG Mass Storage Application in the HOST State Snapshot The application has a provision to change the state from IDLE to HOST and HOST to IDLE In the HOST state both the local OTG device disk and the remote OTG device disk connected will be mounted and available for use ...

Page 25: ...t the source and destination disks to be local or remote Figure 4 6 shows the file selection menu for the source destination disks You can delete the files from the disk by selecting the file and pressing the Delete button on the keyboard The Status Pad window shows the status of the operation with appropriate messages The application transfers files from the source disk to the destination disk on...

Page 26: ...st on the OTG port idle If the OTG device is the bus host on the OTG port de enumerates the connected USB device and comes out of the bus host load Loads OTG modules unload Unloads OTG modules mount If the OTG device is the USB bus host on the OTG port and the connected device is a mass storage device mounts both the local OTG device disk and the remote OTG device disk to the mount points umount I...

Page 27: ...eady mounted local and connected OTG mass storage disks 2 otgcmd idle This command will bring the OTG mass storage device to idle state To get the status of the OTG mass storage device at any time use the following command otgcmd status This command will print the current state of the OTG device the mount status of the local and remote connected OTG device In case of VBUS error you can clear the s...

Page 28: ...status becoming usb host mounting the connected device disks and accessing the connected OTG mass storage device A device files Figure 4 9 shows the screen captures of otgcmd o while copying files from connected OTG mass storage disk to the local disk playing an MP3 file from the connected OTG mass storage device and going back to IDLE state It also shows the screen capture of help option with otg...

Page 29: ... Semiconductors ISP1362 Linux Stack User s Guide UM10012 _2 Koninklijke Philips Electronics N V 2003 All rights reserved User s Guide Rev 1 2 July 2003 29 of 34 Figure 4 10 Operations with OTG A and B devices ...

Page 30: ...enabled the stack prints function entry traces as well as any important detail level traces PHCI_DEBUG Enables debugging for the Host Controller Driver The trace level depends on the global compilation flags CONFIG_FUNC_DEBUG and CONFIG_DETAIL_DEBUG PDC_DEBUG Enables debugging for the Device Controller Driver The trace level depends on the global compilation flags CONFIG_FUNC_DEBUG and CONFIG_DETA...

Page 31: ...ase hal ISP1362 hardware access layer directory Release appl ISP1362 OTG mass storage application modules directory release objs ISP1362 Linux stack object files directory 6 2 host The host directory consists of files and directories related to the ISP1362 host stack The contents of this directory and their description are given in Table 6 2 Table 6 2 Contents of the host Directory File Name Descr...

Page 32: ... driver interface C header file 6 3 2 devmscd The devmscd directory consists of files related to the mass storage class driver the device side and the mass storage bridge Table 6 6 shows the contents of the devmscd directory and their description Table 6 6 Contents of the devmscd Directory File Name Description release device devmscd Makefile Makefile for the device side mass storage class driver ...

Page 33: ...ng table shows the contents of this directory and their description Table 6 10 Contents of the x86pci Directory File Name Description release hal x86pci Makefile Makefile for the ISP1362 X86 PCI HAL release hal x86pci hal_pci c ISP1362 hardware access layer PCI X86 platform C source file release hal x86pci hal_pci h ISP1362 hardware access layer PCI X86 platform C header file 6 6 appl The appl dir...

Page 34: ... setup application C source file 6 7 objs The objs directory consists of files related to the compiled objects and scripts to load and unload the modules This directory initially consists of script files and once the compiled objects are installed the object files will also occupy this directory Table 6 14 Contents of the objs Directory File Name Description release objs imod Script file to load O...

Page 35: ...ww semiconductors philips com Koninklijke Philips Electronics N V 2003 All rights reserved Reproduction in whole or in part is prohibited without the prior written consent of the copyright owner The infor mation presented in this document does not form part of any quota tion or contract is believed to be accurate and reliable and may be changed without notice No liability will be accepted by the p...

Reviews: