Trouble loading the Beta Arduino software for new Bosch based IMU


#1

I updated my image following the link. I edited AConfig.h (to add the line and disable the old imu) and OpenROV.ino. I created the 2 new files in the same directory.

When I attempted to upload the to the Arduino, the ‘Make failed with code 2’.
I don’t see BNO055.ccp being loaded. Did I put it in the wrong directory?

Log :
staging: build dir is /tmp/tmp.NA2I2usqip
staged src in to build folder
src/OpenROV.ino
Searching for Arduino lib version file (version.txt) … /usr/share/arduino/lib/version.txt
Detecting Arduino software version … 1.0.5 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of EEPROM
Scanning dependencies of SPI
Scanning dependencies of Wire
src/Device.cpp
src/openrov_servo.cpp
src/inv_mpu_dmp_motion_driver.cpp
src/inv_mpu.cpp
src/controllerboard25.cpp
src/Timer.cpp
src/ThrustersAndFins2XTrailing2.cpp
src/Thrusters2X1.cpp
src/Settings.cpp
src/Pin.cpp
src/Pilot.cpp
src/Motor.cpp
src/MinIMU_matrix.cpp
src/MinIMU_Vector.cpp
src/MinIMU_Output.cpp
src/MinIMU_LSM303.cpp
src/MinIMU_L3G.cpp
src/MinIMU_I2C.cpp
src/MinIMU_DCM.cpp
src/MinIMU_Compass.cpp
src/MinIMU9AHRS.cpp
src/MinIMU9.cpp
src/MS5803_14BA.cpp
src/MPUVector3.cpp
src/MPUQuaternion.cpp
src/MPU9150Lib.cpp
src/MPU9150.cpp
src/Lights.cpp
src/I2Cdev.cpp
src/FreeMem.cpp
src/DeadManSwitch.cpp
src/Command.cpp
src/Cape.cpp
src/CameraMount.cpp
src/CalibrationLaser.cpp
src/CalLib.cpp
src/OpenROV.cpp
EEPROM/EEPROM.cpp
Linking libEEPROM.a
SPI/SPI.cpp
Linking libSPI.a
Wire/utility/twi.c
Wire/Wire.cpp
Linking libWire.a
arduino/wiring_digital.c
arduino/wiring_pulse.c
arduino/wiring.c
arduino/wiring_shift.c
arduino/wiring_analog.c
arduino/WInterrupts.c
arduino/new.cpp
arduino/CDC.cpp
arduino/HardwareSerial.cpp
arduino/HID.cpp
arduino/Tone.cpp
arduino/main.cpp
arduino/USBCore.cpp
arduino/WString.cpp
arduino/Print.cpp
arduino/IPAddress.cpp
arduino/Stream.cpp
arduino/WMath.cpp
Linking libarduino.a
Linking firmware.elf
.build/mega2560/src/OpenROV.o: In function _GLOBAL__sub_D_check': /tmp/tmp.NA2I2usqip/src/OpenROV.ino:194: undefined reference tovtable for BNO055’
/tmp/tmp.NA2I2usqip/src/OpenROV.ino:194: undefined reference to vtable for BNO055' /tmp/tmp.NA2I2usqip/src/OpenROV.ino:194: undefined reference tovtable for BNO055’
/tmp/tmp.NA2I2usqip/src/OpenROV.ino:194: undefined reference to `vtable for BNO055’
collect2: error: ld returned 1 exit status
make: *** [.build/mega2560/firmware.elf] Error 1
Searching for Board description file (boards.txt) … /usr/share/arduino/hardware/arduino/boards.txt
Searching for Arduino lib version file (version.txt) … /usr/share/arduino/lib/version.txt
Detecting Arduino software version … 1.0.5 (1.0.5)
Searching for Arduino core library … /usr/share/arduino/hardware/arduino/cores/arduino
Searching for Arduino variants directory … /usr/share/arduino/hardware/arduino/variants
Searching for Arduino standard libraries … /usr/share/arduino/libraries
Searching for make … /usr/bin/make
Searching for avr-gcc … /usr/bin/avr-gcc
Searching for avr-g++ … /usr/bin/avr-g++
Searching for avr-ar … /usr/bin/avr-ar
Searching for avr-objcopy … /usr/bin/avr-objcopy
Make failed with code 2
firmware-build.sh: : Compile of the Arduino image failed.
firmware-installfromsource.sh: Building Firmware Failed! Aborting


New IMU / Depth Sensor
#2

Yea, I’m not seeing the BNO055.cpp or .h being loaded.

Double check you can see the files
ls /opt/openrov/arduino/OpenROV/BNO055.*

If you can see them, try changing the permissions on the files to see if that make a difference:

sudo chmod 777 /opt/openrov/arduino/OpenROV/BNO055.*


#3

I checked and the BNO055.ccp was not there. Strange. I was sure i looked for it before re-booting.
So I recreated it. I looked to make sure it was there. I opened it to make sure it contained the code.
I rebooted. I looked for it again to make sure it was there.
I uploaded the firmware to Arduino. It showed it loading. I was pleased. Then it failed in the same place as before for the same code.
I looked to see if the file was there. It was, but I opened it in nano and it was empty.
What should I do now? :slight_smile:

I didn’t try sudo chmod 777 line yet.
I did create the files with sudo though. i will try chmod now.


#4

So I recreated the file and used the sudo chmod line. After rebooting the rov, BNO055.cpp was blank.


#5

Are you rebooting by yanking the power?

After you finish saving the file, don’t just yank power. Issue the shutdown command

sudo shutdown now

As soon as the ethernet lights go out you can physically power cycle.

You can instead use sudo reboot now… I think. It was either reboot or restart.


#6

I did that this time (but had been unplugging before) and the file still contained code when it rebooted. It still failed, but the log had a different issue:

(Also I looked and BNO005.cpp still have the code in it.)

undefinedstaging: build dir is /tmp/tmp.6Ro8JUQ92p
staged src in to build folder
src/OpenROV.ino
Searching for Arduino lib version file (version.txt) … /usr/share/arduino/lib/version.txt
Detecting Arduino software version … 1.0.5 (1.0.5)
Scanning dependencies of src
Scanning dependencies of arduino
Scanning dependencies of EEPROM
Scanning dependencies of SPI
make: Warning: File /usr/share/arduino/libraries/Wire/utility/twi.c' has modification time 2.5e+06 s in the future Scanning dependencies of Wire make: warning: Clock skew detected. Your build may be incomplete. make: Warning: File/usr/share/arduino/libraries/Wire/Wire.h’ has modification time 2.5e+06 s in the future
src/Device.cpp
src/openrov_servo.cpp
src/inv_mpu_dmp_motion_driver.cpp
src/inv_mpu.cpp
src/controllerboard25.cpp
src/Timer.cpp
src/ThrustersAndFins2XTrailing2.cpp
src/Thrusters2X1.cpp
src/Settings.cpp
src/Pin.cpp
src/Pilot.cpp
src/Motor.cpp
src/MinIMU_matrix.cpp
src/MinIMU_Vector.cpp
src/MinIMU_Output.cpp
src/MinIMU_LSM303.cpp
src/MinIMU_L3G.cpp
src/MinIMU_I2C.cpp
src/MinIMU_DCM.cpp
src/MinIMU_Compass.cpp
src/MinIMU9AHRS.cpp
src/MinIMU9.cpp
src/MS5803_14BA.cpp
src/MPUVector3.cpp
src/MPUQuaternion.cpp
src/MPU9150Lib.cpp
src/MPU9150.cpp
src/Lights.cpp
src/I2Cdev.cpp
src/FreeMem.cpp
src/DeadManSwitch.cpp
src/Command.cpp
src/Cape.cpp
src/CameraMount.cpp
src/CalibrationLaser.cpp
src/CalLib.cpp
src/BNO055.cpp
src/BNO055.cpp:260:21: error: conflicting specifiers in declaration of 'pitch’
src/BNO055.cpp:260:28: error: conflicting specifiers in declaration of 'yaw’
src/BNO055.cpp:260:33: error: conflicting specifiers in declaration of 'roll’
src/BNO055.cpp:261:21: error: conflicting specifiers in declaration of 'Pitch’
src/BNO055.cpp:261:28: error: conflicting specifiers in declaration of 'Yaw’
src/BNO055.cpp:261:33: error: conflicting specifiers in declaration of 'Roll’
In file included from src/BNO055.cpp:12:0:
/usr/share/arduino/libraries/Wire/Wire.h: In function ‘uint8_t readByte(uint8_t, uint8_t)’:
/usr/share/arduino/libraries/Wire/Wire.h:58:13: note: candidate 1: uint8_t TwoWire::requestFrom(int, int)
/usr/share/arduino/libraries/Wire/Wire.h:56:13: note: candidate 2: uint8_t TwoWire::requestFrom(uint8_t, uint8_t)
src/BNO055.cpp: In member function ‘virtual void BNO055::device_loop(Command)’:
src/BNO055.cpp:586:5: error: ‘Yaw’ was not declared in this scope
src/BNO055.cpp:587:5: error: ‘Roll’ was not declared in this scope
src/BNO055.cpp:588:5: error: ‘Pitch’ was not declared in this scope
make: *** [.build/mega2560/src/BNO055.o] Error 1
Searching for Board description file (boards.txt) … /usr/share/arduino/hardware/arduino/boards.txt
Searching for Arduino lib version file (version.txt) … /usr/share/arduino/lib/version.txt
Detecting Arduino software version … 1.0.5 (1.0.5)
Searching for Arduino core library … /usr/share/arduino/hardware/arduino/cores/arduino
Searching for Arduino variants directory … /usr/share/arduino/hardware/arduino/variants
Searching for Arduino standard libraries … /usr/share/arduino/libraries
Searching for make … /usr/bin/make
Searching for avr-gcc … /usr/bin/avr-gcc
Searching for avr-g++ … /usr/bin/avr-g++
Searching for avr-ar … /usr/bin/avr-ar
Searching for avr-objcopy … /usr/bin/avr-objcopy
Make failed with code 2
firmware-build.sh: : Compile of the Arduino image failed.
firmware-installfromsource.sh: Building Firmware Failed! Aborting


#7

Close. Just disable the MPU9150, put a (0) after it. Then all should compile fine.


#8

I did that previously. This is what I have listed (in aftermarket)

//After Market:
#define HAS_POLOLU_MINIMUV (0)
#define HAS_MS5803_14BA (1)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define HAS_MPU9150 (0)
#define MPU9150_EEPROM_START 2
#define HAS_BNO055 (1)


#9

I tried disabling the depth sensor, in case that was the issue, but it gave the same failure code.
I will try a clean image and start over.


#10

Ah. My bad. I had a typo in that code:

Go ahead and remove the double “static”


#11

Sweet!

Works perfectly!

Thank you very much!

It seems normal to me now that, having first solved the problem of no file and then solving the problem of an empty file, that there would still be a third problem in the very same file. A problem that had no relation the the first two. Though I suppose I only remember when it does happen.


#12