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 when compiling arduino examples (Read 22866 times)
TimS
Newbies
*
Offline


Posts: 3
Joined: Apr 28th, 2016
Error when compiling arduino examples
Apr 28th, 2016 at 7:22pm
Print Post  
I'm choosing the ArdunoISP example from Visual Micro Explorer with the board set to UNO. I keep getting the following error which is driving me nuts.

Quote:
no5/bin/avr-gcc" -c -g -x assembler-with-cpp -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR es\arduino" iants\standard" \arduino\wiring_pulse.S" -o .o"   -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=33 -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=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
wiring_pulse.S:52:20: fatal error: avr\io.h: No such file or directory
:#include <avr\io.h>
:compilation terminated
Error compiling core


How do you use the example and avoid that error.  I'm using Visual Studio 2013 with Visual Micro Pro version.  I tried open orig and copy/open both have same problem
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when compiling arduino examples
Reply #1 - Apr 28th, 2016 at 7:31pm
Print Post  
I just tried the 1.6.10 avr core you have installed and do not get the error.

Is it building okay in the arduino ide?
« Last Edit: Apr 28th, 2016 at 7:32pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
TimS
Newbies
*
Offline


Posts: 3
Joined: Apr 28th, 2016
Re: Error when compiling arduino examples
Reply #2 - Apr 28th, 2016 at 8:00pm
Print Post  
Yes, I initially had the error there as well but i reinstalled the Arduino IDE and it works fine.  Just not working in Visual Studio 2013 for me.

Edit:  I should add I think the problem started after adding the ATTiny85 board by URL from Manager Boards the URL I used for that was:

https://raw.githubusercontent.com/damellis/attiny/ide-1.6.x-boards-manager/packa...

I've since removed that board but problem persists
« Last Edit: Apr 28th, 2016 at 8:04pm by TimS »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when compiling arduino examples
Reply #3 - Apr 28th, 2016 at 8:31pm
Print Post  
Okay I think that part of the core or the tools remain. I will try to replicate but all combinations of toolchains work for me didn't break when uninstalling.

I think in windows explorer there is something below:-
C:\Users\Tim\AppData\Local\arduino15\packages\arduino\hardware\avr

You can remove the following folder (although it should work okay as long as nothing below the "avr" folder):-

C:\Users\Tim\AppData\Local\arduino15\packages\arduino\avr

After making changes to the boards manager arduino15\packages folder. Restart the ide or click "tools>visual micro>reload toolchains"

Thanks
« Last Edit: Apr 28th, 2016 at 8:31pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
TimS
Newbies
*
Offline


Posts: 3
Joined: Apr 28th, 2016
Re: Error when compiling arduino examples
Reply #4 - Apr 29th, 2016 at 3:06am
Print Post  
I manually removed what remained of the ATTiny hardware and the compile error goes away.  The plugin's browser don't seem to clean it all up when you remove it, no biggie now that I know that.

With ATTiny hardware removed I don't have compile issues.   As soon as I add ATTiny back errors return in Visual Studio using your plugin.  Same code compile's and runs fine from Arduino IDE.


Quote:
Library Include Paths (2)
Include Path 'C:\Program Files (x86)\Arduino\hardware\arduino\avr\libraries\Wire\src'
All import libraries will be re-compiled
Build Core Paths: C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino
o5/bin/avr-gcc" -c -g -x assembler-with-cpp -mmcu=attiny85 -DF_CPU=8000000L -DARDUINO=10608 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" nts\tiny8" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o wiring_pulse.S.o"   -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=33 -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=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
The system cannot find the file specified
     Process: o5\bin\avr-gcc" -c -g -x assembler-with-cpp -mmcu=attiny85 -DF_CPU=8000000L -DARDUINO=10608 -DARDUINO_attiny -DARDUINO_ARCH_AVR -I"C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino" nts\tiny8" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o wiring_pulse.S.o"   -DVM_DEBUG -DVM_DEBUG_ENABLE=1 -DVM_DEBUG_BANDWIDTH_THROTTLE_MS=33 -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=VM_DEBUGGER_TYPE_HARDWARESERIAL -DVM_DEBUG_BREAKPAUSE
Error compiling core


There is some kind of issue with the ATTiny hardware and  your plugin, the  bin folder the plugin is using for gcc does not exist, shouldn't it be using gcc supplied by Arduino IDE ?   I did try copying the bin folder from Arduino install but got a bunch more errors then.  Also the attiny folder is under packages/attiny not packages/arduino/attiny if that matters.

Quote:
o5/bin/avr-gcc"
« Last Edit: Apr 29th, 2016 at 3:10am by TimS »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when compiling arduino examples
Reply #5 - Apr 29th, 2016 at 12:22pm
Print Post  
Ok thanks will review this weekend
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Error when compiling arduino examples
Reply #6 - Apr 29th, 2016 at 11:36pm
Print Post  
A couple of things to clarify.

Initially the report was the Uno failing with the ArduinoISP example but I suspect that was fixed after previously removing the partial toolchain for the tiny?

I don't think the ArduinoISP example will work with the tiny however I agree we have some path confusion.

Please switch on "tools>options>visual micro>compiler>show build properties" and then click build clean, then click build and email the output to info [at] visualmicro.com or post it here.

Can you also confirm that your arduino ide is clean and does not have any attiny definitions below "[arduino ide folder]\hardware". We should just be using a clean arduino ide and the board manager tiny package?

If you use windows explorer to change file structures then click the rescan button on the "micro explorer" or restart the ide.

Thanks
« Last Edit: Apr 29th, 2016 at 11:37pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint