Welcome, Guest. Please Login or Register
Arduino IDE for Visual Studio
 
 
When Logging a Support Issue in the Forum, please ensure you have also:-
  • Enabled vMicro > Compiler > Show Build Properties and Verbose
  • Re-Compile your program with these settings enabled
 
Save the new Output to a Text File and....
Support requests without the output above may be impossible to answer, so please help us to help you
 
  HomeSearch Tutorials & Wiki visualmicro.com LoginHelpRegister  
 
Page Index Toggle Pages: 1
Send Topic Print
Error when compiling arduino examples (Read 4259 times)
TimS
Newbies
*
Offline



Posts: 3
Error when compiling arduino examples
Apr 28th, 2016 at 8:22pm
 
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:
"C:\Users\Tim\AppData\Local\arduino15\packages\arduino\tools\avr-gcc\4.8.1-ardui
no5/bin/avr-gcc" -c -g -x assembler-with-cpp -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10608 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR -I"C:\Users\Tim\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.10\cor
es\arduino" -I"C:\Users\Tim\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.10\var
iants\standard" "C:\Users\Tim\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.10\cores
\arduino\wiring_pulse.S" -o "C:\Users\Tim\AppData\Local\Temp\VMicroBuilds\ArduinoISP\uno\core\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
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
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Error when compiling arduino examples
Reply #1 - Apr 28th, 2016 at 8:31pm
 
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?
Back to top
« Last Edit: Apr 28th, 2016 at 8:32pm by Visual Micro »  
WWW  
IP Logged
 
TimS
Newbies
*
Offline



Posts: 3
Re: Error when compiling arduino examples
Reply #2 - Apr 28th, 2016 at 9:00pm
 
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
Back to top
« Last Edit: Apr 28th, 2016 at 9:04pm by TimS »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Error when compiling arduino examples
Reply #3 - Apr 28th, 2016 at 9:31pm
 
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
Back to top
« Last Edit: Apr 28th, 2016 at 9:31pm by Visual Micro »  
WWW  
IP Logged
 
TimS
Newbies
*
Offline



Posts: 3
Re: Error when compiling arduino examples
Reply #4 - Apr 29th, 2016 at 4:06am
 
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
"C:\Users\Tim\AppData\Local\arduino15\packages\attiny\tools\avr-gcc\4.8.1-arduin
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" -I"C:\Users\Tim\AppData\Local\arduino15\packages\attiny\hardware\avr\1.0.1\varia
nts\tiny8" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\Tim\AppData\Local\Temp\VMicroBuilds\Blink\attiny_attiny_attiny85\core\
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: "C:\Users\Tim\AppData\Local\arduino15\packages\attiny\tools\avr-gcc\4.8.1-arduin
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" -I"C:\Users\Tim\AppData\Local\arduino15\packages\attiny\hardware\avr\1.0.1\varia
nts\tiny8" "C:\Program Files (x86)\Arduino\hardware\arduino\avr\cores\arduino\wiring_pulse.S" -o "C:\Users\Tim\AppData\Local\Temp\VMicroBuilds\Blink\attiny_attiny_attiny85\core\
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:
"C:\Users\Tim\AppData\Local\arduino15\packages\attiny\tools\avr-gcc\4.8.1-arduin
o5/bin/avr-gcc"
Back to top
« Last Edit: Apr 29th, 2016 at 4:10am by TimS »  
 
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Error when compiling arduino examples
Reply #5 - Apr 29th, 2016 at 1:22pm
 
Ok thanks will review this weekend
Back to top
 
WWW  
IP Logged
 
Visual Micro
Administrator
*****
Offline



Posts: 10565
United Kingdom
Re: Error when compiling arduino examples
Reply #6 - Apr 30th, 2016 at 12:36am
 
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
Back to top
« Last Edit: Apr 30th, 2016 at 12:37am by Visual Micro »  
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print