EmbeddedRelated.com
Forums
Memfault Beyond the Launch

Keil ARM ULink2 LPC2400.c Startup Disassembly Errors

Started by "rick.ales" June 12, 2013
Using ARM uVision4 4.71.00 set for ARM mode, and the LPC2400.s startup file with a ULINK2 configured in B0 boot mode, I can not get the start up code to either single step or run. There appears to be an error in the disassembly and the actual execution of the code when using the ULINK2 and actual target. This error does not occur when using the simulator.
When debugging with the simulator, the start up code is correct ie. matches the HEX file data.

From Disassembly window
0x00000000 E59FF018 LDR PC,[PC,#0x0018]
0x00000004 E59FF018 LDR PC,[PC,#0x0018]
0x00000008 E59FF018 LDR PC,[PC,#0x0018]
0x0000000C E59FF018 LDR PC,[PC,#0x0018]
Hex file
:020000040000FA
:1000000018F09FE518F09FE518F09FE518F09FE5C0

However when I try debugging target with ULINK 2 the disassembly is wrong and project won't run.
0x00000000 E59F4018 LDR R4,[PC,#0x0018]
0x00000004 E59F5010 LDR R5,[PC,#0x0010]
0x00000008 E5946000 LDR R6,[R4]
0x0000000C E0056006 AND R6,R5,R6
0x00000010 E5846000 STR R6,[R4]
0x00000014 E51FF004 LDR PC,[PC,#-0x0004]
0x00000018 7FFFE040 SWIVC 0x00FFE040
0x0000001C FFFFBFFF (???)
This code actually modifies R4, R5 etc. Notice the difference is in the destination on the simulator FF in each case, with the target F4, F5 and so on.

I have tried the ULink2 configured in both B0 and B1 with no difference seen.
Working through a similar post at http://www.keil.com/forum/18816/ did not help either.

What is going on? How run on my target?

An Engineer's Guide to the LPC2100 Series


Memfault Beyond the Launch