Error from EEPROM library while compiling

Status
Not open for further replies.

gofaster

Member
EDIT: Please ignore the below. The build failure was caused by something else.

-- original post ---
I am using the EEPROM library in a project. It was compiling fine with Teensyduino 1.29-beta2 (I think that was the version I had prior to updating to the release version a few days ago). Today I deleted the temporary build directory to force a complete rebuild and am getting the following compile error.

Code:
"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino10/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\gdekatt\AppData\Local\Temp\build78abc565088653518f7ef390b54ba44e.tmp\preproc\ctags_target_for_gcc_minus_e.cpp"
"C:\Program Files (x86)\Arduino\hardware\teensy/../tools/arm/bin/arm-none-eabi-g++" -c -O -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -fno-exceptions -felide-constructors -std=gnu++0x -fno-rtti -mthumb -mcpu=cortex-m4 -fsingle-precision-constant -D__MK20DX256__ -DTEENSYDUINO=129 -DARDUINO=10609 -DF_CPU=72000000 -DUSB_SERIAL -DLAYOUT_US_ENGLISH "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\cores\teensy3" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\ADC" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\SPI" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OLED_SSD1306" "-IC:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OneButton" "C:\Users\gdekatt\AppData\Local\Temp\build78abc565088653518f7ef390b54ba44e.tmp\sketch\winch-tester-v0.6.6.ino.cpp" -o "C:\Users\gdekatt\AppData\Local\Temp\build78abc565088653518f7ef390b54ba44e.tmp\sketch\winch-tester-v0.6.6.ino.cpp.o"
In file included from C:\Users\gdekatt\Documents\Winch tester\Code\winch-tester-v0.6.6\winch-tester-v0.6.6.ino:41:0:

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h: In instantiation of 'const T& EEPROMClass::put(int, const T&) [with T = float]':

C:\Users\gdekatt\Documents\Winch tester\Code\winch-tester-v0.6.6\winch-tester-v0.6.6.ino:1116:43:   required from here

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h:144:15: warning: variable 'e' set but not used [-Wunused-but-set-variable]

         EEPtr e = idx;

               ^


C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h: In instantiation of 'const T& EEPROMClass::put(int, const T&) [with T = long int]':

C:\Users\gdekatt\Documents\Winch tester\Code\winch-tester-v0.6.6\winch-tester-v0.6.6.ino:1118:45:   required from here

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h:144:15: warning: variable 'e' set but not used [-Wunused-but-set-variable]

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h: In instantiation of 'const T& EEPROMClass::put(int, const T&) [with T = unsigned char]':

C:\Users\gdekatt\Documents\Winch tester\Code\winch-tester-v0.6.6\winch-tester-v0.6.6.ino:1124:42:   required from here

C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\EEPROM/EEPROM.h:144:15: warning: variable 'e' set but not used [-Wunused-but-set-variable]

The following is the code fragment that's been compiling fine for weeks until now

Code:
int32_t adc_0_offset = 0, adc_1_offset = 0 ; // offset correction.  Retrieve values from EEPROM
float adc_0_gain = 0.0, adc_1_gain = 0.0 ; // factor correction.  Retrieve values from EEPROM

// save to EEPROM.
      eepromAddress = 0;
      calExists = 88;  // flag that calibration values exist in EEPROM
      EEPROM.put(eepromAddress, adc_0_gain);
      eepromAddress = eepromAddress + sizeof(float);
      EEPROM.put(eepromAddress, adc_0_offset);
      eepromAddress = eepromAddress + sizeof(int32_t);
      EEPROM.put(eepromAddress, adc_1_gain);
      eepromAddress = eepromAddress + sizeof(float);
      EEPROM.put(eepromAddress, adc_1_offset);
      eepromAddress = eepromAddress + sizeof(int32_t);
      EEPROM.put(eepromAddress, calExists);

What have I done wrong?
 
Last edited:
Status
Not open for further replies.
Back
Top