carmeloA
Junior Member level 1
Hello Everyone,
I am just starting with a new board, a landboard with a nxp LPC1768 programmed with an external ulink2 with keil4.
I do not understand why when i go in debug mode the starting point of my PC is 0x1fff0080
I use the startup code given by keil 4 lite. This address is not random. In fact when I'm also trying with different example,
written in c, found online the starting point is the main of the c file, but if i hit the reset button, again the starting point is that address.
this is the disassembly but i cannot find nothing on the startup that redirect to that address.
When i debug in simulation mode instead, the starting point is the reset Handles...
Can you please help me to understand what i'm wrong?
Thank you
I am just starting with a new board, a landboard with a nxp LPC1768 programmed with an external ulink2 with keil4.
I do not understand why when i go in debug mode the starting point of my PC is 0x1fff0080
I use the startup code given by keil 4 lite. This address is not random. In fact when I'm also trying with different example,
written in c, found online the starting point is the main of the c file, but if i hit the reset button, again the starting point is that address.
this is the disassembly but i cannot find nothing on the startup that redirect to that address.
Code:
0x1FFF007A 0000 MOVS r0,r0
0x1FFF007C 0000 MOVS r0,r0
0x1FFF007E 0000 MOVS r0,r0
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]
0x1FFF0090 F8DFF000 LDR.W pc,[pc,#0] ; @0x1FFF0094
0x1FFF0094 0201 LSLS r1,r0,#8
0x1FFF0096 1FFF SUBS r7,r7,#7
0x1FFF0098 BFFF ITTTT
0x1FFF009A FFFFC3C0 DCD 0xC3C0FFFF
0x1FFF009E 400F ANDS r7,r7,r1
0x1FFF00A0 0000 MOVS r0,r0
0x1FFF00A2 0000 MOVS r0,r0
When i debug in simulation mode instead, the starting point is the reset Handles...
Code:
PRESERVE8
THUMB
; Vector Table Mapped to Address 0 at Reset
AREA RESET, DATA, READONLY
EXPORT __Vectors
__Vectors DCD __initial_sp ; Top of Stack
DCD Reset_Handler ; Reset Handler
.....
IF :LNOT::DEF:NO_CRP
AREA |.ARM.__at_0x02FC|, CODE, READONLY
CRP_Key DCD 0xFFFFFFFF
ENDIF
AREA |.text|, CODE, READONLY
; Reset Handler
Reset_Handler PROC
my code
ENDP
Can you please help me to understand what i'm wrong?
Thank you