VS Arduino
>> >> Error when compiling arduino examples
https://www.visualmicro.com/forums/YaBB.pl?num=1461871346

Message started by TimS on Apr 28th, 2016 at 7:22pm

Title: Error when compiling arduino examples
Post by TimS on Apr 28th, 2016 at 7: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-arduino5/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\cores\arduino" -I"C:\Users\Tim\AppData\Local\arduino15\packages\arduino\hardware\avr\1.6.10\variants\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

Title: Re: Error when compiling arduino examples
Post by Visual Micro on Apr 28th, 2016 at 7: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?

Title: Re: Error when compiling arduino examples
Post by TimS on Apr 28th, 2016 at 8: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/package_damellis_attiny_index.json

I've since removed that board but problem persists

Title: Re: Error when compiling arduino examples
Post by Visual Micro on Apr 28th, 2016 at 8: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

Title: Re: Error when compiling arduino examples
Post by TimS on Apr 29th, 2016 at 3: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-arduino5/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\variants\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-arduino5\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\variants\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-arduino5/bin/avr-gcc"

Title: Re: Error when compiling arduino examples
Post by Visual Micro on Apr 29th, 2016 at 12:22pm
Ok thanks will review this weekend

Title: Re: Error when compiling arduino examples
Post by Visual Micro on Apr 29th, 2016 at 11:36pm
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

VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.