AT75C220-DK-SMEC Development Board ............................................................................. User Guide Table of Contents Section 1 Overview............................................................................................... 1-1 1.1 1.2 1.3 Scope........................................................................................................1-1 Deliverables ..............................................................................................1-1 The AT75C220-DK-SMEC Development Board .......................................1-1 Section 2 Getting Started with the AT75C220-DK-SMEC Board ................................................................ 2-1 2.1 2.2 System Boot..............................................................................................2-1 Downloading Applications .........................................................................2-3 Section 3 The Code Generation Tools ................................................................. 3-1 3.1 3.2 3.3 Installing the Code Generation Tools........................................................3-1 Installing the Graphic Front-end for siap-uClinux-gdb ..............................3-1 Code Generation Tools .............................................................................3-1 Section 4 The Siap-uClinux Kernel....................................................................... 4-1 4.1 Installing the Siap-uClinux Kernel .............................................................4-1 4.1.1 4.2 4.3 The Application Image Directory ........................................................4-1 Building the Kernel ....................................................................................4-2 Building the Applications ...........................................................................4-2 Section 5 Programming the Flash Memory .......................................................... 5-1 5.1 5.2 Installing the Flash Memory Uploader ......................................................5-1 Programming the AT49BV1614 Flash Memory ........................................5-1 Section 6 Running a Flashless System ................................................................ 6-1 Section 7 Serial and Ethernet Cable Wiring ......................................................... 7-1 7.1 7.2 Serial Wiring..............................................................................................7-1 Ethernet Wiring .........................................................................................7-1 AT75C220-DK-SMEC Dev Board User Guide i Table of Contents ii AT75C220-DK-SMEC Dev Board User Guide Section 1 Overview 1.1 Scope The AT75C220-DK-SMEC development board enables real-time emulation and code development of applications running on an AT75C220, the Atmel Smart Internet Appliance Processor (SIAP-E). This guide focuses on the AT75C220-DK-SMEC board as a development platform. Section 1 provides an overview. Section 2 describes how to get the AT75C220-DK-SMEC board running quickly to illustrate its basic functions. Section 3 details the installation of the code generation tools. Section 4 describes how to install the kernel. Section 5 explains how to program the Flash memory for a complete bootable system. Section 6 describes how to turn the A75C220-DK-SMEC board into a Flashless system to simplify debug. Section 7 gives information on serial and Ethernet cable wiring. This document assumes that the user has an account on a PC running a recent version of Linux(R) (e.g., RedHat 7) and basic knowledge of the Linux operating system. 1.2 Deliverables The AT75C220-DK-SMEC package contains the following items: An AT75C220-DK-SMEC board A CD-ROM containing documentation, software tools, and the current siap-uClinux software set A serial cable (wiring given in Section 7) 1.3 The AT75C220DK-SMEC Development Board The main elements of the AT75C220-DK-SMEC development board are the following: The AT75C220 chip One 16-megabit Flash memory One 32-megabit static memory on daughter board connected to the extension slot Two UART interfaces A handset interface and the associated voice codec Two Ethernet 10/100 Mbps PHY interfaces Two LED groups showing Ethernet activity Two I/O extension slots, one for data and address buses, one for peripherals AT75C220-DK-SMEC Dev Board User Guide 1-1 Rev. 1789A-11/01 Overview An LCD connector for a standard 14-pin LCD module Two current jumpers to plug into a galvanometer Note: This should not be opened in any case. A clock input All I/Os of the AT75C220 are routed to peripheral connectors. This permits the developer to check the integrity of the components and to extend the features of the board by adding external hardware components or boards. Power supply is provided by a 24 VDC 250 mA external adaptor (not supplied). The JTAG interface connector allows the attachment of an emulator for the AT75C220. The serial input of the UART A enables the system to be booted from the internal Flash memory of the AT75C310 in order to download new boot code or new applications directly from the serial line. Figure 1-1 shows a functional block diagram of the AT75C220 chip. Figure 1-2 shows the AT75C220-DK-SMEC development board. 1-2 Rev. 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Overview Figure 1-1. AT75C220 Block Diagram Dual Ethernet 10/100 Mbps MAC Interface ASB Reset OakDSPCore DSP Subsystem Clocks SDRAM Controller JTAG External Bus Interface Embedded ICE SRAM Controller ARM7TDMI Core m Peripheral Data Controller AMBA Bridge SPI IRQ Controller USART 0 PIO 0 USART 1 PIO 1 Timer/Counter 0 Timer/Counter 1 Watchdog Timer Timer/Counter 2 APB AT75C220-DK-SMEC Dev Board User Guide 1-3 Rev. 1789A-11/01 Overview Figure 1-2. AT75C220-DK-SMEC Development Board Ethernet 10/100 PHY Interface B Ethernet 10/100 PHY Interface A Serial Interface A Serial Interface B Phone 24 VDC Power Supply LCD Connector Ethernet Activity LEDs Current Jumpers JTAG Connector I/O Slot SRAM Daughter Board 1-4 Rev. 1789A-11/01 Clock Input and Crystal User-defined Jumpers and Buttons AT75C220-DK-SMEC Dev Board User Guide Section 2 Getting Started with the AT75C220-DK-SMEC Development Board 2.1 System Boot The AT75C220-DK-SMEC development board is supplied with its Flash memory preprogrammed with certain applications running under the siap-uClinux operating system. To boot the system, the following steps are necessary: Connect a 24V adapter to the power plug. Connect the serial cable to J18. Connect the other end of the serial cable to a serial terminal. This can be a PC running a terminal emulator, such as Hyperterminal. The serial settings are 9600 bps, 8 bits, no parity, one stop, rts/cts flow control. Turn on the power supply, or, if it was already on, push the reset button (Z1). The siap-uClinux kernel boots on the terminal and gives a shell command line. This command line is used to enter commands and start programs as on any Linux workstation. To view the root directory, type: > ls This should produce the following: bin etc lib ramfs.img ramfs2.img proc var dev > _ Note that the listing on the screen may differ. Since this listing is not very convenient to use, the developer can create an alias to make the output more user-friendly: > alias ll `ls -al' > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . drwxr-xr-x 1 0 0 32 Jan 01 1970 .. drwxr-xr-x 1 0 0 32 Jan 01 1970 bin drwxr-xr-x 1 0 0 32 Jan 01 1970 etc AT75C220-DK-SMEC Dev Board User Guide 2-1 1789A-11/01 Getting Started with the AT75C220-DK-SMEC Development Board drwxr-xr-x -rw-r--r--rw-r--r-dr-xr-xr-x drwxrwxrwx drwxr-xr-x > _ 1 1 1 5 6 1 0 0 0 0 0 0 0 0 0 0 0 0 32 2688 2633 0 1024 32 Jan Jan Jan Nov Nov Jan 01 01 01 01 01 01 1970 1970 1970 00:00 00:02 1970 lib ramfs.img ramfs2.img proc var dev The left-hand column shows the access modes for each file or directory. Under certain conditions, these access modes can be altered with the chmod command. To see the list of the implemented programs, browse the /bin directory: > cd bin > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . drwxr-xr-x 1 0 0 32 Jan 01 1970 .. -rwxr-xr-x 1 0 0 21437 Jan 01 1970 sh -rwxr-xr-x 1 0 0 8823 Jan 01 1970 init -rwxr-xr-x 1 0 0 20859 Jan 01 1970 rz -rwxr-xr-x 1 0 0 3619 Jan 01 1970 df -rwxr-xr-x 1 0 0 10002 Jan 01 1970 ls -rwxr-xr-x 1 0 0 7864 Jan 01 1970 hexdump > _ These binary files are well-known. Most of them have been taken from the Open Source community and recompiled with no or few modifications. The contents of the /var directory are listed below: > cd /var > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . drwxr-xr-x 1 0 0 32 Jan 01 1970 .. -rwxr-xr-x 1 0 0 30 Jan 01 1970 hello.html The contents of the hello.html text file can be viewed by typing: > cat hello.html Hello world ! > _ The /var directory can be written to and thus can be used to create, copy or delete files; for example: > touch goodbye > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . drwxr-xr-x 1 0 0 32 Jan 01 1970 .. -rwxr-xr-x 1 0 0 30 Jan 01 1970 hello.html -rwxr-xr-x 1 0 0 0 Jan 01 1970 goodbye > cp hello.html hello1.html > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . drwxr-xr-x 1 0 0 32 Jan 01 1970 .. -rwxr-xr-x 1 0 0 30 Jan 01 1970 hello.html -rwxr-xr-x 1 0 0 0 Jan 01 1970 goodbye -rwxr-xr-x 1 0 0 30 Jan 01 1970 hello1.html > rm hello* > ll drwxr-xr-x 1 0 0 32 Jan 01 1970 . 2-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Getting Started with the AT75C220-DK-SMEC Development Board drwxr-xr-x -rwxr-xr-x > _ 2.2 Downloading Applications 1 0 1 0 0 0 32 0 Jan 01 1970 Jan 01 1970 .. goodbye New applications can be downloaded directly from the serial line by using zmodem. AT75C220-DK-SMEC Dev Board User Guide 2-3 1789A-11/01 Getting Started with the AT75C220-DK-SMEC Development Board 2-4 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Section 3 The Code Generation Tools AT75C220 code generation tools are derived from existing tools that have been customized to match the specific architecture of the AT75C220 device. 3.1 Installing the The code generation tools are bundled in a single rpm file. The installation is as follows: Code Generation Change to the directory where the siap-uClinux-tools-2-0.i386.rpm package file resides and type the following line on the Linux PC: Tools host-PC> rpm -i siap-uClinux-tools-2-0.i386.rpm Note that this procedure will install executable files under the /usr directory. This implies that the user needs root privileges to proceed. 3.2 Installing the A graphic front-end for siap-uClinux-gdb, called ddd, can be installed as an option. To do so: Graphic Front Change to the directory where the ddd-3.2.1-6.i386.rpm package file resides and type end for the following line on the Linux PC: siap-uClinux-gdb host-PC> rpm -i ddd-3.2.1-6.i386.rpm Note that this procedure installs executable files under the /usr directory. This implies that the user needs root privileges to proceed. 3.3 Code Generation The name of each tool corresponds to the name of the generic tool preceded by the prefix "siap-uClinux". A non-exhaustive list of these tools follows: Tools siap-uClinux-gcc: Port of gcc. It is a C cross-compiler for the ARM7(R) architecture. siap-uClinux-g++: Port of g++. It is a C++ cross-compiler for the ARM7 architecture. siap-uClinux-as: Cross-assembler siap-uClinux-ld: Linker siap-uClinux-gdb: Debugger, emulator and front-end simulator siap-uClinux-objcopy, siap-uClinux-nm, etc.: Object manipulation utilities As an option: siap-uClinux-ddd: Graphic front-end for siap-uClinux-gdb The tools are derived from existing software, thus the original documentation remains valid. AT75C220-DK-SMEC Dev Board User Guide 3-1 1789A-11/01 The Code Generation Tools Note that when using the siap-uClinux software set, these tools are not used directly. Since the options are numerous and complex, they are called by included scripts and makefiles. 3-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Section 4 The Siap-uClinux Kernel 4.1 Installing the Siap-uClinux Kernel The siap-uClinux kernel source code is included in the siap-uClinux-2.0.tgz compressed archive file. To install the siap-uClinux software set, copy the file siap-uClinux-2.0.tgz onto your hard drive and type the following command: host-PC> tar zxvf siap-uClinux-2.0.tgz The siap-uClinux software set is extracted into a directory called siap-uClinux-2.0. Change to this directory to view the files and subdirectories that are created, notably: linux: The siap-uClinux kernel source is located here. For siap-uClinux users (as opposed to kernel developers), the only subdirectory of interest is linux/arch/armnommu/drivers/ that contains the source code of device drivers. uC-libc: This directory contains the equivalent of the libc for siap-uClinux. This library contains basic C implementations, such as scanf or printf. It is used in almost all applications. libs: This directory contains non-standard libraries which are not mandatory but useful. For example, it contains the libresolv, which contains functions to operate a name resolver during Internet connections. 4.1.1 The Application Image Directory apps: This directory is a repository where all the user application sources reside. prods: This directory contains the application image directory. See Section 4.1.1. mk: This directory contains script files used to build the software architecture. tools: This directory contains miscellaneous tools for target system creation (file system generation, etc.) The application image directory contains the image of the developer's target system in terms of memory and disk layout. More specifically, it contains all the target files in their definitive binary representations. If similar applications are able to run on different hardware boards, separate application image directories must be created. An example is given in the siap-uClinux software set: The prods directory contains product subdirectories. In the siap-uClinux software set, there is only one supported board, denoted at75c220dk-smec. All the files under prods/AT75C220dk-smec are board-dependent and related to the AT75C220-DKSMEC development board. These include the files residing on the target, descriptions of the board and some tools to generate the file systems depending on the hardware residing on the board. AT75C220-DK-SMEC Dev Board User Guide 4-1 1789A-11/01 The Siap-uClinux Kernel An important location is where the application read-only file system is stored. This is under prods/at75c220dk-smec/romdisk/romdisk. Change to this directory to find the exact image of the read-only part of the application. This includes the target bin, dev and lib sub-directories. As explained in Section 2, the bin directory should contain all the executable files required by the application. These files are updated each time the applications are compiled (see Section 4.3). 4.2 Building the Kernel The siap-uClinux software set is delivered with a pre-fabricated kernel. However, the user may develop one himself. This is necessary if the kernel is to be used in a specific application and particularly if the device drivers are created or customized, as they are part of the kernel. To clean up all the results of previous compilations in the siap-uClinux software set, change to the siap-uClinux software set root directory and type: host-PC> make PRODUCT=at75c220dk-smec clean After this step, all the binaries and object files are erased and only sources are preserved. The kernel can then be re-constructed by typing: host-PC> make PRODUCT=at75c220dk-smec linux Compilation may require several minutes. The result is a file executable by the siap-uClinux kernel named linux/linux.bin. Note that variants of this file are also produced with other convenient formats (linux/linux contains debug symbols, linux/linux.bin.gz is compressed). 4.3 Building the Applications As described in Section 4.1, the source code of all applications to be installed on the target system must reside in the apps directory. The process of building the applications compiles all the sources, copies the binary code into the bin subdirectory of the application image directory and constructs a new Flash image file. The Flash image file is a binary dump of the Flash memory of the target system. It can be used directly by the Flash programming software (see Section 5). In general, application code contains references to one or more libraries (e.g., libc). Before compiling applications, it necessary to build and install the libraries. This step is carried out only once unless the developer modifies the libraries themselves. Note, however, that modification of the libraries is not recommended. To build and install the libraries, change to the siap-uClinux root directory, and type: host-PC> make PRODUCT=at75c220dk-smec libc Then type: host-PC> make PRODUCT=at75c220dk-smec installibs Note that this requires root privileges since the libraries are installed under the /usr directory of the system. 4-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide The Siap-uClinux Kernel Once the libraries are successfully built and installed, the developer builds the applications by typing: host-PC> make PRODUCT=at75c220dk-smec apps The make utility checks file dependencies and only rebuilds files where necessary. However, the make process must be provided with a list of files to check for update. This list resides in the prods/at75c220dk/prod.mk file. This file contains a line similar to the following: APPS = shell/sh init/init zmodem/rz df/df ls/ls Thus only those files (and their dependencies) located under the apps directory are checked and, if necessary, updated. If other applications exist, they are not recompiled even if the source has been modified. When creating a new application, it is important to modify the prod.mk file to ensure that the new application is compiled and stored in the Flash memory. AT75C220-DK-SMEC Dev Board User Guide 4-3 1789A-11/01 The Siap-uClinux Kernel 4-4 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Section 5 Programming the Flash Memory 5.1 Installing the Flash Memory Uploader The AT75C220-DK-SMEC Flash memory can be reprogrammed on-chip. The Flash memory uploader is installed using a single rpm file. The installation is as follows: Change to the directory where the siap-up-2-0.i386.rpm package file resides and type the following line on the Linux PC: host-PC> rpm -i siap-up-2-0.i386.rpm Note that this procedure installs executable files under the /usr/local/ directory. Root priveleges are required to proceed. Because the Flash programmer is dependent on the specific Flash memory used, it may be necessary to build it. Refer to the Flash memory uploader documentation for more details. The directory AT49BV1614 contains three files necessary for the AT49BV1614 Flash memory. 5.2 Programming the To program the AT49BV1614 Flash memory, proceed as follows: Change to the directory where the Flash image file is located. This file is AT49BV1614 prods/at75c220dk-smec/romdisk/flash.img. Flash Memory Create a local link to the necessary files by typing: host-PC> ln -s /usr/local/siap-e-up/AT49BV1614/AT49BV1614.ini Connect the serial cable to J18. Connect the other end of the serial cable to the first serial port of the Linux PC. Type the following line on the Linux PC in the current working directory: host-PC> at75c220_fmu /dev/ttyS0 AT49BV1614.ini flash.img Connect a 24 VDC power supply to connector (J1) within three seconds. The Flash programmer establishes the connection, configuring the serial port and programming the Flash memory. The length of the process is generally two to four minutes. AT75C220-DK-SMEC Dev Board User Guide 5-1 1789A-11/01 Programming the Flash Memory 5-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Section 6 Running a Flashless System Note: This section is valid only for AT75C220-DK-SMEC boards with static memories on daughter board extensions. In many cases, it is useful to update the contents of the board memory without changing the Flash. This can be done by loading an application into the SRAM through the JTAG interface and then running it out of the SRAM. The standard make process can still be used, but an additional step must be performed since some minor corrections must be made to the memory image file. Once the compilation of the applications has been done as described in Section 4.3, change to the directory prods/at75c220dk-smec/romdisk. The new flash.img file can be seen. Before uploading the new SRAM image file, it is also necessary to program the SMC and SMC registers so as to select the SRAM instead of the Flash upon boot. These steps are described in the gdb script file below. The script is self-explanatory and thus can easily be adapted to another debugger. # This script configures the SIAP and loads various files into # the target memory to create a Flashless system #load linux symbols file ../../../linux/linux #connect to target #switch to 40 MHz set {int}0xff000000=0x00000001 # Program the SMC to remap the Flash in the upper memory set {int}0xff008010=0x00000080 set {int}0xff004000=0x400020a5 set {int}0xff004004=0x000020a5 set {int}0xff004008=0x004020a5 set {int}0xff00400c=0x300026fd AT75C220-DK-SMEC Dev Board User Guide 6-1 1789A-11/01 Running a Flashless System #load kernel into target memory load ../../../linux/linux # Program some system-related info needed by the boot routine (on-board memory size,...) set {int}0x7000 = 4096 set {int}(0x7000+4) = 4*1024*1024/4096 set {int}(0x7000+20) = 80 set {int}(0x7000+24) = 24 set {int}(0x7000+16) = 31<<8 # Load the command line parameters into memory. These # parameters are used by Linux when it's booting load cmdline.obj # Load the filesystem load disk.obj 6-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Section 7 Serial and Ethernet Cable Wiring 7.1 Serial Wiring Table 7-1. Serial Cable Wiring 7.2 PC Side (9-pin) Board Side 1 7 2 3 3 2 4 6, 8 5 9 6 4 7 1 8 4 9 5 Ethernet Wiring Table 7-2. Ethernet RJ45 Straight Cable Pinout Pin Number Description Color 1 TX+ White + orange 2 TX- Orange 3 RX+ White + green 4 Blue 5 White + blue 6 AT75C220-DK-SMEC Dev Board User Guide RX- Green 7 White + brown 8 Brown 7-1 1789A-11/01 Serial and Ethernet Cable Wiring 7-2 1789A-11/01 AT75C220-DK-SMEC Dev Board User Guide Atmel Headquarters Atmel Product Operations Corporate Headquarters Atmel Colorado Springs 2325 Orchard Parkway San Jose, CA 95131 TEL (408) 441-0311 FAX (408) 487-2600 Europe Atmel SarL Route des Arsenaux 41 Casa Postale 80 CH-1705 Fribourg Switzerland TEL (41) 26-426-5555 FAX (41) 26-426-5500 Asia Atmel Asia, Ltd. Room 1219 Chinachem Golden Plaza 77 Mody Road Tsimhatsui East Kowloon Hong Kong TEL (852) 2721-9778 FAX (852) 2722-1369 Japan Atmel Japan K.K. 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 Japan TEL (81) 3-3523-3551 FAX (81) 3-3523-7581 1150 E. Cheyenne Mtn. Blvd. Colorado Springs, CO 80906 TEL (719) 576-3300 FAX (719) 540-1759 Atmel Grenoble Avenue de Rochepleine BP 123 38521 Saint-Egreve Cedex, France TEL (33) 4-7658-3000 FAX (33) 4-7658-3480 Atmel Heilbronn Theresienstrasse 2 POB 3535 D-74025 Heilbronn, Germany TEL (49) 71 31 67 25 94 FAX (49) 71 31 67 24 23 Atmel Nantes La Chantrerie BP 70602 44306 Nantes Cedex 3, France TEL (33) 0 2 40 18 18 18 FAX (33) 0 2 40 18 19 60 Atmel Rousset Zone Industrielle 13106 Rousset Cedex, France TEL (33) 4-4253-6000 FAX (33) 4-4253-6001 Atmel Smart Card ICs Scottish Enterprise Technology Park East Kilbride, Scotland G75 0QR TEL (44) 1355-357-000 FAX (44) 1355-242-743 e-mail literature@atmel.com Web Site http://www.atmel.com (c) Atmel Corporation 2001. Atmel Corporation makes no warranty for the use of its products, other than those expressly contained in the Company's standard warranty which is detailed in Atmel's Terms and Conditions located on the Company's web site. The Company assumes no responsibility for any errors which may appear in this document, reserves the right to change devices or specifications detailed herein at any time without notice, and does not make any commitment to update the information contained herein. No licenses to patents or other intellectual property of Atmel are granted by the Company in connection with the sale of Atmel products, expressly or by implication. Atmel's products are not authorized for use as critical components in life support devices or systems. Atmel (R) is the registered trademark of Atmel; SIAP TM is the trademark of Atmel. ARM (R), Thumb (R) and ARM Powered (R) are the registered trademarks of ARM Ltd.; AMBA TM and ARM7TDMI TM are the trademarks of ARM Ltd.; OakDSPCore (R) is the registered trademark of DSP Group, Inc.; Linux (R) is the registered trademark of Linus Torvalds. Terms and product names in this document may be trademarks of others. Printed on recycled paper. 1789A-11/01/0M