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 Debug error when loading



I posted this over at the Stellaris Launchpad forum and it was suggested that I try here.

I am using CCS Version 5.4.0.00091 with the free license for the Stellaris Launchpad. I have a program that is 52K. When I try to debug,  it loads 32751 bytes and then stops. I then get the following error:

CORTEX_M4_0: Flash Programmer: Timed out while writing to Flash memory

CORTEX_M4_0: GEL: File: C:\TI-LaunchPad\EclipseProjects\GrlibAdaPjo\Debug\GrlibAdaPjo.bin: Load failed.

When trying to run this down via Google searches I ran across a post saying that the evaluation license should be used. I then requested and received a 90 day license key from TI. The interesting thing is that I upgrade the license,  checked it,  and it states a full license. I then try to debug and I get the error. If I then check the license type it  has reverted back to free. 

It was suggested on the Launchpad forum that I un-install CCS, delete all logs, and then re-install. I tried this and am still having the same problem. All help we be truly appreciated and thanks in advance to all that reply.

Pat

  • Hi,

    Let try this out: 

    1. Copy the code

    2. Delete the project

    3. Create a new workspace

    4. Open a new project

    5. Paste the copied code

    6. Build and check

    If you experience the same issue. Please attach a screenshot.

    Regards,

    Gautam

  • Hi Pat,

    I do not believe you error to be related to licensing.   Have you tried checking the JTAG frequency you use in your target configuration (ccxml)?  Could you send a few more details to help us understand the settings/context?

    Best Regards,

    Lisa

  • Hi Lisa

      The Jtag freq was set to 1Mhz. I reset to 500Khz and then 100Khz. Nieither worked. Could you expand on what other details you woud like and I will be gald to send them?  I will not be back to this until this evening, but I will try to post whatever you request.

    Thanks,

    Pat

    PS to Gautam: Time did not permit me to try your solution. I will try it this evening.


  • Hi Pat,

    basically the settings in your target configuration (ccxml) would likely help.  Did you try 10MHz?  Also could you post the output of the test connection?  Another thing that might be interesting to know and help debug is whether a prepackaged example runs fine.

    Best Regards,
    Lisa 

  • Hi Lisa,

     10Mhz gave me a freq. out of range error. 5Mhz gave the same load error I've been seeing.  Attached is the ccxml file (Renamed .doc for upload) and 2 screenshots. One is the 3 load dialogs right after it freezes. The second is the error dialog after the loading times out. 

    Thanks again,

    Pat

  • I don't know what happened to the ccxml file. A link was shown in my writeup when I posted. I'm going to try again with this post.

    3835.Stellaris LM4F120H5QR.doc

    Just in case - here is the text of the link:

    http://e2e.ti.com/cfs-file.ashx/__key/communityserver-discussions-components-files/81/3835.Stellaris-LM4F120H5QR.doc

  • Hi Lisa,

      Here ia a little more data. I created a simple useless program that has a global static const arrar of 80K bytes. When I declare this array of type char and 80K it loads fine and I can step through it. When I change the array type to long and 20K bytes it freezes during load as the other on has. Below is screenshots.

    Regards,

    Pat

  • Hi Pat,

    just to let you know we are going to try to reproduce this here.   It may be tomorrow, but as soon as there is feedback we will let you know.

    Best Regards,

    Lisa

  • Hi Pat,

    Thank you for the screenshots using which I was able to create a similar test case and reproduce the behavior with CCS locking up when trying to program to Flash. I tried the stand-alone flash programmer (Uniflash) as well and that generates the same error. This looks like a bug to me, so I have filed a bug report to track the issue. The tracking # is SDSCM00048029 and you may track the status using the SDOWP link in my signature.

    A workaround to avoid the issue could be to break down the array into smaller arrays.

     

  • Hi Lisa and Art,

      I checked the status of the bug and it is listed as open. I know the test code for showing the bug is useless but the problem surfaced while trying to load a "real" program using TI's grlib. Are there any updates?

    Thanks,

    Pat

  • Pat,

    Sorry for the late reply. I have been looking into this issue recently, and the behaviour is quite perplexing. I was able to find a workaround during my debugging though and have updated the CQ to reflect that.

    Workaround:

    "Change the Flash Erase option from "Necessary Pages Only" to "Use the Erase Options Specified Below", which will erase Entire Flash instead."

    But this workaround was developed using the 'test code' programs, which is not really valid programs anyways. It is programming the data array at the start of Flash memory at address 0x0, which is where the interrupt vectors should be located. I think that is where the difference between having a char array and long array comes into play, where the data at 0x0 will be different, and therefore the device might behave differently during programming.

    I'm assuming your original programming that you were seeing the problem with is an actual valid program, and therefore, the workaround might not work for you. I was wondering if you are able to share this program with me, so that I can try to reproduce the problem on my end?

    Alternately, there was recently a problem discovered on another thread related to the WDT during Flash programming on Stellaris/Tiva devices, which causes similar timed out errors you were seeing. A forum user provided an updated GEL file that seems to fix their problem. If you have time, please read the thread, and see if it is relevant to you:

    http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/286801/1002071.aspx

    Thanks,

    Ricky

  • Hi Ricky,

       I will be glad to send you the actual program that brought this problem to light. Please email me an email address to send the code. I'll try to have it "in the mail" within the next couple days.

    Thanks,

    Pat

  • Pat,

    Thanks. My email is available in my profile information (click on my name and search email).

    Thanks,
    Ricky