Home
nanoLIAB User's Manual
Contents
1. Ld 79449414 3V3 3V3 3V3 9 R705 R706 10K 470R R701 05 LED GREEN 7 t 171 Y 1701 R710 R711 ono lt 10UH 49R9 49R9 100N PHY 0 5 9701 ETHGND 16 oo Unos 09 8 8 Eq i pty 2 18 TXD1 20 22 TXCLK ISO H 38 RXERR RXD4 Rx 26 27 RXD2 1 28 28 SPEEDLED OP1 18 43V3 EMITS RXCLK ACTLEDIOP2 RXDV CABLETST 14 14 100N 100N R702 gt R703 5 COLRMII 4 R707 R708 2k2 5 2 CRS BGRESG p 22 ETHGND ETHGND 6 acres 25 3V3 ETHINT lt s 32 MDINTR AVDD 1702 7 AVDD 2 xni 10UH 42 Xl C707 C708 C709 100N 100 100 m 5 RESET 10 2 2 AGND ETHPD Qj PWRDOWNS 5 DNS161 ETHGND 4 3 m AKT C705 25MHz C706 GNDGNDGND 22 22 GND GND GND GND 3V3 C701 C702 c703 C704 100N 100N 100N 100N GND Liab ApS stre All 6 DK 9530 St vring Telefon 98370644 Fax 98370144 Web www liab dk E mail i
2. 2 2 Board Layout 2 2 1 Power Supply 2 2 2 Standard Connectors 2 5 2 2 3 LEDs and Switches 2 2 4 Pin Headers 1 to 3 Get your Board Up and Running 3 1 Required Items 4 The LIAB Distribution 41 Installing the Distribution 4 2 Installing the Cross Compiler 4 3 Contents of the Distribution 4 4 Demo program forthe 4 5 Loading the nanoLIAB Module 46 The Board Control Program nanoctrl 4 7 Ademo program using the modulenanomod 5 The Boot Loader 5 1 Three Dots Received 5 2 No Dots Received 10 10 12 13 13 14 14 16 16 17 17 19 22 22 22 23 24 26 27 28 4 ApS nanoLIAB 5 3 Download of Binary Images 6 MTD and JFFS2 6 1 Memory Technology Devices MTD 6 2 Journalling FLASH File System 2 JFFS2 Bibliography Links A Using cu as terminal emulator B Schematics and Layout nanoLIAB Block diagram nanoLIAB Power supply nanoLIAB Reset and Oscillators nanoLIAB CPU FLASH and SDRAM memory nanoLIAB CPU A and B serial RTC A
3. THE BOOT LOADER YOU MUST SEND 3 DOTS WITHIN THE NEXT 5 SECONDS LIAB bootloader h for help Boot gt 20 ApS nanoLIAB User s Manual Try the h command to get a list of possible commands Boot gt h d start end Display memory from start to lt end gt AE Go into the FLASH PROM utility submenu h Help this text 3 lt addr gt Jump to lt addr gt default 0x21000000 1 Load images using uuencoded data p Display and edit boot and network parameters a la lilo q Quit monitor and continue boot procedure r rate Set baudrate 0 9600 1 19200 2 34800 3 57600 4 115200 S Scan memory for GZIP images items marked with give access to submenues Boot As described your LIAB will be equipped with a bootloader a Linux kernel im age and a disk image when shipped from LIAB ApS The kernel contains a driver for the network hardware on the LIAB board In addition the root file system in the disk image contains scripts for initializing the network system with IP number subnet mask default gateway etc At the end of the boot procedure both a network daemon xinetd and a web server daemon httpd is started Thus you may connect to your LIAB board using e g telnet and look at its web pages using a browser The only thing you need to setup is the basic network parameters which is done using the boot loader From the Boot prompt en ter the parameter sub menu by t
4. VODPLLB Hi3 R308 C307 EHH PLACE 228 100N GNDPLLB A GND 2302 GNDPLLA GNDPLLB NEN PT PRA ta oR 3 ATSTRMS20BGA 2303 GNDPLLB RE OR R309 R310 185 185 C308 C310 10N 10N C309 1 1NO 1NO GNDPLLB GNDPLLB Liab ApS stre All 6 DK 9530 St vring Telefon 98370644 Fax 98370144 Web www liab dk E mail info liab dk Tite NANOLIAB OSCILATORS AND RESET Schematic ZAPROJECTSWANOLIABNANOLIAB1A 1 0 3 0 DSfffev 1 0 Date Tuesday October 03 2006 Bheet 3 8 1 sdy VTI gvIToueu enuen sasn 67 p a ansi pd sdy VTI gvr oueu 5 U201A 010 15 BECOME 3V3 SSOR D2 SDA10 g 53 M11 03 U401 05 A2 23 DO D7 A4 25 1 2222999 01 D2 JE 09 A6 3 Pip Dio 2 5 T mu 2 HIE D12 A9 D7 2 013 07 H DE D14 Ait 34 8 44 09 015 4 22 p10 H 16 16 011 D17 PC17 13 Ai4 36 48 012 U15 16 12 012 015 20 50 013 T14 51 D13 514 D19 PC19 014 Dis D20 PC20 16x SoBe Dis D21 PC21 D22 PC22 28 D23 PC23 HUE LDOM
5. 6 DK 9530 St vring lt Telefon 98370644 Fax 98370144 Web www liab dk pn E mail info liab dk GND Tite NANOLIAB MEMORY Schematic ZAPROJECTSWANOLIABNANOLIABTA 1 3 0 05 1 0 Date Monday October 02 2006 Bnet 4 of 8 5 40024 WVHGS HSV I4 0066Wel16 LV 4 enuen sasn Smeg angi G d PND pun OLY od 01425 Old 101 AT91RM920BGA DTR1 AT91RM9200 MICROPROGESS 1 PA2 SPCK IRQ4 5 PORT A AND PORT 1 PAS NPCS2 TXD3 6 7 2 PA8 ETXEN MCCDB PA10 ETX1 MCDB1 PA11 ECRS MCSB2 PA12 ERX0 MCDB3 PA13 ERX1 TCLKO PA14 ERXER TCLK1 PA15 EMDC TCLK2 16 PA17 TXDO TIOAO PA18 RXDO TIOBO PA19 SCKO TIOA1 PA20 CTSO TIOB1 PA21 RTSO TIOA2 PA22 RXD2 TIOB2 PA23 TXD2 IRQ3 PA24 SCK2 PCK1 PA25 TWD IRQ2 PA26 TWCK IRQ1 PA27 MCCK TCLK3 PA28 MCCDA TCLK4 PA29 MCDAO TCLK5 PA30 DRXD CTS2 PA31 DTXD RTS2 PBO TFO RTS3 PB1 TKO CTS3 PB2 TDO SCK3 PB3 RDO MCDA1 PB4 RKO MCDA2 PB5 RF0 MCDA3 PB6 TF1 TIOA3 PB7 TK1 TIOB3 PB8 TD1 TIOA4 PB9 RD1 TIOB4 PB10 RK1 TIOA5 PB11 RF1 TIOB5 PB12 TF2 ETX2 PB13 TK2 ETX3 PB14 TD2 ETXER PB15 RD2 ERX2 PB16 RK2 ERX3 PB17 RF2 ERXDV PB18 RH ECOL PB19 DTR1 ERXCK PB20 TXD1 PB2
6. GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND GND 3 3V 1 8V ov Liab ApS stre All 6 DK 9530 St vring Telefon 98370644 Fax 98370144 Web www liab dk Tite POWER SUPPLY Schematic Name ZAPROJECTSWANOLIABWANOLIAB1A 1 0 3 0 DSffRev 1 0 Date Wednesday October 04 2006 Bheet 2 8 1 GV sdy VTI gvIToueu enuen 19 74824 112 12 5107011280 40 3V3 y U201D L AT9 LRM9200 MICROPROCESSOR 3V3 LS TSTO RESET OSC AND JTAG kd R304 R302 AKT JTAGSEL R301 GND 7 eH IMS vec RESET NTRST B R305 RESET IN MR GND C301 7 08115 as 10 XIN C302 10 ve XOUT t XOUT C303 XIN32 10 Gi XIN32 RESET lt C304 ri 10P XOUT32 H17 xoura2 41V8 9 0005 GNbosc R306 C305 J14 228 100N GNDOSC 08 GNDOSC VDDPLLA VODPLLA R307 C306 PLLRCA 228 100N mH GNDPLLA 18 GNDPLLA Z301
7. 1 2 C10 8505 FORCEDEBUG D10 D503 0 BAS85 GND GND 470R Co PB6 E9 7 R507 0505 C509 C510 C51 0512 9 PBS EA 1K 9 100N 100 6V3 1004 470 1501 R509 PET avon H4 2 cukouT ms 19UH gt BCLK T 7 LRCIN AUGND R510 OR L 27 8 GND EMMA 0507 HPGND 2 10 26 AUDIO 0 5 PB20 XTO eue 470 AUDIO4 0000 51 PB21 Y502 4_ PB22 C508 12MHz 9 LHPOUT E 10 C514 470 AUDIOS F4 PB25 C515 100 AUDIOO G4 PB26 GND 24 20 lt gt 0 29 94 21 8 M C516 100 AUDIO1 Ig PB2S i Lout H2 DGND ROUT Hi AUDE 8508 Li b A S GND LVSZ0DAC2SPW R511 R512 stre All 6 DK 9530 St vring AKT Telefon 98370644 Fax 98370144 Web www liab dk E mail info liab dk AUGND Tite NANOLIAB PORT A AND RS232 AND AUDIO PB 0 29 Schematic ZAPROJECTSWANOLIABINANOLIABTA 10 3 0 05 1 0 Date Tuesday October 03 2006 Bheet 5 of 8 sdy VTI gvIToueu enuen sasn 9 4 nsu gd SCAT ASN pu 9 Old 0 AT91RM9200 MICROPRO ESS PORT PORTD AT91RM920BGA PC1 BFRDY SMOE PC2 BFAVD PC3 BFBAA SMWE PC4 BFOE
8. PC5 BFWE PC6 NWAIT PC10 NCS4 CFCS PC11 NCS5 CFCE1 PC12 NCS6 CFCE2 PC13 NCS7 14 15 PDO ETXO PD1 ETX1 PD2 ETX2 PD3 ETX3 PD4 ETXEN 5 PD6 DTXD 7 PD8 PCK1 PD9 PCK2 PD10 PCK3 PD11 PD12 PD13 PD14 PD15 TDO PD16 TD1 PD17 TD2 PD18 NPCS1 PD19 NPCS2 PD20 NPCS3 PD21 RTSO PD22 RTS1 PD23 RTS2 PD24 RTS3 PD25 DTR1 PD26 027 HDMB DDP DDM JETHINT 3V3 3V3 3V3 gt 50 C17 016 bis 5 5 ce gt 5 5 2 5 5 5 FX as lt EX H4 Lu x 3 v R607 228 Lau 7 C601 47 5 Ki R609 228 R608 15K USB1 C602 47 Hz GND Crs cM R611 22R R610 15K KS USB C608 47 R613 228 R612 15K USB3 C604 47P R614 15K R615 228 USBA 47P C605 GND 8616 22R 5 USB5 47P C606 GND gt DTR1 5 5 stre All 6 DK 9530 St vring Telefon 98370644 Fax 98370144 Web www liab dk E mail info liab dk Title NANOLIAB PORT C D AND USB Schematic Name ZAPROJECTSWANOLIABNANOLIAB1A 1 0 3 0 DSfffev 1 0 Date Monday October 02 2006 Bheet 6 of 8 1 9v sdy VTI gvIToueu enuen 19 Lg
9. nanoLIAB User s Manual e Connector P5 Standard stereo headphone connector for the high quality stereo DAC on the nanoLIAB board The headphone outputs and other signals into and out of the stereo DAC are present on pin header JP3 2 2 3 LEDs and Switches The nanoLIAB microprocessor board is equipped with 5 LEDs 01 5 three push buttons 5111 3 The first four LEDs are fully programmable and can be used as an operator interface for debugging and configuration purposes the fifth LED indicates the status of the network interface link constant light and activity blinking SW1 acts as a reset push button whereas the state of SW2 3 can be read from software In section 4 7 a Linux kernel module for the control of these elements are presented together with some programming examples However you may also use the program nanoctr1 described in section 4 6 page 27 to control the LEDs and read the switches 2 2 4 Pin Headers JP1 to JP3 The three pin headers present on the bottom side of the nanoLIAB micropro cessor board are labeled 1 JP2 and JP3 Their location can be observed on Fig 2 2 and pin no 1 is marked with a crossed rectangle All pin head ers consist of two rows of gold plated pins placed on a 2 00mm module grid The purpose of the individual pin headers is described in Table 2 1 The pin JP1 26 Power and communication e Power in 6 12 Volts DC unregulated e Regulated power out 5 and 3 3 e Etherne
10. AUDIO2 AUDIO4 AUGND 3V3 PHYO PHY2 PHY4 GND TXD RS232 RXD RS232 Reset in Vin 6 10VDC USB HOST A 0 USB HOST B 0 USB SLAVE 0 GND OS80505020z050c02020 00 O0 O50 050802050 050502020 O AUDIO1 AUDIOS AUDIOS AUGND 3 3 1 5 RTS RS232 CTS RS232 Reset out 5V USB HOST 0 USB HOST B 0 USB SLAVE D GND lt Line in L R Line out L R Headphone L R lt Audio GND Ethernet media signals Serial port Console or UARTO Reset in out USB host 2 and slave 1 ports Figur 2 3 Signals of the three connectors the nanoLIAB 1 3 9 Get your Board Up and Running When delivered from LIAB ApS your nanoLIAB microprocessor board is preloaded with a boot loader and a Linux system This system will boot when power is con nected using connector P2 PLEASE NOTE Electrostatic discharges ESD can damage your LIAB board and care must be taken to avoid them You should wear a grounded anti static wrist strap before unpacking the nanoLIAB from the protec tive anti static bags it was delivered in In addition the nanoLIAB should be kept on a grounded static free sur face 3 4 Required Items You need the following items to begin using the LIAB board e One nanoLIAB microprocessor board e A serial cable The end to be connected to the nanoLIAB must be equipped with a RJ12 6 6 plug An appropriate connector
11. D24 PC24 HBl D25 PC25 OX 18 WE D26 PC26 CAS D27 PC27 PRIS D28 PC28 FAIS 19 D29 PC29 REX 31 D30 PC30 15 2999900 N D3t PCa1 H14 Sok 6665566 23 aomeso M1 A0 nu AUNBS2 NWR2 5 GND Tina Aa HN AS R404 8405 8406 A6 4 A6 AK7 AK7 47 6 Pt A7 7 Ms AD GND AT U402 p d 00 12 RIRE H Di ala N 14 A pai 7 57 15 Ad 22 A2 paz H a ard A16 5 Di 17 1 6 2 55 A p 095 Las 06 aig 94 D AT 097 80 07 29 9 10 36 DE N8 21 10 008 35 59 A22 22 11 g A9 009 20 510 4 23 10 0010 4 Dit A23 PC7 Ba 24 A13 a Di2 A2SIPCSCFRNW PLAE 14 0912 4 Dis 5 A13 pais 14 0014 a 15 0015 rag LN10 SDRA A18 16 Aig a A17 RESET sone SDCK A20 A18 Pg 21 19 Bio SDCKE A20 RYBY 18 22 15 speswcst 9 8005 A23 2 wm 16 SDA10 6 24 fon WP ACC NBS1 NWR1 CFIOR 50851 A25 8 A24 NBS3 NWR3 CFIOW 8 22 vec 84 82 Ex 34 OE R402 NCS3 SMCS H 13 WE 22 1 2 47 5 NRD NOE CFOE NE RESET NWRO NWE CFWE P8 GND stre All
12. a domain name in order to make the web server work properly You may use the domain name dummy in case you are on a local net without any nameserver Having entered the network parameters you may first review them using the p command and then write them back to the FPROM using Param gt p 1 liabIP 192 168 1 182 8 192 168 1 1 2 liabHOST liab2 liab dk Param w Do you want to write the parameters back to FPROM gt Boot parameters start at Ox00fff800 Param The two parameters liabIP and liabHOST are passed to the Linux kernel just before it boots This process is in nature identical to the pass ing of boot parameters from the LILO prompt to the Linux kernel on a PC You are now ready to boot the Linux system Either you press the reset button SW2 on the nanoLIAB standard baseboard or you enter two successive q quit commands Param q Boot gt q Scanning FPROM memory range 0 00000000 to OxOOffffff Loading kernel at 0x20008000 Now Decompressing Image Now Decomp decompressed image 2133904 byte Bootloader now putting Linux boot tags at 20000100 Starting Linux kernel You will now observe a boot sequence similar to the one printed on page 18 Eventually you will get a login prompt where you can login as users root or liab You may also connect to the LIAB using telnet and you should consider trying to browse the homepage on the LIAB using e g f
13. for your host computer must be located in the opposite end of the cable Wiring of a suitable cable is shown in Fig 3 2 e A power source DC power supply with a voltage in the range 6 to 12 volts capable of delivering at least 2 watts is required A simple wall plug in power module with adequate power rating is usable e A host computer with a serial channel and software for a ter minal emulator The first login into the nanoLIAB can be done using the serial line Next you can use the serial line to config ure boot parameters such as IP number subnet mask etc 16 ApS User s Manual 17 e A twisted pair Ethernet cable is needed when you have config ured the board with the network parameters If you want to connect the nanoLIAB to a Ethernet hub or switch any stan dard cable will do Alternatively the LIAB can be connected directly to a host computer using a cross link cable To HUB or directly to network card in PC Latter case crosslink cable 0000 7 00M port ool male DB9 connector l To suitable wall plugin power unit or battery 6 10VDC Figur 3 1 Connections to the exterior world power serial port and network 3 2 Unpacking and Serial Connection A suitable serial cable should be included with the nanoLIAB board when de livered from LIAB ApS Alternatively you can make one yourself if you have at hand one
14. hostS telnet liab 6 ApS nanoLIAB User s Manual Trying 192 168 1 180 Connected to liab liab login root password lt enter root password for the LIABARM9200 gt root liab ls lt files in root directory of the LIABARM9200 gt The root password for the nanoLIAB board can be found in the covering letter 1 Introduction The Linux In A LIAB for short project was started in summer of 1998 at the Institute of Electromagnetic Systems at the Technical University of Den mark DTU The aim was to develop a small microprocessor platform feasible of performing control and data acquisition task in relation to an antenna mea surement facility A prototype and the first generation of the LIAB board were developed at DTU In the fall of 2000 all activities were moved to the Danish company LIAB ApS a company focused on developing single board computers running the Linux operating system parts of the hardware and bootloader software are copyright of LIAB ApS However the hardware and most of the software are open sourced For the hard ware this means that everybody gains full insight in all schematics and PCB de signs Similarly everybody have full insight in the patches for the Linux kernel and images for RAM disks You are free to distribute the full documentation of the hardware and source codes of software as long as you do not make changes to either parts However you may distribute c
15. liab login root password lt enter LIABARM9200 root password gt root liab cat gt gt rhosts IP number of your host PC your userid at the host PC lt presse Ctrl D gt root liab To transfer the file 10 to the LIAB use rcp command on the Linux PC user host rcp hello arm root lt LIAB s IP number The file he11o armis now copied into the home directory of user root To run the program switch to the telnet session stated above and type 110 arm root liab hello arm Hello ARM World root liab 4 5 Loading the nanoLIAB Module Kernel modules in Linux are units of compiled code that can be loaded and un loaded from the kernel on demand One type of kernel module is device drivers allowing the system to communicate with connected pieces of hardware e g se rial ports printers etc The preloaded Linux system that came with your nanoLIAB microprocessor board includes a device driver for reading and controlling the state of the buttons and LED s located on the nanoLIAB microprocessor board The following assumes that you have created either a telnet connection or aa serial connection using cu as described in appendix A to the nanoLIAB board To use a Linux kernel module it must first be loaded into the kernel If any communication to and from the module is necessary a corresponding device special file must also exist in dev To load the module the insmod program is u
16. to FPROMs Download of images to DRAM Manual GZIP image decompression Param Menu Jump to address Display and edit of User inter boot parameters vention within Write to FPROM 5 seconds No Compressed GZIP Scan Kernel Image FPROM scanning for compressed kernel and ramdiscs Linux Setup Further setup of HW to suit Linux TOMUS Decompression of kernel image Figur 5 1 The boot loader for the nanoLIAB board 5 2 No Dots Received If the five seconds elapse without the reception of three dots the boot loader will try to boot a Linux system if one is found in the FLASH PROM Both the Linux kernel and its accompanying ramdisk are expected to be in compressed state The boot loader will now search the FLASH PROM for compressed im ages In the event that a Linux kernel image is found it will be decompressed into DRAM starting at address 0x20008000 Further setup of the hardware is done initialization of interrupt controllers copy kernel parameters to DRAM at 0x20000100 before a jump to address 0 20008000 is performed At this stage the Linux kernel takes over The boot loader code is not used before a hard reset condition again is enforced on the Atmel 91 9200 ARM microproces SOr 32 ApS User s Manual 5 3 Download of Binary Images To download binary images over the serial port you face the problem that most serial drives are unwil
17. to interruptions By keeping a journal of all transactions performed to the file system its integrity can always be restored when the computer boots again Traditional filesystems have no strategy for the use of disk space Thus some sectors of the disk may be rewritten again and again whereas other are left un touched for long periods This is not a problem when dealing with hard disks but each sector of a FPROM can only stand a limited number erase rewrite cy cles To avoid erasing the same sector over and over again a wear leveling algorithm must be used The filesystem JFFS2 Journalling Flash File System 2 is a filesystem suited for FPROM since it utilizes both the above mentioned journalling principle as well as wear leveling By employing MTD and the JFFS2 filesystem on the nanoLIAB one may get 33 34 ApS nanoLIAB User s Manual between two to ten megabytes of FLASH disk depending of the hardware con figuration of the nanoLIAB microprocessor board This area is suitable for the storage of application specific programs and data The rest of this section deals with these systems on the nanoLIAB board 6 1 Memory Technology Devices MTD Note before carrying out the procedures listed below you should check if your nanoLIAB has a suitable configuration for MTD and JFFS2 The Memory Technology Devices system MTD gives access to FPROM RAM and other types of memory through a set of block devices drivers under Linu
18. transferred hereto Last a stack segment is set up and a call is made to a main further coding can be done in the C programming language compiled using the gcc cross compiler As discussed in section 3 3 the boot loader next prints a banner before it waits for five seconds looking for three dots to be received over the debug port 5 1 Three Dots Received If in fact the boot loader receives the three dots within the five second period the boot loader enters a menu system The boot loader gives you a variety of options for display of memory baud rate switch code download manual decompression of gzipped images and unconditional jumps to a prescribed location of memory In addition you may enter two sub menus one for operations on the FLASH PROM and one for editing of the boot parameters In the FLASH PROM menu you may read erase and write to the PROM In addition you may download binary images which are programmed into the FLASH on the fly The sub menu for the parameters you may view delete and enter new parameter strings which are given to the Linux kernel at boot time ease the entering of network parameters an interactive questionnaire is implemented in this sub menu see section 3 4 30 LIAB ApS User s Manual 31 Hardware Init Bootloader FPROM Menu PLL clock setup Main Menu Erasure of FPROMs Init of serial line Memory display Download of and DRAM system Baudrate switching images
19. 1 RXD1 PB22 SCK1 PB23 DCD1 PB24 CTS1 PB25 DSR1 PB26 RTS1 PB27 PCKO PB28 FIQ PB29 IRQO RTSO RESET 20 lt gt PAO 31 EM C EMI O 17 43V3 3V3 9 C501 10 32 768KHz R502 R501 2 2 2 2 501 1 8 voc 20 sow lt INTA SCL PAZ 10 5 4 GND SDA 6 4 BT1 0501 114148 051337 Eie TPAS GND al ND GND 500 0502 LL41k8 GIE C503 C504 4 EMA A 100N 100N D15 48V3 504 R5 NC7SZ157P6X ic 8 16 03 7821 3 A 0 47 il 8 ct ve Ais EMIT M 4 C2 v 8 A mH vec C2 4 41 Ear i 2 TOUT ii mH T2OUT EIS 124 RIOUT RIN a Pis 562 1 TPO 9 ROUT 25 7 9503 ST3232c 26 R504 af Ala 4 27 AKT 5 H 11 gH 10 GND t 75718 6 TPI R506 GND 4
20. ARTO you have at hand a gen eral purpose UART for login modems etc The multiplexed port employs a RS232 line driver giving access to four signals TXD CTS and RTS e An 10 100 Mbit Ethernet interface complete with an Ethernet PHY You may connect the a patch cable to the RJ45 socket on the nanoLIAB board for network access to the nanoLIAB 12 LIAB ApS User s Manual e An USB host controller with a two port root hub Thus two USB devices can be directly connected to the microprocessor board at the same time One of the ports are accessible through the standard USB connector on the board e Real Time Clock RTC with battery backup e Operator interface having four LEDs and two push buttons third push button is provided to reset the computer e A high performance stereo audio DAC feasible of producing CD quality audio signals headphone amplifier is also included capable of producing 2x30mW into 32 speakers e A linear supply producing 45V 3 3 and 1 8V for the on board logic e Three pin headers for power digital IO and audio output 2 2 Board Layout The electronics for the microprocessor board is assembled on a PCB using four layers for signals and two for power The dimensions of the PCB are 62x68mm and the weight is less than 50 grams Nearly all components are placed on one side of the PCB except for the connectors LEDs push buttons and battery holder for the RTC batte
21. Bheet 1 8 sdy VTI gvIToueu enuen sasn angu 1dnooap pun uanog Sul DC POWER 9 E D201 45v U202 o LM1117MPX 5 0 3 2 VOUT D voUT at C202 C203 TRANZORB 0201 100 16 1000 02 TOON 6v3 GND GND GND GND iND U203 LM 117MPX 3 3 vin VOUT 2 1 1 2 C207 C209 C210 C211 C212 C213 C214 L C205 L C208 100N 100N 100N 100N 100N 100N 470N E T 1900 47N 6v3 J 1 GND GND GND b GND GND GND GND GND GND T10 p Ut C215 C216 C217 C218 C219 C220 100N 100N 100N 100N 100N 100N GND GND GND b GND GND 41V8 0204 9 E6 2 vout 4 Eg C221 C222 C223 C224 C225 C226 L C206 R201 100N 100 100N 100N 100N 100N 220N 55 10K ERROR 4 GND GND GND b GND GND SN 44 LP3961EMP 1 8 R1 R2 T9 GND 9200 MICROPROCESSOR VDDIOP VDDIOP VDDIOP VDDIOP VDDIOP VDDIOP VDDIOP POWER 3 3V VDDIQP POWER FOR OSC AND PLL ON OSC PART VDDIOP VDDIOP VDDIOP VDDIOM VDDIOM VDDIOM VDDIOM VDDIOM VDDIOM VDDIOM VDDIOM VDDIOM VDDCORE VDDCORE VDDCORE VDDCORE VDDCORE VDDCORE
22. D GND 1 2 SER 0 3 9 3 PHY Cds GND 37 GND Q2 19 p SEA P2 12 6 6 SER2 SERS 81 RSTN o 13 14 D RESE 1 USES 17 180 To 0 DTR1 419 20 USB 6 0 m 29 0882 220 ESTIN RESET IN 23 24 E Lt 25 26 0 am ww COMMPWR 444444 POWER SUPPLY wi NANOLIAB OSC AND RESET NANOLIAB PORT AB NANOLIAB ETHERNET Gu Gub ala RESET SER 0 3 5 5 ND GND MEMORY PORT CD AND USB PB 0 29 aU 4 6 F101 1 DESIGNATORS 4 DESIGNATORS 6kx pm ee DIRI FUSE RTSO 100N ETHPD USBHOST PAS Gub 1 4 2 4 v G PAT p PAS USB1 2 IU GND GND M PA22 5 25 26 27 GND GND GND 29 Far 3 PB20 J1 5 P822 a PB23 PB24 PB25 PB26 29 45V ETH GND GND P3 GND USB 0 5 USB 0 5 SER gt 5 use stre All 6 DK 9530 St vring NANOLIAB MEMORY NANOLIAB PORT CD AND USB Teleton 98970944 rax 99970144 Web www liab dk E mail info liab dk Title NANOLIAB OVERVIEW Schematic 2 1 0 3 0 5 1 0 Date Tuesday October 03 2006
23. Liab Linux in a Box User s Manual for the nanoLIAB microprocessor board Version 00 02 November 2006 This document describes the use of the nanoLIAB microprocessor board An introduction to the LIAB Linux In A Box concept is given together with a de scription on how to get the microprocessor board up and running Procedures for the development of soft LIAB ApS ware and hardware extensions are also given Ostre All 6 Please also consult the accompanying nanoLIAB CD DK 9530 Stovring ROM for software distribution and schematics Note 45 98 37 06 44 that all parts of the nanoLIAB hardware and LIAB mail info liab dk bootloader is copyright of LIAB ApS http www liab dk 2 LIAB ApS nanoLIAB User s Manual Liab Linux in a Box NOTICE Liab The information in this document is subject to change without notice Further the software and documentation are provided as is without warranty of any kind including without limitation any warranty of merchantability or fitness for a particular purpose Even further LIAB ApS does not guarantee or make any representations regarding use or the result of the use of the software hard ware or written material in terms of correctness accuracy reliability or other wise Contents 0 Editorial Notes read this first 1 Introduction 1 1 The Concept 2 The nanoLIAB Hardware 2 1 The nanoLIAB Microprocessor
24. M based microprocessor currently available providing both a number of built in peripherals such as USB host and Ethernet and also features very low power consumption 0 8 1 2 Watts The on board FLASH PROM memory provide storage for the bootloader the Linux operating system and application software and data The nanoLIAB board is equipped with standard connectors and interfaces as well as pin headers for interconnection with other pieces of PCB e g a baseboard However the nanoLIAB board is self contained as you may connect directly to the nanoLIAB using an Ethernet patch cable a Serial cable and a connection a USB host plug In the following the features of the nanoLIAB microprocessor board are de scribed together with a discussion of the signals in the three pin headers located on the bottom side of the board 2 1 The nanoLIAB Microprocessor Board The microprocessor board is an 6 layer PCB Printed Circuit Board which con tains the Atmel AT91RM9200 microprocessor FPROM DRAM memory pe ripheral components and a linear power supply To provide flexibility most ac cesses to the features of the board can be done through either the standard con nectors or the three pin headers located on the bottom side of the board A block diagram of the nanoLIAB microprocessor board is shown in Fig 2 1 10 LIAB ApS User s Manual 11 Status LEDs Y yz o Pushbuttons DUM T 2 Serial port
25. RJ12 Modular 6P6C plug a length of flat telephone cable with six wires and a female DB 9 connectors The wiring you need to make is shown in Fig 3 2 3 3 Start a Terminal Emulator and Apply Power Having connected the LIAB board to your host computer using the serial cable you are ready to apply power through power connector P1 terminal emulator on the host computer must be started and configured for 115200 baud 8 data bits and no parity bit On a PC running Linux you may use the terminal program cu as described in Appendix A Having started cu at 115200 baud and now applying power to the LIAB you will see a boot sequence like this user host cu 1 dev ttyS0 s 115200 Connected Boot o LIAB Bootloader o Release 1 0 November 20 2006 at 15 01 by msa Copyright LIAB ApS 18 ApS User s Manual connection between and host PC DB 9 female rear view Modular 6P6C plug RJ12 seen from connector side To COM port on HOST PC Signals and dir RTS TXD GND GND RXD CTS Figur 3 2 Serial communication for the nanoLIAB connectors and wiring dia gram The bootloader will now search for a compressed kernel and file system and try to boot up a Linux system IF YOU WANT TO GET INTO HE BOOT LOADER YOU MUST SEND 3 DOTS WITHIN THE NEXT 5 SECONDS The asterisks at the end of the last line t
26. cross compiler from sources found on the Internet To install the cross compiler all that is needed is to copy the opt directory from the CD ROM to the root on your Linux computer as root 22 ApS nanoLIAB User s Manual 23 user host cd mnt cdrom user host a opt The normal way of using the cross compiler is prepending the path opt crosstool arm softfloat linux gnu gcc 3 3 2 glibc 2 3 2 bin to your search path by inserting something like this in your profile profile bash re teshre PATH SPATH opt crosstool arm softfloat linux gnu gcc 3 3 2 glibc 2 3 2 bin Now you can perform cross compilations using arm softfloat linux gnu gcc instead of gcc arm softfloat linux gnu c instead of c and so To instruct a Makefile to use arm softfloat linux gnu gcc instead of gcc you simply add the line CC arm softfloat linux gnu gcc to the top of the Makefile or adding it on the command line like this user host make myprogram CC arm softfloat linux gnu gcc See the directory software crosscompiler hello_armfor a Makefile exam ple 4 3 Contents of the Distribution This description of the distribution pertain to the nanoLIAB file tree as installed on your host PC using the installation procedure described in section 4 1 The directory hardware This directory contains hardware documentation for the LIAB boards Docu mentation of the current versions of the nanoLIAB
27. debug PIO ports Atmel 1 26 1 0 pins total 91 9200 Serial E Serial port Qa Pinheader JP2 ee fineHons 200MHz ARM920T Single USB Host MADE Seriel Ethernet SSC for audio soort USB host slave Ethernet PIO 12C SPI E 215 256 10 100MB Reset logic steres Audio Headphone conn 1 2888 JP3 5 0V Linear ower P FPROM SDRAM 3391 19 DC Power 32 64MB center pin 7 10 0 unreg 16MB positive 1Watt typ Figur 2 1 Block diagram of the nanoLIAB microprocessor board The nanoLIAB microprocessor board has the following features e Atmel AT91RM9200 ARM microprocessor small outline BGA package running at 180 MHz The microprocessor includes interrupt and DMA con trollers serial channels timers a real time clock a FLASH and SDRAM interface and lots of general purpose digital I O ports In addition several dedicated interfaces are present Serial ports Ethernet USB host USB slave SPI e 16 MB non volatile FLASH PROM memory for the boot loader the Linux kernel presently version 2 6 16 and ramdisk containing the root file sys tem e 32 64 optionally synchronous DRAM functioning main work stor age for the Linux system e An asynchronous serial ports multiplexed between two UARTs the debug UART and UARTO Using the debug UART you may watch the console output from the Linux system Using U
28. distributions To start cu log in as root and type the command cu 1 dev ttyS0 s 115200 To exit cu again type tilde followed by a dot on a new line user host cu 1 dev ttyS0O s 115200 Connected communication with the LIAB board Disconnected user host It may be inconvenient to have to log in as root when using cu To access the COM1 port from any user account you have to change the permissions on the device files that refers to the COM ports chmod 666 dev ttyS0 will give permissions to everybody to use the port Downloading kernel or disk images to the LIAB board can also be done from within cu If you want to download the image file located in the same di rectory as where cu was started you first tells the remote system in this case a LIAB that a download is to be initiated Next by issuing the command gt v the download is started A typical example is given on the next page 38 LIAB ApS User s Manual user host cu 1 dev ttyS0 s 115200 Connected communication with the LIAB board 29F800 gt 1 gt V 12 45 6 18 9 EO lt indication of download gt Fate tee 7 862 863 lt or some other number gt file transfer complete connected Disconnected 39 Schematics Layout On following pages complete schematics and component layouts the nanoLIAB microprocessr board nanoLIAB AT91RM9200 CPU FLASH and SDRAM
29. e UNIX operating system may easily migrate to the Linux since in fact Linux is yet another clone of the UNIX OS In particular classical textbooks on UNIX 6 7 8 9 apply almost directly to Linux The Linux project was started in 1991 by Linus Torvals and for a long period only the Intel 1386 processor architecture was supported However Reduced Instruction Set Computer RISC processors have gained considerable use an efforts have been made to port Linux to such processors The ARM Advanced RISC Machine processors are widely used in mobile phones since these posses high performance low power consumption and low cost High end ARM processors ARM72x ARM92x contain a memory management units MMU together with cache systems Such processors are well suited for the Linux operating system Specifically Atmel AT91RM9200 microprocessor containing a ARM920 core has been used to create the nanoLIAB series micro processor boards Based on the AT91RM9200 the nanoLIAB microprocessor board employs a hard ware structure which allows fast system prototyping and a variety of custom interfacing possibilities The board is a self contained fully functional Single Board Computer SBC with three interfacing connectors in form of pin headers This allows the main microprocessor board to be mounted on different base boards with various interfacing and on board features With reference to Fig 1 1 the nanoLIAB microprocessor board is identi
30. ed to build the cross compiler The directory also contain a precompiled cross compiler for Atmel AT91RM9200 ARM micro processor For instructions on how to install and use the cross compiler see 4 1 The directory Documentation of the various chips used on the nanoLIAB microprocessor board and standard baseboard The directory pdf atmel contains full documentation of the AT91RM9200 ARM chip 4 4 Demo program for the LIAB This section provides a short introduction on the use of a Linux PC as a de velopment platform for writing application for the nanoLIAB system Before you start this introduction make sure that you have entered the network pa rameters into your LIAB as described in section 3 4 and that you can get in contact with your nanoLIAB using the network test the connection using eg the ping commandg After installing the LIAB distribution including the cross compiler on your Linux PC as described in section 4 1 you will find an example of a very sim ple Linux application program in the directory software crosscompiler hello arm To get into this directory type user host cd your liabarm dist path software crosscompiler hello arm ApS User s Manual 25 In the hello arm directory you will find the source file hello arm c fora small program that does nothing else than print out a short text when executed To compile the 1 using t
31. fied as the top board Currently only a bread board for experimental use is available from LIAB How ever it is expected that more application specific baseboards will follow These could include a multimedia baseboard featuring graphics and camera systems and a baseboard for industrial controls equipped with relays and digital and analog I O interfaces Please consult LIAB ApS if you like to engage in a discussion on the design manufacturing and testing of a baseboard which can fulfill your specific require ments ApS nanoLIAB User s Manual 9 The LIAB board is presently distributed with a version 2 6 16 Linux kernel and a Linux file tree which is an extract of the Debian Linux distribution The shared libraries in this file tree are based on a recent version of the GNU library libc6 Please note that the ARMO core is not compatible with x86 core of you Personal Computer Programs for the nanoLIAB must be compiled for the ARM platform using a cross compiler e g the one included on the accompanying CD ROM Figur 1 1 The nanoLIAB microprocessor board Connections to a possible baseboard is shown as rectangular boxes on the baseboard 2 Hardware The Linux In LIAB ARM based solution provides an excellent plat form for small control and data acquisition systems that needs to be supervised over the Internet The microprocessor board uses one of the most powerful At mel AR
32. file system 1 Reading from a FPROM is nearly as fast as reading from static or dynamic RAM However writing to a FPROM is slow and in order to alter the con tent of a FPROM sector typically 64 Kilobyte one must first erase and then rewrite it 2 Each sector of a FPROM is only able to tolerate a finite number of erase cycles in the order of 10 106 erasures 3 FPROM memory systems are often used in embedded systems where it is a requirement that the file system does not get corrupt when the processor is stopped abruptly by a power fail condition Problems regarding the slow writing speed can be solved using a proper buffer ing system and by having a pool of preerased sectors at hand The overall life time of the FPROMS can be extended using wear leveling algorithms where a randomly chosen preerased sector is used when data areas are to be updated Last by employing a transaction journal the integrity of the file system can be reestablished when the Linux system is waked up again The most extensive FLASH file system under Linux is named Journalling FLASH File System 2 JFFS2 for short and is developed by RedHat Support for this file system is selected during kernel configuration under File Systems Bibliography 1 D P Bovet and M Cesati Understanding the Linux Kernel O Reilly amp Associates Inc Sebastopol CA first edition 2001 ISBN 0 596 00002 2 8 2 M Dalheimer and L Kaufman Running Li
33. hanges and contributions to the LIAB project but you must clearly mark which parts are yours and which are part of the distributions from LIAB ApS If you sell a product that uses the LIAB bootloader or if you develop a product using the bootloader for use by or on behalf of a commercial entity LIAB are entitled to a royalty fee Additionally LIAB should also be compensated if products using the bootloader is treated as proprietary thus enabling a competitive advantage to a company Please contact LIAB ApS for more details 1 1 The Concept During the conceptual phase of the development of microprocessor based control systems it is often recognized that the task of developing software takes up a major part of the total time needed mean to reduce the extent of the software task is to use an operating system OS Choosing the open sourced operating system Linux for a project will not only keep the basic cost of the software at a reasonable level that is no cost at all but the software development process 8 ApS nanoLIAB User s Manual will also benefit from the vast amount of applications written for Linux Due to its widespread use drivers for all sorts of hardware can be found on the Internet and the programming environment is well documented both in books 1 2 3 4 5 but also in numerous README FAQ Frequently Asked Questions and HOWTO files on the Internet On top of that programmers with experience in th
34. he ARM cross compiler type user host arm softfloat linux gnu gcc hello arm c o hello arm or alternatively use the make utility user host make hello arm The output file he110 armis an executable that can run directly on the nano LIAB First boot up your LIAB and use the program ftp to transfer the executable hello arm to the nanoLIAB target user host ftp IP of the LIAB board typically 192 168 1 180 gt Connected to liab 192 168 1 180 220 Welcome to LIAB FTP service Name host user root 331 Please specify the password Password enter LIABARM9200 root password 230 Login successful Remote system type is UNIX Using binary mode to transfer files ftp put hello arm 226 File receive OK ftp bye 221 Goodbye user host Next connect to your nanoLIAB system from your Linux PC using e g cu as described in Appendix A Login as root and make the file he 110_arm executable user host cu 1 dev ttyS0 s 115200 connected root liab chmod x hello_arm root liab hello arm Hello ARM World root liab As an alternative to ftp you might use the command rcp remote copy to transfer files between your host PC and the LIAB board However before you can do that you must log onto the LIAB and add an entry to the rhosts file in the directory root 26 LIAB ApS nanoLIAB User s Manual user host telnet IP of the LIAB board typically 192 168 1 180 gt Connected to liab
35. he accompanying CD ROM See the directory software liabkernel liab modules liabarmmod 4 6 The Board Control Program nanoctr1 Instead of accessing the kernel module directly LIAB has written a small pro gram to 1 Control the four LEDs 0 3 2 Read the status of the two switches SW2 3 3 Control the serial port multiplexer which chooses whether to out the debug UART DBGU or UARTO on RJ12 connector P2 default at boot up is always debug UART 28 ApS nanoLIAB User s Manual The program actually uses the kernel modules nanomod and the device special file dev nanomod Thus the module has to be loaded and the device special file must exist However the default start up application located in FLASH disk as jffs2 StartApplication does this You may see the options for the nanoctrl program by entering root liab nanoctrl h Program to operate the various facilities of the nanomod module Usage nanoctrl options Options h help Help this text r Read button states 1 led VALUE Set LED states to VALUE where VALUE is a hex number s set serial MODE Set the P2 serial port into AUX serial or DEBUG serial mode MODE can be one of either AUX or DBG LIAB ApS www liab dk Nov 2006 root liab nanoctrl 1 5 lt light LEDS 01 and D3 gt root liab nanoctrl r SW2 0 SW3 1 4 7 A demo program using the m
36. he pin out of the P2 connector As a default you connect to serial debug console the DBGU UART on the microprocessor dev ttyS0 when accesing the P2 Thus you can configure the nanoLIAB using the bootloader watch the boot process and finally log into the system using registered user ids and passwords The default communication parameteres are 115200 baud 8N1 However us ing the program nanoctrl you may switch the serial multiplexer on the nanoLIAB to facilitate communication with UARTO dev ttys1 The pins in P2 are also found on pin header JP1 e Connector Standart RJ45 connector for Ethernet Both 10 and 100 Mbit sec is supported and in presence of link pulses on the connected Eth ernet cable LED 05 is lit Activity on the net is signified by blinks You access the Ethernet interface using pins in pin header JP1 However you cannot just connect yet another RJ45 connector of the same type Pulse Engineering J0026D01 in parallel with that on the nanoLIAB board This is due to the fact that the connector in question includes small signal trans formes Thus you have to unmount the connector on the if you want to use an connector external to the nanoLIAB board e Connector P4 Standard single USB HOST connector for e g memory sticks WEB cameras printers etc The nanoLIAB includes a two USB HOST and one USB slave interface All three interfaces are accessible on pin header JP1 14 LIAB ApS
37. ime indicators each separated by a one second interval If no user intervention occurs within five seconds the bootloader will try to locate a Linux system and boot it You may try this out and consequently you will see a boot up sequence like this o LIAB Bootloader o Release 1 0 November 27 2006 at 15 01 by msa Copyright LIAB Aps The bootloader will now search for a compressed kernel and file system and try to boot up a Linux system IF YOU WANT TO GET INTO HE BOOT LOADER YOU MUST SEND 3 DOTS WITHIN THE NEXT 5 SECONDS PHY reset completed OK Scanning FPROM memory range 0 00000000 to OxOOffffff for gzipped kernel and initrd images GZIP image no 1 found at addr 0x00020000 Filename vmlinux bin Comment comment Timestamp Nov 28 09 46 25 2006 UTC GZIP image no 2 found at addr 0 001 0000 Filename initrd ApS User s Manual 19 Comment no comment Timestamp Nov 28 10 55 58 2006 UTC Loading kernel at 0x20008000 Now Decompressing Image Now Decompressing Image Nodecompressed age 2133904 bytes Bootloader now putting Linux boot tags at 20000100 Starting Linux kernel Linux version 2 6 16 msa msa gcc version 3 3 2 31 PR 30 CET 2006 CPU ARM920Tid wb 41129200 revision 0 ARMvAT Machine Atmel AT91RM9200 DK Memory policy ECC disab
38. int main void This is the file descriptor rnt Buffer to hold characters to write and those read char str 20 int 1 1 cnt 0 sw 0 Try to open the device in read write mode fd open dev nanomod O_RDWR Check whether it opened correctly if fd lt 0 printf Error opening module n exit 0 while 1 Read button states do cnt read fd str READBYTES if cnt gt 0 Parse the button states if strncmp str 00 0 break usleep 100000 1 Write the LED value to the module Sprintf str V x i write fd str strlen str qi man 8 lt lt usleep 100000 Close the device again close fd 5 The Boot Loader The boot loader represents the very first code executed after a power up or reset of the Atmel AT91RM9200 ARM microprocessor The flow of the boot loader is shown in Fig 5 1 The firmware of the 91 9200 can use several sources for binary boot code download using the debug serial port fetch of code from the EEPROM or boot directly from the FLASH PROM When instructed to boot from the FPROM directly the ARM processor starts executing instructions from address 0x0 Now the bootstrap written in assem bler sets up debug serial port the DRAM system Subsequently the part of the FPROM that represents the boot loader is copied to DRAM and a execution is
39. irefox or any other web browser 4 The Distribution A CD ROM is enclosed in the shipment from LIAB ApS It contains documenta tion and software for the nanoLIAB board The distribution is open sourced as described in section 1 This means that you are free to redistribute it 4 1 Installing the Distribution Before installing the distribution from the CD ROM you have to make sure that you have at least 640 MB of free space on the hard drive of your Linux PC compatible computer To install the nanoLIAB distribution you must get root access and unpack the tar file lt distribution name gt tgz into a suitable directory using something like user host tar xvz C MyHomeDir f liab4I ARM sep 2005 tgz Files in the distribution are either owned by root root uid 1 gid 1 or liab users uid 998 gid 100 If convenient you might change the ownership of the files in your local copy of the distributions provided that you do not change the owner ship of the files in the directory 1iabdisc To change the ownership of the files to e g randi users get root access and enter the distribution directory Then type user host find user 998 exec chown randi users 4 4 2 Installing the Cross Compiler To compile programs for the ARM architecture on a standard x86 based PC a cross compiler is needed The directory software crosscompiler contains not only a precompiled cross compiler but also scripts to build the
40. ke mainstream PC board stores only its bootloader but also the Linux kernel and initial ramdisk image in the non volatile part of memory the FLASH PROM FPROM for short Normally the FPROM is only accessed during boot up since all relevant data are copied from FPROM to RAM during boot When done all further accesses are done to RAM The downside of keeping all data in RAM is that the content of RAM disappears if the power is lost or the LIAB board is reset It is therefore desirable to use part of the FPROM as a hard disk like device a FLASH disk Linux kernels nowaday have support for FLASH disks using the driver system called Memory Technology Devices or MTD for short By including MTD in the Linux kernel access to the FPROMs becomes possible trough a set of char and block device special files One can now create a filesystem on one of these block devices and next mount using a suitable mount point However using a traditional Linux filesystem like ext2 has at least two drawbacks The first is related to power fails whereas the second is about wear for the FPROM chips During power fail traditional file systems get corrupted and must be checked and repaired when the computer comes up again Sometimes the repair even fails Embedded systems are normally required to be tolerant to power fails meaning that the system must be able to boot without problems when power is restored Thus the filesystem used must be tolerant
41. led Data cache writeback Clocks CPU 165 MHz master 55 MHz main 14 745 MHz CPUO D VIVT write back cache CPUO I cache 16384 bytes associativity 64 32 byte lines 8 sets CPUO D cache 16384 bytes associativity 64 32 byte lines 8 sets Built 1 zonelists Kernel command line liabETH 00 90 82 FF 03 F0 liabIP 192 168 1 153 8 192 168 1 liabHOST msa3 liab dk liabJFFS2 jffs2 liabRUN jffs2 StartApplication I Mon Nov 27 15 3 many lines of Linux kernel initialization messages Starting httpd Executing file jffs2 StartApplication Setting system clock Copying jffs2 root to Loading nanoLIAB kernel module distribution 6I LIAB ApS visit http www liab dk liab login After approximately 10 seconds you will get the Linux login prompt where you can login as users root or 11 The passwords are supplied on a separate covering letter in the shipment from LIAB ApS 3 4 Network Configuration Send Three Dots In section 3 3 it was suggested that no user intervention was taken during the first five seconds after power was applied As a consequence a Linux system was booted This time we want to get into the bootloader menus in order to configure network parameters Press the reset button SW1 on the nanoLIAB standard baseboard and then immediately send three dots to the LIAB from your terminal emulator Now you will get a bootloader prompt
42. ling to accept and transmit all the 256 possible ASCII characters 0x00 to Oxff A simple way to solve the problem is to chop the stream of bits into chunks of six bits With a proper offset these chunks can now be send using the alphanumeric part of the ASCII codes Other characters can be used to signal start of line end of line etc For this purpose a utility called uuencode is readily at hand in typical Unix or Linux systems Thus the 1 commands expect the peer to transmit data produced by the uuencode program Traditionally the first line of a uuencoded stream specifies the filemode and filename like this begin 644 vmlinux gz M F8 FQ I2 7IZP However no filename is needed in this context and the string representing it is instead used to specify the load address and a POSIX 1 CRC checksum in the format addr crc begin 644 0000 1150042577 where 0000 is load address in hex and 1150042577 is the CRC checksum in decimal During load the checksum of the binary data will be calculated and compared to the original checksum stated in the first line of the stream You can generate a file to be downloaded using a script like this named e g mkuu bin bash FILE 1 LOADADDR 2 CKSUM S LOADADDR cksum SFILE cut f1 d uuencode 5 50 lt SFILE which is called like this user host mkuu filename lt loadaddr gt gt lt uufile gt 6 MTD and 52 Unli
43. memory B 5 nanoLIAB CPU PIO port A and B Serial port RTC and audio system nanoLIAB CPU PIO port C and D USB system LEDs switches nanoLIAB Ethernet PHY nanoLIAB Component placement top B9 nanoLIAB Component placement bottom Tabel B 1 Overview of schematics and component placements on the following pages 40 ANS 2014 GND P5 AUDIO4 LEFT 4 RESET AUDIOS RIGHT P3 J0026D01 HEADPHONE LEEFERFERT POWER SUPPLY OSC AND RESET PORT AB ETHERNET SHEET 2 SHEET 3 SHEET 5 SHEET 7 AUDIOO AUDIO AUDIO2 91 2 D AUDIO DESIGNATORS 2xx DESIGNATORS 3xx DESIGNATORS 5xx DESIGNATORS 7xx AUDIO4 3 4 D RUDI AUDIO 0 5 5 6 7 AUDIOCONN 4652254457 FRROOCEEUNU AUDIO 0 5 reset L RESET SEL IER ET 17 EMI o 17 eio 17 PHVI0 5 EEE PHY 0 5 33 33 EIENT 9 ETHGN
44. microprocessor board and the standard baseboard as supplied in the evaluation kit are placed here The documentation contains schematics diagrams and component layouts for both boards The sub directory hardware processorboard Schematics and component layout for the nanoLIAB microprocessor board 24 LIAB ApS nanoLIAB User s Manual The directory software This directory contains software for the nanoLIAB microprocessor board boot loader Linux kernel and file trees for disk images to be loaded into the FLASH PROM The sub directory software liabboot Binaries for the bootloader for the nanoLIAB microprocessor board This direc tory also contains various shell scripts relevant for download of a new bootloader a new kernel and disk images The sub directory software liabkernel Modified kernel source of the version 2 6 16 Linux kernel which is able to boot on the nanoLIAB microprocessor board The directory also contains a compressed tar image of the original kernel source together with patch files The sub directory software liabdisc File tree for a fully operational Linux system with scripts for boot up and the most relevant commands Contains network bash vi shared libs dev proc Apache httpd etc Based on Debian version 6 2 Scripts to create a compressed disk image suitable for download to the FLASH PROM on the liab The sub directory software crosscompiler The crosstool build script for gcc us
45. nfo liab dk Title NANOLIAB ETHERNET Schematic 2 1 0 3 0 5 1 0 Date Monday October 02 2006 Bheet 7 8 sdy VTI gvIToueu enuen sasn 1 48 ApS User s Manual NANOLIAB V1 1 FHR 17 0KT 2006 LIAB ApS VISIT HTTP WWW LIAB DK D3 SW1 Figur B 8 nanoLIAB Component placement page 1 Top ApS User s Manual Figur B 9 nanoLIAB Component placement page 2 Bottom 49
46. nux O Reilly amp Associates Inc Sebastopol CA fifth edition 2006 ISBN 0 596 00760 4 8 3 Bentson Inside Linux SSC Inc Seattle WA 1998 ISBN 0 916151 89 1 8 4 A Rubini Linux Device Drivers O Reilly amp Associates Inc Sebastopol CA second edition 2001 ISBN 0 596 00008 1 8 5 A Rubini J Corbet and G Kroah Hartman Linux Device Drivers O Reilly amp Associates Inc Sebastopol CA third edition 2005 ISBN 0 596 00590 3 8 6 M J Bach The Design of the UNIX Operating System Prentice Hall Inc Englewood Cliffs NJ 1986 ISBN 0 13 201757 1 8 7 M J Rochkind Advanced UNIX Programming Prentice Hall Inc En glewood Cliffs NJ 1985 ISBN 0 13 011800 1 8 8 P K Andleigh UNIX System Architecture Prentice Hall Inc Englewood Cliffs NJ 1990 ISBN 0 13 949843 5 8 9 W R Stevens UNIX Network Programming Prentice Hall Inc Engle wood Cliffs NJ 1990 ISBN 0 13 949876 1 8 36 ApS nanoLIAB User s Manual 87 Links Below a number of relevant hyperlinks for ARM development are listed ARM General The AT91 ARM resource pages are maintained by Atmel It contains informa tion on both Atmel development kits for their ARM series a support forum and links to third party development tools http www at91 com ARM Linux ARM Linux is a port of the Linux Kernel to ARM processor based machines lead mainly by Russell King with cont
47. odule nanomod You may use nanoLIAB module nanomod from shell scripts either by accessing it directly by using the program nanoctr1 To use the module in a compiled C program however a series of standard C function calls is to be used The rel evant function calls in this demo program are and write The following program shows how to write program making running light on the four LEDs 01 04 as long as none of the switches SW2 3 are depressed The first task in the program is to get a file descriptor for the device special file we want to communicate with A file descriptor can be obtained using the open function call The corresponding function close releases the file descriptor when it is no longer used An example of opening and closing a port to the nanoLIAB module is shown below The actual communication with the module is done using the file descrip tor and the two function calls read write Please also consult the source codes located in the directory software liabkernel liab modules liabarmmod userspace on the accompanying CD ROM LIAB ApS User s Manual 29 include lt stdio h gt include lt stdlib h gt include lt sys types h gt include lt sys stat h gt include lt fcntl h gt include lt unistd h gt include lt string h gt define READBYTES 4
48. ributions from many others ARM Linux is under almost constant development by various people and organizations around the world http www arm linux org uk In the ARM Linux developer section the newest ARM kernel developments are available plus additional useful information for ARM development on Linux http www arm linux org uk developer Debian Linux The nanoLIAB distribution is based on Debian Linux http www debian org The more than 15000 packages for the Debian Linux distribution are distributed from several mirrors most of which are listed on the Debian Package pages Most of these packages already exist in readily downloadable versions compiled for ARM http packages debian org A Using cu terminal emulator The nanoLIAB was specifically designed for the Linux operating system and a natural choice for a development platform and host computer would be an IBM compatible Personal Computer PC running Linux number of termi nal emulators are readily available in the various Linux distributions or can be downloaded over the Internet One of the oldest and simplest emulators is the cu program which stands for Connect Unix You don t get any fancy graphical user interface you just get connected In the following we assume that nanoLIAB is connected to the COM1 port on the host PC and that this port can be accessed trough the device file named dev ttyS0 this is at least true for Redhat 7 x and 8 x
49. ry Headphone connector Je RTC D5 Eth activity battery 01DA DS Serial port O Li L 0 2 Console UARTO SW dev ttySO dev ttyS1 5 5 Single USB P4 542 SW3 Power 6 10VDC HOST connector oo center pin pos TPO 1 Figur 2 2 Layout connectors LEDs switches pin headers on the nanoLIAB microprocessor board 10 100MB Ethernet ethO 62 mm ApS User s Manual 13 The layout of connectors pin headers jumpers and other large components is shown in Fig 2 2 The three pin headers JP1 to JP3 are show as hatched rect angles on the figure The purpose of the individual headers JP1 3 is described in Table 2 1 on page 14 2 2 1 Power Supply The microprocessor board must be powered by a DC supply having a voltage between 6 and 12 volts using the power jack connector P1 The center pin in the jack must be positive The board consumes around one watt and it has been tested to work in temperatures ranging from 10 to 60 Power can also be induced using pin header JP1 Similarly regulated voltages of 5 Volt and 23 3 Volt can be accessed using pins in JP1 and JP2 2 2 2 Standard Connectors 2 5 Using the standard connectors P2 P5 you may access the individual parts of the microprocessor board e Connector P2 Standard RJ12 Modular 6P6C connector for serial com munication See Fig 3 2 on page 14 for t
50. sed and device special file is created using mknod In the example below the module is first inserted and followingly a device special file called is created root liab insmod nanomod root liab mknod dev nanomod c 63 0 LIAB ApS User s Manual 27 Through device special file you now have read and write access to but tons and LEDs A thorough description of the possible interactions with the module nanomod can be found in a README file on the CD ROM at software liabkernel liab modules liabarmmod kernelspace For now we just want to light up the ten LEDs and the individual segment in the seven segment display Try the following series of commands root liab echo 710 dev nanomod root liab echo 711 dev nanomod gt light LED D1 gt gt root liab echo 1 gt dev nanomod gt gt light LED D2 gt blink LED D2 gt darken LED D2 gt Set leds D4 D1 0111 gt root liab echo 1 dev nanomod root liab echo V7 dev nanomod AN AA A A It is also possible to read the state of both push buttons SW2 3 through the nanomod module To read the state of the two push buttons we type root liab dd if dev nanomod count 1 00 The two digits returned represents SW1 and SW2 1 when button is depressed 0 if not The source code for the module and an example of how to use the module within software is included on t
51. t e Serial port DBGU or UARTO e USB HOST x2 and USB slave ports e Reset in out JP2 36 Peripheral pins e 27 Programmed Input Output pins have three functions general IO and two special func tions timers SPI I C serial ports SD MMC card support interrupt You should consult the User s Manual of the AT91RM9200 microprocessor for further descriptions JP3 Audio connector e Line in out and headphone out 2 1 Pin headers on the nanoLIAB microprocessor board JP3 ApS User s Manual headers are feasible for mating PCBs or ribbon cable connectors 15 You may consult the schematics found on the accompanying CD ROM in the directory hardware processorboard for the specific functions of the individual pins of the pin headers However the functions of the pins in the three connectors JP2 and are given in Fig 2 3 JP2 3V3 PAO PA2 22 25 27 29 PB4 PB7 PB9 PB11 PB21 PB23 PB25 PB29 GND FOROS oO 1 o 3 o 5 7 9 n 13 15 17 19 o 21 o 25 25 2 29 31 33 o 35 GND PB3 PB6 5 8 10 20 22 24 26 5V GND Connectors as seen from TOP side of PCB i e the side with LEDs switches and battery AUDIOO
52. udio nanoLIAB CPU PIO C and D USB LEDs switches nanoLIAB Ethernet PHY User s Manual 33 TT 34 Us ur Sa 35 36 37 38 0 Editorial Notes read this first This document describes a small but yet powerful computer system called the For the impatient user If you are eager to experience features of Linux system on the nanoLIAB board plug it into your computer as described in chapter 3 Notational conventions Throughout the manual it is assumed that a host PC running the Linux operating system is used for the communication with the nanoLIAB system Screen dumps and examples of human interaction are printed using fixed spaced typewriter letters POSIX conformance testing by UNIFIX Page cache hash table entries 16384 order 4 65536 bytes CPU Testing write buffer pass Linux 0 for Linux 2 6 The following two prompts signify that the user is interacting with the host PC directly either as normal user user host or as superuser user host user host ls lt files on the host PC gt user host su Password lt enter root password for the host PC gt user host user host lt press ctrl D gt user host Using either a serial communication program like cu or a network terminal program like telnet you may communicate with the nanoLIAB system To signify this the prompt root liab will be used user
53. x The MTD system is part of Linux kernel and is now enabled by default in the standard LIAB Linux distribution In Fig 6 1 you may study the default FPROM memory map on the nanoLIAB 0x1000000 Boot parameters Oxfe0000 dev mtdblock3 Available space for a JFFS2 filesystem MTD extra partition dev mtdblock4 The size of both partitions can be altered during kernel configuration 0x600000 make xconfig MTD maps section Compressed ramdisk image MTD root partition dev mtdblockO 0 1 0000 E ae pue Tm nanoLIAB FPROM ev mtdbloc 070000 52961 128 FPROM 0 000000 bootloader dev mtdblock1 One FPROM of 16MB Total size 16 Figur 6 1 Layout of FPROM memory on a standard nanoLIAB The MTD partitions can be accessed from a user space Linux program using the following device special files the numbers in parenthesis denotes the major and minor number LIAB ApS User s Manual 35 Partition char block Root dev mtdO 90 0 dev mtdblockO 31 0 Boot dev mtdl 90 1 dev mtdblockl 31 1 Kernel dev mtd2 90 2 dev mtdblock2 31 2 Param dev mtd3 90 3 dev mtdblock3 31 3 JFFS2 dev mtd4 90 4 dev mtdblock4 31 4 6 2 Journalling FLASH File System 2 JFFS2 The MTD system gives the ability to create and mount file systems on top of MTD block device special files However one must face a number of conditions when using as the media for a
54. yping the p command Help on the sub menu can be obtained using the h command Boot gt p Entering the boot network parameter editor h for help use options and for editing of network stuff Param gt h a alter the network specifications h help this text d lt line gt delete the specified parameter line i line param insert text lt param gt before parameter line lin NOTE the text string must NOT contain spaces n show the network specifications p print the boot network parameters q quit boot network parameter submenu write new parameters back to FPROM Param Now you are ready to enter your IP number subnet mask default gateway host domain name and domain name server to the LIAB using a command You are asked the following 1 If you want to enter the IP network specifications answer y for yes and enter the IP number and subnet mask for the primary Ethernet connection ApS User s Manual 21 eth0 Review the settings and if correct type n when you are asked if you want to further change the IP settings 2 If you want to enter the host domain specifications answer y and enter the host name the domain name and if applicable the IP number of domain name server Review the settings and if correct type n when you are asked if you want to make further changes Please note that you need to supply
Download Pdf Manuals
Related Search
Related Contents
KPSI™ Level and Pressure Transducers User`s Manual Manual Del Propietario Mode d`emploi Web Hosting User`s Manual Copyright © All rights reserved.
Failed to retrieve file