标题: PIC单片机代码问题,显示eeprom的存储空间不足,试过好几种方法还是报错 [打印本页] 作者: 1148794250 时间: 2024-1-18 13:49 标题: PIC单片机代码问题,显示eeprom的存储空间不足,试过好几种方法还是报错 请大佬看看是pic16f676单片机代码哪儿的问题
报错显示::: warning: (1273) Omniscient Code Generation not available in Free mode
miewendeng.c:479: warning: (752) conversion to shorter data type
D:\XC8\sources\pic\eeread.c:12: error: (1360) no space for auto/param eeprom_write@addr
(908) exit status = 1
nbproject/Makefile-default.mk:131: recipe for target 'dist/default/production/miewendeng.X.production.hex' failed
make[2]: Leaving directory 'D:/MPLAB X IDE v4.05???/miewendeng.X'
nbproject/Makefile-default.mk:90: recipe for target '.build-conf' failed
make[1]: Leaving directory 'D:/MPLAB X IDE v4.05???/miewendeng.X'
nbproject/Makefile-impl.mk:39: recipe for target '.build-impl' failed
make[2]: *** [dist/default/production/miewendeng.X.production.hex] Error 1
make[1]: *** [.build-conf] Error 2
make: *** [.build-impl] Error 2
编译已失败 (退出值2, 总时间: 1s)
----------------------------------------
警告:adcshili.c:418: warning: (752) conversion to shorter data type这个警告表示在第418行进行了将数据类型转换为较短的数据类型的操作。
错误:D:\XC8\sources\common\lwdiv.c:31: error: (1358) no space for _eeprom_read temps (1)这个错误表示编译器无法为_eeprom_read temps分配足够的空间。
eeprom_write(0x03,eeprom_read(0x03)+1); //清虫天数计数+1天 418行
请问大佬这个代码该怎么改啊,刚刚入行的小白琢磨了好几天还是一头雾水。
/*
* File: adcshili.c
* Author: Administrator
*
* Created on 2024年1月5日, 上午9:24
*/
//#include <stdio.h>
//#include <stdlib.h>
/*
*
*/
/*
int main(int argc, char** argv) {
return (EXIT_SUCCESS);
}
*/
# include <xc.h>
#pragma config FOSC = INTRCIO // Oscillator Selection bits (INTOSC oscillator: I/O function on RA4/OSC2/CLKOUT pin, I/O function on RA5/OSC1/CLKIN)INTOSC 振荡器, RA4、RA5为IO口
#pragma config WDTE = OFF // Watchdog Timer Enable bit (WDT enabled)看门狗开
#pragma config PWRTE = ON // Power-up Timer Enable bit (PWRT enabled)上电复位开
#pragma config MCLRE = OFF // RA3/MCLR pin function select (RA3/MCLR pin function is digital I/O, MCLR internally tied to VDD)RA3/MCLR引脚功能为MCLR
#pragma config BOREN = OFF // Brown-out Detect Enable bit (BOD enabled)欠压检测功能关
#pragma config CP = OFF // Code Protection bit (Program Memory code protection is disabled)程序存储器代码保护被禁用
#pragma config CPD = OFF // Data Code Protection bit (Data memory code protection is disabled)数据代码保护关