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.

Compiler/MSP430F5438A: "Data verification" Error Occurring on Every Other Launch

Part Number: MSP430F5438A


Tool/software: TI C/C++ Compiler

I am trying to run a TI-RTOS CCS Project on an MSP430F5438A. I am able to run the program in debug mode once, and everything works perfectly, and I click the Stop button to terminate the debug session. Even without making any changes, if I try to launch debug mode again (pressing the Debug button), I receive a "Load Program" Error. However, if I click Debug once more, the program will load to the board and run in debug mode as expected. It seems that this is happening every other time I launch the code, which makes me wonder if I'm not exiting debug mode correctly (although everything I've looked at has indicated that the stop button from the debug view is the appropriate thing to do). I have also looked into the page on the "Load Program Error" Description, and my project doesn't seem to have any of those issues listed.

The program I am trying to run is a TI-RTOS project that uses a SWI to blink a light. I am using Compiler version 16.9.6, XDCTools version 3.32.0.06_core, and TI-RTOS version 2.20.0.6. I built it from the RTOS video labs, and more information can be found in my previous question about importing those projects:

https://e2e.ti.com/support/tools/ccs/f/81/t/827194?tisearch=e2e-sitesearch&keymatch=%20user%3A416526

I have tried copying all the project files into a new empty project, and this does not have any effect, and still produces the error every other launch. I have also tried to use a more recent compiler (18.12.2) for the project in case that might be the issue. The project does compile, and it does not produce the load error on every other launch, but instead, the program does not seem to be correctly running, as the light is not blinking at all and none of the project is running at all.

  • Hi Natalie,

    Can you attach your project, including the executable that you built? I want to make sure that I am using the same exact executable.

    Thanks

    ki

  • Ok, I'll try to attach it here.new_blink_for_real.zip

  • Thanks Natalie.

    I seem to be missing a library. Specifically:

    C:/ti/tirtos_msp43x_2_20_00_06/products/tidrivers_msp43x_2_20_00_08/packages/ti/drivers/lib/drivers_MSP430F5438A_instrumented.ae430X

    Does that not come pre-built in the TI-RTOS package? If not, can you provide that library to me?

    Thanks

    ki

  • I assumed it came with the RTOS build, but I've attached it here anyway!drivers_MSP430F5438A_instrumented.zip

  • I assumed it came with the RTOS build, but I've attached it here anyway!1777.drivers_MSP430F5438A_instrumented.zip

  • Thanks Natalie. But as I feared, now it is complaining about another library. Likely I have to do something on my end in configuring TI-RTOS. This is not my domain so I will have to get this sorted out. Thanks for your patience.

  • Sure, I really appreciate any assistance you can give me!

  • Natalie,

    Sorry to trouble you further but could you provide all files in 'C:\ti\tirtos_msp43x_2_20_00_06\products\tidrivers_msp43x_2_20_00_08\packages\ti\drivers\lib' for MSP430F5438A?

    That would include all files that start with:

    drivers_MSP430F5438A*

    drivers_wifi_MSP430F5438A*

    And any other with 'MSP430F5438A in the name.

    You can put them all in a zip and attach it to this thread

    It appears that the TI-RTOS installation foes not come with the F5438 files prebuilt. You need to build them using the supplied makefiles. I was able to driverlib without issue but I am having problems with the other files.

    Thanks

    ki

  • Okay, here's the files you've asked for!Drivers_msp430.zip

  • Thanks! I can finally now build successfully!

    I used CCSv9.1.0 with the same version of the compiler, XDCtools, and TI-RTOS that you used. I am unable to reproduce the error you see on the second debug launch. It loaded successfully every time. I also tried with the executable you provided from the zip. No issues there either. However, never does the LED ever blink (even with the execubalte you provided). So I don't know if it is running successfully. I am running on the MSP-EXP430F5438 board:

    http://www.ti.com/tool/MSP-EXP430F5438

    Are you running on some custom target?

  • Ki said:
    However, never does the LED ever blink (even with the execubalte you provided). So I don't know if it is running successfully. I am running on the MSP-EXP430F5438 board

    The project from Natalie toggles a LED on P9.6. On a MSP-EXP430F5438 P9.6 is connected the chip-select (LCD_CS) on the on board 138x110 dot-matrix LCD rather than a LED, so Natalie must be running on a custom target.

  • Hi,

    Yes I am on a custom board, so your LED might be on a different port number than mine. However, it's also worth mentioning that part of the issue I've described is that if I compile with the 16.9.6 version compiler, the LED blinks as expected, but if I'm using 18.12.2 version compiler, it no longer blinks at all.

  • - Just thought I'd touch base and see if I could get some help with this problem! Thanks!!

  • I don't know what is causing the "Data verification" Error, but if you capture the Debug Server Logs as described in CCS Diagnostic Logs and attach them that might give more information on the cause of the problem.

    Given that you are getting a "Data verification" Error on every other launch probably best to capture a separate log for each attempt.

  • Ok, I've attached one log per outcome here.log_failure.txtlog_success.txt

  • Natalie Wright said:
    Ok, I've attached one log per outcome here.

    Comparing the two shows that in the failure case there is a "MSP430: Trouble Writing Memory Block at 0x5c00 on Page 0 of Length 0x273e: Could not write device memory" error followed by the "MSP430: File Loader: Verification failed: Target failed to write 0x05C00" error. From the logs I can't see why there was a problem writing to the device memory. The error is from the MSP430_Memory() function in the MSP430 DLL.

  • Natalie, thanks for the logs. I have forwarded them to the engineering team for further analysis. 

    Just to reiterate, I was unable to reproduce the issue. I can always load the program successfully regardless of the compiler version. But I have an issue where the application hits an exception immediately after the start point (it never gets to main). I'm not sure why. Perhaps you are hitting a similar issue for the scenario where the program loads but does not blink the LED? are you able to get to main?

    In any case, we are focusing on the cause of the data verification error when you using compiler version 16.9.6.

    Thanks

    ki

  • Further to Chester's analysis, the logs show only the same write operation being initiated but it fails in one case but not the other.  One possibility is some leftover state on the device side is affecting the flashing operation. Whatever that state information is, it is not being cleared by the flash operation. I suspect that if you reset the target (or power cycled it) between flash operations, it would work. If you find this to be the case, a possible workaround would be to add a GEL_Reset() in the OnPreFileLoaded() callback of your GEL file.  Not being able to reproduce the issue here makes it difficult to debug this.

  • Natalie, 

    I also tested your project in my system but unfortunately couldn't reproduce it as well. I am able to connect to the device every time. 

    I am using your project but I built the libraries directly from the TI-RTOS tree (I didn't use your libraries). 

    This is running on a MSP-TS430PZ5X100 target board and I can read 1Hz on port 9.6 (pin 74).

    CCSv9.1.0.00010, TI MSP430 tool-chain component release 9.1.0 (check menu Help --> About --> Installation details)

    As Andy suggested, can you open the project properties and see if enabling the option below helps with the connection?

    Hope this helps,

    Rafael

  • Apologies for the delay, I've been out of the office. Checking the box to "Reset the target on a connect" has made this work perfectly! I am extremely grateful for the help, since this was a tough problem to figure out!