用的IAR for AVR,定义寄存器R0,R1,R2,对他们进行赋值,移位等操作,会提示错误,查到说是IAR对用户开放的是R4开始。这个怎么破?我想做一个协作式内核
//SFR_W_R(0x02, OSRdyTbl)//
//SFR_W_R(0x03, OSTaskRunningPrio)//
//#define OSRdyTbl ((unsigned uchar*)0x02)//任务运行就绪表
//#define OSTaskRunningPrio ((unsigned uchar*)0x03)//正在运行的任务
__regvar __no_init static unsigned char OSRdyTbl @2;
__regvar __no_init static unsigned char OSTaskRunningPrio @3; |