英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流

标题: pic16f877还有扩展的内存吗?总共368字节不够啊! [打印本页]

作者: winnie    时间: 2009-4-21 09:46
标题: pic16f877还有扩展的内存吗?总共368字节不够啊!
错误如下:
Executing: "C:\HT-PIC\BIN\PICC.EXE" -E"tx10.lde" "F:\Program Files\MPLAB\1\tx10.obj" -M"tx10.map" -O"tx10.cof" -O"tx10.hex" -Q -MPLAB -16F877
This compiler will expire in 12 days
Compiler operating in demo mode.
Some command line options are disabled and compilation is delayed.
Register this compiler to enable these options.
Error[000]   : Can't find 0x200 words for psect rdata_0 in segment BANK0
Error[000]   : Can't find 0x46 words for psect rbss_1 in segment BANK1
Error[000]   : Can't find 0x2 words for psect temp in segment COMBANK
Error[000]   : Can't find 0x3 words (0x3 withtotal) for psect intsave in segment BANK0
Error[000]   : Can't find 0x2 words (0x2 withtotal) for psect code_ptr in segment BANK0
Error[000]   : Can't find 0x1 words (0x1 withtotal) for psect intsave in segment BANK0
Error[000]   : Can't find 0x1 words (0x1 withtotal) for psect intsave_0 in segment COMBANK
BUILD FAILED: Fri Dec 24 18:50:12 2004
bank 内定义的变量字节总数不能超过可用RAM 字节数。可是我要定义几个数组,还要
进行 CRC 查表校验,四个数据存储器显然是不够的,怎么解决这个问题?
作者: winnie    时间: 2009-4-21 09:46
问题解决!
本来不知道怎么将该数组定义成使用程序存储器,而不是数据存储器,

unsigned char   auchCRCHi[] = {      
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41................

后来发现前面加 const就行了

即 const unsigned char   auchCRCHi[] = {        //去掉了auch...前的code
0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41




欢迎光临 英锐恩单片机论坛,Microchip单片机,模拟器件,接口电路,麦肯单片机,单片机应用交流 (http://www.enroobbs.com/) Powered by Discuz! X3.2