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.

TMS570 HDK - File Loader: Data verification failed - cannot access the HDK anymore.

Other Parts Discussed in Thread: TMS570LS3137

hello everybody,

I am using the TMS570LS3137 HDK with CCS  Version: 6.0.1.00040 and HALCoGen 04.01.00.

I am in trouble to load code inside my HDK

 * Symptoms :

  • When I try to run debug for any code (even the working old ones and new HelloWorld from scratch) I get the following error :   

CortexR4: File Loader: Data verification failed at address 0x00000000 Please verify target memory and memory map.

CortexR4: Unable to terminate memory download: NULL buffer pointer at 0x3a9f

  • The nERROR red LED is on.
  • Demo mode cannot access the card.

* Probable cause :

  • In my main() there is _mpuInit_() followed by _mpuEnable_(). I ran the code with the _mpuInit_() commented. From this point, my HDK is unusable now.
  • GEL file is unedited and only SDRAM section was added into sys_link.cmd => memory maps slightly different (but it worked like for me this from the beginning)

* Access still available to the HDK:

  • I can access the target in debug mode by loading the target configuration (TMS570LS3137.ccxml).
  • after I connect to the target, with a system reset, I can view the disassembly and the registers.
  • I can load symbols manually to visualize the source code and run step-by-step until crash (crashing instruction is isb inside _mpuInit_(); )
  • running the code trough sys_startup() clears the nERROR LED.
  • I can also reset the nERROR LED by writing 0xA then 0x0 into the ErrKEY register.
  • RAM is writable, Registers are writable.
  • JTAG test connection works

* Unsuccessful Tries :

  • debuging code with the all-in-one button. > I get the error
  • loading a valid .out after connection to the target in manual debug mode (by loading the target configuration TMS570LS3137.ccxml). > same error
  • loading a valid .out after clearing the nERROR > same error but different address -> 0x00008BC0
  • Erasing flash with the "On-Chip Flash" menu (error : Target is not connected or does not support current Flash operation
  • Loading a demo code (such as light show) > demo loader does not access the target
  • I followed this threadthis one and the WIKI with no solutions for me.

I hope there is something I'm missing and you can help me

Best regards,

Benjamin

  • Benjamin,

    This shouldn't be too bad to recover from. BTW - I think there's actually a note somewhere in the CPU guide that warns against turning on the MPU without enabling any regions ;)

    If you can get to this point:
    • I can access the target in debug mode by loading the target configuration (TMS570LS3137.ccxml).
    • after I connect to the target, with a system reset, I can view the disassembly and the registers.

    From the system reset you should be able to erase the flash.

    If you still get the message :
    Erasing flash with the "On-Chip Flash" menu (error : Target is not connected or does not support current Flash operation)

    Then the simplest fix may be to install CCS again. I think I got this before and the problem was in one of the XML files that I had hand edited.
    I'll see if I can dig up some history on what caused this for me.

    -Anthony
  • Wasn't able to find what caused "Target is not connected or does not support current Flash operation" for me before - have a few questions out.
    I *think* it was maybe an issue in the XML file where the device ID or silicon revision changed and it wasn't pattern matching against devices it knew how to flash.

    Anyway maybe I didn't read your post carefully enough. Are you saying that you actually can reflash, but every time you do you are getting stuck with the nERROR light after you run the code? (so flashing really isn't the problem - you just can't get code into the part that doesnt't trigger the nERROR).

    If that's the case try going back to some known good code you may have from the past and running this. If you get nERROR try pressing nPORRST after disconnecting the JTAG connection. It could be just that an error flag is set which is not cleared by a normal or system reset, and your code doesn't have what it needs yet to handle all the errors.

    Some additional pointers on the error "Target is not connected or does not support current Flash operation"

      1) CCS does some checking on the target when it connects -- and part of this checking figures out if the device supports flash programming & if so what kind.

          So if your part is in a bad state - like you are unbricking - you may get this error.

      2) There is a checkbox  in the flash settings that should help a lot with this.  It is "System Reset on Target Connect":

          It isn't checked in the screenshot below - but you should try checking this box.  One reason it was added is for code

          that programs the MPU - after which the flash loader may not be able to download the algos it needs into RAM

          (with the given MPU settings).

  • Hi Anthony,

    Thank you for your time.

    Your first thoughts were right. flashing is the problem. The nError is just one of the symptoms. I can only view the current disassembly loaded on the target and do few assembly steps until it crash. 

    I tried the suggestions you made :

    • System reset, then Flash reset (in the On-Chip Flash Menu) -> same error "Target is not connected or does not support current Flash operation"
    • Re-installation of CCS -> I tried to load validated code from a co-worker's computer, target is still unreachable.
    • Disconnect JTAG, then nPORESET -> the nError LED is still on and flashing is still impossible.
    • Enabling the checkbox "System Reset on Target Connect" -> The checkbox was somewhere else (screenshot below) but flashing and flash reset not working.

    Maybe I need to update CCS (current version 6.0.1.00040). I have a spare HDK to work with and I can load any code into the flash.

  • Hi Benjamin,

    Yes - I don't see the "System Reset on Connect" button under On-Chip Flash. That solves a lot of problems with flash download.
    You should definitely update CCS and also the components like the debug server flash, hercules emulation, ti emulation.
    (make sure you check for updates after updating CCS to 6.1.1).

    -Anthony
  • Anthony,

    I finally managed to unlock the HDK.

    • I installed from scratch a fresh new CSS with the last version up-to-date (6.1.2.00015) ->  "System Reset on Connect" was here but had no effect.
    • I installed NowFlash v3.42 and loaded a valid .out with the flags Erase, Blank Check, Program & Verify -> this solved my problem !

    I am now able to load any .out and debug it via CSS without any problems.

    Regards,

    Benjamin.