Home

"user manual"

image

Contents

1. Using the BDI 2000 XILINX Using the BDI 2000 To use the BDI 2000 1 Using XPS download the bitstream in the ml403_ppc_bdi project into the FPGA on the ML403 board From the command prompt run tftpsrv dH designs m1403_ppc_bdi bdi 2 From the command prompt run b20pp4gd to invoke the BDI 2000 setup software Enter the BDI IP Address and m1403_bdi cfg as the Configuration file click Connect then click Transmit 3 At the command prompt telnet to the BDI using the command telnet 149 199 109 220 Figure 9 shows the Telnet window with the BDI gt prompt displayed along with Help information on BDI commands set data breakpoint 16bit access set data breakpoint lt Bhit access clear data breakpoint s k display information about the current state L lt ofitxet lt file gt lt format 1 load program file to target memory C lt offset gt lt file gt lt format gt 1 1 verify a program file to target memory L lt offset gt lt file gt lt format program Flash memory format SREC or HIN or AOUT or ELF it address gt mode gt erase a Flash memory sector chip or block imode CHIP BLOCK or SECTOR Cdefault is sector addr lt step gt count gt erase multiple flash sectors lt addr gt lt delay gt unlock a flash sector addr lt step count gt unlock multiple flash sectors lt tyupe gt lt size gt lt hus gt change flash configuration cms gt delay for a number
2. Building Embedded Linux Systems O Reilly This table below shows the revision history for this document Date Version Revision 9 23 07 Initial Xilinx release XAPP981 v1 0 February 23 2007 www xilinx com 10
3. 5 200 200 205 200 Contig Host IP Address 255 255 255 255 Configuration file mi403_bdi cfg Cancel Ok Tranamit Writing setup data passed X981_05_022107 Figure 5 BDI Setup XAPP981 v1 0 February 23 2007 www xilinx com Hardware Setup XILINX Invoke a terminal emulation window as TeraTerm or HyperTerminal as shown in Figure 6 Set Baud rate to 9600 Tera Term Senal port setup Pore hs Baud rake Draka Prarie Stop Flow control none Transmit delay E msecichar T mseciline X981_06_013007 Figure 6 TeraTerm Settings Hardware Setup The hardware setup involves connecting the BDI 2000 and ML403 to the Ethernet and PC Depending on the flow at various phases of the process hardware connections may require changes Figure 7 shows a hardware initial setup for configuring the BDI firmware and downloading the bitstream into the FPGA Cross over Ethernet Serial com X981_07_013007 Figure 7 Initial Setup After these two functions have been completed connect the ML403 JTAG port to the Target B port on the BDI using16 pin ribbon connector Figure 8 shows the connections of the BDI ML403 after the initial setup The JTAG connection between the BDI 2000 and the ML403 consists of two ribbon cables Serial com BD12000 Ethernet Ethernet Jack Hub Figure 8 BDI 403 Connections X981_08_013007 XAPP981 v1 0 February 23 2007 www xilinx com 6
4. Application Note Embedded Processing A Using the BDI 2000 Interface to Debug a gt XILINX Linux Kernel on the ML403 Embedded Development Platform XAPP981 v1 0 February 23 2007 Author Ed Meinelt Lester Sanders Summary This application note describes how to debug a Linux Kernel using the BDI 2000 JTAG Debug Interface for GNU Debugger An example uses a reference system for the On Chip Peripheral Bus Inter IC OPB IIC core using the IBM PowerPC 405 Processor PPC405 based embedded system in the ML403 Embedded Development Platform The configuration and building of the Linux kernel for BDI 2000 use is discussed Software and hardware setup procedures are given A step by step flow for debugging the Linux kernel is provided Included This application note includes one reference system Systems www xilinx com ovdocs appnotes xapp981 zip The project name used in xapp981 zip is ml403_ppc_bdi Required Users must have the following tools cables peripherals and licenses available and installed Hardware Tools Xilinx EDK 8 2 02 e ISE 8 2 03i e Xilinx Download Cable Platform Cable USB or Parallel Cable IV e Monta Vista Linux v2 4 Development Kit e BDI 2000 Software e BDI 2000 Hardware Introduction This application note uses a system built on the ML403 development board Figure 1 is a block diagram of the system used in this flow OPB OPB UART OPB INTC 16550 IIC OP PLB PLB PLB DDR BRAM X981_01_013007 Figure 1 O
5. I to locate the page tables The head4xx S and pgtable c files contain the page table information needed to use software breakpoints The Include BDI 2000 user context switcher option prevents the kernel from modifying the debug registers in ppc4xx_setup c fd Kemel hacking ee Kemel hacking y vn Kermel debugging Help VY em Mage sysrakey OOOO lw y n Debug memory allocations Help yje Memory mapped FO debugging Help lw y n Spinlock debugging Help wv y wv n Wait queue debugging Help wv y ve n Include kgdb Kernel debugger Help Serial Pori Help lv yilv v Allow syvskq G to enter KGDB Help lv yilv Vn Enable serial console thru kgdb port Help lv y o n Include xmon kermel debugger Help y we wn Include BDI 4000 user context switcher Help Iw n Add any additional compile options Help g gqdb Additional compile arguments Help lv y wn support for early boot text console Boots or OpenFinnware only Help y v n support for early boot texts over serial port Help i Hain Menu Next Prev X981_03_013007 Figure 3 Kernel Hacking XAPP981 v1 0 February 23 2007 www xilinx com 3 Software Setup XILINX Software Setup Edit to the Makefile to use the g option on CFLAGs as shown in Figure 4 Note The makefile depends on tab characters Do not replace them with spaces Run make clean dep zImage ini
6. PB IIC Reference System Block Diagram B PowerPC 405 Processor The system uses the embedded PowerPC PPC as the microprocessor and the OPB IIC core 2007 Xilinx Inc All rights reserved All Xilinx trademarks registered trademarks patents and further disclaimers are as listed at http www xilinx com legal htm PowerPC is a trademark of IBM Inc All other trademarks and registered trademarks are the property of their respective owners All specifications are subject to change without notice NOTICE OF DISCLAIMER Xilinx is providing this design code or information as is By providing the design code or information as one possible implementation of this feature application or standard Xilinx makes no representation that this implementation is free from any claims of infringement You are responsible for obtaining any rights you may require for your implementation Xilinx expressly disclaims any warranty whatsoever with respect to the adequacy of the implementation including but not limited to any warranties or representations that this implementation is free from claims of infringement and any implied warranties of merchantability or fitness for a particular purpose XAPP981 v1 0 February 23 2007 www xilinx com 1 Configuring and Building the Kernel XILINX Configuring and This section provides the steps to configure and build the Linux kernel which are specific to Building the using the BDI 2000 Kernel Figure 2 s
7. hows the menu which is provided after running the make xconfig command on a Linux machine After configuring the kernel for the BSP general functions select Kernel Hacking a Linux PowerPC Kemel Configuration code maturity level options Hetwork device support MPCoxxx CPM2 Options Loadable module support Amateur Radio support MPCSzxx VO Options Platform support IrDA finfrared support IGM Axx options General setup ISDH subsystem USB support Memory Technology Devices MTD Old CD ROM drivers not scsi not IDE USB support Plug and Play configuration Console drivers Bluetooth support Block devices Input core support Kemel tracing Multi device support RAID and LYM Macintosh device drivers Library routines Cryptography support CryptoAPl Character devices _Kermet nacking Hetworking options YME bus support ATAIDE MFMSRLL support Multimedia devices SCl support Fle systems ave and Exit Fusion MPT device support sound Quit Without saving IEEE 1394 FireWire support EXPERIMENTAL MPC ixx CPM Options Load Configuration from Fil 120 device support MPCHZ60 Communication Options store Configuration to File X981_02_013007 Figure 2 make xconfig Menu XAPP981 v1 0 February 23 2007 www xilinx com 2 Configuring and Building the Kernel XILINX Select Kernel hacking Include BDI 2000 user context switcher as shown in Figure 3 This sets up pointers to allow BD
8. nge the current core lt ip gt k change IP address of program file host lt string gt defines a new prompt string display or update BDI configuration lt file gt lt hostIP gt lt bdilP gt lt qateway gt lt mask 11 1 TARGET TARGET TARGET display command list switch to JTAG command mode terminate the Telnet session processing user reset request resetting target passed processing target startup core HH PUR is 826611470 processing target startup passed bdi load zimage initrd elf ELF Loading zimaqe initrd elf please wait File offset amp 8xHA610608 to address 8xHA4H0H00 size 23142468 Loading program file passed bdi gt bi 8xCBBRES46C Breakpoint identification is ihdai go go ci X981_10_013007 Figure 10 BDI Telnet Session Run the instructions below The ci instruction clears breakpoints Figure 11 shows the Teraterm output in which the Linux boot process stops at Now booting the kernel Bi Tera Term Web 3 1 COMI YT File Edit Setup Web Control Window Help loaded at board data at relocated to Zimage at initrd at avail ram OO400000 OO6S513C OO040662C OO406BF O0476000 00639000 OO06381E4 00635154 OO0406644 00475285B 00634334 04000000 Linus PPE load conmsole ttyS0 9600 root dev ran rw ip oft Unconpressing Linuz done How booting the kernel heal X981_11_013007 Figure 11 TeraTerm Output 4 From a computer wi
9. of milliseconds lt core gt change the current core lt ip change IP address of program file host Cstring defines a new prompt string display or update BDI configuration file gt lt hostIP gt lt bdilP gt lt qateway gt lt mask gt 11 display command list switch to JTAG command mode terminate the Telnet session net 149 199 109 220 o xi BDH RIV addr X981_09_013007 Figure 9 Telnet BDI Help Window Using the BDI instructions set a breakpoint at the start_kernel routine using the bi instruction which is located just after the MMU is turned on Address translation errors will occur if gdb is enabled before the MMU is enabled The System map provides the location of start_kernel To get the address of start_kernel run grep start _kernel System map The first part of the kernel code cannot be debugged If the target responds with Target must be in debug mode for this action type halt and re issue the bi command bi 0xC015a46c lt start kernel gt At the BDI telnet session enter load zImage initrd elf ELF Note Do not use an absolute path to zImage init elf XAPP981 v1 0 February 23 2007 www xilinx com 7 Using the BDI 2000 XILINX Figure 10 shows the BDI telnet session Gh Telnet 1 49 1 99 1 09 220 addr lt step gt count gt unlock multiple flash sectors lt tyupe gt lt size gt lt hus gt change flash configuration Cm delay for a number of milliseconds lt core gt cha
10. rnel at init main c i354 breakpoint keep 4 Axchbe8Hali in AMU_init at init c 3hH6 breakpoint keep HxcHheBedc in sched _init at sched ciis breakpoint keep Axchbe8Hali in AMU_init at init c 3h6 5 breakpoint keep HxchBeBedc in sched init at sched c 1897 cgdb del i Cadh n start _ kernel at init main c 354 354 printk linux_banner printk linux_hbanner setup_archt command_line printk Kernel command line sn saved _command_line parse_options command_line gt X981_13_013007 Figure 13 Debugging with gdb Some example GDB instructions are given below These remove a breakpoint and then create two new breakpoints del 1 break MMU_init break sched_init n Conclusion This application note describes how to use the BDI 2000 to debug Linux kernel problems This is done for a Monta Vista Linux kernel running on the Xilinx ML403 Evaluation Platform References References Revision History XILINX JTAG Debug Interface for GNU Debugger PowerPC 4xx User Manual v1 14 for BDI 2000 Using the BDI2000 to Debug a Linux Kernel Ultimate Solutions 02 001a T Michael Turney Hardware Assisted Debug with Embedded Linux Ultimate Solutions 02 002 Debugging Linux with the BDI 2000 and bdiGDB 04 002 Ultimate Solutions Fahd Abidi DS434 OPB IIC Bus Interface v1 02a XAPP765 Getting Started with EDK and MontaVista Linux The I2C Bus Specification Version 2 1 January 2000 Philips Semiconductors
11. th the Monta Vista Linux software enter ppc _405 gdb vmlinux target remote 149 199 109 220 2001 XAPP981 v1 0 February 23 2007 www xilinx com 8 Conclusion XILINX The 149 199 109 220 2001 is the BDI IP address connected to port 2001 Figure 12 shows the Telnet window for the gdb session start _kernel at init main c 354 54 printk linux_hbanner E E IES printk linux_hbanner setup_archttcommand_line gt n printk Kernel command line s n saved _command_line ni disc pasing remote debugging pba linux gt ppe hina al hes um linux 7 a os a HH532 2683 12 24 Fonmight 2003 Prea Software Rausdatiun Inc GDB is free software covered by the GNU General Public License and you are we lcome to change it and or distribute copies of it under certain conditions Type show copying to see the conditions There is absolutely no warranty for GDB Type show warranty for details This GDB was configured as host 1686 pc linux gnu target powerpc hardhat li mux gdb target remote 149 17199 169 220 2081 T X981_12_013007 parse_options command_line Figure 12 Starting gdb Session 13 shows the Telnet window with a debug session with gdb Cannot insert breakpoint Error accessing memory address HxcBHEHRBH Unknown error 4294967295 ifMqdb gt info breakpoints Num Type Disp Enb Address What hu breakpoint keep HxchbeS5 478 start_ke
12. the following settings IP 149 199 109 4 FILE H designs ml403_ppc_bdi bdi zlmage initrd elf FORMAT ELF STARTUP RESET WM82 0x000000f0 0x00000000 MMU XLAT The IP 149 199 109 4 is the IP address of the TFTP server The MMU XLAT is needed to debug Linux after virtual addressing is enabled Because the Linux bootloader registers initialization the INIT statements in m1403_bdi cfg must be commented to avoid a possible conflict XAPP981 v1 0 February 23 2007 www xilinx com 4 Software Setup XILINX Figure 5 shows the BDI setup GUI invoked by running b20pp4gd exe at the command prompt When in configuration mode a red LED on the BDI 2000 flashes Click on both Connect and Transmit The LED stops flashing after setup Another BDI setup method is to run the command bdisetup c i149 199 109 220 h149 199 109 4 fm1403_bdi cfg After BDI setup disconnect the serial cable from the BDI and connect it to the ML403 for Teraterm BDI2000 Update Setup gt Connect EEI2000 Loader Channel COM COM O COMS LOM4 r Baudrate SN 36780645 MAC 000C04367806 9600 C 19200 39400 C 57600 DIOOD Firmware Logic Current Hewest 105 Curent 1 14 unknown 1 03 UNE ROWE Update Loader Firmware Lagic Configuration BOI IP ddress Subnet Mask Default Gateway 143 199 109 220 Network Specific 255 255 255 25
13. trd The location of system map and vmlinux is inthe linux kernel root directory The compressed kernel zImage initrd elf is 2 MB to 3 MB and the uncompressed kernel vmlinux is 25 MB Shell Konsole lt 4 gt Session Edit View Bookmarks Settings Help INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory relocations required by build roots INSTALL WOO PATH Gfshell 4 if n which Hhl whereami 2 gt fdevinull then 4 if f Ahl_target_installdir then 4 echo n hAl whereami t d fdevkite cat Al _target_installdir target HOOLIB C 1NSTALL_WOD PATHS ibimodu les i KERNEL AELESSE export ODLI B standard QFLAGS CPPFLAGS D_ KERNEL HPATH CCPPFLAGS g All W trict prototypes Who trigraphs 02 4 fno strict aliasing fnoa common iindet COMFTG FRE POINTER CFLAGS fomit frare pointer endif AFLAGS i D ASSEMBLY CCPPFLAGS AFOOT DEV specifies the default root device when making the image This can be either FLOPPY CORRENT fdevisxxsx or empty in which case the default af FLOPPY is used by build X981_04_013007 Figure 4 Makefile Edits Software is available for the BDI 2000 from Abatron The installation of this software is documented in the JTAG debug interface for GNU Debugger User Manual see the References section The m1403_bdi cfg file included in design files is used in the software setup The ml1403_bdi cfg has

Download Pdf Manuals

image

Related Search

Related Contents

Descargar Manual de Usuario  Blomberg TKF 7330 A Clothes Dryer User Manual  

Copyright © All rights reserved.
Failed to retrieve file