|
Technical Support Support Resources Product Information | ULINK: MEMORY MISMATCH AT DEBUGGER START
Information in this article applies to: - ULINK USB-JTAG Adapter
- ULINK2 USB-JTAG Adapter
QUESTIONI 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? ANSWERBy 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
SEE ALSOLast Reviewed: Sunday, January 28, 2007
|
|