Writing to eeprom, 18F1320 BoostC

Status
Not open for further replies.

Odin

Member
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);
	}
}
 
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:
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…