Keil Logo

ULINK: MEMORY MISMATCH AT DEBUGGER START


Information in this article applies to:

  • ULINK USB-JTAG Adapter
  • ULINK2 USB-JTAG Adapter

QUESTION

I have moved some constants into a different memory area (in my case an external Flash). Now, I am getting a memory mismatch when the debugger starts.

However, during Flash programming (which was just executed before) everything was OK. What can be the reason for my problem?

ANSWER

By default, on debugger start a CPU reset is issued and the memory content is verified. If the Flash is not fully enabled (for example because some configuration registers are not set), you are getting an verification error, even despite the fact the the Flash is correctly programmed.

There are two solutions:

  • Disable the download option Verify Code Download under Project — Options — Debug — ULINK Settings. This is feasible if you are sure that the program is correctly loaded.
  • Provide a debugger INI file that configures the device registers in the same way as in the initialization phase of your software. This debugger INI file might be similar to the file used for Flash programming. In addition it is required to disable the option Load Application at Startup in the dialog Project — Options — Debug and execute the LOAD command after device initialization.

    For example:
    // A.20..23 on P2.4..7
    // (Alternate Push-Pull Outputs + enable CS.0/1 P2.0..1)
    _WDWORD(0xE0005000, (_RDWORD(0xE0005000) | 0x00F3) ); // PC0
    _WDWORD(0xE0005004, (_RDWORD(0xE0005004) | 0x00F3) ); // PC1
    _WDWORD(0xE0005008, (_RDWORD(0xE0005008) | 0x00F3) ); // PC2
    
    // if necessary other settings that enable external memory
    // ...
    
    LOAD file.ELF INCREMENTAL   // load application
    g, main                     // run til main (optional)
    

MORE INFORMATION

  • Getting Started User's Guide, Flash Programming, Prepare Flash Programming
  • Refer to _WDWORD in the µVision User's Guide.

SEE ALSO

FORUM THREADS

The following Discussion Forum threads may provide information related to this topic.

Last Reviewed: Thursday, September 24, 2015


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.