exception of mpc 5634

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

exception of mpc 5634

1,042 Views
单片机颜
Contributor I

extern

IVOR4Handler();
externuint32_t__IV_ADDR; /* Interrupt Vector Prefix value from link file */
externconstvuint32_tIntcIsrVectorTable[];

void initIrqVectors(void)

{

asm ("lis r5, __IV_ADDR@h");   /* IVPR = address base used with IVOR's */
asm ("mtIVPR r5 ");
asm ("lis r5, IVOR4Handler@h"); /* IVOR4 = address of handler */
asm ("ori r5, r5, IVOR4Handler@l");
asm ("mtIVOR4 r5");

}

This is a IVPR and IVOR4 initialization routing .But the compiler say" _IV_ADDR "and "IVOR4Handler" are undefined.I search all datas .I don't know how to define them.

 

Labels (1)
Tags (1)
0 Kudos
1 Reply

674 Views
lukaszadrapa
NXP TechSupport
NXP TechSupport

Not sure what the reason is.

For example, default liker file already contains:

_stack_addr = ADDR(stack)+SIZEOF(stack);

_stack_end  = ADDR(stack);

_heap_addr  = ADDR(heap);

_heap_end   = ADDR(heap)+SIZEOF(heap);

EXCEPTION_HANDLERS = ADDR(exception_handlers);

If I use any value like _stack_addr or EXCEPTION_HANDLERS in C file then it always works fine. Meaningless example:

extern uint32_t _stack_addr;

void test(void)

{

asm ("lis r5, _stack_addr@h");

...

}

Lukas

0 Kudos