exception of mpc 5634

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

exception of mpc 5634

1,659件の閲覧回数
单片机颜
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.

 

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

1,291件の閲覧回数
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 件の賞賛
返信