Go Down

Topic: mega2560 and rf12.h (Read 826 times) previous topic - next topic

jm_wsb

Hello,

I am running multiple jeenodes and arduino duemilanove (with RFm12B module) communication with no problem to each other.

When I try to compile any RF12 example with my new mega2560, I always get this error:

In file included from C:\Users\Jeroen\Desktop\arduno\arduino-0021\libraries\RF12\RF12.cpp:8:
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h: In function 'void eeprom_read_block(void*, const void*, size_t)':
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:290: error: ISO C++ forbids incrementing a pointer of type 'void*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:290: error: ISO C++ forbids incrementing a pointer of type 'const void*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:290: error: invalid conversion from 'const void*' to 'const uint8_t*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:290: error:   initializing argument 1 of 'uint8_t eeprom_read_byte(const uint8_t*)'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h: In function 'void eeprom_write_block(const void*, void*, size_t)':
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:398: error: ISO C++ forbids incrementing a pointer of type 'void*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:398: error: ISO C++ forbids incrementing a pointer of type 'const void*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:398: error: invalid conversion from 'void*' to 'uint8_t*'
c:/users/jeroen/desktop/arduno/arduino-0021/hardware/tools/avr/lib/gcc/../../avr/include/avr/eeprom.h:398: error:   initializing argument 1 of 'void eeprom_write_byte(uint8_t*, uint8_t)'

I've looked into the eeprom lib and rf12.h lib, It are the lastest versions and I can't notice the problem.

Can someone help me ?

Thanks in advance, Jeroen.

PaulS

Quote
When I try to compile any RF12 example with my new mega2560, I always get this error:

On which version of the IDE? On which OS? Where are you getting the code from?

jm_wsb

sorry for the lack of information

OS: windows 7
arduino-0021 libs.
RF12.h comes from http://code.jeelabs.org/libraries/RF12/

and fe. the example program pingPong. (but it is the same with all programs)

It compiles if you select as board the duemi.. with 328 chip, but it gives  errors when you select mega2560 board.


Thanks,
Jeroen

Go Up