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.

Flash failure on LM3S9DN6

Other Parts Discussed in Thread: UNIFLASH

Started this thread as suggested from 

http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/283047/988762.aspx :

**************************************************************************************************************************************************************

Hi, We're multiple developers in my company experiencing this currently as well. Could you please prioritize this Bug, the error:

CCS Version: 5.4.0.00091 

Win7 pro

  Manufacturer LENOVO
  Model 2349H2G
  Total amount of system memory 8,00 GB RAM
  System type 64-bit operating system
  Number of processor cores 2

BR, Carsten

  • Ricky already answered:

    Carsten,

    Based on the error messages you posted, I am seeing that you are using a LM3S9DN6 device. If this is correct, the problem you are seeing is probably different from the one that John was seeing, even though the error message is the same. This is because different Flash algorithms are used for different device families.

    And because of this, it might make more sense to start another thread so you get better visibility on your issue. In the new thread, please include the following information if you can.

    1. You mentioned multiple developers are seeing this issue. Are they all using LM3S9DN6 devices?

    2. Which emulator are you using?

    3. Are you getting the same error on any program you are loading, or just specific ones? Also, it might be helpful if you can send us the OUT files that are causing problems; in case we need to reproduce on our end.

    4. Do standalone Flash operations work? ie; try to launch a debug session, go to the On-Chip Flash view and performing an Erase operation, and see if it works.

    Thanks,

    Ricky

  • Hi Ricky.

    A little bonus info:

    The error is seen every 2nd time. First time it fails. 2nd time it can flash.

    ---

    * Yes we're all working on the same processor. It's likely that it's setup related to the project.

    * Emulator: XDS100 V2 / otherwise please see the pic I embedded in the former message.

    * I can't give you the outfile due to confidentiality sorry.

    * Stand alone falshing I'll see to it later.

    ---

    BR, Carsten

  • Carsten,

    To debug this further, it would be ideal if we could reproduce the error at our end. However, we may not have any boards with the LM3S9DN6 device, but I will ask around to see if others do.

    A few addiitonal questions:

    1) Do you see the error/requirement to flash twice when loading any program, or it only with specific programs?

    2) It would be interesting to know if the stand alone flash operations work (as suggested by Ricky). Let us know when you've had a chance to try it. 

    3) Could you enable debug server logging by following the steps here, and send us the generated logs? That might give us more clues.

  • I'll check it out and return to you :)

    Can you tell me where the log will be written please (which one)?

    BR, Carstem

  • Please see this page for details on how to enable debug server logs: http://processors.wiki.ti.com/index.php/Troubleshooting_CCSv5#CCS_Diagnostic_Logs

    When you enable it, you can specify the location where you would like the log file to be saved (it can be quite large). Then zip up and attach the file here. Thanks!

  • Hi again.

    I've tested some of the things Ricky suggested:

    1) Do you see the error/requirement to flash twice when loading any program, or it only with specific programs?

    - It seems only to be  a specific program

    2) It would be interesting to know if the stand alone flash operations work (as suggested by Ricky). Let us know when you've had a chance to try it. 

    - Yes I can manipulate the flash via the on-chip flash tool.

    BR, Carsten

  • Carsten,

    So the problem seems to be related to loading only certain programs? I assume this issue isn't currently blocking you, but is certainly something we'd like to get to the bottom of and fix as soon as possible. Unfortunately this is sometimes difficult to do without a reproducible test case. To that end, it would be very helpful if you could send us the .out file that causes this error so we can analyze it. In addition the debug server logs previously requested would also be helpful.

  • Hi ArtiG.

    I've sent the out file to Ricky Lau as he was the one I could find an email address on.

    The issue is slowing the whole team down now considerately so any help would be highly appreciated.

    Best Regards,

    Carsten

  • Hi ArtiG.

    I have to update regarding secondary flash tool. A colleague of mine tried flashing with uniflash and he saw the same error. So it is the outfile somehow.

    - I only tried erasing, should of cause have tried a full flashing.

    let me know when you have news ;)

    BR, Csrsten

  • Hi guys.

    Any news on this matter?

    BR, Carsten

  • Hello all,

    I beleive I have encountered the same issue, but I might have some extra information on the topic.

    First of all, I am using arm-none-eabi-gcc 4.7 to compile for the TMS570LS04x controller. I am using CCS v5.4 5.4.0.00091 to download my code to a demo board with the XDS100v2 USB emulator.

    I experience flash download errors if specific instructions are used by the compiler in my code:

    - O2 optimalitzation level with GCC: a return value is handled from a function call (same code can be downloaded in case of O0 and O3)

    - 32-bit constant initializer value loads to registers (might be the IP register that is used by the compiler to speed up the process)

     

    So basically, standard C-language elements that may use specific instructions, make the flash download fail, at least, it seems to be that way.

    My question would be that is there any instruction code checking during flash download? Could that be the cause that the compiler is using bad instruction opcodes? Is there a checksum calculation that may fail for some reason?

    So far, I am able to debug my code if I comment out specific code parts, but this is quite frustrating, especially the return value bug. Please let me know if there is any solution for this!

    Best regards,

    Andras Horvath

     

  • Hello all,

    It seems like I made thre wrong assumption about the flash download errors. It's much more likely that the issue is related to the size of the code rather than the code itself.

    Commenting out code parts or adding further lines may result in a succesfull flash write, as the size of bytes that are downloaded changes.

    Could you please look into this?

    BR,

    Andras

  • Carsten Svendsen said:

    Any news on this matter?

    We are actively working on this internally and believe the issue is related to the watchdog getting reset during flash programming. We are looking into whether the flash programmer should be updated to reset the WDT registers prior to programming. We will post an update when we have further details. For reference, this issue is being tracked as bug # SDSCM00048225.

    In the meantime, there is another thread with a similar issue that has a post with a link to another thread with a suggested workaround.
    http://e2e.ti.com/support/development_tools/code_composer_studio/f/81/p/285442/1003480.aspx#1003480

    The workaorund involves taking the CortexM3_util.gel file attached in this post and replacing the one in the CCS installation with this modified version. Please be sure to save off the original version first before replacing it, just in case. Please give the workaround a try and report back if it does not help.

  • Disabling the watchdog fixed it!

    Thank you and OMG ;)

    Best regards, Carsten