Critical Input Interrupt (IVOR0)

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

Critical Input Interrupt (IVOR0)

997件の閲覧回数
20Sidar04
Contributor III

Hello Mr. / Mrs.

I am working on IVOR0. I checked sample code for enable IVOR0 by using MSR bit. I try to implent this sample assembly source code to my project on GCC compiler and s32 IDE. My source code like below;


void SetMSR_ME(void)
{
__asm__(
/* read spr MSR */
"mfmsr r3" "\n"

/* load mask to assert the ME bit */
//lis r4, 0x0000
//addi r4, r4, 0x1000
"e_lis r4,0x0000" "\n"
"e_add16i r4,r4,0x1000" "\n"

/* set ME bit */
//or r3, r3, r4
"se_or r3,r4" "\n"

/* write back to MSR */
"mtmsr r3" "\n"
);
}

I took this errors on IDE like that;

unsupported relocation against r3 

unsupported relocation against r4.

What is your advice to handle this error?

Best Regards.

0 件の賞賛
返信
1 返信

985件の閲覧回数
davidtosenovjan
NXP TechSupport
NXP TechSupport

Hi,

error Unsupported relocation against r4 is caused by incorrect syntax. If you use inline assembler and GPR registers, you have to use following syntax:

asm("e_li %r0, 0");

There must be character % near the SPR register name.

0 件の賞賛
返信