This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux Aware debugging on the BeagleBoard

Other Parts Discussed in Thread: CCSTUDIO

I would like to do what is described in the following article:

http://tiexpressdsp.com/index.php?title=Linux_Aware_Debug

I would love to track down the author of the article as I cannot seem to get CCSV4Beta5 to work. I'm using a Blackhawk BH-USB-560M JTAG emulator with a BeagleBoard RevC2. I read that there was somthing wrong with the ES2 part, but since I'm using the ES3.1 part, this does not apply.

I am using the latest Linux Kernel in OE, namely V2.6.29. My u-boot and MLO are also from the latest OE. I have compiler debug symbols turned on, optimize for speed turned off and kernel optimization set at -O1.

When I launch the TI Debugger as described in the above article, I get an error message:

Trouble Reading Register:
Error 0x80002004/-1203
Fatal Error during: Register, Control,
The DAP access, address 0x000001E4, has returned a SLAVE error.

On the console I get the following:

<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>

OMAP 32K Watchdog Timer is disable
 Putting DPLL into bypass before proceeding
 Putting CORE DPLL into bypass before proceeding
 Locking CORE DPLL
 PRCM clock configuration IIA setup has been completed
 SystemClock = 19.2 MHz
 DPLL_MULT_VALUE = 242
 DPLL_DIV_VALUE = 13
 CORE_DPLL_CLK = 663.771 MHz
 CORE_CLK = 331.8855 MHz
 L3_CLK = 165.9427 MHz
MM01: mDDR Samsung K4X51323PC - 512 Mbit(64MB) on CS0, 4M x 32bit x 4Banks
common_sdram_init() completed
SDRC initilization for mDDR_Samsung_K4X51323PC completed
19.2MHz clock configuration IIa
     CORTEXA8_CORE_VERSION = 0x411FC083
Cortex_A8_0: Trouble Reading Register: Error 0x80002004/-1203 Fatal Error during: Register, Control,  The DAP access, address 0x000001E4, has returned a SLAVE error. 
    CORE_REVISION = 0x00100003
     IS NOT COMPREHENDED BY THIS GEL FILE
Cortex_A8_0: GEL: Error while executing OnTargetConnect(): target failed to read memory at 0x20790600.
OMAP 32K Watchdog Timer is disable
 Putting DPLL into bypass before proceeding
 Putting CORE DPLL into bypass before proceeding
 Locking CORE DPLL
 PRCM clock configuration IIA setup has been completed
 SystemClock = 19.2 MHz
 DPLL_MULT_VALUE = 242
 DPLL_DIV_VALUE = 13
 CORE_DPLL_CLK = 663.771 MHz
 CORE_CLK = 331.8855 MHz
 L3_CLK = 165.9427 MHz
System Reset has occured.

Cortex_A8_0: Failed Software Reset
OMAP 32K Watchdog Timer is disable
 Putting DPLL into bypass before proceeding
 Putting CORE DPLL into bypass before proceeding
 Locking CORE DPLL
 PRCM clock configuration IIA setup has been completed
 SystemClock = 19.2 MHz
 DPLL_MULT_VALUE = 242
 DPLL_DIV_VALUE = 13
 CORE_DPLL_CLK = 663.771 MHz
 CORE_CLK = 331.8855 MHz
 L3_CLK = 165.9427 MHz
CPU Reset callback function has fired
<<<<<<<<<<<<<<>>>>>>>>>>>>>>>

Anyone know how to make this work?

  • If you stop the countdown during u-boot such that you get to a prompt, are you able to connect using CCS at that time?  It would be good to know if your connection problems are only when Linux is running (e.g. related to power modes) or if there's something more fundamental?

  • Hi Brad,

    That is what I do normally. I stop the countdown in u-boot and then launch the debug session. I am able to reset the processor from CCSV4 and I see u-boot start, but the countdown then stops at 10 seconds. If I hit the run icon, nothing happens.

  • I've not actually tried this yet under CCS 4.0.  From my experience with CCS 3.3 you should be careful with the gel files.  I imagine the gel file is written for the omap3evm rather than the beagle board.  Plus, I know even for the omap3evm there are some boards with Samsung memory and others with Micron memory so that could be goofed up as well.

    Here's the procedure I took under CCS 3.3:

    • Removed all gel files from cc_setup such that upon connection to the processor we would not have any "interference" with the DDR from CCS.
    • During the countdown of u-boot I connect with CCS which halts the processor.
    • Hitting run should resume the countdown once again.  You can hit enter so that u-boot halts and gives you a console interface.
    • You should be able to halt and run repeatedly and everything should continue working.

    If you get that working ok then I believe your emulation setup is ok.  At one point I recall seeing some kernel patches related to preserving the state of emulation upon suspend/resume.  So if you can connect and run/halt during u-boot but not during run-time then that could be your issue.

    As a sanity check on your silicon revision can you please inspect the IDCODE register as shown here to verify that you definitely have ES3.0 silicon?

  • John,

    Those messages in the console are from the default gel file.  That file assumes you don't have an OS loaded - in fact it issues many writes to physical memory addresses that under linux are mapped to completely differently.  The gel file is intended for early development on the cortex before your application runs on boot up and configures the target accordingly. 

    I forgot to mention this when I last updated that wiki.  Remove all the gel files (on the advanced tab in the setup editor, expand the tree and delete the "initialization script" value for every target), and you should be ok. 

    Darian

  • Hi Darian,

    OK, I did as you suggested, I deleted the startup scripts for each target and now I can get much further than before, but there are still some problems.

    I power up my BeagleBoard and stop the u-boot countdown. I then right click on my target configuration and select "Launch Selected Configuration". The BeagleBoard console shows the processor is reset and the u_boot countdown stops at 10. I then get and error in the CCS console "Cortex_A8_0: Failed Software Reset ".

    I then do a Target/Load Symbols - vmlinux, which works successfully.

    When select "Enable OS Debugging", I get the following error:

    Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read linux_banner: linux_banner - not found

    In the Error Log, I get the following:

    <<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 10:20:37 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *linux_banner: Invalid character found in the string.
    <<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>

    Trying to set without OS Aware Debugging, does not work correctly. The sequence of calls for the thread is incorrect and stepping into non-inline functions does not change that sequence. There are four sequences for the main thread and stepping into a non-iniline function does add an additional call to that thread.

    Darian, thank you for your help, this has been very helpful and hopefully we can overcome this last obsticle.

  • Hi Brad,

    The IDCODE I get is 0x3B7A E02F or ES3.0, which is a little surprising as the TI guys said that the BeagleBoard RevC2 board was using the ES3.1 silicon. Anyway, there is no cc_setup in CCSV4 or as best as I can determine, but I did remove the GEL startup scripts as suggested by Darian and this did improve the tools dramatically. I am able to start and pause the board during the u-boot countdown, so that part seems to be working correctly.

    Thank you for all your help. Much appreciated.

  • The failure to issue a software reset I can't explain.  Do you have the option to auto-reset after a connect enabled?  (Select Tools->Debugger Options, scroll down to the Connection Options group and look at the value of the first option "Reset the target on a connect").

    As for the second error, "linux_banner" is a global symbol in the kernel that points to a string that says "Linux" and some version information.  Linux aware debug tries to verify that there is in fact a linux image present by reading the data at that symbol.  I'm guessing this error is due to trying to enable linux debug too soon - if you let uboot continue and halt the target immedately after, can you successfully enable OS debugging?

    Darian

  • I disabled "Reset the target on a connect" and now this fixes the first problem.

    I set a hardware breakpoint at kernel_init() and and run to that point. Again, I tried to set OS Debugging and I get the following error on the console:

    Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *linux_banner: Invalid character found in the string.

    In the error log, I get two errors:

    <<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 11:11:48 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *linux_banner: Invalid character found in the string.

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 11:11:48 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *linux_banner: Invalid character found in the string.
    <<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>

    Both error look the same to me.

    Do you know what string CCS is looking for. Is this the string obtained from "uname -a"? It says an invalid character found in the string. Here is what uname -a shows:

    Linux beagleboard 2.6.29-omap1-05532-ge673d79 #3 Fri May 1 00:00:31 PDT 2009 armv7l GNU.Linux

     

  • John,

    It's a global char array - You should actually be able to put "linux_banner" in the expression or memory view and see what's there. 

    Mine is the following string: "Linux version 2.6.22.1-omap1 (a0792123@go-engtest5) (gcc version 4.2.0 20070413 (prerelease) (CodeSourcery Sourcery G++ Lite 2007q1-21)) #3 Wed Sep 17 10:33:39 EDT 2008"

    Darian

  • When I "linux_banner" in memory view, I get the following errors in the error log:

    <<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:09:42 PDT 2009
    Failed to access memory: address=0xc0459c1c size=4 Error Code=9

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:09:40 PDT 2009
    Failed to access memory: address=0xc0459b68 size=840
    Error Code=0x9: Memory Request Failed [Adrs 0xc0459b68-0xc0459eaf] memoryUpdateInfo.isAborted=true
    Memory Request Failed [Adrs 0xc0459b68-0xc0459eaf] memoryUpdateInfo.isAborted=true

    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Here is what I see in the memory view.

     

    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????
    linux_banner
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????
    linux_proc_banner
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????

    The address for "linux_banner" is 0xC0459B68.

    What address do you have for "linux_banner"?

  • OK, I rebuilt my kernel using the CodeSourcery compiler and now I get the following for linux_banner:  .
    linux_banner
    L    i    n    u    x    .    v    e    r    s    i    o    n    .    2    .
    6    .    2    9    -    o    m    a    p    1    .    (    j    s    y    n
    e    s    i    o    @    D    e    l    l    X    P    S    G    e    n    2
    )    .    (    g    c    c    .    v    e    r    s    i    o    n    .    4
    .    2    .    1    .    (    C    o    d    e    S    o    u    r    c    e
    r    y    .    S    o    u    r    c    e    r    y    .    G    +    +    .
    L    i    t    e    .    2    0    0    7    q    3    -    5    1    )    )
    .    #    3    .    M    o    n    .    M    a    y    .    1    1    .    1
    2    :    1    8    :    3    2    .    P    D    T    .    2    0    0    9
    .    .    .    .
    However, I still get the following error on my CCS console:

    Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read max_cpus: max_cpus - not found

    And the error log shows:

    <<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:30:48 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read max_cpus: max_cpus - not found

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:30:48 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read max_cpus: max_cpus - not found

    <<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

  • John,

    Linux debug works by reading various kernel data structures from the target via the addresses in the symbol file.  If an of the required symbols are stripped, or if the version of the kernel has changed significantly enough that the symbols have different names, then it's not going to work.

    On my version of the kernel (2.6.22) max_cpus is a static defined in init\main.c.  Is that variable still in your version of that file (ie has the file changed significantly enough that we'll need to supply you with an updated linux debug dll), and if so, can you access it in the expression view?

    Darian

  • Hi Darian,

    There is a setup_max_cpus, but no max_cpus in init/main.c. It is defined as follows:

    <<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>

    /* Setup configured maximum number of CPUs to activate */
    unsigned int __initdata setup_max_cpus = NR_CPUS;
    <<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>

    Also, linux_banner is defined as follows:

    <<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>

    const char linux_banner[] =
        "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@"
        LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n";
    <<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>

  • John,

    I don't think this is going to work on your version of the kernel.  The developer who did most of the integration with the kernel data structures, and who would need to update the code to work with newer kernel versions, is on vacation this week.  I'll discuss this with him next week and get back to you.  I'm assuming working with an earlier kernel is not a solution for you...

    Darian

  • Hi Darian,

    Of all the weeks in the year, how can the developer choose this week to go on vacation ;-)

    Anyway, I changed setup_max_cpus to max_cpus and recompiled, but this did not work any better, so I suspect there is something else going on.

    As you know, the Linux developers are always changing structure names, so I would suggest using a mapping file to translate between the names of the structures used by CCSV4 and the names of the structures in the current Linux Kernel, or some mechanism like this to solve the incompatibilities between kernel versions. 

    Thank you again for all your help. I look forward to a fix next week.

  • HI Darian,

    OK, I built Linux Kernel 2.6.22.18, which is the only one I can find with a beagelboard config file. I tried to debug as before. Now I get and error:

    Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *cpu_name: Symbol *cpu_name (0x0) is not in kernel space

    The error log shows:

    <<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 17:27:40 PDT 2009
    Error: Cortex_A8_0: Can't initialize TLD Device Driver: A supported Linux image is not detected on the target: Fail to read *cpu_name: Symbol *cpu_name (0x0) is not in kernel space

    <<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>

  • John,

    It sounds like it's found the right symbol, but the value hasn't been initialized yet.  On my version, it's initialized in setup_processor in arch/arm/kernel/setup.c.  If you run to there and return from it, will linux debugging enable at that point?

    Darian

  • Hi Darian,

    OK, that worked. I can now enable OS Debugging once "cpu_name" is initialized.

    Now, as I step through some of the starup code, I see the following errors in the Error Log:

    <<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Tue May 12 09:33:59 PDT 2009
    Failed to execute runnable (java.lang.UnsupportedOperationException)

    org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.UnsupportedOperationException)
        at org.eclipse.swt.SWT.error(SWT.java:3374)
        at org.eclipse.swt.SWT.error(SWT.java:3297)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:126)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:996)
        at org.eclipse.core.launcher.Main.main(Main.java:971)
    Caused by: java.lang.UnsupportedOperationException
        at com.ti.debug.engine.impl.OSAwareManager.getOSObjNodeInfo(OSAwareManager.java:278)
        at com.ti.ccstudio.debug.engine.proxies.PxyOSAwareManager.getOSObjNodeInfo(PxyOSAwareManager.java:183)
        at com.ti.ccstudio.debug.core.kov.ObjectNode.<init>(ObjectNode.java:40)
        at com.ti.ccstudio.debug.core.cdi.OSManager.getRootOSObject(OSManager.java:118)
        at com.ti.ccstudio.debug.ui.views.kov.TreeContentProvider.inputChanged(TreeContentProvider.java:93)
        at org.eclipse.jface.viewers.ContentViewer.setInput(ContentViewer.java:246)
        at org.eclipse.jface.viewers.StructuredViewer.setInput(StructuredViewer.java:1542)
        at com.ti.ccstudio.debug.ui.views.kov.KernelObjectView$3.run(KernelObjectView.java:269)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
        ... 20 more
    <<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Tue May 12 09:33:59 PDT 2009
    Unhandled event loop exception
    <<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    These exceptions seem to repeat each time I step into or step over in the source window.

    I also see this error after pausing the processor:

    <<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Tue May 12 09:43:26 PDT 2009
    Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".

    java.lang.ArrayIndexOutOfBoundsException: 0
        at com.ti.ccstudio.disassembly.core.impl.TIDisassemblyBlock.addDisassemblyBlock(TIDisassemblyBlock.java:413)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyEditorInput.addDisassemblyBlock(TIDisassemblyEditorInput.java:625)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyEditorInput.replaceDisassemblyBlock(TIDisassemblyEditorInput.java:610)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyView.setStartAddress(TIDisassemblyView.java:800)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyView.selectAndReveal(TIDisassemblyView.java:1342)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyView.computeInput(TIDisassemblyView.java:1256)
        at com.ti.ccstudio.disassembly.ui.TIDisassemblyView.selectionChanged(TIDisassemblyView.java:1119)
        at org.eclipse.ui.internal.AbstractPartSelectionTracker$1.run(AbstractPartSelectionTracker.java:119)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:843)
        at org.eclipse.ui.internal.AbstractPartSelectionTracker.fireSelection(AbstractPartSelectionTracker.java:117)
        at org.eclipse.ui.internal.PagePartSelectionTracker$1.selectionChanged(PagePartSelectionTracker.java:45)
        at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
        at org.eclipse.core.runtime.Platform.run(Platform.java:843)
        at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
        at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:149)
        at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:160)
        at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1976)
        at org.eclipse.debug.internal.ui.viewers.AsynchronousViewer.updateSelection(AsynchronousViewer.java:820)
        at org.eclipse.debug.internal.ui.viewers.AsynchronousViewer.attemptSelection(AsynchronousViewer.java:635)
        at org.eclipse.debug.internal.ui.viewers.AsynchronousViewer$1.runInUIThread(AsynchronousViewer.java:506)
        at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:94)
        at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
        at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:123)
        at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3325)
        at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2971)
        at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
        at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
        at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
        at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
        at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:96)
        at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
        at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
        at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
        at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
        at org.eclipse.core.launcher.Main.run(Main.java:996)
        at org.eclipse.core.launcher.Main.main(Main.java:971)

    <<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

     

  • John,

    The first exception I think it caused by the kernel objects view.  That's actually an old view that shouldn't even be in the product anymore.  If you close that, everything should work as normal.

    The other issue it outside of the area I'm familiar with. It looks like a disassembly view bug and I'll inform the necessary engineers.

    Darian

     

     

  • Hi Darian,

    Fantastic news. I am now able to run the debugger without these errors. I closed the kernel object tab and that did the trick. I do see the other error from time to time, but I think it only occurs when I have source code displayed in the dissassembly window.

    The best news is that I am able to run and then halt even after the kernel has started up. This was never possible with the BDI200 or the PEEDI emulators. I can now see all the threads running, which is just is very helpful.

    Thank you for all your hard work and please let me know as soon as you have a CCV4 fix so that I can use the 2.6.29 kernel. I do need this ASAP.

  • >>The best news is that I am able to run and then halt even after the kernel has started up.

    Just out of curiousity, can you step?

    Not that it is a big deal.  But I found with other Eclipse based debuggers I could not step.  But I could "run to breakpoint"  with no problem and got used to debugging that way.

  • Hi Darian,

    I hope the CCSV4 developer is well rested after his/her vacation. Did you manage to speak with the developer about supporting the 2.6.29 kernel? I did try renaming the setup_max_cpus to max_cpus, but CCSV4 is still complaining that it cannot find max_cpus.

  • Hi Joe,

    Yes, Single Stepping works great, both at the source code level and at the assembler level.

  • john3909 said:

    When I "linux_banner" in memory view, I get the following errors in the error log:

    <<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:09:42 PDT 2009
    Failed to access memory: address=0xc0459c1c size=4 Error Code=9

    eclipse.buildId=4.0.0.14000
    java.version=1.5.0_14
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
    Command-line arguments:  -os win32 -ws win32 -arch x86

    Error
    Mon May 11 12:09:40 PDT 2009
    Failed to access memory: address=0xc0459b68 size=840
    Error Code=0x9: Memory Request Failed [Adrs 0xc0459b68-0xc0459eaf] memoryUpdateInfo.isAborted=true
    Memory Request Failed [Adrs 0xc0459b68-0xc0459eaf] memoryUpdateInfo.isAborted=true

    <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    Here is what I see in the memory view.

     

    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????
    linux_banner
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????
    linux_proc_banner
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????    ????????    ????????    ????????    ????????
    ????????    ????????    ????????    ????????

    The address for "linux_banner" is 0xC0459B68.

    What address do you have for "linux_banner"?

    Hi John,

    I am the developer for the CCS v4 component that reads the Linux kernel data from the target.

    All these "????????" in the memory view imply that the memory address ranges are not available.

    It seems to me that the virtual memory is not set up properly or the MMU is disable.

    Perhaps, you were enabling the feature before the kernel is initialized and part of the kernel initialization is to set up the page table.

    If you are debugging the kernel start up, you do not have to enable the driver at all. You simply load the vmlinux symbol file.

    We will look into if the driver can detect that the kernel is not initialized yet and output a more meaningful error message.

    Regards,

    Raymond

  • Hi John,

    The max_cpus variable was renamed to setup_max_cpus in 2.6.26 kernel.

    I am working on a fix on this.

    I hope to have it available by the end of this week.

     

    Regards,

    Raymond

  • Hi Raymond,

    You are correct, I realized this after Darian gave me some feedback last week. I had to make sure that the MMUhad been setup first and that the variables had been initialized and then debugging in the 2.6.22 kernel worked great. You have done some really nice work and I very much appreciate your hard work.

     

  • Hi Raymond,

    Using the 2.6.29 kernel, I renamed setup_max_cpus back to max_cpus, and recompiled, but this did not seem to fix the problem, so I think there is something more going on than just a name change.

  • Hi John,

    I will certainly test it before I release it.

    I am currently getting the Linux tree from git.kernel.org and will build the kernel and test it on the beagle board.

    Do you have 2.6.29 uImage and vmlinux I can use to save some time?

    Regards,

    Raymond

     

     

  • Hi Ramond,

    The mainline still needs several patches to work correctly. I'm using OpenEmbedded to build my kernel, which uses the following GIT:

    git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git linux-omap-2.6

    OpenEmbedded then applied several patches to get a stable kernel. I have everything you will need, but there doesn't seem to be a simple way to attach these to this message. Do you have a ftp server, or perhaps we can speak privately to get you everything you need. My ID on the #beagle IRC is john3909.

     

     

  • Hi Raymond,

    I haven't seen you on IRC, so this is the only way I know to contact you. Is there any update on when I might get to test the 2.6.29 support?

  • Hi John,

    We found that the problem exists in the kernel version 2.6.26 and up. The problem has been fixed.

    The CCSv4 official release will have this fix and support kernel version 2.6.26 and up.

    We are working on an update for you. I hope to make it available to you later today or early tomorrow.

    Regards,

    Raymond