Open DavidH137 opened 11 years ago
FYI, TYPE 33 Mega2560
Compile with EPROM_MODE = 0 is successful
Strange. Tested it with Arduino 1.0.4 on windows and it was no problem. The undeclared commands are definied in #include <avr/eeprom.h> which is included in Eeprom.h. What os are you using that your avr does not have these definitions?
Windows 7 64bit SP1.
I have EEPROM.H in arduino-1.0.3\libraries and arduino-1.0.3\Source\libraries I have Eeprom.h in arduino-1.0.3 (this is in the Repetier directory which I loaded the .pde file from in the IDE I have eeprom.h in arduino-1.0.3\hardware/tools\avr\avr\include and arduino-1.0.3\hardware/tools\avr\include
I renamed all but the one in the Repetier directory (which is included in the Repetier firmware download)
The remaining Eeprom.h that shows up in the Arduino IDE windows does include:
extern inline void epr_set_byte(uint pos,byte value); extern inline void epr_set_int(uint pos,int value); extern inline void epr_set_long(uint pos,long value); extern inline void epr_set_float(uint pos,float value); extern void epr_data_to_eeprom(byte corrupted); extern void epr_eeprom_to_data(); extern void epr_eeprom_reset();
inline byte epr_get_byte(uint pos) { return eeprom_readbyte ((unsigned char )(EEPROM_OFFSET+pos)); } inline int epr_get_int(uint pos) { return eeprom_read_word((unsigned int )(EEPROM_OFFSET+pos)); } inline long epr_get_long(uint pos) { return eeprom_readdword((unsigned long)(EEPROM_OFFSET+pos)); } inline float epr_get_float(uint pos) { float v; eeprom_read_block(&v,(void )(EEPROM_OFFSET+pos),4); // newer gcc have eeprom_read_block but not arduino 22 return v; }
Compile gives the same error after the renames as I posted above.
After trying everything below I just copied and pasted the Ardunio eeprom.h into the Eeprom.h files and compiled without errors. The Ardunio IDE sucks!!!
I also moved the file from arduino-1.0.3\hardware\tools\avr\include which I renamed to xeeprom.h and changed the name of the include to xeeprom.h with the same result.
This version in avr is from WinAVR-20100110-install.exe.
I then renamed and moved from eeprom.h from arduino-1.0.3-windows.zip into the Repetier folder with same result.
This is weird since I can see the definitions in xeeprom.h. If I try to rename xeeprom.h to eeprom.h Windows tells me Eeprom.h exists, do I want to overwrite...
I also tried with changing the one from Arduino to zeeprom.h, move to Repetier directory and did a Tools/Add file, I was asked if I wanted to replace the existing zeeprom.h and said yes, which resulted in zeeprom.h being deleted from the directory with the following errors:
Could not createInput() for E:\3D\arduino-1.0.3\Repetier\zeeprom.h
java.io.FileNotFoundException: E:\3D\arduino-1.0.3\Repetier\zeeprom.h (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.
I got it to compile but when try to run on Leapfrog 3d Creatr the values are incorrect for most of the them (x, y, z direction, steps, extruders...)
Using Ardunio 1.0.3 IDE
in file included from Commands.cpp:24: /Eeprom.h: In function 'byte epr_get_byte(uint16_t)': Eeprom.h:116: error: 'eeprom_read_byte' was not declared in this scope /Eeprom.h: In function 'int epr_get_int(uint16_t)': Eeprom.h:119: error: 'eeprom_read_word' was not declared in this scope /Eeprom.h: In function 'long int epr_get_long(uint16_t)': Eeprom.h:122: error: 'eeprom_read_dword' was not declared in this scope /Eeprom.h: In function 'float epr_get_float(uint16_t)': Eeprom.h:126: error: 'eeprom_read_block' was not declared in this scope