Hi All
I have something strange with my uVision4 (4.01). I compiled a program, loaded it on my board (LPC1700) and started the debugger. The debugger started briefly but almost immediately returned to the compiler again. I tried the usual, restarting uVision, no luck, restarting windows, no luck Then I removed the tick at "Run to Main" and then the debugger staid. But single stepping caused the same effect, return to compiler, after 5 steps. Then I loaded Blinky just to witness that Binky did exactly the same. Now I this slowly drives me crazy. I noticed there was an update (4.03) and I loaded that. My uLink needed a firmware update after that so i considered that a good sign. But still, no luck. It still crashes. I checked a lot a entries in the forum, i removed memory windows, changed the USB connections but it is still the same. I am pretty desperate now.... Someone with a good idea out there?
Solved..... I noticed that (very briefly) the message "cannot access memory" popped up in the message window. I started looking for it and found an entry in the forum for a different CPU but that did the trick. When you have a memory window open and there is an address in there, clear the address field, close the window and then close uVision. Then start it again and the problem is solved.
There is an option in the Debug settings to control whether uVision "remembers" previous settings - like memory watches.
Presumably, clearing this would also have solved your problem?
Hi
Yep it would have I guess. But it doesn't, my problem just returned. It worked for one debugging session but now it crashes again. I stepped through the program and noticed that it already crashes after the 5th step. the message "Cannot access memory" pops up and then I return to the compiler.
0x1FFF0080 F8DF4018 LDR.W r4,[pc,#24] ; @0x1FFF009C 0x1FFF0084 F8DF5010 LDR.W r5,[pc,#16] ; @0x1FFF0098 0x1FFF0088 6826 LDR r6,[r4,#0x00] 0x1FFF008A EA050606 AND r6,r5,r6 0x1FFF008E 6026 STR r6,[r4,#0x00] <== It crashes here 0x1FFF0090 F8DFF000 LDR.W pc,[pc,#0] ; @0x1FFF0094 0x1FFF0094 0201 LSLS r1,r0,#8 0x1FFF0096 1FFF SUBS r7,r7,#7
I changed the board, the uLink and everything, just nothing helps.
The problematic instruction is part of the NXP ROM bootloader and writes to a special memory location which disables debug pins. Therefore after debugger steps over it the communication is lost.
Either skip this instruction when single stepping or run through the bootloader.
Robert,
Could you please elaborate a little more on this issue? The circumstances described by you and the OP and the instruction involved look strangely familiar to the source of my current headache (see here:http://www.keil.com/forum/docs/thread16421.asp). Thank you.
With the help of Alex from Keil I solved the issue. The NXP jtag tool for the LPC17xx needs the flag SWJ to be set. The Field Port must be on SW. Then it works. Don't ask why, I have no idea. Thanks for all the replies
Walter