O Odin Member Feb 24, 2011 #1 I'm trying to write to the internal eeprom on a 18F1320. MPlab 8.60 Sourceboost 7.01. Getting the error: "Optimisation level:1 Error: Failed to resolve external:eeadrh failure Link step failed. BUILD FAILED: Thu Feb 24 09:56:45 2011" If I comment out the line "eeprom_write..." it compiles fine. Any suggestions? Code: #include <system.h> #include <eeprom.h> #pragma CLOCK_FREQ 8000000 #pragma config WDT = OFF, LVP = OFF, OSC = INTIO2 unsigned char i; void main(void) { while(1==1) // Loop forever { i = eeprom_read(0x01); eeprom_write(0x05, 0x12); } }
I'm trying to write to the internal eeprom on a 18F1320. MPlab 8.60 Sourceboost 7.01. Getting the error: "Optimisation level:1 Error: Failed to resolve external:eeadrh failure Link step failed. BUILD FAILED: Thu Feb 24 09:56:45 2011" If I comment out the line "eeprom_write..." it compiles fine. Any suggestions? Code: #include <system.h> #include <eeprom.h> #pragma CLOCK_FREQ 8000000 #pragma config WDT = OFF, LVP = OFF, OSC = INTIO2 unsigned char i; void main(void) { while(1==1) // Loop forever { i = eeprom_read(0x01); eeprom_write(0x05, 0x12); } }
A anothermort New Member Feb 24, 2011 #2 Try this line Code: volatile char eeadrh; //dummy variable that is needed to link to eeprom library for PIC18s that don't have EEARDH register Then it will work fine, its a known problem. Last edited: Feb 24, 2011
Try this line Code: volatile char eeadrh; //dummy variable that is needed to link to eeprom library for PIC18s that don't have EEARDH register Then it will work fine, its a known problem.