[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[avr-gcc-list] Problem reading from EEPROM

From: Arthur Goldhammer
Subject: [avr-gcc-list] Problem reading from EEPROM
Date: Mon, 14 Jul 2003 14:15:07 -0400

I'm trying to read data from the EEPROM of an 8515. I've got the following

#define EEPROM __attribute__((section(".eeprom")))

uint8_t val1 EEPROM = 'o';
uint8_t val2 EEPROM = 'x';

Later, I have these lines:

  uint8_t v0, v1;
    v0 = eeprom_read_byte(&val1);
    v1 = eeprom_read_byte(&val2);

But both v0 and v1 are 0xff after execution of the last two lines. What am I
doing wrong? I dumped the EEPROM to make sure the data are in there. It
looks OK.

I'm using the latest CVS version of avr-gcc:
gcc version 3.3 20030512 (prerelease)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]