Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed from November 25 through December 2. Thank you for your patience.

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.

Data verification error

I am using the LM4F232H5QC with Code Composer Studio 5.1.0.09 and the XDS100v2.

When I enter debug mode and the application is flashed to the ARM I get the follwoing errors:

"CS_DAP_0: 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.

CS_DAP_0: File Loader: Data verification failed at address 0x00007FF0 Please verify target memory and memory map."

What I don't understand is that this address falls within a valid range of the flash

Please can someone assist, I am a bit baffled!

  • Hi,

    Basing on my experience with MCU with internal Flash:

    CCS loader can load only to RAM. To program Flash you have to use some extra tool. 

  • Can anyone else confirm if this is correct?

  • ok, I'm not sure what I did but now I can load firmware to the ARM....?

    But i do have the following messages in the console:

    " CS_DAP_0: GEL Output: 

    Memory Map Initialization Complete
    CORTEX_M4_0: GEL Output:
    Memory Map Initialization Complete
    CS_DAP_0: GEL Output: Watchdog Timer Enabled
    CS_DAP_0: GEL Output: UARTs Enabled
    CS_DAP_0: 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.
    CS_DAP_0: Trouble Writing Register IP_DUMMY
    CS_DAP_0: AutoRun: Unable to run the target at this time
    CS_DAP_0: AutoRun: Target not run as breakpoint could not be set: Unknown error
    CORTEX_M4_0: GEL Output: Watchdog Timer Enabled
    CORTEX_M4_0: GEL Output: UARTs Enabled "
    
    
    
    
    It seems I can execute the code, but when I hit the following ROM function call: ROM_GPIOPinTypeGPIOOutput(GPIO_PORTF_BASE, 0xFF); 
    I get the follwoing error " CORTEX_M4_0: Can't Run Target CPU: (Error -1268 @ 0x1090001) Device is locked up in Hard Fault or in NMI. 
    Reset the device, and retry the operation. If error persists, confirm configuration, power-cycle the board, and/or try more reliable JTAG settings 
    (e.g. lower TCLK). (Emulation package 5.0.520.0) "
    
    
    Also in the disassembly window I get this error "0201f042:    Memory map prevented reading of target memory at 0x0201F042 [code=0x20000]"
  • How do you know it seems to work?

  • well it isn't working 100%, i can at least debug and single step through the code now.

    The biggest probelem right now are the error messages I mentioned above, and when i execute the ROM peripheral drivers the debug session crashes.

  • Bartosz Bosowiec said:

    Basing on my experience with MCU with internal Flash:

    CCS loader can load only to RAM. To program Flash you have to use some extra tool. 

    This is only true for CCSv3 and earlier. In v4 and v5, the flash programmer is integrated into CCS so when you load a program CCS, it will automatically program into flash.

  • Thanks for that confirmation, althoug that was never an issue for me.

    So some of the problems above I have solved. I didnt relaise I needed to call ROM_SysCtlPeripheralEnable(), once I used that function a lot of the memory map isues went away and I was abale to bedug noramly.

    But now I have a new similar problem. I have just included a copy of startup_ccs.c file, defining the interrupt tables desicribes in the datsheet. The project compiles with no errors, but when I debug using the XDS100 I get the following errors, and I am completely unable to debug

    "CS_DAP_0: 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.
    CS_DAP_0: File Loader: Data verification failed at address 0x00000000 
    Please verify target memory and memory map."
  • Simon,

    Can you provide a screenshot of the CCS environment when you get these errors? In particular I would like to see the Debug view window.

    Thanks

    ki

  • Hi Ki,

    Here is a screenshot of the debug environment.

    This is as far as I can get, once I click "ok" CCS returns to editing envirnoment.

    Simon

  • If I disable verification in debug configurations->XDS100->Target->CS_DAP_0 then CCS enters the debug environemnt without complain and I can debug, interrupts are also executing correctly.

    So that kind of fixed it, but I'm not happy with that solution. I would like to know why the error is there in the first place and what the error actually is. It all seems a bit cryptic.

  • Simon Thome said:

    The project compiles with no errors, but when I debug using the XDS100 I get the following errors, and I am completely unable to debug

    "CS_DAP_0: 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.
    CS_DAP_0: File Loader: Data verification failed at address 0x00000000 
    Please verify target memory and memory map."

    Simon,

    A couple more data points that might help isolate the issue:

    - Are you using a custom board or TI evaluation board?

    - Have you tried loading any of the Stellarisware examples and if so, do the same data verification errors appear?

    - Could you try loading the program with LM Flash programmer instead of CCS and let us know if any errors appear with that? You can add a post build step to the CCS project to generate a binary file which can then be loaded using LM Flash. All the Stellarisware examples have this post build step added so you can take a look at any of them for the syntax of the command. Let us know how this goes.

     

  • Hi,

    I am using a custom board. I have loaded the Stellarisware examples onto the LM4F232 eval kit, using the onboard USB debug interface without problems.

    Is the LM Flash programmer compatible with the USB100v2 JTAG?

  • Sorry, the LM Flash programmer cannot be used with xds100v2. But I was trying to see other ways to load the same code onto different boards using different programmers to see if that could help isolate the problem further.

    Maybe you could try some of the following tests if they are feasible, and see if the data verification errors appear:

    - Load your program code onto the eval kit with either onboard ICDI or xds100v2 JTAG(for this you would need adapters to go from the ARM 10-pin to TI 20-pin).
    - Load Stellarisware examples on to your custom board using xds100v2 JTAG. The only modification this would require is that you use your custom target configuration file (.ccxml) set for xds100v2 rather than the default target config file in the stellairsware examples
    - Can a Stellaris ICDI board be used with your custom board as ICDI debugger and load the code successfully?