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.

Debug CCSv4.2. Flash programmer fails.

Other Parts Discussed in Thread: LM3S6965, LM3S8962, SYSBIOS

I am using LM3S6965 with external Stellaris In-Circuit Debug Interface.

Debug worked fine before, but now I am not able to start Debug session.

Console:

...

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

CORTEX_M3_0: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x7ff0: Debug Port error occurred.

Cannot write to target

CORTEX_M3_0: Error: Debug Port error occurred.

 

LM Programmer still works fine. Debug is able to start if I erase flash manually in LM programmer. I think Erase in Debug is not configured properly.

 

 

  • George,

    We are going to escalate this to our flash guy.

    John

  • George,

    When you get the above error messages (I'm assuming you are using Debug Active Project), you should get a dialog that gives you an option to continue launching. Click yes, and it will launch a debug session for your Stellaris device.

    Now, you should be able to access the Flash settings view; I want to make sure that the Flash settings are correct. To access the settings, at the top menu bar, go to 'Tools'->'On-Chip Flash'. Can you take a screenshot of this view and attach it to this thread?

    And since you here, can you also try erasing the Flash using the "Erase Flash" button? Please let me know if this works. And if this works, try loading the program again and see if it works as well.

    Please let me know your findings.

    Thanks.

    Ricky

  • Hi Ricky,

    "On-Chip Flash" screen looks identical to my other PC.I was able to erase flash by using correspondent button. I verified Blank Flash in the LM Programmer.

    Loading does not work. What I can do in order to get to debug is programming flash in LM Programmer. After that Debug is able to start normally.

    P.S. Clicking on "ARM advance features" tab freezes CCS permanently.

  • George,

    Just a few more things I wanted to clarify with you.

    When you say "On-Chip Flash" screen looks identical to my other PC, have you tried Flash programming on the same device on that PC?

    You stated in your first post that "Debug worked fine before", does this mean that Flash programming was working in the CCS on this device? and then it started not working?

    Also, I'm still not clear what is currently working and not working. Can you try out these test cases and let me know which of the following scenarios are working/not working? Assuming it is in the "Not Working" state already.


    1. In CCS, perform a Debug Active Project. [It fails with error message?]

    2. In LM Flash Programmer, erase flash. Go back to CCS and perform a Debug Active Project [This works?]

    3. Start from end of scenario 2, terminate the debug session, perform another Debug Active Project [It fails this time?]

    4. Do not use Debug Active Project. Just start a debug session using the CCXML file for your device (right click on the ccxml file in your project and choose Debug As -> Debug Session). Connect to the device, and try to erase the Flash (via the On-Chip Flash view) and load the program by going to Target->Load Program and choosing the one in your project.

     

    On the topic of "ARM Advance Features", are you seeing this "hang" consistently when opening the view?


    Thanks.

    Ricky

  • I'm having pretty much the same problems with the LM3S8962 eval board and very frustrated.

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

    CORTEX_M3_0: Trouble Writing Memory Block at 0x0 on Page 0 of Length 0x57e8: Debug Port error occurred.

    Cannot write to target

    CORTEX_M3_0: Error: Debug Port error occurred.

     

    Also hangs the entire CCS app when attempt to look at Advanced ARM Features. Running on Windows 7 and nothing but problems with CCS out of the box and after applying updates.

    Tried SYSBIOS demo mutex app, but debugger fails every attempt pretty much. Also tried generating a bin file and flashing with LM Flash programmer, but it just gives me "**ERROR**:File Access Error". The bin was created using the same steps as the demo game app.

    Bob

     

     

  • Bob,

    Can you let me know which version of CCS you are using?

    If possible, can you try updating to the installing the latest CCS5.1.0 build, or CCS4.2.4 build? (available here: http://processors.wiki.ti.com/index.php/Download_CCS). Specifically for the latest CCS5.1.0 build, we have added additional logging information that might be useful in determining the cause of the issue you are seeing.

    You can also try out the debugging steps in my previous post to George if you have the time, and let me know your results. This information might also be useful in determining the cause of the problem.

    Thank you very much.

    Ricky

  • Hi Ricky,

    I'm using version 4.2.4.00033 of CCS. I could try moving to v5, but I fear I'll run into lots of problems building my code if I do this. I spent many days getting everything installed and getting the sample code to build successfully. Best I recall, I tried CCS5 initally but couldn't get it to build the Stellarisware code for my board. So, I ended up using the stuff on the CD that shipped with the board to get a system that would build successfully. Apparently the Stellarisware and CCS versions are not all build compatible from what I could tell.

    I've moved my USB cable from a front panel USB connector to a rear panel USB connector (connector on the motherboard). This seems to have helped a good bit, but I'm still experiencing the occasional flash write error and have to power cycle the eval board to get it working again. Perhaps it's a data error of some sort, but not sure how I can resolve this as most other things seem to work fine on my USB ports. The front panel USB connectors have a pigtail cable to the motherboard that might be causing some problems, but not sure really as these came with the motherboard and enclosure. Seems like the debugger should be able to handle any errors without totally hanging though.

    Bob