Before logging an issue, please update to the latest release of Visual Micro from the Downloads Page.

When Logging a Support Issue in the Forum, please ensure you have also:-

  • Enabled vMicro > Compiler > Show Build Properties
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
  • Click the Reply button and attach as .txt file OR
  • Click here to Email us with the file attached, and a link to your post
Support requests without the output above may be impossible to answer, so please help us to help you
 
Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic (.text.startup+0x7f6): undefined reference to MPU6050::initialize() (Read 1857 times)
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
(.text.startup+0x7f6): undefined reference to MPU6050::initialize()
Jan 23rd, 2019 at 7:18pm
Print Post  
I have a project that has been working fine for months/years, and now all of a sudden I'm seeing an error similar to

(.text.startup+0x7f6): undefined reference to MPU6050::initialize()

For every reference to my MPU6050 object in the code.  In the code itself, intellisense correctly colors and highlights all such references, the flyover text is correct, and selecting 'Peek/GoTo Definition goes to the correct implementation file and section.

Any ideas?

Code file attached (too large to place inline)

Code
Select All
ccKHFIlK.ltrans0.ltrans.o*: In function main
   (.text.startup+0x7f6): undefined reference to MPU6050::initialize()
   (.text.startup+0x806): undefined reference to MPU6050::testConnection()
   (.text.startup+0x828): undefined reference to MPU6050::reset()
   (.text.startup+0x83e): undefined reference to MPU6050::setSleepEnabled(bool)
   (.text.startup+0x84c): undefined reference to MPU6050::setMemoryBank(unsigned char, bool, bool)
   (.text.startup+0x856): undefined reference to MPU6050::setMemoryStartAddress(unsigned char)
   (.text.startup+0x864): undefined reference to MPU6050::setMemoryBank(unsigned char, bool, bool)
   (.text.startup+0x86c): undefined reference to MPU6050::getXGyroOffsetTC()
   (.text.startup+0x876): undefined reference to MPU6050::getYGyroOffsetTC()
   (.text.startup+0x880): undefined reference to MPU6050::getZGyroOffsetTC()
   (.text.startup+0x88e): undefined reference to MPU6050::setSlaveAddress(unsigned char, unsigned char)
   (.text.startup+0x898): undefined reference to MPU6050::setI2CMasterModeEnabled(bool)
   (.text.startup+0x8a4): undefined reference to MPU6050::setSlaveAddress(unsigned char, unsigned char)
   (.text.startup+0x8ac): undefined reference to MPU6050::resetI2CMaster()
   (.text.startup+0x8d0): undefined reference to MPU6050::writeProgMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool)
   (.text.startup+0x8e6): undefined reference to MPU6050::writeProgDMPConfigurationSet(unsigned char const*, unsigned int)
   (.text.startup+0x8f6): undefined reference to MPU6050::setClockSource(unsigned char)
   (.text.startup+0x900): undefined reference to MPU6050::setIntEnabled(unsigned char)
   (.text.startup+0x90a): undefined reference to MPU6050::setRate(unsigned char)
   (.text.startup+0x914): undefined reference to MPU6050::setExternalFrameSync(unsigned char)
   (.text.startup+0x91e): undefined reference to MPU6050::setDLPFMode(unsigned char)
   (.text.startup+0x928): undefined reference to MPU6050::setFullScaleGyroRange(unsigned char)
   (.text.startup+0x932): undefined reference to MPU6050::setDMPConfig1(unsigned char)
   (.text.startup+0x93c): undefined reference to MPU6050::setDMPConfig2(unsigned char)
   (.text.startup+0x946): undefined reference to MPU6050::setOTPBankValid(bool)
   (.text.startup+0x950): undefined reference to MPU6050::setXGyroOffsetTC(signed char)

Error linking for board Arduino/Genuino Mega w/ ATmega2560 (Mega 2560)
   (.text.startup+0x95a): undefined reference to MPU6050::setYGyroOffsetTC(signed char)
   (.text.startup+0x964): undefined reference to MPU6050::setZGyroOffsetTC(signed char)
Build failed for project 'FourWD_WallE2_V3'
   (.text.startup+0x9bc): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xa08): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xa10): undefined reference to MPU6050::resetFIFO()
   (.text.startup+0xa18): undefined reference to MPU6050::getFIFOCount()
   (.text.startup+0xa24): undefined reference to MPU6050::getFIFOBytes(unsigned char*, unsigned char)
   (.text.startup+0xa2e): undefined reference to MPU6050::setMotionDetectionThreshold(unsigned char)
   (.text.startup+0xa38): undefined reference to MPU6050::setZeroMotionDetectionThreshold(unsigned char)
   (.text.startup+0xa42): undefined reference to MPU6050::setMotionDetectionDuration(unsigned char)
   (.text.startup+0xa4c): undefined reference to MPU6050::setZeroMotionDetectionDuration(unsigned char)
   (.text.startup+0xa54): undefined reference to MPU6050::resetFIFO()
   (.text.startup+0xa5e): undefined reference to MPU6050::setFIFOEnabled(bool)
   (.text.startup+0xa68): undefined reference to MPU6050::setDMPEnabled(bool)
   (.text.startup+0xa70): undefined reference to MPU6050::resetDMP()
   (.text.startup+0xabc): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xb08): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xb54): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xb5c): undefined reference to MPU6050::getFIFOCount()
   (.text.startup+0xb6e): undefined reference to MPU6050::getFIFOBytes(unsigned char*, unsigned char)
   (.text.startup+0xbb4): undefined reference to MPU6050::readMemoryBlock(unsigned char*, unsigned int, unsigned char, unsigned char)
   (.text.startup+0xbbc): undefined reference to MPU6050::getFIFOCount()
   (.text.startup+0xbce): undefined reference to MPU6050::getFIFOBytes(unsigned char*, unsigned char)
   (.text.startup+0xc1c): undefined reference to MPU6050::writeMemoryBlock(unsigned char const*, unsigned int, unsigned char, unsigned char, bool, bool)
   (.text.startup+0xc26): undefined reference to MPU6050::setDMPEnabled(bool)
   (.text.startup+0xc3a): undefined reference to MPU6050::resetFIFO()
   (.text.startup+0xc42): undefined reference to MPU6050::getIntStatus()
   (.text.startup+0xc66): undefined reference to MPU6050::setDMPEnabled(bool)
   (.text.startup+0xca8): undefined reference to MPU6050::getIntStatus()

ccKHFIlK.ltrans2.ltrans.o*: In function global constructors keyed to 65535_0_FourWD_WallE2_V3.cpp.o.3870
   (.text.startup+0x188): undefined reference to MPU6050::MPU6050(unsigned char)

collect2.exe*: error: ld returned 1 exit status
 



Frank

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: (.text.startup+0x7f6): undefined reference to MPU6050::initialize()
Reply #1 - Jan 23rd, 2019 at 11:51pm
Print Post  
Try build>clean?
  
Back to top
WWW  
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: (.text.startup+0x7f6): undefined reference to MPU6050::initialize()
Reply #2 - Jan 24th, 2019 at 2:24am
Print Post  
Yep - tried that
  
Back to top
 
IP Logged
 
FrankP
Full Member
***
Offline


Posts: 240
Joined: Oct 19th, 2011
Re: (.text.startup+0x7f6): undefined reference to MPU6050::initialize()
Reply #3 - Jan 26th, 2019 at 10:03pm
Print Post  
Tim,

OK, I finally got some data I think you can work with.  I have a project file (FourWD_WallE2_V1.ino) that now compiles cleanly in the Arduino IDE using the 1.6.21 version of the AVR platform, but produces the (.text.startup.xxx) undefined reference errors in VS/VM.  I have attached the .ino file and the two verbose compiler outputs as a single ZIP (the forum software only allows two attachments).

I believe this may be related to my other post where I described a similar situation, but with different errors where I found that the VMicro board manager appears to have both the 1.6.21 and 1.6.23 versions of the AVR board manager installed.

Please let me know if there is anything else I can do, as this is driving me nuts (a short trip!)

TIA,

Frank


  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint