Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Linker plugin problem (Read 3206 times)
emb_dev
Newbies
*
Offline


Posts: 4
Joined: Sep 6th, 2016
Linker plugin problem
Sep 6th, 2016 at 1:49pm
Print Post  
Hi! I'm totally newbie with Visual Micro and just started to evalute it. At first glance, it looks quite good environment for arduino development. I really appreciate your hard work with it!

However, I have strange problem with Visual Studio. I'm trying to compile the SW for Mega 2560+Dragino Yun. The same SW works OK with Arduino IDE 1.6.11 (AVR boards 1.6.13), but does not compile in Visual Studio. It throws an error:
cc1.exe*: error: -fno-fat-lto-objects are supported only with linker plugin

I tried to google the problem, but with no success...

Any help is appreciated, thanks in advance!

Here's the whole output:
Compiling debug version of 'Blink' for 'Arduino Mega 2560 - Dragino Yún'
Build folder: file:///C:/Users/test_user/AppData/Local/Temp/VMicroBuilds/Blink/Dragino_mega2560Yun
Additional Defines: VM_DEBUG;VM_DEBUG_ENABLE 1;VM_DEBUG_BANDWIDTH_THROTTLE_MS 50;VM_DEBUGGER_TYPE_HARDWARESERIAL 0;VM_DEBUGGER_TYPE_SOFTWARESERIAL 1;VM_DEBUGGER_TYPE_FASTSERIAL 2;VM_DEBUGGER_TYPE_USB 3;VM_DEBUGGER_TYPE_TEENSY 4;VM_DEBUGGER_TYPE_UART 5;VM_DEBUGGER_TYPE_USART 6;VM_DEBUGGER_TYPE_USBSERIAL 7;VM_DEBUGGER_TYPE_TTYUART 8;VM_DEBUGGER_TYPE_NET_CONSOLE 9;VM_DEBUGGER_TYPE_Uart 10;VM_DEBUGGER_TYPE_COSA 11;VM_DEBUGGER_TYPE_CDCSerialClass 12;VM_DEBUGGER_TYPE_HARDWARESERIAL1 13;VM_DEBUGGER_TYPE_HARDWARESERIAL2 14;VM_DEBUGGER_TYPE_HARDWARESERIAL3 15;VM_DEBUGGER_TYPE VM_DEBUGGER_TYPE_NET_CONSOLE;VM_DEBUG_BREAKPAUSE;VM_DEBUG_AUTO_REPORTING;VM_DEBUG_READ_DIGITAL_PORTS 1;
Architecture Tools: C:\Users\test_user\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/
Sketchbook: file:\\\C:\Users\test_user\Documents\Arduino
Sketch Include Paths
Core Include Paths
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino'
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega'
Library Include Paths (1)
"C:\Users\test_user\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5\bin\avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=106011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\tgr51q3j.gca\Micro Platforms\default\debuggers\VM_DBG" -I"C:\Program Files (x86)\Atmel\Studio\7.0\Extensions\tgr51q3j.gca\Micro Platforms\default\debuggers" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Users\test_user\AppData\Local\Temp\VMicroBuilds\Blink\Dragino_mega2560Yun\Blink.cpp" -o "nul"
All import libraries will be re-compiled

Building variant ...

Building core ...
"C:\Users\test_user\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-gcc" -c -g -x assembler-with-cpp -flto -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=106011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\test_user\AppData\Local\Temp\VMicroBuilds\Blink\Dragino_mega2560Yun\core\wiring_pulse.S.o" 
"C:\Users\test_user\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-arduino5/bin/avr-gcc" -c -g -Os -w -std=gnu11 -ffunction-sections -fdata-sections -MMD -flto -fno-fat-lto-objects -mmcu=atmega2560 -DF_CPU=16000000L -DARDUINO=106011 -DARDUINO_AVR_MEGA2560 -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\variants\mega" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\hooks.c" -o "C:\Users\test_user\AppData\Local\Temp\VMicroBuilds\Blink\Dragino_mega2560Yun\core\hooks.c.o" -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=50 -DVM_DEBUGGER_TYPE_HARDWARESERIAL=0 -DVM_DEBUGGER_TYPE_SOFTWARESERIAL=1 -DVM_DEBUGGER_TYPE_FASTSERIAL=2 -DVM_DEBUGGER_TYPE_USB=3 -DVM_DEBUGGER_TYPE_TEENSY=4 -DVM_DEBUGGER_TYPE_UART=5 -DVM_DEBUGGER_TYPE_USART=6 -DVM_DEBUGGER_TYPE_USBSERIAL=7 -DVM_DEBUGGER_TYPE_TTYUART=8 -DVM_DEBUGGER_TYPE_NET_CONSOLE=9 -DVM_DEBUGGER_TYPE_Uart=10 -DVM_DEBUGGER_TYPE_COSA=11 -DVM_DEBUGGER_TYPE_CDCSerialClass=12 -DVM_DEBUGGER_TYPE_HARDWARESERIAL1=13 -DVM_DEBUGGER_TYPE_HARDWARESERIAL2=14 -DVM_DEBUGGER_TYPE_HARDWARESERIAL3=15 -DVM_DEBUGGER_TYPE=VM_DEBUGGER_TYPE_NET_CONSOLE -DVM_DEBUG_BREAKPAUSE -DVM_DEBUG_AUTO_REPORTING -DVM_DEBUG_READ_DIGITAL_PORTS=1

cc1.exe*: error: -fno-fat-lto-objects are supported only with linker plugin
Error compiling core
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12345
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker plugin problem
Reply #1 - Sep 6th, 2016 at 2:01pm
Print Post  
Hi,

Please uninstall arduino avr from board manager or  delete C:\Users\test_user\AppData\Local\arduino15\packages\arduino

Arduino 1.6.11 comes with the latest avr. In fact all arduino ide's come with the avr and I suspect visual micro is confused by finding both ide and boards manager installation.

There isn't any point to using board manager for avr. In arduino 1.6.2 they released board manager and didn't include avr with the ide. Then in 1.6.3 someone has complained so they put the avr back in the board manager which currently confused visual micro when a duplicate is installed via board manager.

Then restart the ide.

Does that fix it?

Thanks
« Last Edit: Sep 6th, 2016 at 2:03pm by Tim@Visual Micro »  
Back to top
IP Logged
 
emb_dev
Newbies
*
Offline


Posts: 4
Joined: Sep 6th, 2016
Re: Linker plugin problem
Reply #2 - Sep 7th, 2016 at 6:14am
Print Post  
Thanks a lot for your fast response! After deleting ...\arduino15\packages\arduino, I got rid of the error.

There's still one error related to libraries:
VM_DBG.h: 47:20: fatal error: Bridge.h: No such file or directory
#include <Bridge.h>
compilation terminated
Error compiling libraries


I checked in Visual Micro Explorer->Manage Libraries->Arduino that there's "Bridge by Arduino" installed. Actually there was version 1.6.2 installed first, but then I updated to the version 1.6.3. Both versions gave the same error.

I assume there's library path missing or something... Should I add a path somewhere in settings?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12345
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker plugin problem
Reply #3 - Sep 7th, 2016 at 11:55am
Print Post  
Which board are you using? Bridge should only be relevant if you have selected it as debug transport on the micro,debugger menu?
  
Back to top
IP Logged
 
emb_dev
Newbies
*
Offline


Posts: 4
Joined: Sep 6th, 2016
Re: Linker plugin problem
Reply #4 - Sep 7th, 2016 at 12:21pm
Print Post  
I'm using Arduino Mega 2560 + Yun shield (I upload the SW and trace it via Yun shield, so bridge is needed). I haven't changed debug transport settings, it's default.

Otherwise everything works good and I like the tool Smiley
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12345
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Linker plugin problem
Reply #5 - Sep 7th, 2016 at 12:36pm
Print Post  
Oh okay thanks for the info. I guess you are uploading using IP Address?

In that case the debugger will automatically attempt to use Bridge and provide limited debug functions.

The debugger for Yun/Bridge hasn't been tested for some time so will retest.

Thanks
  
Back to top
IP Logged
 
emb_dev
Newbies
*
Offline


Posts: 4
Joined: Sep 6th, 2016
Re: Linker plugin problem
Reply #6 - Sep 7th, 2016 at 12:40pm
Print Post  
Yes, I'm using IP address.

Thanks for your effort
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint