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 Can't build with latest avr-gcc and assembly file (Read 7274 times)
Genoil
Newbies
*
Offline


Posts: 6
Joined: Sep 16th, 2013
Can't build with latest avr-gcc and assembly file
Sep 17th, 2013 at 7:58am
Print Post  
I'm using Arduino with the latest avr-gcc from Atmel Studio to get around a bug (http://forum.arduino.cc/index.php/topic,60649.0.html) using attiny84. I'm also using an assembler source file. That combination doesn't work with Visual Micro for Visyal Studio, because it gives me the following error:

error* : unrecognized command line option '-assembler-with-cpp'

It compiles fine using Arduino IDE.
Visual Micro for Atmel Studio gives me the same error.

« Last Edit: Sep 17th, 2013 at 9:16am by Genoil »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't build with latest avr-gcc and assembly file
Reply #1 - Sep 17th, 2013 at 1:06pm
Print Post  
Oops that sounds like the compiler command name for assembler files has altered in some prev Arduino version and that Vm needs to be updated.

I guess you are using an Arduino 1.0.x version because for Arduino 1.5 the build process is read from the same definition files that the Arduino Ide uses.

I think you can tweak the vm config until the next release but first we need to know what the compiler command change. It would save some time if you could do the following if not then we will do this over the next few days.

In Arduino please switch on File>Preferences>Compile>Verbose and run a compile to see the .S commands

In Visual Micro switch Tools>Options>Visual Micro>Compiler>Verbose and run a build. Please post one .S compile from each build. 

Thanks very much
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Can't build with latest avr-gcc and assembly file
Reply #2 - Sep 17th, 2013 at 4:15pm
Print Post  
Update: I had a quick look at this although have not installed the hardware.

I have also looked again the Arduino 1.0.5 source code it is appears to be the same as Visual Micro for assembler files.

This suggests that Visual Micro is finding the wrong tool chain so the verbose output for .S file from Visual Micro (as per prev post) will be very helpful.
  
Back to top
IP Logged
 
Genoil
Newbies
*
Offline


Posts: 6
Joined: Sep 16th, 2013
Re: Can't build with latest avr-gcc and assembly file
Reply #3 - Sep 19th, 2013 at 8:12am
Print Post  
Hey,

I checked again but noticed that in Arduino (1.0.5) as well as in Visual Micro (latest) it doesn't compile. Just for clarity, the toolchain version I use is: 

Code
Select All
avr-gcc (AVR_8_bit_GNU_Toolchain_3.4.2_992) 4.7.2
 



instead of the default 1.0.5 one:

Code
Select All
avr-gcc (WinAVR 20081205) 4.3.2
 



The output is identical, except VM adds -DVISUALMICRO_COMPILER_VER=1
Code
Select All
C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avr-gcc -c -g -assembler-with-cpp -mmcu=attiny84 -DF_CPU=8000000L -DARDUINO=105 -DUSB_VID=null -DUSB_PID=null -IC:\Program Files (x86)\Arduino\hardware\tiny\cores\tiny -ID:\***\libraries\RF12_Ignite -ID:\***\libraries\i2cmaster -ID:\***\libraries\i2cmaster\utility D:\***\libraries\i2cmaster\i2cmaster.S er.S.o
avr-gcc: error: unrecognized command line option '-assembler-with-cpp'
 



I think between gcc versions, the command line option has changed from 
Code
Select All
-assembler-with-cpp
 


to
Code
Select All
-x assembler-with-cpp
 



The bug with attiny i was referring to had something to do with the linker (ld.exe) so I copied just that from the new toolchain into the default one so it looks like the issue is resolved now. 

« Last Edit: Sep 20th, 2013 at 8:28am by Genoil »  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint