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.

AM3517 + CCS + SD510USB skipping instructions; odd behavior

Other Parts Discussed in Thread: AM3517

I'm seeing some odd behavior with CCSv4.2.1, an AM3517EVM board and the SD 510USB debugger.

For instance, right now, when I'm doing assembly instruction stepping through some C code, the PC doesn't go straight through the code.  It will bounce around the image in SRAM.  It doesn't appear to be obeying the rules of the processor.

The AM3517.xml file was given to me by Rafael.  It's in this page: http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/89769/318318.aspx#318318

Here's some pictures showing the issue: http://e2e.ti.com/support/development_tools/compiler/f/343/t/92435.aspx

 

Thanks,

Matt

  • Hi Matt,

    I see this typically when working with optimized code.  Stepping thru the C code will jump around alot depending on the optimization level that was invoked during compile.  If you step through the assembly code, you should see instructions execute as expected.

    Regards,

    james

  • Hmm... perhaps I wasn't clear... it's ASSEMBLY LEVEL instructions that are being skipped, not C-level statements.

    I am debugging some of each, but it makes no sense that the ASSEMBLY LEVEL instruction sequence flow is not being followed.

    I've submitted so many posts to this forum that I'm not clear now on who I've told what.  Sorry for that.

    Matt

  • Yes, you shouldn't be skipping around at the assembly level.  I'm not quite sure what could be happening.  Is this the xloader from the AM3517 PSP that you are running?  Maybe i can try it on my setup here.

    Regards,

    James

  • Here's what I'm doing:

                  come out of reset

                  set the processor state to supervisor

                  set r13 to an address below code

                  clear the stack memory (just for kicks)

                  bl       teststack (in a separate file)

    teststack:

        stmfd    sp!,{r0-r3,lr}
        mov        r0,#0xff
        mov        r1,#0xfe
        mov        r2,#0xfd
        mov        r3,#0xfc   
        bl        teststack2   
        ldmfd    sp!,{r0-r3,pc}
       
    teststack2:
        stmfd    sp!,{r0-r3}
        mov        r0,#0
        mov        r1,#1
        mov        r2,#2
        mov        r3,#3
        ldmfd    sp!,{r0-r3}
        bx           lr

    EVERY TIME I try to execute the "bx lr" instruction at the end of teststack2, the machine stops at 0x1400c (prefetch abort vector).

    I've isolated it to this.

    It's got SOMETHING to do with breakpoints.

    If you want to suggest me to run a little tiny code project, I'm fine with that.  I personally think TI isn't doing enough to help me with this problem which I have been fighting for over a week, it's just taken me a while to narrow it down.  I've never used tools that work as poorly as these or that appear to have such poor support for a chip from a vendor.

    We picked this tool chain (CCS) for this processor (AM3517) because we were assured it was the best combination.  Nothing could be further from the truth!

  • Hi Matt, i don't readily see an issue with what you are doing.  Can you post the project you are working with?  I can try to reproduce it here.

    Regards,

    James

  • 7181.tasngbl.zip

    Hi, James,

    Thanks for the offer.  Here's the project.  If you single step down to "teststack", then step into it, on my machine the first STMFD doesn't store nor does it update SP.

    If you'd like a more direct way to communicate, please let me know.

    Regards,

    Matt

  • Hi Matt,

    unfortunately i'm not able to reproduce the issue.  I loaded up your project, rebuilt the code, downloaded it and stepped through, and i was able to step thru the code in question without any issues.  I did a "rebuild all", as the original .out file did not seem to correlate with the source code.  May want to try this.  I also used the xml file from the other forum post.

    So at this point i'm not quite sure what else to try.  My CCS version is 4.2.1.00004

    Regards,

    James

     

  • I've been testing and rebuilding all day.

    I changed a string in one of the files for privacy, and didn't rebuild it.

    This is bizarre.

    Did you test it on an AM3517EVM board?

  • Yes i'm on a AM3517EVM.  I even have an SD XDS510USB JTAG.  So the setup is the same.

    Regards,

    James

  • So you used all of my same configuration?  Or did you have to plug any special files in to CCS to make it work?

  • I used your config.  The only thing extra i did was rebuild. 

    We can try a quick webex if you'd like.  I've got mtg number 310 414 555 live now.  Go to webex.com and click "Attend a Meeting"

    Regards,

    James

  • Sorry, but I didn't receive this email in time to respond.  I would really enjoy the chance to show you what I'm going through.  Could we arrange a teamviewer session together?

    Thanks and regards,

    Matt

  • Hi Matt, any progress here?  We can try to link up this afternoon or tomorrow.  I've got another webex live now if you want to join.  Meeting number 751 234 311.

    Regards,

    James