Home
LinuxScope v4.0.0 User Manual & v4.0.0 Install
Contents
1. Format te Start Address OxcdO00000 End Address OxcO0000 100 6 Flashing 6 7 NOR Select Flash from the JTD menu or press the Flash toolbar button To Note Flashing creates its own target connection so any debugging session using the JTAG probe must be ended before flashing Most targets need to be reset before flashing LinuxScope does this automatically The Flash wizard appears Hash Configuration Set flash programming details Empty field values indicate that ITD settings will be used Flash type override Unlock arguments lw Erase arguments FO lf Program arguments Offset Image xtc uboot bin Image Type e Next gt Finis Cancel Select flash commands and arguments If the arguments are empty values from the BDI config file will be used The image name is relative to the TFTP server Flash type override Use these drop down boxes to select your Flash configuration Overrides the default arguments in the BDI config FLASH section file 1f specified Unlock arguments When checked it will run an unlock command to the BDI before programming The arguments can be typed in as they would in the BDI Telnet interface Overrides the default arguments in the BDI config FLASH section file 1f specified The arguments can be typed in as they would in the BDI Telnet interface Overrides the default arguments in the BDI config FLASH
2. Resume Target on Startup is selected target execution will resume once the launch is configured Otherwise the target will remain suspended after the launch Arguments Environment Tabs Used to pass arguments and environment variables to the target program These are not typically used with remote targets Source Tab Specifies path entries and substitutions for source lookup This is very useful for sources that exist outside the project 3 5 Creating A Linux Build Project LinuxScope can be used to build a Linux kernel or any GNU Make project The steps to creating a project for building sources is similar to that of creating a project But some additional parameters will need to be specified so that the LinuxScope environment can recognize and use the tool chain Start by first making a working copy of your Linux Kernel or GNU Make sources Then from LinuxScope select file gt new gt project expand C and select LinuxScope Linux Build Project tA New Project ist Select a wizard Wizards type filter text E Java Project Java Project from Existing Ant Buildfile IC Linuxscope JTD C Project wE Plug in Project General be E EJ C C Project 0 LinuxScope Linux Build Project K LinuxScope JTD C Project eS CVS Finish Cancel Click Next In the next window you will need to fill out several settings hal New Project Linux Build Project Create a new C project for a Linux Kernel ES
3. Changed value color Changed value background color Iess Memory unbuffered color Memory buffered color C 2 2 4 Path Mapping In some cases paths returned by GDB may not be understood by Eclipse because they do not resolve to files in the file system For these cases a path mapping can be created The preferences window provides a way to specify a default set of path mappings under C C gt Debug gt Common Source Lookup Path Note LinuxScope automatically takes care of path issues created by default Cygwin installations type filter text ER General Ant Common Source Lookup Path C C Path Mapping Default Mapping Appearance JS ecos cl Cr gt Build Console Code Formatter E Common source L GDB MI EI Editor Down gt File Types Indexer Hl Make Managed Build 3 Parser PathEntry Variables E Install Update Java el Plugin Development E Run Debug l Team z l Restore Defaults Apply 3 Working with LinuxScope JTD 3 1 Launching Perspectives Perspectives in Eclipse are simply layouts of views and editors While these can be customized several have been provided for convenience The Open Perspective button and menu item can be used to open perspectives E Open Perspective The perspectives toolbar provides easy access to opening and switching perspectives E Hie The JTAG Debug perspective provides a convenient layou
4. You will be taken to the selected source file and line number where the variable is declared NOTE The option to open symbol declarations 1s only available if a valid gdb session has been launched 5 JTAG Debug Perspective Tour JTAG Debug main c LinuxScope JTD DES File Edit Refactor Navigate Search Project JTD Run Window Help 4 By Snes BRM dn 0 1 2 ry false 3 ZE JTD Modules xD OO main c e Zo ya Ze OS gold i A 3 Non Debug Symbols e Activate the first processor 4 SG arch a drivers B entry S 5 asmlinkage void init start kernel void fs init char command line calibrate c extern struct kernel param start param _ stop param E do_mounts_initrd c B do_mounts_rd c Interrupts are still disabled Do necessary setups then D do_mounts c enable them zg B initramfs c 7 E geg lock kernel el n BPR page address init dt do_earty_param Oxc 1e printk KERN NOTICE init_setup 0xc01e2358 pelis paneer 2 init Oxc000221c p s v A le EEN E hiteammand lina as initcall_debug_setup Ox W loglevel Oxc01e2090 W gt maxcpus Oxc01e2014 Disassembly 3 D 2 nosmp Oxc01e2000 e Ch ei parse_early_param Oxc OxcOle24c8 lt start_kernel gt mflr ro er quiet_kemel role OxcOle24d0 lt start_kernel 8 gt stwu r1 32 r1 6 e Cen Gi OxcOle24d8 lt start kernel 16 gt stw r0 36 r1 run_init_process Oxcl NTI OxcOle24dc lt start
5. a distclean ee it Cancel 4 Source Debugging 4 1 Connecting To Target If you have not chosen to automatically connect to the target in your launch configuration you will need to connect before you can debug Pressing the connect to target button in the Command Tool will establish a connection to your JTAG Probe Refer to Section 3 2 for Command Tool 4 2 Setting Breakpoints Breakpoints can be set from the source window by right clicking on the white space next to the source line or on the line number of the source line main c X 485 done 1 486 487 488 89 Activate the first processor 90 91 INTERNET t kernel void Toggle Breakpoint ram start param stop param Toggle Hard Breakpoint abled Do necessary setups then Y Show Quick Diff Ctri Shift Q v Show Line Numbers Preferences wn ono oo on Cn on AN LI de eee de da da da SE Je LS e KH m 04 setup per cpu areas E 06 07 Mark the boot cpu online so that it can call console drivers in 08 printk and can access its per cpu storage 09 510 smp prepare boot cpu 511 N N U I NOTE The option to set a hardware breakpoint is only enabled if you are connected to the target 4 3 Setting Data Breakpoints Breakpoints can be set from the source window by right clicking on the white space next to the source line or on the line number of the source line 495 extern st
6. section file if specified Program arguments Overrides the default arguments in the BDI config FLASH section file if specified The second screen of the wizard contains target settings this step can be ignored if the global preferences are correct Press finish to flash the target Results are displayed Flash Results y Erasing flash at 0x40f00000 Erasing flash at Ox40f10000 Erasing flash at 0x40f200000 Erasing flash at 0Ox40f30000 Erasing fash passed Programming xtc uboot bin please wait 41 kbytes 91 kbytes 143 kbytes Programming flash passed Note More sophisticated flash sequences can be accommodated with the Script interface 6 2 NAND Select Nand from the JTD menu or press the Nand toolbar button G Note Nand Flashing needs an active connection to the target It will however initialize the target Chip Selects based on the parameters provided Currently only the E500 Nand Controller 1s supported with a Large Page Nand Device on CS0 The Nand wizard appears EA NAND Memory Erase Flash Mand ID Fead WAND Open Binary file Use text box to specify the file to burn into NAND Base Address Specifies the desired base address location of the Nand Flash Select Nand Size Size of the Nand device being used Start Address Address where the binary file should be loaded in Nand must fall in the Nand Address window specified by the Nand base address Nand Size parameters Als
7. 54M gt Oc2d4000 10 00 OO000000 11 00 00000000 12 04 00001000 13 00 40000000 14 00 00000000 15 00 02040000 16 10 00000000 SMB VI 5 gt 221c000 KB V45 gt a9c4e000 8MB G5W gt 90552000 KB S5W gt 858c 1000 8MB VI S M gt 87d61000 KB V G5 44 gt 69b3d000 8MB 5 gt 534705000 17 00 00400000 512KB V 5M gt 26644000 18 00 01000000 9 00 00000000 UO 00010000 00 OOOO0000 8MB VIG M gt 35671000 8MB VI S gt 11dd4000 4KB VI S gt 6895d000 AB I 5 M gt bd 182000 The trace script add edit dialog contains several fields Get Add a Trace Script TraceScriptOutputFile Trace out Mame File Trace Location 0xCO0000000 Trace Loop Count 0 forever 1 E Trace stop Condition S M variable amp REG register Check data to Store below PA registers M Variables funtion arguments 2 local stack Script Wl Stop on errors TraceScriptOutputFile Mandatory filename to capture the script s output Script output directory 1s defined in the JTAG Debug Preferences The trace script will not run if this field is left blank Name Graphical display name this need not be unique Trace Location address or symbol name of breakpoint where trace will be captured Trace Loop Count The number of times the breakpoint should be hit Note that if this number can be very large but only the last 500 data points will be stored Trace Stop Condit
8. Finish A new project with your chosen name is created and displayed in the C Projects view A JTAG Debug LinuxScope JTD File Edit Refactor Navigate Search Project tom gt AAA A D C C Projects x SS g i kra EI c A H G G arch GG block Gs crypto GC Documentation GG drivers Gr fs ae include E gt init Gs faja G kernel ar lib Gs mm GC net GC scripts GG security GG sound H a Uer ES Debug 0 P Disa Monitors lt To edit your environment settings right click on the project and select properties From the pop up select the C C Make Project and then select the environment Tab Sa oT RU m r wm ee 7 w PAN AIS E D E Bey CAC Projects EZ gt m d rk A II E Open in Neve windows Index Build Configurations Make targets Build Project Clean Project 0 0 EEE 30 89 Ai fo fo o o PP PPP PPP mor OR E Copy E SM Delete bic E LR Rename Import Export vi O T D Gy E F Retresh Close Project h HE Run AS d Debug As validate Team Compare with Restore wom Local History POE Tools k Properti A It Enter HA Properties for linux type filter text C C Make Project Resource Builders CAC General l ae CA Include Paths and Make Builder Environment Error Parsers Binary Parser Dis
9. Mame of this Linux Kernel Project linux Create an empty Project or uncheck and browse to existing Kernel directory Location of Linux Kernel C cyqwins homewose mite linux 2 6 17 rc3 2006 05 11 0050 Select the Tool Chain Directories hrovwse add CAcrgweinopteldk pin Ccygwintootyeldksusr bin Ccygwinkbin Cocygqwinkusrsbin y Add Variables for Linux Build all clean distclean Start by specifying a project name for this Linux Build Project Uncheck the checkbox create an empty Project and click Browse to the top level source directory of your Linux Kernel Next click browse add and select your tool chain directory this is the directory s where your GCC and other tools required to build the kernel reside When you install your tool chain It should give you details on which directories to include If you are using cygwin for your build environment you will also need to include the bin and usr bin directories under your cygwin root directory so that LinuxScope can find the build environment Select the Add Variables for Linux Built and specify the CROSS COMPILE and ARCH system variables your tool chain documentation should tell you what these values need to be For other GNU make projects these variables may not be needed If you want to add make targets to build then check the Add Make Targets and add remove the make targets you wish to include Once you have setup this page click
10. Note When you launch Eclipse it asks for a workspace path This is the location where all projects settings code data etc are stored Do not select a path with a space in it as this can cause failures with external tools such as GDB Standalone Installation Windows Installation Simply run the LinuxScopeJTD_Installer exe in the windows folder on the CD and follow the prompts Linux Installation Choose the appropriate binary directory linux x86 bin or linux x86 64 bin and execute the install sh script On the first run the End User License Agreement will be presented To accept the license and install the program run install sh again with the word accept as an argument Also provide the installation path for example sh install sh accept opt LinuxScopeJTD Manual Installation To install LinuxScope JTD as a standalone application simply extract the archive appropriate for the platform The archive can be extracted to any desired location The archive contains a branded version of Eclipse the Eclipse CDT and LinuxScope JTD To launch LinuxScope JTD execute the Linuxscope binary in the linuxscope folder Adding a GUI shortcut is platform specific and is not done automatically When launching Eclipse it is a good idea to specify the Java VM to use especially if more than one is installed This can be done by specifying command line arguments to eclipse for example eclipse vm c jdk1 6 12 jre bin java Plug in Ins
11. Restore Defaults Select STAG Debug from the tree to display the JTAG preferences page The fields set default values for probe parameters these values can be overridden on a per target basis see the section Launching Debug Sessions for details License File This is the path to the license file supplied by Ultimate Solutions or a franchised distributor The license is a text file that can be saved anywhere in the file system Script Output Directory This is the directory where the captured output of executed scripts will be stored Default Debugger Remote Address This is the IP address of the JTAG probe This is a default that can be overridden in each launch configuration Default Debugger Remote Port This is the TCP port number of the JTAG probe This is a default that can be overridden in each launch configuration This value should not be modified in most cases Hard Breakpoint Type By default this option is set to Hard In this mode you can set hardware breakpoints from the GUI and Linuxscope JTD will keep track of your breakpoints If for some reason you encounter errors setting or hitting hardware breakpoints you can chose the alternate mode BDTI In this mode the breakpoints are set directly on the JTAG probe and Linuxscope JTD will clear any previous hardware breakpoint before setting the next one LinuxScope JTD cannot keep track of breakpoints when BDI is selected Breakpoints listed under the br
12. Resume Target on Startup Filter matched 12 of 12 items T VS LinuxScope can also connect to the AVRONE debugger and you can use the Select Probe drop down box to select which probe you want to use Breakpoint Type selects a breakpoint setting for the probe Hard breakpoints make use of hardware registers and the number of simultaneous breakpoints 1s usually quite limited Soft breakpoints are more flexible but rely on trap instructions and therefore cannot be used when debugging flash images or when the IVT 1s not set up While using the soft breakpoint mode it is still possible to set hard breakpoints explicitly If Attach to JTAG target on startup is checked GDB connects to the probe during the launch If it is not checked the user can connect to the debugger at a later time The Target Reset Options group controls whether the target is reset during the launch sequence If so the target can be run for a specified amount of time to allow the target to initialize If Load code into target on startup is checked GDB will be used to load the program into the target during the launch process after reset if any This can also be done manually If specified the Initial Breakpoint is used to stop the target when execution reaches a symbol or address prefixed with Typically man is used in C applications however sometimes more flexibility is warranted when debugging embedded code If
13. button is used to launch the script add edit dialog and the blue x y button is used to launch a trace script dialog The script add edit dialog contains several fields ScriptOutputFile Seet ol Name File Script Stop on errors Resume execution after script ScriptOutputFile Filename to optionally capture the script s output Script output directory is defined in the JTAG Debug Preferences The script will not output to a file if this field is left blank Name Graphical display name this need not be unique Script List of commands to send to GDB Lines starting with are ignored Lines ending with are continued on the next line Stop on errors If this is checked the script will stop after any line that results in an error Otherwise execution will proceed Resume execution after script If this is checked the target will be resumed once the script is complete Otherwise it will remain suspended After the script runs the output dialog appears mon dtib 0 31 IDX ASID EPN SIZE VIGSWM RPN 0 00 00000000 KB V S gt 3ca1b000 1 00 02004000 512kB VI W gt cO 07000 2 00 00008000 512KB 5 gt 682468000 3 00 01000000 MB 5 gt 21446000 4 00 00000000 4KB IG WM gt d2819000 5 00 OO000000 KB VI SWM gt ccc reg 6 00 00000000 512KB VI S gt 00102000 7 00 00000000 GM VIGSW gt 12ac3000 8 00 08001000 KP I SWM gt faze 1000 9 00 00000000 8MB VI
14. debug setup Oxc01e2674 loglevel Oxc01e2090 maxcpus Oxc01e 2014 nosmp Oxc01e 2000 parse_early_param Oxc01e 2440 quiet_kernel OxcO1e206c rest_init Oxc00021b0 fi fa ny g Pi g e Ee BE Be E 1111 pa unkno Open Source E version c Find ipc 1 2 gt kernel LL Find Next H Gi lib Set Address Breakpoint ZE mm a Set Hard Address Breakpoint HG net E gt security wa Refresh E string S dla Add Symbol File JL Modules e Coll All a E cygdrive c stul egen e The JTD Modules view provides the following actions Open Source Opens the selected source file in an editor window or opens the source file containing the selected symbol Find Searches for a text string in the sources and symbols trees starting from the root Find Again Repeats a search started with Find starting from the current selection Set Address Breakpoint Creates a breakpoint on the selected symbol using the probe breakpoint mode Set Hard Address Breakpoint Creates a hard breakpoint on the selected symbol regardless of the probe breakpoint mode Refresh Updates the tree with regard to symbols loaded into GDB This is useful if the GDB console has been used to modify the symbol table Add Symbol File Allows an additional symbol file to be added to the address space This 1s useful for adding Linux kernel module information Collapse All Collapses the entire tree 5 2 1 Adding Symbol Files The A
15. 0 Variables Expressions and Memory Views eer A Memory nna SES Tasks 9 Variables 23 Expressions E st H e E gt u 60 char commana ine r The variables view shows the values of local variables in the current stack frame Global variables can also be added to the display Debug Memory Breakpoints Signals Tasks Variables SCH Expressions 3 Console E gt t TI S E 7 g ai char command Jine 4 0x00000004 3223200968 sols char command_line 4 L IT char command line 0x00000000 HY 2 long 3 4 7 The expressions view can be used to enter watch expressions Right click to add expressions Note Do not put newlines in expressions expressions with newlines cannot be evaluated Debug Q Memory 3 gt Breakpoints Signals Tasks Variables Expressions Console P em ats TE Memory Monitors d NW Sig Memory Renderings d 0xc01b2000 Oxc01b2000 lt Hex gt iedh D c bdi zistis address Jo 3 4 7 8 ee m C0152000 root de Ps 3 rw CO1B2010 ip 192 168 253 Co1B2020 79 1 92 1 68 2 53 2 Ti C01B2030 22 1 92 1 68 2 53 1 CO1B2040 255 255 255 0 x CO1B2050 tere tho otr Dar Co1B2060 oot e t ftpb ootd E The memory view is used to display memory segments Use the green plus icons to add memory regions and rendering formats to the display is The disk icon can be used to dump a memory region to disk Save file c tempfile txt Browse
16. 3 Use the C C Local Application launch type in the launch configuration dialog 4 Use the GDB Server debugger on the debugger tab Use TCP for the connection and specify the target s IP address
17. DT can manage all stages of project implentation from coding and compiling to debugging and version control If you have an existing CDT or other project this can be used for JTAG debugging If you don t a simple project is easy to create Select Hle gt Mew gt Project and choose JTD C Project in the list of wizards under the C category Enter a project name and then finish This step creates an empty project that is compatible with the CDT and LinuxScope JTD The preset New ITD C Project wizard is automatically displayed when you click the Click to Perform button Click to Perform Click to Skip ae J es i t ail f 1 Es _ E d Launching a Debugging Session 7 Z SS Exploring Views E Click on the Click to Perform button to launch the new project dialog K New Project JTAG Debug Project Create a new C project for debugging only no make Location Specify a new project name and click finish or click cancel if a project to be used already exists The cheat sheet will now display the Launching a Debugging Session page A Welcome x fi Return to Welcome Getting Started Y Introduction 7 Y b Configuring LinuxScope JTD KA Y Setting up the Workbench KA A Creating a Project KA 7 Launching a Debugging 7 Select Run gt Debug to bring up the Debug dialog Select JTD from the left column and press New to create a new lau
18. Defaults The JTD launch configuration type has several launch options that are specific to JTAG debugging To create a new launch configuration select the JTD type and then press the New button This creates a new Set of launch parameters which is independent of other launches Tabs allow the launch to be configured Main Tab This allows the project and executable image to be specified Configurations do not require executables but use executable images to resolve symbols If a project and executable were selected prior to opening the launch dialog these should automatically be populated in the fields Executables can be located anywhere in the file system not just inside the project Create manage and run configurations JTAG Load Debug Launch Mode Configurations Name LinuxxTC C C Attach to Local Appl E C C Local Application fi C C Postmortem debuga ES JTD 8 New configuration Project XTC Browse il Main Debugger Startup Dir Arguments ES Environment Es Source C Common Executable Image C lstufflinuxs tb wymlinux Browse Debugger Tab This tab allows the GDB executable and remote settings to be overridden This is initially populated from the Preferences page The Shared Libraries tab allows shared library handling to be adjusted Click on the connection sub tab to see the TCP IP settings K Debug Create manage and run config
19. F 040 mtcd Dedarations Oxfff1f1044 mesp Oxfffff048 andi Oxftfti0dc bne Oxfffff050 mt St Run to Line References Search Text 21 Resume At Line E E Preferences D powerpc elf gdb exe 10 23 07 2 58 PM o see the conditions Open Symbol Declaration lo warranty for GDB Type show warranty for deta 5 Data Write Breakpoint ed as host 1686 pec cygwin target powerpc elf 2 Data Read Breakpoint le SDE 3 2 2 runtime New configuration l1sjtd C No Data Breakpoint devrocket workspace yosemite C No such file or di mP aea mr cnnnart Far thie ma ADT A dialog box will appear asking you to finalize your selection pa Search For Symbol Declaration Symbol or address 0x lock_ kernel At this point you can change the symbol name to set the breakpoint on if desired You may also choose to select an address location If you choose an address location you must enter the full string as OxfHtfar a total of 10 characters including the 0x Once you have made any changes click on OK Provided the symbol or address is found the source containing the function declaration or address location will open and the line number will be highlighted If the symbol selected is a variable then another selection box will open asking you to select a source file match for the given variable K Matches for Global Variable linux_banner E4 init version c fs proc proc_misc c Make a selection and click OK
20. LICENSE AGREEMENTS OR a accept the terms of the license agreement do not accept the terms of the license agreement A progress bar will show the status of the Install once finished CDT should then be installed Select Yes and allow Eclipse to restart the workspace once CDT is installed Note If you wish to compile programs in Eclipse CDT you must install GCC CDT does not tend to give explicit errors when GCC is not properly installed so if it is behaving funny and doesn t seem to offer the expected array of actions this 1s a good thing to check Installing LinuxScope JTD Plug In Installing the LinuxScope JTD Eclipse plug in 1s similar to installing the CDT 1 Open Help gt Install New Software 2 Create a new local update site that points to the eclipse plugin LSJTDUpdateSite folder from the installation media Add Repository Location media 110111_1229 eclipse plugin LS TDUpdateSitef 3 Select LinuxScope JTD 4 0 0 and Next Install x Available Software Check the items that you wish to install pE Work with LinuxScope file media 110111_1229 eclipse plugin LSJTDUpdateSite E Find more software by working with the Available Software Sites preferences El VIIZEL 22 LinuxScope JTD 3 0 2 Select All Deselect All 1 item selected Details Default category for otherwise uncategorized features gt More Show only the lat
21. LINUXZYSCOPE JTD JTAG LARGET DEBUGGER LinuxScope JTD Installation Guide Version 4 0 0 Platform Support LinuxScope JTD v4 0 0 has been tested on the following platforms Linux Ubuntu 10 04 and 11 10 others will probably work Windows XP Other 32 bit NT based systems such as Windows NT 4 Windows 2000 and other Windows XP versions will probably work Hardware Requirements 1GHz CPU recommended 1GB of RAM S00MB free disk space depending on installation method less may suffice Prerequisites BDI Configuration It is assumed that the BDI has already been configured given an IP address and loaded with firmware appropriate for the target LinuxScope JTD does not configure the BDI nor does 1t come bundled with BDI firmware See the BDI documentation for information about configuring the probe TF TP Server A TFTP server is also required this is used to provide files to the BDI LinuxScope JTD does not currently come with a TFTP server Linux has a built in server while a good freeware TFTP server for Windows can be found at http tftpd32 jounin net See the BDI documentation for information about setting up a TFTP server Java VM A stable Java VM is required The latest Sun 1 6 x VM will work others especially GNU g1 may be insufficient The installation CD contains installation packages of Sun s Java Runtime Environment for supported platforms Or to download and install an appropriate Java VM please visit h
22. ary images used for debugging To create an empty project suitable for debugging select File gt New gt Project or File gt New gt LinuxScope JTD C Project JTAG Debug LinuxScope JTD File Edit Refactor Navigate Search Project JD Run Window Help New Stat ES Project gt Open File LinuxScope JTD C Project a 8 i 7 7 o eu K LinuxScope JTD C Project E Save Ctrl 5 EA Other Ctrl Select a project type 1f asked and select Next Y New Project Select a wizard Wizards H E CVS Simple cm Type a project name and choose Finish Directory C LinuxScope JTD workspace XTC Browse lt Back nt gt mn cm 3 4 Launching Debug Sessions To begin a debugging session select Launch Debug from the CommandTool You can also select Debug from the debug dropdown or Run gt Debug from the main menu 3 Launch Debug Debug As i E Load ll Organize Favorites Create manage and run configurations JTAG Load Debug Launch Mode E Perspectives These settings associate a perspective with JTD launch configurations A different perspective may be associated with each supported launch mode and can optionally be opened when a configuration is launched or when an application suspends via the Debug preferences To indicate that a perspective should not be opened select None Debug TAG Debug Restore
23. aunching a Debugging Session Exploring Views E Nhe i Click to perform will launch a preferences dialog EM Preferences JTAG Debug JTAG Debug JTAG Debugger Preferences License File Y License txt Script Output Directory Po Default Debugger Remote Address 192 168 1 2 Default Debugger Remote Port Hard Breakpoint Type 3 Hard O BDI Suppress Eclipse Error Dialog O Yes 2 No Default GDB Executable A Use this dialog box to set the defaults the BDI will use every time 1t launches a new debug session These default settings can be overridden when you setup a new debug session License File Be sure to specify a valid License file License files for LinuxScope can be obtained from Ultimate Solutions Inc http www ultsol com license htm Phone USA Canada 978 455 3383 Script Output Directory Directory where all script output files will be saved Default Debugger Remote Address IP address of the JTAG Probe you will be connecting to Default Debugger Remote Port The port number where you will communicate with the JTAG Probe Hard Breakpoint Type Chose to set a breakpoint directly on the BDI or through eclipse Suppress Eclipse Error Dialog Stop error dialog boxes from popping up all the time Default Breakpoint Type Forces the JTAG Probe to use Hardware or Software Breakpoints Default GDB Executable Several gdb executables are provided with LinuxScope in the gdb folder use one t
24. covery Options Cil Make Project C Project Paths Project References S ARCH powerpc Refactoring Histor 3 Y CROSS_COMPILE powerpc _linux ee Une Sng la zz PATH 7 Program Files lava jres binfclient c Task Repository Task Tags Validation Environment used for make builder Environment variables to set Variable value Mew Remove Append environment to native environment O Replace native environment with specified environment Restore Defaults Apply Add remove any environment variable that needs to be set to make your project build To build one of the make targets you have included right click on the project and select make targets gt Build Hg CAC Projects 3 al E ES WWW WEE H HHH HIH Debug a a bi eg ITE 30h of 481 i Select the target you want to build or add a new target then select the Build button Copy MH Delete gy Export Per e ta Into Open in Wew windows Index k Build Configurations k Make targets Create Clean Project Mowe Rename Import pP EI console E Build linus Retesh Close Project Run AS k Debug As validate Team a Compare with k Restore from Local History PDE Tools k Properties A lt Enter linux e B Error launching P Cannot run progr HA Make Targets Make Targets for linux Target Location Add clean Remove
25. d In text color Restore Defaults 2 2 2 GDB Timeouts When sending remote commands to the JTAG probe GDB uses a timeout value specified in the C C gt Debug gt GDB MI machine interface preferences pane This value can be adjusted if GDB receives spurious timeout errors Preferences ole type filter text General GL Ant General settings for GDB MI Fl C C Appearance Communication Build Console Debugger timeout ms z Code Formatter 10000 E Debug Launch timeout ms x Common Source L 30000 Editor Iw Automatically refresh modules Indexer El Make Managed Build Parser PathEntry Variables H Help Install Update Java Plugin Development Run Debug H Team A Restore Defaults Apply 2 2 3 Source Editor Preferences During debugging Eclipse automatically reuses the same editor window when opening source files This behavior can be changed on the Run Debug preferences pane cis Run Debug es T SS General Settings for Running and Debugging a CIC Reuse editor when displaying source code H Help a Install Update Activate the workbench when a breakpoint is hit Java Activate the debug view when a breakpoint is hit JTAG Debug a Skip breakpoints during a Bun to Line operation da Tasks Prompt for confirmation when deleting all breakpoints a Team Prompt for confirmation when deleting breakpoint containers
26. dd Symbol File action on the JTD Modules View provides a way to add symbols such as those associated with Linux kernel modules wv E Sym hol File EEE EEE EEE il ee et te ie te te nt Di AREA AAA SE D Module 1 2 Segments O Arguments ClearSymbols Prev Module Next Module To add a module the name of the module and the segment addresses are required There are three ways to add the segment addresses 1 Provide the addresses for the segments listed under the Segments radio button The text segment is required the others are optional 2 Paste in the map This is in the format output by insmod m Linux 2 4 kernels only Each line should have the form lt segment gt lt size gt lt address gt lt alignment gt 3 Provide the arguments to the GDB add symbol file command directly The format is lt text address gt s lt segment gt lt address gt This can be automatically generated by Linux 2 6 8 and later kernels using a script like the following To clear the current symbol table before loading the current modules select the ClearSymbols checkbox Up to 50 modules may be added Module information will be stored in the project s configuration settings for future sessions Prev Module and Next Module provide a way to iterate through the list of modules Clicking OK will load the module s symbols and present a new Add Symbol File screen bin bash gdbline module image F Outp
27. e disconnect button 5 8 Disassembly View Lo Disassembly Y HA EI MOxcOle24c amp 8 lt start kernel gt mflr r 3 Oxc lez24d0 lt start kernel 8 gt Stu r1 32 r1 T Oxc lez24da8 lt start kernel 16 gt Btw ro 36 r1 OxcOle24dc lt start kernel 20 gt stmw r29 20 r1 char command line extern struct kernel param start param stop param pe Interrupts are still disabled Do necessary setups then enable them ei lock kernel page address init printk KERN NOTICE OxcOle24ce lt start kernel 4 gt lis r3 16359 OxcOle24d4 lt start_kernel 12 gt addi r3 r3 4196 OxcOle24e0 lt start kernel 24 gt bl Oxc0019748 lt printk gt printk linux banner OxcOle24e4 lt start_kernel 268 gt lis r3 16359 OxcOle24e8 lt start kernel 32 gt addi r3 r3 2586884 i Mir A ZE A A en A n 2 Ers 1 Piar MA TADO E pe Je EI The disassembly view shows a mixed source and assembly view of the code referenced by the current stack frame If no sources are found by GDB this view will show assembly code only The left ruler shows the current instruction pointer and allows breakpoints to be set 5 9 Breakpoints View Debug Memory Ho Breakpoints 3 Signals Tasks Variables Expressions Console K oe ae Gel a mE E T gt E The breakpoints view is a simple list of defined breakpoints It can be used to determine which breakpoints are loaded and to toggle enable or disable breakpoints 5 1
28. e SDK 3 2 2 runtime New_configuration lsjtd C No such file Data Breakpoint devrocket workspace yosemite C No such file or directory There are 3 types of data breakpoints than can be set Data Write Breakpoint Data Read Breakpoint and a Data Access Breakpoint You can choose to set any type of Data Breakpoint on a symbol or global variable Select the function or variable name and select the option to set the breakpoint type you would like A dialog box will appear asking you to confirm your selection K Set data write breakpoint at Symbol or address Ox At this point if you want you can change the symbol name to set the breakpoint on You may also choose to select an address location If you choose an address location you must enter the full string as OxfHtfar a total of 10 characters including the 0x Once you have made any changes click on OK to set the breakpoint Provided the symbol is found the breakpoint will be set and you can view it from the breakpoints view To remove the breakpoint you should use the breakpoints view Section 5 8 You may also choose to set data breakpoints from the disassembly window Select the address where you want to set a data breakpoint and right click to open the selection menu BR Disassembly X mm BK Ri mianr 0 Run to Line Ctr R g Ox 2 Resume At Line 1 24576 Data Breakpoint 08 Ox Data Write Breakpoint 1 32768 Qx Data Read Breakpo
29. eakpoints view are meaningless Suppress Eclipse Error Dialog Default is no Use this option if you get error dialog boxes consistently during debugging Default GDB Executable This is the default GDB executable The selected GDB should match the target CPU and should either come from the installation CD or be compiled from the sources provided 2 2 Other Useful Preferences 2 2 1 Console Note These preferences are displayed only when the Preferences dialog is opened manually the dialog opened by the cheat sheet does not contain these preference pages Eclipse console windows can be configured to pop up whenever there is new output displayed This can become aggravating as GDB frequently produces output that is not interesting enough to warrant a distraction This behavior can be disabled by unchecking the Show when program writes to standard out error options on the Run Debug gt Console preferences page e Preferences type filter text H H General Ant C C Help Install Update Java Plugin Development Run Debug Pr rrr External Tools Launching String Substitution View Management Team Console Debug Console Settings Fixed width console li Limit console output Console buffer size characters O Displayed tab width E Show when program writes to standard out Show when program writes to standard error Standard Out text color Standard Error text color Standar
30. ed ama CDT Main Features 1 0 0 7V3 cLSvvE7E7AE7UAAAUMO Show only the latest versions of available software O Hide items that are already installed Group items by category What is already installed LJ Show only software applicable to target environment Contact all update sites during install to find required software lt Back Weg Finish Check the CDT Main Features box and click Next Click Next again install Install Details Review the items to be installed gt C C Development Tools 8 1 0 201206111645 org eclipse cdt feature group gt 4 C C Development Tools SDK 8 1 0 201206111645 org eclipse cdt sdk feature group Size Unknown Accept the License agreement and click Finish Install Review Licenses Licenses must be reviewed and accepted before the software can be installed Licenses License text Eclipse Foundation Software User Agreement February 1 2011 Usage Of Content E ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE DOCUMENTATION INFORMATION AND OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS COLLECTIVELY CONTENT U NOTICES INDICATED OR REFERENCED BELOW BY USING THE CONTENT YOU AGREE THAT YOUR USE OF THE CONTENT IS AND OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW IF OU DO NOT AGREE TO THE RMS AND CONDITIONS OF THIS AGREEMENT AND E TERMS AND CONDITIONS OF ANY APPLICABLE
31. est versions of available software LJ Hide items that are already installed Group items by category What is already installed LJ Show only software applicable to target environment Contact all update sites during install to find required software Review and accept the license terms Select Finish Select Install All if presented with Feature Verification dialogs Select Yes and allow Eclipse to restart the workspace with the new plug ins EH ere Uninstalling Plug ins Features To uninstall plug ins e g Prior to installing newer versions select Help gt About Eclipse SDK E About Eclipse SDK E Eclipse SDK Wersion 4 2 0 Build id 120120608 1400 c Copyright Eclipse contributors and others 2000 2012 All rights reserved Visit http www eclipse org platform Click Installation Details On the Installed Software tab select LinuxScope JTD and click Uninstall Eclipse SDK Installation Details gt Vi C C Development Tools 8 1 0 201206111645 org eclipse cdt feature group gt amp C C Development Tools SDK 8 1 0 201206111645 org eclipse cdt sdk feature g gt amp Eclipse SDK 4 2 0 120120608 140 org eclipse sdk ide EN SS E is feature provides extensions to CDT for using JTAG debuggers under Eclipse Uninstall Uninstall Details Review and confirm the items to be uninstalled pt LinuxScope TD Details Review and click Fin
32. gdbgui without x Replace the argument to target with something appropriate in general this is target lt arcitecture gt lt vendor gt lt os gt There is no easy way to get a list but reading bfd config bfd may provide some insights into what is accepted Also use a program prefix indicative of the target supported 4 Run make to produce and install a binary make amp amp make install 5 Clean up the intermediate files so that GDB can be configured and built again make distclean LINUX ASCOPE JTD JTAG LARGET DEBUGGER LinuxScope JTD User s Manual Version 4 0 0 Table of Contents KOODE At alba Back ote ssi lar 4 Md WCC ONG e saris euler A E E aaa ce had ch gala NOE oes ct huh cata andl 4 2 LE muxsScopeJ 1 Dc Wea Mia ri 6 2 Using Eclipse and Emuxscopo JID sida ia 14 2 1 Configuring LinuxScope JTD and the JTAG Probe ccocoooonoconcccoccncnnnnnnnnnnnnnnnonononanononnnnanoss 14 2 Z Other ET 16 AN A A A 16 II A A aie 17 EAS e Editor ET 18 DD A 19 gt WoOrkime WEEMS COPE JI Dieren a dio 20 Dl Lacan Per peca 20 A A ee 21 A O O 24 A Launch De DUS Session caida Be E la Bud PrO Te EE 32 A Souro COIS iia 38 4 Omme Cine TO Tariel aaa iia 38 42 SOUS Break eet 38 4 Setin Data Break DOES tii dia 38 4 4 Finding Function and Variable Declaratong 40 TAG Debue Perspective OU na 43 Sl ED REGISTERS VIC West ds 44 DD VIO GUNS SN Eegenen 45 diz NAIM Os erleedegt eeben eebe 46 3 3 Finding Breakpoint symbo
33. hat most closely resembles your debug target Time Delay after reset Command Increase this delay if your system takes a long time to reset When finished click apply then ok The next cheat sheet page will launch titled Setting up the workbench A Welcome x p p tt Return to Welcome Getting Started si b Introduction 2 v Configuring LinuxScope JTD KA Setting up the Workbench 2 Select Window gt Open Perspective gt Other and choose JTAG Debug This step changes the perspective to set up the workbench for JTAG Debugging creating a window layout suitable for common tasks Perspectives are customizable so experiment with the options on the Window menu To restore the perspective to its default chose Window gt Reset Perspective The JTAG Debug perspective is automaticaly displayed when you click the Click to Perform button E Click to Perform Creating a Project SA Launching a Debugging Session F Exploring Views ei Click to Perform will launch the JTAG Debug perspective view in Eclipse if it is not already open The cheat sheet will now display the next page titled Creating a project E Welcome x tt Return to Welcome Getting Started sc Introduction v Configuring LinuxScope JTD w Setting up the Workbench Creating a Project In order to save information about debugging sessions a project is required The Eclipse C
34. ify the debug argument on the command line when running Eclipse Installing the CDT The C C Development Tools CDT 1s installed from within Eclipse itself Run Eclipse and open the Help menu Select Install New Software The following wizard should appear install Available Software Select a site or enter the location of a site p Work with type or select a site y Find more software by working with the Available Software Sites preferences E O There is no site selected een Details Show only the latest versions of available software O Hide items that are already installed Group items by category What is already installed LJ Show only software applicable to target environment Contact all update sites during install to find required software Click the Add button enter the information below and click OK Add Repository Name C Development Local Location http download eclipse org tools cdt releases juno Y nce Install Available Software Check the items that you wish to install D Work with C Development http download eclipse org tools cdt releases juno y Find more software by working with the Available Software Sites preferences type filter text A gt C C Development Tools 8 1 0 201206111645 A C C Development Tools SDK 8 1 0 201206111645 gt Uu CDT Optional Features Select All Deselect All 2 items select
35. int fEFOBO Oxfffff050 mtspr 308 r NOTE The options to set data breakpoints are only available when you have launched a valid debug session and are connected to the target 4 4 Finding Function and Variable Declarations You can open function and variable declarations directly from the source window by selecting the function or variable in question and selecting the Open Symbol Declaration option E main c X 495 extern struct kernel param start param stop param 496 497 Interrupts are still disabled Do necessary setups then 498 enable them 499 500 AR 501 page add Undo 502 printk Revert File 503 setup al Save 504 setup pe 505 Show In Alt Shift W 506 507 Mark Gem abil fan call console drivers in 508 print ES ae prage 509 Paste CLAN e SMP_PESE Shift Right oe pe Shift Left 513 Ger sre Ctri fF interrupts such as the 514 timex Uncomment Gill happens at smp init 515 time Add Block Comment Ctrl Shift inctioning scheduler 516 Remove Block Comment Ctri Shift 1 517 sched ir 518 E ES Content Assist Ctr Space 519 Disak Add Include Ctrl Shift N fuling is extremely 520 fragi Format Ctri Shift F Fst time 521 Show in C C Projects DIA preempt Refactor hai Disassembly 7 gt Open Declaration F3 Oxfffff034 mtsp Open Definition Ctri F3 Oxfffff038 lis Go to next member Ctrl Shift Down Oxfffff03c ori Go to previous member Ctrl Shift Up OXFFF
36. ion When this checkbox is enabled you can evaluate a simple expression as a condition to stop the trace experiment on All the variables in the expression are calculated sequentially registers When this button is checked the BDI will store all register contents at each trace iteration variables When this button is checked the BDI will store local variables to the current function is any Function arguments When this button is checked the BDI will store all arguments to the current function is any Local stack When this button 1s checked the BDI will store the local stack frame Script List of commands to send to GDB Lines starting with are ignored Lines ending with Y are continued on the next line The script is executed every time the breakpoint is hit and the results are saved Stop on errors If this is checked the script will stop after any line that results in an error Otherwise execution will proceed After the script runs the Progress dialog appears pA Progress Information Operation in progress Cancel Details gt gt You can manually stop the trace script at anytime by clicking the cancel button After the trace script finishes running it will process the output and save It into the specified file and directory Mon Commands As with console views scripts accept probe telnet commands if they are prefixed with the GDB mon command Special Commands The script interface supports special commands that
37. ish Platform specific Installation Notes Windows Platforms Tools such as GCC and GDB are typically run under Cygwin which is a layer that provides Unix like APIs on Windows To get Cygwin go to http www cygwin com and run the setup exe You can also use MINGW and MSYS www mingw com The GDB binaries provided with LinuxScope JTD were built with mingw and msys Installation Verification Troubleshooting Review the following screens to make sure the information is reasonable 1 Help gt About Eclipse Select Configuration tab Make sure the proper VM is being used This screen also provides a way to capture this information to the clipboard this allows the configuration to be submitted in support requests 2 Help gt About Eclipse Select Plugins tab Make sure the Ultimate Solutions com ultsol lsjtd ui plug in is listed Building GDB If the bundled GDB versions are insufficient for a given target additional GDB builds can be made using the following procedure 1 Make sure GCC and GNU make are installed these are necessary to compile GDB 2 Extract the contents of gdb6 8 src tar gz located in the gdb src directory on the installation CD to a temporary working location using a command such as rar xzf gdb6 8 src tar gz 3 Change to the gdb 6 8 directory and configure GDB using a command similar to the following configure target powerpc linux gnu program prefix ppc disable gdbtk disable
38. kernel 20 gt stmw r29 20 ri 2 unknown_bootoption D e EEE e a evtern etrner kernel naram er art naramif eran narami lt gt 5 Debug Xi 0 E console Memory Breakpoints Signals Tasks Variables Expressions Ex A PI TE gt CH ZS 28 amp aA LK j LinuxXTC JTD Debugger Process 4 23 06 9 15 PM GNU gdb 6 4 A fo Sa Co E ht 2005 Free Software Foundation Inc 8 89 GDB Cross 4 23 06 9 15 PM Suspended pyrig l doe oe Thread 0 Suspended GDB is free software covered by the GNU General Public License and you are 1start_kernel at init main c 431 Oxc01e24c8 welcome to change it and or distribute copies of it under certain conditions O start bereft Oxc0002050 Type show copying to see the conditions vi Debugger Process 4 23 06 9 15 PM There is absolutely no warranty for GDB Type show warranty for details vi C stuff jinuxstx vmlinux 4 23 06 9 15 PM This GDB was configured as host i686 pc cyowin target powerpc 2860 linux gnu v 9 10 The JTAG Debug perspective contains several features 1 Menu Bar pull down menus 2 Toolbar Quick access to common operations 3 Perspective Chooser Open and switch perspectives 4 Editor Area Used for source code displays 5 Left View Area Contains registers modules script and project views 6 Disassembly View Shows current assembly instructions 7 Debug View Shows current target processes and stack frames 8 Debug Views Contains several debug views including c
39. l A dci 48 3 4 Controlling Debugging with the Debug Vi Wii avia 49 A 51 SELDI T EEEE E E E E N E E da 52 A PP E ao ssw EA TA A EEO AS 58 5 8 Disassembly EE 59 EE EE eege 60 5 10 Variables Expressions and Memory VIEWS aii 61 Eeer 62 1 Quick Start 1 1 Welcome When LinuxScope JTD is run for the first time the workspace must be selected This is the folder where Eclipse will store all projects and settings This path should not contain spaces Select a workspace LinuxScope JTD stores your projects in a folder called a workspace Choose a workspace folder to use for this session This screen can offer several items that may be useful to Eclipse beginners The tutorials section bottom center contains a Getting Started cheat sheet to help you get started with LinuxScope JTD To access the tutorial click the Tutorials icon and then the LinuxScope JTD entry E JTAG Debug LinuxScope JTD File Edit Navigate Search Project JTD Run Window Help amp Welcome X La Tutorials Learn how to be productive using LinuxScope JTD by completing end to end tutorials that will guide you along the way LinuxScopeJTD Java Development Get started with LinuxScope JTD Create a Hello World application Go through the initial workspace and project Learn how to create a simple Java application setup and start debugging that prints Hello world Create a Hello World SWT application Learn how to create a standal
40. nch configuration Name the configuration Fil in the Mam tab with the project and the executable image The executable image is optional in the case where the target already contains code to be debugged and no debug symbols are desired Fill in the Start tab with the steps to take when launching the debug session The Debugger tab is preloaded with values from the global preferences but check to make sure the values are correct for this launch The Debug dialog is automatically opened when you click the Click to Perform button Click to Perform Exploring Views L By clicking Click to Perform you will be taken to the launch debug session dialog Refer to section 3 4 Launching Debug Sessions of this manual 2 Using Eclipse and LinuxScope JTD 2 1 Configuring LinuxScope JTD and the JTAG Probe Global LinuxScope preferences can be set in the Preferences dialog Open the preferences dialog by selecting Window gt Preferences from the main menu bar Fig pA Preferences JTAG Debug Io JTAG Debugger Preferences aoe AG Debugger Preferences H C C License File C LinuxScope JTD License txt IS Help IS Install Update Java Default Debugger Remote Address Default Debugger Remote Port IS Plug in Developmer Run Debug Hard Breakpoint Type Team Hard BDI Suppress Eclipse Error Dialog Yes No Default GDB Executable C GE exe script Output Directory
41. o the start address for a Nand Read command End Address The end address where the binary file should be loaded in Nand must fall in the Nand Address window specified by the Nand base address Nand Size parameters If the file size exceeds Start Address End Address then the file 1s clipped to fit the specified range Also the end address for a Read Nand command Erase Flash Erases the entire nand flash device Nand ID Returns the Manufacture ID of the Nand Device Read Nand Reads the Nand device from the range specified from Start Address till End Address 7 General Tips Debugging Boot ROMs and Other Bare Metal Programs Use of hard breakpoints is recommended Code can be loaded into the target using the load option command for memory resident programs once the target is initialized Flash based code can be loaded with the flash wizard Debugging the Linux Kernel Use of soft breakpoints is recommended because there are far more breakpoints available However the soft breakpoints cannot be set until the Linux MMU is enabled This means that the first breakpoint hit must be a hard breakpoint after which the soft breakpoints can be installed Here 1s a simple set of steps to accomplish this Launch a debug session without attaching to the target using soft breakpoints 2 Use the JTD Modules View search feature to locate the start_kernel symbol 3 Use the Add Hard Breakpoint action to set a breakpoint 4 Attach
42. one SWT Java application that displays a window to the user Eclipse Plug in Development Create an Eclipse plug in This brings up the LinuxScope JTD cheat sheet 1 2 LinuxScope JTD cheat sheet fs Return to Welcome Getting Started This cheat sheet will automatically launch wizards perform actions and guide you through the individual steps to get started with LinuxScope JTD To learn more about using cheat sheets or to see a list of available cheat sheets click help 2 To start working on this cheat sheet cick the Click to Begin button below t Configuring LinuxScope JTD KA t Setting up the Workbench 7 t Creating a Project C7 t Launching a Debugging Session KA t Exploring Views 7 The dialogs and pages launched by the cheat sheet is described in the sections to follow The initial cheat sheet page is titled Introduction Clicking the Click to Begin button launches the Configuring LinuxScope JTD page A Welcome x D Ch S a t Return to Welcome Getting Started b Introduction Select the JTAG Debug page in the Window gt Preferences dialog and set the TCP IP parameters for your JTAG debugger Also select the version of GDB that is appropriate for your target The JTAG Debug page is automatically launched when you click the Click to Perform button gt Click to Perform G3 a Setting up the Workbench G3 t Creating a Project L
43. onsole memory and variables 9 Quick View Panel Drag views here for quick access 10 Progress Monitor Displays status and progress information 5 1 JTD Registers View Within the JTAG Debug perspective the JTD Registers view displays registers that GDB does not know about but that are listed in the prob e s register definition file To modify a register right click ei JTD Registers i Registers 3 7 O di Los JTD Registers A it bar 0x 14000200 ce 101 cicr 0x00e45f80 AR cimr 0x00000001 AM cipr 0x00000000 AYA cisr 0x00000000 oll ciyr 0x0000 E cmp count AIX oper 0x0090 ool cir 0x00000000 S Di dar 0x00020000 10 ide adr 0x40002000 DI dr oO MY Modify Register mei ACA E collapse All 1010 dees Collapse A ee DND der 0x71c7400f ANN dsisr 0x00000000 1 S der z gsmr_h sha gsmr it 2add 0x10 AND i2brg 0xf Mot i2cer 0x00 0 err 0x00 i i2com 0x00 wc 5 2 JTD Modules View The JTD Modules view provides a tree of all modules and symbols loaded into GDB This allows for symbol table searches source location and breakpoint identification TID Registers Registers Script 45 ITD Modules 3 gt i E LAS qe E e Es A 4 6 init A calibrate c do_mounts_initrd c do_mounts_rd c do_mounts c initramts c main c la debug_kernel Dec je 2048 183 do_early_param Oxc01e 2390 init_setup Oxc01e 2358 init OxcOOO22 1c initcall
44. ot of the Debug View tree The hierarchy contains Launch Sessions The debug session name Processes There is a process entry for the target as well as helper processes Threads Only one thread 1s supported by the hardware probe Stack Frames The symbol on the top of the stack appears at the top inside the window Many of the views and actions in Eclipse depend on the selection made in the debug view For example The variables view displays variables for the current stack frame The state of the debug actions depends on the selected target thread The console view shows the input and output of the selected process Double clicking a stack frame opens the associated source file The tool bar buttons listed from left to right are 1 Remove Terminated Launches Cleans up terminated debug sessions 2 Restart Restarts the debug session 3 Load Loads the binary image into the target via the JTAG probe 4 Instruction Stepping Mode Step instructions rather than source lines this must be selected if there are no sources or if the stack is not valid 5 Step Into Step into function or branch instruction 6 Step Over Step over statement or instruction 7 Step Out Continue execution until function exits 8 Run Resume Resumes target execution 9 Suspend Suspends target execution 10 Connect Connect to remote target this is used 1f the session was launched without the Attach to JTAG target on startup option 11 Disconnect Disconnects Lin
45. rib gt select memory access mode display information about the current core display information about all cores LOAD lt offset gt lt file gt lt format gt load program file to target memory VERIFY lt offset gt lt file gt lt format gt verify a program file to target memory PROG lt offset gt lt file gt lt format gt program flash memory lt format gt 5REC or BIN or AQUT or ELF ERASE lt address gt lt mode gt erase a flash memory sector chip or block lt mode gt CHIP BLOCK or SECTOR default t sector UNLOCK lt addr gt lt step gt lt count gt unlock multiple flash sectors FLASH lt type gt lt size gt lt bus gt change flash configuration DELAY lt ms gt delay for a number of milliseconds HOST lt ip gt change IP address of program file host PROMPT lt string gt defines a new prompt string CONFIG display or update BDI configuration CONFIG lt file gt lt hostlP gt lt bdilP gt lt gateway gt lt mask gt HELP display command list i terminate the Telnet session Core state debug mode Debug entry cause JTAG break request Current PC OA 416104 Current 5R 00d 0005c01 Current LR r31 UI 3418c54 Current SP 129 Ooch APS 38 b 70 vC BUS The Telnet view alows you to connect to a telnet session on the BDI It uses the IP address of the selected debug configuration from the debug view To connect to a session select the connect button to disconnect select th
46. ruct kernel param start _ param stop param 496 497 Interrupts are still disabled Do necessary setups then 498 enable them 499 500 hock a 501 page ac 502 printk 503 setup 504 setup 1 ete Show In Alt Shift w gt E Cut Ctri x 7 Mar Copy Ctri C can call console drivers in PF paste Ctrl V SES Jit SD Dir Shift Right 511 Shift Left 519 E me i SES Comment Ctri IA ON h S A giel Uncomment Ctri LEE me the 31 Cim happens at smp n t 15 time a ara Ci Functioning scheduler x Remove Block Comment Ctrl Shift 1 EE Content Assist Ctri Space S Add Include Ctrl Shift N H Dis duling is extremely ae 4 Format Ctri Shift F area 920 fraq rst time 521 x Show in C C Projects 522 Dreem Refactor gt Disassembly 3 Open Declaration F3 R3333 mt Open Definition Ctri F3 Oxfffff038 lij Goto next member Ctri Shift Down Oxfffff03c or Goto previous member Ctri Shift Up Oxfffff040 mti Declarations e Oxfffff044 mf References gt Oxfffff048 anc search Text gt Oxfffff04c bne OXfffffO50 mts Run to Line Ctri R 2 Resume At Line Y Add Watch Expression z Ke ints Signals Tasks Variables Expressions Search Preferences db powerpc elf gdb exe 10 23 07 2 58 PM to see the conditions Open Symbol Dedaration no warranty for GDB Type show warranty for details 7 Data Write Breakpoint red as host i686 pc cygwin target powerpc elf Data Read Breakpoint s
47. start with There are currently two special commands wait lt milliseconds gt causes the script to pause before continuing to the next command sync causes Eclipse to sync with the remote target and refresh all the views loop n causes the script to be executed n iterations endloop terminates the sequence of commands to iterate Automatically Triggered Scripts The script view provides placeholders for scripts that are automatically run when certain events occur On Attach Runs after LinuxScope connects to the remote target On Reset Runs after the target is reset either via the launch process or the reset button reset the target system change startup mode display or set current breakpoint mode set PC and start current core CONT lt cores gt restart multiple cores lt cores gt core bit map T lt pe gt trace on instuction single step HALT lt cores gt force core s to debug mode lt cores gt core bit map Bl lt addr gt lt mask gt lt cores gt set instruction breakpoint lt mask gt address mask lt cores gt core bit map BD RW lt addr gt lt mask gt lt cores gt set data breakpoint lt mask gt address mask lt cores gt core bit map CI id gt clear instruction breakpoint s of current core CD lt id gt clear data breakpoint s of current core CLEAR lt cores gt clear all breakpoints of all or selected cores change the current core MEMACC CPU BUS lt att
48. t of commonly used debugging functions in addition to some JTAG specific views Select Perspective Hace acs Repository Exploring F Debug Resource EbTeam Synchronizing Perspectives can be customized by dragging views around and by using items on the Window menu The default perspective configuration can be restored by selecting the Window gt Reset Perspective option 3 2 Command Tool The JTD command tool offers an easy way to access key debugging functions from one toolbox You can start it by clicking on the CommandTool button from the menu bar al JTAG Debug LinuxScope JTD File Edit Navigate Search Project JTD Run Window Help To El te ROG a Bt we Or Ge wiles ey oC DS 2 Regis Script e af A You can also start it from the JTD menu KA JTAG Debug LinuxScope JTD File Edit Navigate Search Project IR Run Window Help Fa PEE ee 64 CommandToo cee Golf Fash FEMP A S SW hl Dump Memory Info The toolbox will launch If you are not connected to a target most of the buttons will be grayed out JID Command Tool EN Launch Debug Ae ome ISS CA 0363630 The Command Tool buttons include 2 Launch Debug Launch debug sessions H DI Memory Dump Dumps the target memory to a file Load Memory Load a binary file to target memory Load Loads the binary image into the targe
49. t via the JTAG probe Flash Launch the Flashing Utility Instruction Stepping Mode Step instructions rather than source lines this must be selected if there are no sources or if the stack is not valid Step Into Step into function or branch instruction Step Over Step over statement or instruction Step Out Continue execution until function exits Run Resume Resumes target execution Suspend Suspends target execution Connect Connect to remote target this is used 1f the session was launched without the Attach to JTAG target on startup option Disconnect Disconnects from the JTAG probe but does not kill the debug session Reset Resets the target connected to the JTAG probe via the GDB load command Sync Synchronizes LinuxScope GDB and the JTAG probe useful 1f the probe was accessed directly via Telnet 3 3 Creating a Project Before performing any debugging a project is required An Eclipse project is a file system directory folder that contains files related to a coding debugging project Even if no sources and binaries are to be stored in Eclipse a project is still required to save breakpoints launch configurations and so on CDT provides several project types These project types help build code by means of standard and managed makefiles Such projects can be used in LinuxScope debugging sessions Setup of a complex CDT project can be bypassed if CDT is not used to build the bin
50. tallation Using LinuxScope JTD as a plug in requires Eclipse Platform 4 2 0 1s required Eclipse CDT 8 1 0 is required Installing the Eclipse Platform Eclipse 4 2 0 1s required This can be downloaded from http www eclipse org downloads packages release ganymede r Eclipse IDE for C Developers 1s recommended as it comes bundles with CDT 8 1 Other platforms can also be used and latter updated with the CDT plugin Once downloaded the archive should be extracted to the location where Eclipse should be installed When launching eclipse it is a good idea to specify the Java VM to use especially if more than one is installed This can be done by specifying command line arguments to eclipse for example eclipse vm c jdk1 6 0 jre bin java For more information see http www eclipse org eclipse development readme_ eclipse 3 4 1 html Shortcuts to launch eclipse are platform dependent and are not automatically added Note When you launch Eclipse 1t asks for a workspace path This 1s the location where all projects settings code data etc are stored Do not select a path with a space in it as this can cause failures with external tools such as GDB To facilitate collection of logging information during beta testing debug logging should be enabled Add the following line to the options file in the eclipse directory if options does not exist create it org eclipse cdt debug m1 core debug true Also spec
51. to the target reset and resume so that the boot ROM can load the kernel 5 Once start_kernel is reached soft breakpoints will be working and all soft breakpoints will be automatically sent to the target on the next step resume action As long as the hard breakpoint remains set this process does not need to be repeated The hard breakpoint is saved with the project Debugging Linux 2 4 Kernel Modules 1 Use insmod m when adding the module to the kernel 2 Paste the result into the Add Symbol File dialog when adding the module symbols Note that in general module initialization code can t be debugged in this manner because it runs before the symbol map is returned If it crashes the map can t be captured In this case the module must be rewritten so that initialization is deferred until after loading Debugging Linux 2 6 Kernel Modules Because the module loading process has moved from user space into kernel space insmod does not print out a map of what it did However if CONFIG KALLSYMS 1s set the kernel exports the map to the sys file system where it can be retrieved using a script such as the one in the section entitled Adding Symbol Files Application Debugging Eclipse and CDT are useful for debugging Linux applications The hardware probe is not used for this Here are some tips 1 Use the Debug perspective not the JTAG Debug perspective 2 Run the application under gdbserver on the target
52. ttp java sun com javase downloads index jsp A full list of operating systems and JVMs tested with Eclipse can be found here http www eclipse org projects project plan php projectid eclipse target_environments GCC For the Eclipse CDT to work properly development tools such as gcc must be installed and included in the path See the platform specific notes These are not needed for debugging but are essential for building binaries under Eclipse If Eclipse will not be used to build images gcc is not required GDB GDB forms the foundation for all debugging activity in LinuxScope JTD so a good version is required For optimal performance a version must be used that contains extensions added by the LinuxScope development team These extensions fix some not yet implemented MI commands and will be submitted to the DMI working group for inclusion in future GDB versions LinuxScope JTD comes with pre built GDB 6 8 binaries for supported platforms and targets which can be directly copied to the host machine The source code for this GDB release along with the extensions 1s provided on the installation disc so that builds for additional targets and platforms can be made Installation Overview LinuxScope JTD can be installed in two ways as a standalone product or a plug in to an existing Eclipse based product Standalone installation is the simplest method There are installers scripts provided to simplify the standalone install process
53. urations JTAG Load Debug Launch Mode Tax eH E Bente 7 Startup Gr Arguments PS Environment Advanced Eclipse Application Equinox OSGi Framew E Java Applet E Java Application C LinuxScope JTD gdb ppc gdb exe SS Java Bean GDB command file a f ITD Isjtd SS Warning Some commands in this file may interfere with the startup operation of the Jo Akit debugger for example run Es Source El Common Debugger Options Shared Libraries Connection GDB debugger Ju JUnit Plug in Test GDB command set Remote Java Applicati Protocol mi verbose console mode Startup Tab This tab contains several options for controlling startup behavior when the debug session is launched Debug Configurations Create manage and run configurations JTAG Load Debug Launch Mode fe x E ee type filter text Sa E E Main Ss Debugger Startup 6d Arguments PE Environment Es Source ES Common fc C C Application a c C C Attach to Application SSSR EES e New_configuration Abatron BDOL2000 3000 fc C C Postmortem Debugger a JID Abatron E csb1880 SH rim linux 0 Breakpoint Type rim linux 1 rim linux 2 rim linux 3 E Attach to JTAG target on startup rim linux 4 Target Reset Options Launch Group No Reset Reset Halt Mame csb1880 Reset Run ma 5000 Load code inte target on startup Initial Breakpoint
54. uts an add symbol file line suitable for pasting into gdb to examine Z a loaded module ed sys module 1 sections echo n bin cat text for section in a z do if section text then echo n H s section bin cat section fi done echo 5 3 Finding Breakpoint Symbols If sources are available to Eclipse the GUI can be used to locate and set breakpoints Breakpoints can be set directly on source lines Breakpoints can be toggled by right clicking to the left of source lines in the source editor E softirq c X Y m 52 A 33static inline void wakeup softirqd unsigned cpu SE 95 struct task struct tsk Esoftirgd task cpu 36 97 if tsk amp amp tsk gt state TASK RUNNING 38 wake up process tsk 59 a 60 E 1 3 OU D 1 ra D Toggle Breakpoint AE id reakpoint Properties Toggle Hard Breakpoint wt w Show Quick Diff Ctrl Shift Q 7 gt The JTD Modules View can be used to set breakpoints This uses GDB to identify sources and symbols 5 4 Controlling Debugging with the Debug View The debug view displays a hierarchy of selectable debug objects and also provides a set of actions for controlling target execution Debug X go Hi 2 ZE GR gt ZS Op is a ZS Isjtd 11D Se GDB Cross 6 18 07 12 31 PM Suspended Thread 0 Suspended eo C LinuxScope JTD gdb ppc gdb exe 6 18 07 12 31 PM e Existing Starting from the ro
55. uxScope from the JTAG Probe but does not kill the debug session 12 Reset Resets the target connected to the JTAG probe via the GDB load command 13 Sync Synchronizes LinuxScope GDB and the JTAG probe useful if the probe was accessed directly via Telnet There are also Buttons in the tool bar which come from other Eclipse applications 5 5 Console View Debug Memory Breakpoints Signals Tasks Variables Expressions El console Ez Es hH ial E me O Linux BOI Debugger Process 3 23 06 1 03 AM A bt FO start kernel at init main c 431 1 0xc0002050 in start here print pc Si 3223200968 print x pc Si OxcOlez24ca m Direct interaction with GDB is possible by entering commands into the console for the GDB process Black lines come from the output stream red lines come from the error stream Mon Commands Commands that are interpreted by the remote target rather than GDB can be sent with the monitor or mon GDB command The set of mon commands available are the same as the set of commands accepted over Telnet connections to the JTAG probe Entering mon help into the GDB console results in a list of these commands 5 6 Scripting The Script View provides a set of buttons that send commands to GDB or to the remote target E Script ES Each script gets a button with a label when pressed this button runs the script To the right are modify and delete buttons The green
Download Pdf Manuals
Related Search
Related Contents
Software Manual VisiWinNet__VisiWinNET Smart Hunter 53249 Instructions / Assembly triflex Untitled - amazing Motorola motorola Headphones User Manual Belkin P35727ec User's Manual Manual Opel Astra H 2010 Copyright © All rights reserved.
Failed to retrieve file