在XC16说明上,找到可以使用near char template[20]。细节如下
/*------------------------------------------
MIGRATION TO THE CCI
For 8-bit compilers, change any occurrence of the far qualifier, as in the following
example:
far char template[20];
to __far, i.e., __far char template[20];
In the 16- and 32-bit compilers, change any occurrence of the far attribute, as in the
following
void bar(void) __attribute__ ((far));
int tblIdx __attribute__ ((far));
to
void __far bar(void);
int __far tblIdx;
--------------------------------------------*/
不过在声明变量时,加入near后,出现
error: 'far' undeclared (first use in this function)。