rpicopter / ArduinoMotionSensorExample

MPU6050/MPU6500/MPU9150/MPU9250 over I2c for Arduino
117 stars 43 forks source link

Cant compile this project on Intel Edison (connected with MPU 9150) #10

Closed yerzhik closed 8 years ago

yerzhik commented 8 years ago

I have intel edison which has arduino inside. Connected with MPU 9150 and tried this project to compile but it shows following errors shown below. I tried it using arduino compiler. Makefile can do it only for BOARD_TAG = uno but uploading that ELF file to board (manually) doesn't work right. I can't figure out what board tag should be used. If using no uno then it shows error:

avr-g++: error: missing argument to '-mmcu='

what can be the reason here?

[code]sketch/I2Cdev.cpp: In static member function 'static boolean Fastwire::waitInt()': I2Cdev.cpp:718: error: 'TWCR' was not declared in this scope while (!(TWCR & (1 << TWINT)) && l-- > 0); ^ I2Cdev.cpp:718: error: 'TWINT' was not declared in this scope while (!(TWCR & (1 << TWINT)) && l-- > 0); ^ sketch/I2Cdev.cpp: In static member function 'static void Fastwire::setup(int, boolean)': I2Cdev.cpp:723: error: 'TWCR' was not declared in this scope TWCR = 0;

......etc

I2Cdev.cpp:789: error: 'TWDR' was not declared in this scope TWDR = address; // send data to the previously addressed device ^ I2Cdev.cpp:790: error: 'TWCR' was not declared in this scope TWCR = (1 << TWINT) | (1 << TWEN); ^ ... etc ^ sketch/I2Cdev.cpp: In static member function 'static byte Fastwire::write(byte)': I2Cdev.cpp:812: error: 'TWDR' was not declared in this scope TWDR = value; // send data ^ I2Cdev.cpp:813: error: 'TWCR' was not declared in this scope TWCR = (1 << TWINT) | (1 << TWEN); ^ ...etc ^ sketch/I2Cdev.cpp: In static member function 'static byte Fastwire::readBuf(byte, byte, byte*, byte)': I2Cdev.cpp:825: error: 'TWCR' was not declared in this scope TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO) | (1 << TWSTA); ^ .... etc

I2Cdev.cpp:851: error: 'TWSTO' was not declared in this scope TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO) | (1 << TWSTA); ^ ...... etc ^ I2Cdev.cpp:888: error: 'TWSTO' was not declared in this scope TWCR = (1 << TWINT) | (1 << TWEN) | (1 << TWSTO); ^ exit status 1 'TWCR' was not declared in this scope[/code]