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
Hot Topic (More than 8 Replies) Error creating .elf when using SoftwareSerial.h (Read 8438 times)
drm
Junior Member
**
Offline


Posts: 13
Joined: Jan 31st, 2015
Error creating .elf when using SoftwareSerial.h
Feb 14th, 2015 at 9:22pm
Print Post  
Hello,

I have a working sensor circuit on my Arduino Duemilanove and wanted to add Bluetooth capability. I've attached a serial Bluetooth module to my circuit. The next step was to incorporate the software serial object (that's supported in SoftwareSerial.h) into my sketch. 

As you can see in the attached screenshot, when I add the code that creates this object, the build fails with an "Error creating .elf" message. (If I comment out the line that creates this object, the project builds without error.)

I'm guessing that I've missed something very basic here. However, I'm not sure what that might be.

Thanks!
  

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


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf when using SoftwareSerial.h
Reply #1 - Feb 14th, 2015 at 9:45pm
Print Post  
HI,

If you switch on tools>visual micro>verbose messages that should show where the SoftwareSerial is being resolved. Please post the output after switching it on and compiling.

Does the arduino ide show the same issue?

Thanks
  
Back to top
IP Logged
 
drm
Junior Member
**
Offline


Posts: 13
Joined: Jan 31st, 2015
Re: Error creating .elf when using SoftwareSerial.h
Reply #2 - Feb 14th, 2015 at 9:58pm
Print Post  
Attached is the visual studio output after enabling verbose messages.

Appreciate the help!

  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
drm
Junior Member
**
Offline


Posts: 13
Joined: Jan 31st, 2015
Re: Error creating .elf when using SoftwareSerial.h
Reply #3 - Feb 14th, 2015 at 10:00pm
Print Post  
Looks like there's an issue with attaching .txt files. I'm inserting the Visual Studio output here:

Core Include Paths
Include Path 'C:\Arduino\arduino-1.0.6\hardware\arduino\cores\arduino'
Include Path 'C:\Arduino\arduino-1.0.6\hardware\arduino\variants\standard'
Library Include Paths (2)
Include Path 'C:\Arduino\arduino-1.0.6\libraries\Wire'
Include Path 'C:\Arduino\arduino-1.0.6\libraries\SFE_ISL29125_Library'
Platform Libraries Root Include Paths
Include Path 'C:\Arduino\arduino-1.0.6\libraries'
Include Path 'C:\Arduino\arduino-1.0.6\hardware\arduino\libraries'
Include Path 'C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers'
Include Path 'C:\Users\donnmo\Documents\Arduino\libraries'
C:\Arduino\arduino-1.0.6\hardware\tools\avr\bin\avr-g++ -c -g -Os -fno-exceptions -ffunction-sections -fdata-sections -Wall -mmcu=atmega328p -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=106 -I"C:\Arduino\arduino-1.0.6\hardware\arduino\cores\arduino" -I"C:\Arduino\arduino-1.0.6\hardware\arduino\variants\standard" -I"C:\Arduino\arduino-1.0.6\libraries\Wire" -I"C:\Arduino\arduino-1.0.6\libraries\SFE_ISL29125_Library" -I"C:\Arduino\arduino-1.0.6\libraries" -I"C:\Arduino\arduino-1.0.6\hardware\arduino\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\donnmo\Documents\Arduino\libraries" -o "C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328\RGB.cpp.o"  "C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328\RGB.cpp" 
C:\Arduino\arduino-1.0.6\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -L"C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328" -o "C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328\RGB.elf" "C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328\RGB.cpp.o" .o" twi.c.o" Library\SFE_ISL29125.cpp.o" "C:\Users\donnmo\AppData\Local\VMicro\Arduino\Builds\RGB\atmega328\core.a" -lm
RGB.cpp.o:In function `__static_initialization_and_destruction_0'
RGB.ino:SoftwareSerial(unsigned char, unsigned char, bool)'
RGB.ino:~SoftwareSerial()'
Error creating .elf
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf when using SoftwareSerial.h
Reply #4 - Feb 14th, 2015 at 10:06pm
Print Post  
Thanks for the info. I could see the txt okay

Does "Build>Clean Solution" solve the issue?

If not please post the compiler output after that because it will show more clearly where the SoftwareSerial.h is being included from.

Thanks
« Last Edit: Feb 14th, 2015 at 10:07pm by Tim@Visual Micro »  
Back to top
IP Logged
 
drm
Junior Member
**
Offline


Posts: 13
Joined: Jan 31st, 2015
Re: Error creating .elf when using SoftwareSerial.h
Reply #5 - Feb 14th, 2015 at 10:13pm
Print Post  
I just did a "clean" and then a "build". Output in the attached .txt file.

Thanks!
  

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


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf when using SoftwareSerial.h
Reply #6 - Feb 14th, 2015 at 10:41pm
Print Post  
Thanks, it looks like it is trying to compile a different version of your ino code that does not contain #include "SoftwareSerial.h"

Can you see if there is an RGB.cpp in your sketch folder with a slightly older version of your .ino code? The way arduino compile works is that .ino files are combined into a [skatehname].cpp in a temp folder. BUT advanced users can override and make their own .cpp (not recommended)

If that is not the issue then please confirm the version of visual micro you are using tools>options>visual micro>version>version and version>minor
  
Back to top
IP Logged
 
drm
Junior Member
**
Offline


Posts: 13
Joined: Jan 31st, 2015
Re: Error creating .elf when using SoftwareSerial.h
Reply #7 - Feb 14th, 2015 at 10:54pm
Print Post  
Well, I'm not sure what happened; but, I'm no longer seeing the error. 

I'd shut down Visual Studio, re-installed the Arduino IDE, and tested the .ino in the Arduino IDE. It worked. 

After the notification arrived that you'd responded, I re-opened visual studio, did a "clean", and then a "build". And, it built without the error.

Still not sure how the issue was resolved...but, it appears that I'm up and running.

Sincerely appreciate the help!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12138
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf when using SoftwareSerial.h
Reply #8 - Feb 14th, 2015 at 11:16pm
Print Post  
Ok good to hear it is working. Thanks for the update
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint