Hi,
I have a problem with LPC 2148 (try to enable interrupts) and I don’t understand something in the startup code.
Here is header of cstartup.s (IAR)
I don’t understand how 0x18 from ldr pc,[pc,#0x18] is obtained.
I another example for lpc2378 I’ve found:
__irq_handler:
ldr pc,[pc, #-0x0120]
And what dc32 __iar_program_start lines stands for?
If someone could explain the code below would be very nice. Tnx
MODULE ?cstartup
SECTION CSTACK:DATA:NOROOT(3)
SECTION SVC_STACK:DATA:NOROOT(3)
SECTION IRQ_STACK:DATA:NOROOT(3)
SECTION FIQ_STACK:DATA:NOROOT(3)
SECTION UND_STACK:DATA:NOROOT(3)
SECTION ABT_STACK:DATA:NOROOT(3)
SECTION .intvec:CODE:NOROOT(2)
PUBLIC __vector
PUBLIC __iar_program_start
PUBLIC __vector_0x14
PUBLIC __undef_handler
PUBLIC __swi_handler
PUBLIC __prefetch_handler
PUBLIC __data_handler
PUBLIC __irq_handler
PUBLIC __fiq_handler
ARM
__vector:
ldr pc,[pc,#0x18]
__undef_handler:
ldr pc,[pc,#0x18]
__swi_handler:
ldr pc,[pc,#0x18]
__prefetch_handler:
ldr pc,[pc,#0x18]
__data_handler:
ldr pc,[pc,#0x18]
__vector_0x14:
dc32 0xFFFFFFFF
__irq_handler:
ldr pc,[pc, #0x18]
__fiq_handler:
ldr pc,[pc,#0x18]
dc32 __iar_program_start
dc32 __undef_handler
dc32 __swi_handler
dc32 __prefetch_handler
dc32 __data_handler
dc32 0xFFFFFFFF
dc32 0xFFFFFFFF
dc32 __fiq_handler