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 got Error creating .elf when compile (Read 5635 times)
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
got Error creating .elf when compile
Oct 10th, 2014 at 7:11am
Print Post  
Hi! I've try to compile my code use i2c keypad with chio pcf8574 library which can be download here https://github.com/joeyoung/arduino_keypads/tree/master/Keypad_I2C

after install library and try to compile in visual studio I got error as below

Code
Select All
C:\Program Files (x86)\Arduino\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:\Program Files (x86)\Arduino\hardware\arduino\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\variants\standard" -I"C:\Program Files (x86)\Arduino\libraries\EEPROM" -I"C:\Program Files (x86)\Arduino\libraries\PS2Keyboard" -I"C:\Program Files (x86)\Arduino\libraries\Wire" -I"C:\Program Files (x86)\Arduino\libraries\Keypad_I2C" -I"C:\Program Files (x86)\Arduino\libraries" -I"C:\Program Files (x86)\Arduino\hardware\arduino\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Tikki\Documents\Arduino\libraries" -o Led.cpp.o"  Led.cpp"  -DVISUALMICRO_COMPILER_VER=1
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-gcc -Os -Wl,--gc-sections -mmcu=atmega328p -L"C:\Users\Tikki\AppData\Local\VMicro\Arduino\Builds\ChingSignboard\uno" -o board.elf" board.cpp.o" Led.cpp.o" PROM.cpp.o" rd\PS2Keyboard.cpp.o" .cpp.o" ity\twi.c.o" C\Keypad_I2C.cpp.o" "C:\Users\Tikki\AppData\Local\VMicro\Arduino\Builds\ChingSignboard\uno\core.a" -lm
ChingSignboard.cpp.o:In function `Keypad_I2C'
Keypad_I2C.h:Keypad(char*, unsigned char*, unsigned char*, unsigned char, unsigned char)'
Keypad_I2C.cpp.o:In function `Keypad_I2C::begin(char*)'
Keypad_I2C.cpp:begin(char*)'
Error creating .elf
 



I use arduino pro mini and if i cut this i2c keypad code off everything else is can be compile just fine. any idea?
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: got Error creating .elf when compile
Reply #1 - Oct 10th, 2014 at 8:56pm
Print Post  
Hi,

Thanks for the info.

Does the compile fail in the Arduino Ide?

Are there other error higher up in the output?

Does the sketch.ino have the wire library imported?

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


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: got Error creating .elf when compile
Reply #2 - Oct 11th, 2014 at 3:10am
Print Post  
Hi,
I've try to compile in Arduino Ide as you suggested and it seem this error came from KeypadI2C Library ,Sorry for such a waste post. I'm still a beginner in arduino so I've not sure this error cause from the code or vismicro  but now I get it, Anyway thank for your reply

regard
Tikki
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: got Error creating .elf when compile
Reply #3 - Oct 11th, 2014 at 9:22am
Print Post  
Hi,

No problem thanks for the updated post and I hope you find a solution.

Maybe this is a missing library issue. Is the Wire library #included in ChingSignboard.ino? I noticed "wire.h" is in the KeypadI2C.h so that will mean that you have to include it in ChingSignboard.ino

That might not be the problem but thought it worth mentioning.
« Last Edit: Oct 11th, 2014 at 9:23am by Tim@Visual Micro »  
Back to top
IP Logged
 
Tikki
Junior Member
**
Offline


Posts: 25
Location: Thailand
Joined: Feb 2nd, 2014
Re: got Error creating .elf when compile
Reply #4 - Oct 14th, 2014 at 4:30pm
Print Post  
Hi again, 
I like to update, Perhaps it might useful for some one who went to the same problem as me. 
I've take a look to wire.h and keypadI2C.h  like you said and found nothing wrong with it. 
so I went back to github where I download the code from and take a look in readme file. 
I've notice that the author recommend to include keypad.h in sketch  which I didn't, I've be able to compile with no error now. Thank again for you help. Smiley

regard 
Tikki
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12204
Location: United Kingdom
Joined: Apr 10th, 2010
Re: got Error creating .elf when compile
Reply #5 - Oct 14th, 2014 at 4:31pm
Print Post  
Great, thanks for the update
  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint