Fortunately, I had kept all the old versions of the required i2cdevlib files, so my two-year old project (Teensy_MPU6050_DMP6_V2.ino) still compiled and ran properly – whew. Unfortunately, two years later when I tried to change out the Mega 2560 for a Teensy 3.5 in Wall-E3 my latest autonomous wall-following robot, I ran into compile problems again – rats! Looking at the code, I saw that the maintainers had accepted my pull request to add a ‘I2CDEV_TEENSY_3X_WIRE’ identifier to I2Cdev.h to switch from to as I had done previously, but I still couldn’t get the library to compile with a Teensy 3.x target. See this post from almost two years (December 2019) ago for the gory details. At the time I got the library to compile by replacing #include Wire.h with #include i2c_t3.h in i2cdev.h/cpp. However, when I tried switching over from Arduino UNO/Mega controllers to the Teensy 3.x controller, Jeff Rowberg’s library wouldn’t compile at all.
Since I am not an expert on Embedded programming I would like to know why this mismatch is related to and if it might be a bug.This post describes my efforts, once again, to figure out how to get a Teensy running with Jeff Rowberg’s I2CDev library for the purpose of interfacing to a MPU6050 6-axis IMU with on-board DMP.Īfter some initial teething problems, I have been using the MPU6050 for years on my various autonomous wall-following robots using Arduino Mega 2560 controllers with great success. In order to solve this error the following function in the std name space must be defined
tmp/arduino_build_766032/sketch/vector_: In function std::vector >::_M_check_len(unsigned int, char const*) const': /home/user/.arduino-1.8.5/hardware/tools/arm/arm-none-eabi/include/c++/5.4.1/bits/stl_vector.h:1425: undefined reference tostd::_throw_length_error(char const*)’
= Took 2.24 seconds =īut the same code build on the Arduino IDE outputs the following error home/user/.platformio/packages/toolchain-gccarmnoneeabi/bin/…/lib/gcc/arm-none-eabi/5.4.1/…/…/…/…/arm-none-eabi/lib/armv7e-m/fpu/libc.a(lib_a-writer.o): In function _write_r':** **writer.c:(.text._write_r+0x12): undefined reference to_write’Ĭollect2: error: ld returned 1 exit status LDF MODES: FINDER(deep) COMPATIBILITY(soft)Ĭompiling. SYSTEM: MK66FX1M0 180MHz 256KB RAM (1MB Flash) Verbose mode can be enabled via -v, -verbose option When I build it using platformio using pio run I get the following error The version of platformio I am using is 3.6.0a1 and compiling for a Teensy 3.6 board. I have a question regarding why I get different errors for the same issue in platform io and the Arduino IDE