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.

CCS/PROCESSOR-SDK-AM335X: NDK project fails

Part Number: PROCESSOR-SDK-AM335X

Tool/software: Code Composer Studio

Hello,

I am still trying to get an example, any example, of a NDK project to load and run on a BBB.  I am getting a verification error most of the time.  Otherwise, it loads but doesn't debug... or even appear to run.  The putput from a debug launch is:

CortxA8: Output: EMIF Timing register configuration is done ....... 
CortxA8: Output: PHY is READY!!
CortxA8: Output: DDR PHY Configuration done 
CortxA8: GEL Output: Turning on EDMA...  
CortxA8: GEL Output: EDMA is turned on...  
CortxA8: Output: ****  AM3359_ICE Initialization is Done ****************** 


CortxA8: File Loader: Verification failed: Values at address 0x80068060 do not match Please verify target memory and memory map.
CortxA8: GEL: File: C:\Users\scott\workspace_v7\NIMU_BasicExample_bbbAM335x_armExampleproject\Debug\NIMU_BasicExample_bbbAM335x_armExampleproject.out:
 a data verification error occurred, file load failed.

What I have done, starting from scratch:

I build the entire PDK as defined by these steps:

processors.wiki.ti.com/.../Rebuilding_The_PDK

C:\ti\pdk_am335x_1_0_7\packages>pdksetupenv.bat
Optional parameter not configured : CG_XML_BIN_INSTALL_PATH
REQUIRED for xdc release build
Example: set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
Optional parameter not configured : DOXYGEN_INSTALL_PATH
REQUIRED for xdc release build
Example: set DOXYGEN_INSTALL_PATH=C:/ti/Doxygen/doxygen/1.5.1-p1/bin
**************************************************************************
Environment Configuration:
    LIMIT_SOCS                : am335x
    LIMIT_BOARDS              : evmAM335x icev2AM335x bbbAM335x skAM335x
    PDK_INSTALL_PATH          : /ti/PDK_AM~1/packages
    C6X_GEN_INSTALL_PATH      : C:/ti/ti-cgt-c6000_8.1.3
    TOOLCHAIN_PATH_GCC        : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_A15        : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_A8         : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_A9         : C:/ti/gcc-arm-none-eabi-4_9-2015q3
    TOOLCHAIN_PATH_M4         : C:/ti/ti-cgt-arm_16.9.2.LTS
    TOOLCHAIN_PATH_Arm9       : C:/ti/ti-cgt-arm_16.9.2.LTS
    TOOLCHAIN_PATH_EVE        : C:/ti/arp32_1.0.8
    CL_PRU_INSTALL_PATH       : C:/ti/ti-cgt-pru_2.1.5
    UTILS_INSTALL_DIR         : C:/ti/xdctools_3_32_01_22_core/bin
    FPULIB_PATH               : C:/ti/gcc-arm-none-eabi-4_9-2015q3/lib/gcc/arm-none-eabi/4.9.3/fpu
    CROSS_TOOL_PRFX           : arm-none-eabi-
    XDC_INSTALL_PATH          : C:/ti/xdctools_3_32_01_22_core
    BIOS_INSTALL_PATH         : C:/ti/bios_6_46_05_55
    IPC_INSTALL_PATH          : C:/ti/ipc_3_46_00_02
    EDMA3LLD_BIOS6_INSTALLDIR : C:/ti/edma3_lld_2_12_04_28
    NDK_INSTALL_PATH          : C:/ti/ndk_2_25_01_11
    IMGLIB_INSTALL_PATH       : C:/ti/imglib_c66x_3_1_1_0
    DSPLIB_INSTALL_PATH       : C:/ti/dsplib_c66x_3_4_0_0
    MATHLIB_INSTALL_PATH      : C:/ti/mathlib_c66x_3_1_1_0
    UIA_INSTALL_PATH          : C:/ti/uia_2_00_06_52
**************************************************************************
Changing to short name to support directory names containing spaces
current directory: /ti/PDK_AM~1/packages
PDK BUILD ENVIRONMENT CONFIGURED
**************************************************************************

C:\ti\PDK_AM~1\packages>CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin
'CG_XML_BIN_INSTALL_PATH' is not recognized as an internal or external command,
operable program or batch file.

C:\ti\PDK_AM~1\packages>set CG_XML_BIN_INSTALL_PATH=C:/ti/cg_xml/bin

C:\ti\PDK_AM~1\packages>pdkProjectCreate.bat
=========================================================================
Configuration:
   SOC             :   AM335x
   BOARD           :   all
   ENDIAN          :   little
   MODULE          :   all
   PROCESSOR       :   arm
   PDK_SHORT_NAME  :   C:\ti\PDK_AM~1\packages\
=========================================================================
Checking Configuration...
Complete
=========================================================================
   PDK_PARTNO         : AM335
   PDK_ECLIPSE_ID     : com.ti.pdk.am335x
   RTSC_PLATFORM_NAME : ti.platforms.evmAM3359
   RTSC_TARGET        : gnu.targets.arm.A8F
   CCS_DEVICE         : "Cortex A.AM3359.ICE_AM3359"
*****************************************************************************
Detecting all projects in PDK and importing them in the workspace C:\ti\PDK_AM~1\packages\\MyExampleProjects
Detected Test Project: EMAC_BasicExample_evmAM335x_armExampleproject
....  (a while later, it completes with no errors)

(Why it requires "CG_XML_BIN_INSTALL_PATH" and yet doesn't have it set by default is a mystery to me.. But none-the-less...)

I import the NIMU basic project:

I build the project, and try to launch it, and get a Stellaris error:

Okay, I'm not using Stellaris, as I did for the TM4C projects...  So I change it to the XDS100  (I have a BlackHawk 20 pin)

The, I try to launch it again, and I get the error most times:

In anticipation of the question "Are you resetting the BBB?", Yes.  In fact, I can run a "Typical" example project brought in with the "Resource Explorer".

Occasionally, I can actually get ti to complete loading.  It appears to be random, and not related to anything I can control.

When that happens the debugger does NOT allow me debug, it doesn't stop on any break points, and doesn't even offer a PAUSE Option.  And the console displays none of the messages that the project prints.  I have to assume that it's not really running.

What is wrong with this "out of the box" sample project?

I also tried to import and run the NIMU FTP example project, and have the same results.  However, I also noticed that these two projects share the same cfg file!!  So, after I attempted to change the config for this example, it also messed with the FTP project.

Again, I can pull in the normal "typical_BeagleBone_Black_CortexA" from the resource explorer, build it, load it, and debug it.  Which tells me that the BlackHawk JTAG unit is working, and the BBB board is functioning properly.

Any advice for this?

(And, for another thread, it appears impossible to simply add NDK support to the existing project...  Using XGCONF leaves a potholes of unresolved symbols.  And there is nothing documented about manually adding libs to the project, every resource says to use the cfg file.  :-(  )

-CSW

  • Hi Christopher,
    The data verification error is documented in the link below:
    software-dl.ti.com/.../troubleshooting-data_verification_errors.html

    It explains the various potential causes. But yes, I would expect the out-of-box example to work out-of-the-box. Likely there is some step or setting missing. I will move your thread to the Sitara forum where there experts there have the most experience with the SDK and can help you best.

    Thanks
    ki
  • Ki,

    Thanks for your reply.  That is for the load problem, but not the inability to use breakpoints or debug.

    I already saw that document.  I've been fighting this for a couple days, and searching around.  My reaction was also that it shouldn't be like this "out of the box".  And that I didn't want to try to earn a PhD troubleshooting someone else's example project.

    Also, if this was a GEL file, device selection, or other setting, it would not be intermittent.

    Is it possible I need to upgrade some driver for the BlackHawk?  This is a brand new drive which I installed a fresh CCS 7.2 because of all the problems I'm bee dealing with.  So, somewhere, it installed the Stellaris, Blackhawk, XDS drivers.  I remember doing that manually when I installed CCS 6.2, but I didn't install then manually on this new drive.

    Also, " move your thread to the Sitara forum" ...?  I though I posted this to the Sitara forum (see below).  And then selected the AM335x, which is a Sitara device.  If I'm not selecting the right place to post, please let me know.

    -CSW

  • Christopher Weber said:
    When that happens the debugger does NOT allow me debug, it doesn't stop on any break points, and doesn't even offer a PAUSE Option.  And the console displays none of the messages that the project prints.  I have to assume that it's not really running.

    The target is running. In your screenshot, see that the A8 is running (highlighted with the pink box in the screenshot below). The reason why many of the debug buttons are disabled is because there is no proper debug context selected. If you select on the node for the A8 (highlighted with the red box in the screenshot below), then those buttons should be available

  • Christopher Weber said:
    Thanks for your reply.  That is for the load problem, but not the inability to use breakpoints or debug.

    Sorry, I missed that. I just posted regarding this (see the reply before this one)

    Christopher Weber said:
    Is it possible I need to upgrade some driver for the BlackHawk?  This is a brand new drive which I installed a fresh CCS 7.2 because of all the problems I'm bee dealing with.

    7.2 should have pretty recent balckhawk drivers. But you can check for updates to see if they have posted more recent ones (Help -> Check for Updates)

    Christopher Weber said:
    Also, " move your thread to the Sitara forum" ...?  I though I posted this to the Sitara forum (see below).  And then selected the AM335x, which is a Sitara device.  I

    The forum is a little funky in that since you specified CCS as your development tool, the forum thinks the question can either go in the Sitara or CCS forum. If you leave the "Select a forum" blank, I guess it defaults to CCS.

  • Ki,

    Thanks.   I selected it, and was able to pause.  It's paused deep in some disassembly.   (as kind of expected, since SYS/BIOS is running, and the "taskFxn" only does one "print" then exists)

    However, it still doesn't actually stop on any break points at the beginning

    *and*  all the System_printf (..)  that I peppered all over the place do not show in the console.

    This is in contrast to the simple "typical" project.  It stops at "main", stops at break points, prints messages...

    This is why I surmise that this NIMU project is not really running on the target device.

    Now... a few more times trying to load, restart, debug, break... when I tried to press pause, I got this message:

    CortxA8: Trouble Halting Target CPU: (Error -2062 @ 0x1FE) Unable to halt device.
    Reset the device, and retry the operation.
    If error persists, confirm configuration, power-cycle the board, and/or try more
    reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.628.3)

    Where would I find these JTAG settings?  The "BlackHawk" icons that were install on my desktop are all empty.

    And, why wouldn't it work with the "BlackHawk" debug probes?  I'm using the BH USB V100V2.

    Thanks.

    -CSW

  • Ki,

    I just saw this too:

    CortxA8: Trouble Setting Breakpoint with the Action "Finish Auto Run" at 0x80008368: (Error -1066 @ 0x333C) Unable to set/clear requested breakpoint. Verify that the breakpoint address is in valid memory. (Emulation package 6.0.628.3)

    CortxA8: Breakpoint Manager: Retrying with a AET breakpoint

    So, I need to start digging into the MAP file?

    After lunch...  

    -CSW

  • Christopher Weber said:

    Thanks.   I selected it, and was able to pause.  It's paused deep in some disassembly.   (as kind of expected, since SYS/BIOS is running, and the "taskFxn" only does one "print" then exists)

    However, it still doesn't actually stop on any break points at the beginning

    *and*  all the System_printf (..)  that I peppered all over the place do not show in the console.

    This is in contrast to the simple "typical" project.  It stops at "main", stops at break points, prints messages...

    This is why I surmise that this NIMU project is not really running on the target device.

    I suspect it run initially and then gets stuck somewhere. Is there a 'main' in the application? CCS will by default try to run to main on program load. If there is no main, then CCS will just continue to run until halted or it hits another breakpoint. I would guess that your suspicion that the project is not really running is correct... or at least it is not running properly.

    Christopher Weber said:

    Where would I find these JTAG settings?  The "BlackHawk" icons that were install on my desktop are all empty.

    These settings are in your target configuration file:

    http://processors.wiki.ti.com/index.php/Debug_Handbook_for_CCS#Target_Configuration_Files

    Christopher Weber said:
    And, why wouldn't it work with the "BlackHawk" debug probes?  I'm using the BH USB V100V2.

    That probe is supported. Not sure why you thought it was not.

    But back to the error message:

    Christopher Weber said:
    CortxA8: Trouble Halting Target CPU: (Error -2062 @ 0x1FE) Unable to halt device.
    Reset the device, and retry the operation.
    If error persists, confirm configuration, power-cycle the board, and/or try more
    reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.628.3)

    Sometimes this is a symptom of the target getting into a bad state than an issue with the debug probe settings. I won't be quick to lower TCLK as it is likely mot the root cause.

  • Ki-Soo Lee said:

    I suspect it run initially and then gets stuck somewhere. Is there a 'main' in the application? CCS will by default try to run to main on program load. If there is no main, then CCS will just continue to run until halted or it hits another breakpoint. I would guess that your suspicion that the project is not really running is correct... or at least it is not running properly.

    Yes, it has a "main".  it's just the example from "C:\ti\pdk_am335x_1_0_7\packages\MyExampleProjects\NIMU_BasicExample_bbbAM335x_armExampleproject".  Completely unchanged. Of course, that folder has no files in it. They are all linked from elsewhere (a useful concept for big shared projects, but annoying as heck for looking at a sample).

    Ki-Soo Lee said:
    Christopher Weber
    And, why wouldn't it work with the "BlackHawk" debug probes?  I'm using the BH USB V100V2.

    I am referring to the devices named "BlackHawk"...  they all fail when testing. There are five devices named "BlackHawk 20 pin", and everyone one of them gives a failure when I try to "verify".
    But the one on the list that doesn't have "BlackHawk" in it's name works. It's "Texas Insturments XDS 100v2 USB Debug Probe" ...  And yet it connects to my "BlackHawk USB XDS 100 V2"  (This device: 
    https://store.ti.com/TMDSEMU100V2U-20T-XDS100v2-JTAG-Debug-Probe-20-pin-cTI-version-P1848.aspx
    So, what is a "BlackHawk" and what isn't?
    -CSW

    Christopher Weber
    And, why wouldn't it work with the "BlackHawk" debug probes?  I'm using the BH USB V100V2.

    That probe is supported. Not sure why you thought it was not.

    But back to the error message:

    Christopher Weber
    CortxA8: Trouble Halting Target CPU: (Error -2062 @ 0x1FE) Unable to halt device.
    Reset the device, and retry the operation.
    If error persists, confirm configuration, power-cycle the board, and/or try more
    reliable JTAG settings (e.g. lower TCLK). (Emulation package 6.0.628.3)

    Sometimes this is a symptom of the target getting into a bad state than an issue with the debug probe settings. I won't be quick to lower TCLK as it is likely mot the root cause.

  • Christopher Weber said:
    But the one on the list that doesn't have "BlackHawk" in it's name works. It's "Texas Insturments XDS 100v2 USB Debug Probe" ...  And yet it connects to my "BlackHawk USB XDS 100 V2"  (This device: 
    https://store.ti.com/TMDSEMU100V2U-20T-XDS100v2-JTAG-Debug-Probe-20-pin-cTI-version-P1848.aspx
    So, what is a "BlackHawk" and what isn't?

    Ah, yes. You are right, it is confusing. All the XDS100, XDS110 and XDS200 vendors use our (TI) drivers. So that is why for those, you would use the ones that have "Texas Instruments" in front. But It is a different story for the XDS510 and XDS560 based ones. Blackhawk (and other vendors) tend to have their own drivers for those so you would need to use the ones provided by Blackhawk.

  • Ki,
    Thanks for that insight. Even if it is confusing, at least I know there is a little reason behind it.

    You'll love this. Now it's working.
    I rebooted. Then applied CCS Updates (they were just compiler updates I think). Then I restarted the BBB. I imported all the source files in the project, so they aren't "linked", did a clean and rebuild.
    It stopped at "main" and it stopping at my breakpoints, and the print messages are showing on the console. Everything is working.

    I can't explain why.

    Next question... actually a question about a question.
    How do I make it DHCP? And should I ask this question in a new thread?

    There is a hard coded IP in a source file... I can't even find the file, because it's part of the PDK or NDK or something, and the path is only relative to some MACRO. Obviously, I can't (shouldn't) change it there.
    DHCP is already on in the XGCONF editor. But it's still using the hardcoded IP.

    Thanks
    -CSW
  • Christopher Weber said:
    You'll love this. Now it's working.

    I do love that it is working! I can't explain it either but I'm glad that you have a running environment

    Christopher Weber said:
    Next question... actually a question about a question.
    How do I make it DHCP? And should I ask this question in a new thread?

    This part I can't help with much at all. It is definitely for the experts in this forum. Yes it would probably be best to start a new thread in this forum.

    Good luck!

    ki

  • Ki,
    Okay, new thread it is. But first I'm gonna dig at it myself before calling for help.

    -CSW
  • Ki,

    I solved DHCP myself, but hit a next roadblock...  I wanted to post.  Suddenly, I cannot post.  I get a message:

    You have posted to a forum that requires a moderator to approve posts before they are publicly available.

    If the administrator has configured this forum to support email notifications you will receive an email when your post is either approved or denied (if you have emails enabled in your profile).

    Return to the Sitara Processors Forum forum

    Except it's the same forum I posted this to.  And we have been replying to.

    What's going on?

    -CSW

  • That's weird. I just tried to post in this forum and was successful so maybe it was a temporary issue with the servers. Please try again
  • I tried twice on Friday, and both times it gave me that response. Not sure why.

    I don't want to try again, since it went to a moderator. I'd look like I was trying to SPAM the forum. Besides, on Saturday I saw a reply from Biser that "The RTOS team has been notified" So I guess it eventually went through.

  • Ki,

    It happened again.  This time when I was replying to one of my own posts.  In a different forum.

    I think someone is getting tired of me posting all the broken problems I experience  (I spent ALL DAY just trying to compile in C++, and there are nothing but header conflicts or unresolved functions... what a mess)

  • I forwarded your post to the E2E forum admins. They are currently looking into this.

    Thanks
    ki
  • You should be good now.

    Thanks

    ki

  • Thanks, but that would be a "relative" interpretation. :-)

    I have been uncovering so many errors and conflicts in the TI provided packages, it's giving me lots of grey hair. This really does NOT look like it's ready for general release.

    -CSW