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.

F2812 with XDS100 JTAG -- "Error encountered when writing to flash memory"

Other Parts Discussed in Thread: TMS320F2812

Hi,

I have a "USB-EMU Docking Stn" (that came with a F28035 controlcard)

Now, I also have a F2812 based design with a JTAG port. This is a proven design, and has been programmed using the Spectrum Digital XDS510PP Parallel Port JTAG programmer with CCS 3.1 for years. Unfortunately, my laptop doesn't have a Parallel connector, so I want a USB JTAG programmer.

I'm currently trying to program it using the XDS100 USB-JTAG emulator on the docking station. To do this, I have a ribbon cable going from the JTAG connector on the docking station, to the JTAG connector on my F2812 board.

To keep things simple, I'm using the "DSP28_281xFlash.c" CCS4 Example, and trying to write it to the DSP. CCS seems to recognize the board, and I can run RAM based examples fine (program, start, stop, etc).

My issue comes trying to program the DSP flash. When I do this, I get errors such as:

C28xx: Flash Programmer: Error encountered when writing to flash memory
C28xx: Trouble Writing Memory Block at 0x3f6470 on Page 0 of Length 0x16
Cannot write to target


If I use "Tools" -> "On-Chip Flash", and try to erase the Flash memory I get:
C28xx: Flash Programmer: Error erasing flash memory. Error erasing Sector A

This happens for each sector (if I deselect sector A, only try B, etc).

(I have OSCCLK and PLL set correctly on the page)

 

Any ideas? I've set the target to "Texas Instruments XDS100 USB emulator" -> "EZDSPF2812" and  "TMS320F2812" without any luck programming the flash. I've tried powering the board from USB or externally, without any change.

 

Any ideas?

 

Thanks,

Stewart

 

  • If I'm reading this correctly, you are trying to use the docking station XDS100 as a pass through emulator to your F2812 board, correct?

    I do not believe that we support this (although we have thought of it, and other groups do this, including Stellaris Cortex-M3).

    Best solution is to purchase an emulator. One of the lowest cost ones is discussed here: http://e2e.ti.com/forums/t/10419.aspx

     

     

  •  

    While I understand this isn't really a supported method of operation, is there any reason it shouldn't work? I'm using the FT232 chip in the same way that I would be using it if it were part of the original design, right?

     

    Am I running up against something more fundamental; ie, does the XDS100 not support programming the F2812 Flash?

     

     

     

  • So, I've discovered that even the F28035 controlcard is having the same problem.

     

    If I used the Example_28035_Flash example project, and try to flash it, I get this error (After setting the Target correctly):

    C28xx: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.
    C28xx: File Loader: Data verification failed at address 0x003F662C Please verify target memory and memory map.
    Error found during data verification. Ensure the linker command file matches the memory map.

     

    What's going on? This is a fresh install of CCS4 Platinum Trial. I know that this worked before.

    I have a piccolo 28027 controlSTICK that I'm going to test next, but I'm starting to run out of options. Is this board broken? It seems unlikely. I have a feeling it's more likely to be software-related; I'm recovering from a XP crash, and I could swear that I had both docking-station-as-pass-though for F2812, and docking station / F28035 working.

    Any ideas?

     

     

  • Stewart -

    Please make sure that the GEL file is correct for your target configuration. Go to Tools->GEL files. Then check that the .gel file that appears is for the device you are using.  I have run the flash examples for the 2812 and the Piccolo devices on different platforms without any problems (not controlCARD though).

    One of the reasons you can get the above error is if the GEL file is defining different memories from those available on your device.

    Note: The above comment is WITHOUT using anything as a pass-through. I cannot speak to that use case.

  • Hi,

     

    Yeah -- same here. I think the issue is definitely software related. I've just finished testing out the piccolo F28027 ControlStick (doesn't even use the docking board), and that is failing with (again, this is the F28027 variant of the flash example):

    C28xx: Target did not halt properly during a Flash operation.
    C28xx: File Loader: Data verification failed at address 0x003F65F8 Please verify target memory and memory map.
    Error found during data verification. Ensure the linker command file matches the memory map.
    C28xx: Flash Programmer: Error erasing flash memory. Device is locked or not connected. Operation cancelled

     

    I forgot to mention, but I did make sure the GEL files were correct for each target.

     

    I've thus changed every component of the hardware platform, and they're all exhibiting similar problems. I'm convinced it's somehow CCS that is confused.

    One of the other things I didn't mention earlier: I tried installing the CCS4 Core edition (which also had the same problem), before trying out the CCS4 Platinum Trial.

     

    This is becoming a bit frustrating.

     

    -Stewart

     

     

     

  • Stewart -

    It is highly likely that this is CCSv4 related (what version of CCSv4 are you using? If it is an earlier version, it is possible that it is still buggy...).

    On multiple computers and devices the Flash programming  works fine for me for the devices you have mentioned using the same example projects.  I would try posting this to the Code Composer Studio forums - as they may have some ideas.

    Perhaps try the following for troubleshooting (likely you've tried these already..):

    1. Close CCSv4, unplug your emulators/USB cable. Open CCSv4, replug emulators, and launch target configuration. 
    2. Restart your computer and re-try.
    3. Completely uninstall CCSv4 and re-install (as last resort).

     

     

     

  • Ok.

     

    Arrgh.. Am I missing something stupid here?? Here are my steps:

     

    1. Uninstalled CCS 4 Platinum. Verified c:\program files\ texas Instruments directory is gone.

    2. Ran FTClean, verified it removed drivers, restarted PC.

    3. Installed CCS4 Core 4.0.2.01003, c2000 tools. (This is a version I downloaded literally today)

    4. deleted c:\tidcs

    5. Installed SPRC832 (28027 header files / examples)

    6. Plugged in Piccolo F28027 ControlSTICK, it shows up as XDS100 Ver. 1.0. Point it to drivers in C:\Program Files\Texas Instruments\ccsv4\common\uscif\ftdi

    7. Run CCS 4. Project -> Import Existing Eclipse Project -> C:\tidcs\c28\DSP2802x\v121\DSP2802x_examples_ccsv4\flash_f28027

    8. Project -> Rebuild Active Project

    9. Target -> New Target Configuration -> XDS100 Emulator -> ControlSTICK Piccolo F28027, save.

    10. Debug Active Project.

       "An Error was encountered when attempting to load the program You may continue with your debug session if you wish to attempt to resolve the issue by performing such tasks as power cycling the device or editing your startup scripts. Continue Launching? [YES] [No]"

    11. Click Yes.

    "C28xx: Loader: One or more sections of your program falls into a memory region that is not writable.  These regions will not actually be written to the target.  Check your linker configuration and/or memory map.
    C28xx: File Loader: Data verification failed at address 0x003F65F8 Please verify target memory and memory map.
    Error found during data verification. Ensure the linker command file matches the memory map."

    12. Close CCS4. Move "workspace" folder to "workspace2"

    13. Restart, reimport project. Recreate Target file. Rerun debug.

    Works.

     

    Conclusion?

    Something weird in the "workspace" folder. I'm going to compare the new & old config files in that folder to see if something screwy happened. On second thoughts, maybe not. The old Workspace->.metadata folder is 30MB, versus the new one which is 455KB...

     

    Hmmm..

    Next, I'm going to try the other targets. But, somehow a setting got screwed up, in a way that isn't exactly clear.

     

     

     

  • Stewart -

    It sounds like your original workspace was corrupted somehow. I'll post this to the Code Composer team and see if they have any ideas

  • An update to this, mainly for other people who might find this:

     

    So, I ended up trying the F2812 target and I still got the same error(s).The "Fix" seemed to only help on the F28027 and F28035 targets, not the F2812.

    After countless attempts at reinstallation / trying alternate drivers / etc, I decided to purchase the Spectrum Digital XD100 emulator -- the "proper" way of programming. This had the exact same errors.

    I discovered that the version of Code Composer 4 that I have is 4.0.2.01003   I decided to try an older version - version: 4.0.1.01001. This worked perfectly -- all targets work again. I literally uninstalled 4.0.2XX, installed 4.0.1XX, and it worked.

    There is therefore something amiss with the most recent release  - at least for me.

    It would be interesting if someone could try and duplicate my test; try using an XDS100 JTAG emulator with an F2812 processor, and try running the 2812 "Flash" CC4 example.

     

    -Stewart

     

  • Stewart,

    Please find more information on your issue in the following post.

    http://e2e.ti.com/forums/p/12274/50820.aspx#50820

    Let me know if you have any questions.

    Thanks.

    Ricky

  • All,

    An update is now available for CCS4.0.2.010003.

    More information can be from here: http://e2e.ti.com/forums/p/12274/50908.aspx#50908

    Thanks.

    Ricky