PIC C30编译器,内部函数调用出错。

[复制链接]
 楼主| lhzw2001 发表于 2012-2-7 08:34 | 显示全部楼层 |阅读模式
int __attribute__ ((space(eedata))) eeData = 0x1234; // Variable located in EEPROM

unsigned int offset;


// Set up NVMCON to erase one word of data EEPROM

NVMCON = 0x4058;

// Set up a pointer to the EEPROM location to be erased

TBLPAG = __builtin_tblpage(&eeData); // Initialize EE Data page pointer


offset = __builtin_tbloffset(&eeData); // Initizlize lower word of address

__builtin_tblwtl(offset, 0); // Write EEPROM data to write latch

asm volatile ("disi #5"); // Disable Interrupts For 5 Instructions

__builtin_write_NVM(); // Issue Unlock Sequence & Start Write Cycle



error: Argument to __builtin_tblpage() is not the address
您需要登录后才可以回帖 登录 | 注册

本版积分规则

78

主题

341

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部