標題: 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)數據代碼保護關