How to access macro variable to an asm function in mpc5746

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

How to access macro variable to an asm function in mpc5746

1,110 次查看
renjithr
Contributor I

How to access the following macro to my inline-asm function, and to store 32 bit value to that location

#define STATUS_VAR (*(volatile uint32_t*)0x40008025u)

asm void testFunc(void)          
{

-------

-------
}

标签 (1)
标记 (4)
0 项奖励
回复
1 回复

1,012 次查看
lukaszadrapa
NXP TechSupport
NXP TechSupport

Hi,

you can't do that. It is not possible to put C expression to asm code. You can do that only if it is pure number like:

#define STATUS_VAR 0x40008025U

Regards,

Lukas

0 项奖励
回复