Pages: [1]   Go Down
Author Topic: mega2560 and rf12.h  (Read 718 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Seattle, WA USA
Online Online
Brattain Member
*****
Karma: 612
Posts: 49201
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 61
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Pages: [1]   Go Up
Jump to: