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 Error creating .elf (Read 4342 times)
greccofly
Newbies
*
Offline


Posts: 5
Joined: Dec 11th, 2014
Error creating .elf
Oct 10th, 2015 at 8:32pm
Print Post  
Hi,

I've realy an issue with buils a project. 
I work with Visual Studio Community 2015 and Visual Micro in the latest Build and Arduino 1.6.5.
I get the follwing error message: 
Code (C++)
Select All
...
Platform Libraries Root Include Paths
Include Path 'C:\DEV\Arduino_1_6_5\Arduino\libraries'
Include Path 'C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries'
Include Path 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ft2yymr2.42c\Micro Platforms\default\debuggers'
Include Path 'D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries'
"C:\DEV\Arduino_1_6_5\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"X:\Projects\ArduBoardControl\SRC\ArduBoardControler\ArduBoardControler_Rx" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\variants\mega" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries\RF24" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries\SPI" -I"C:\DEV\Arduino_1_6_5\Arduino\libraries" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ft2yymr2.42c\Micro Platforms\default\debuggers" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries" ega2560\ArduBoardControler_Rx.cpp" -o ega2560\ArduBoardControler_Rx.cpp.o"
"C:\DEV\Arduino_1_6_5\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"X:\Projects\ArduBoardControl\SRC\ArduBoardControler\ArduBoardControler_Rx" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\variants\mega" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries\RF24" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries\SPI" -I"C:\DEV\Arduino_1_6_5\Arduino\libraries" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ft2yymr2.42c\Micro Platforms\default\debuggers" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries" ega2560\buffer.cpp" -o ega2560\buffer.cpp.o"
"C:\DEV\Arduino_1_6_5\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"X:\Projects\ArduBoardControl\SRC\ArduBoardControler\ArduBoardControler_Rx" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\variants\mega" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries\RF24" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries\SPI" -I"C:\DEV\Arduino_1_6_5\Arduino\libraries" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ft2yymr2.42c\Micro Platforms\default\debuggers" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries" ega2560\crc.cpp" -o ega2560\crc.cpp.o"
"C:\DEV\Arduino_1_6_5\Arduino\hardware\tools\avr/bin/avr-g++" -c -g -Os -w -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"X:\Projects\ArduBoardControl\SRC\ArduBoardControler\ArduBoardControler_Rx" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\variants\mega" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries\RF24" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries\SPI" -I"C:\DEV\Arduino_1_6_5\Arduino\libraries" -I"C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\libraries" -I"C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\ft2yymr2.42c\Micro Platforms\default\debuggers" -I"D:\Dropbox\DEV\BaseFiles\ARduino_1_5_1_libraries\libraries" ega2560\VescUart.cpp" -o ega2560\VescUart.cpp.o"
Build Core Paths: C:\DEV\Arduino_1_6_5\Arduino\hardware\arduino\avr\cores\arduino
"C:\DEV\Arduino_1_6_5\Arduino\hardware\tools\avr/bin/avr-gcc" -w -Os -Wl,--gc-sections,--relax,--relax,--relax,--relax,--relax -mmcu=atmega2560 -o ega2560/ArduBoardControler_Rx.elf" ega2560\ArduBoardControler_Rx.cpp.o" ega2560\buffer.cpp.o" ega2560\crc.cpp.o" ega2560\VescUart.cpp.o" ega2560\RF24\RF24.cpp.o" ega2560\SPI\SPI.cpp.o" ega2560/core.a" tmega2560" -lm
VescUart.cpp.o:In function `VescUartSetCurrent(float)'
VescUart.cpp.o:In function `VescUartSetCurrentBrake(float)'
collect2.exe*:error: ld returned 1 exit status
Error creating .elf 


'I allready tried to reinstall Arduino IDE. Same problem.

I have a project with several libraries within the same folder as the .in0 file.

The two functions mentioned in the error message are listed here: 
Code (C++)
Select All
void VescUartSetCurrent(float current) {
	int index = 0;
	uint8_t payload[3];

	payload[index++] = COMM_SET_CURRENT ;
	buffer_append_int16(payload, (int)(current * 1000), &index);
	PackSendPayload(payload, 3);
}

void VescUartSetCurrentBrake(float brakeCurrent) {
	int index = 0;
	uint8_t payload[3];

	payload[index++] = COMM_SET_CURRENT_BRAKE;
	buffer_append_int16(payload, (int)(brakeCurrent * 1000), &index);
	PackSendPayload(payload, 3);

} 



I've no idea how to solve this problem and get stocked in my problem!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12145
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf
Reply #1 - Oct 11th, 2015 at 10:47am
Print Post  
Hi,

Does it compile with the Arduino Ide. If not what is the error.

Thanks
  
Back to top
IP Logged
 
greccofly
Newbies
*
Offline


Posts: 5
Joined: Dec 11th, 2014
Re: Error creating .elf
Reply #2 - Oct 11th, 2015 at 11:30am
Print Post  
Hi,

Just tried it also on the IDE. There I get at least an error message. Would be great to see that as well on Visual Micro.

The error message I get is
Code (C++)
Select All
VescUart.cpp.o: In function `VescUartSetCurrent(float)':
C:\Users\AC\AppData\Local\Temp\build8358227366628126910.tmp/VescUart.cpp:196: undefined reference to `buffer_append_int16(unsigned char*, int, int*)'
VescUart.cpp.o: In function `VescUartSetCurrentBrake(float)':
C:\Users\AC\AppData\Local\Temp\build8358227366628126910.tmp/VescUart.cpp:205: undefined reference to `buffer_append_int16(unsigned char*, int, int*)'
collect2.exe: error: ld returned 1 exit status
Fehler beim Kompilieren.

 



But I still don't know where the error is. Sad
  
Back to top
 
IP Logged
 
greccofly
Newbies
*
Offline


Posts: 5
Joined: Dec 11th, 2014
Re: Error creating .elf
Reply #3 - Oct 11th, 2015 at 11:38am
Print Post  
That is painfull!

Found the error. One varaiable was different in header and source.  Undecided

Sorry.

Remaining is the issue, that Visual Micro should bring the same error message than the IDE.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12145
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error creating .elf
Reply #4 - Oct 11th, 2015 at 12:26pm
Print Post  
Ahh, I forgot to tell you to double click the visual micro compiler messages. They take you to the correct line of code so it becomes more obvious. 

Unfortunately to get the double click to work the error message suffered and needs some additional work which will happen during the next few months.

  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint