Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

ARM - Strange PC adress on reset

Status
Not open for further replies.

carmeloA

Junior Member level 1
Joined
Jul 17, 2017
Messages
19
Helped
1
Reputation
2
Reaction score
1
Trophy points
3
Activity points
188
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.
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
 

Hi ! While I know nothing about the LPC1768 per se, but a quick look at the memory map in the data sheets shows that the location 0x1fff0000 to 0x1fff1fff is reserved for "8 kb Boot ROM". Maybe this will help you solve your problem ?
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top