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 Additional compiler flags ignored (Read 6067 times)
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Additional compiler flags ignored
Apr 2nd, 2017 at 8:23am
Print Post  
Hi

I'm using the paid version of Visual Micro with Atmel Studio 6.

I entered additional compiler parameters into the box on 
Tools -> Options -> AVR/GNU C++ Compiler -> Miscellaneous -> Other flags

The parameters are shown in the command line at
Tools -> Options -> AVR/GNU C++ Compiler -> All Options

But these parameters are not used when compiling and they are not in the command line that ist shown in the build log window.

What do I have to do to make Visual Micro actually use the entered compiler parameters?

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Additional compiler flags ignored
Reply #1 - Apr 2nd, 2017 at 12:47pm
Print Post  
Hi,

1) Standard

For Arduino we have to be more dynamic and flexible that the atmel project system can cater for, Therefore we just use it for intellisense and update it when you change board or build options.

Please see the "Project Properties" in our documentation for how to set extra flags, globally for the project or for the current  configuration. There are various properties that apply either to all build commands or just the compile, link etc.

http://www.visualmicro.com/page/User-Guide.aspx?doc=index

2) Advanced- (maybe not of interest)

The Arduino build system is also very flexible allowing you to redefine the entire build process or a part of it. Normally this is done via the arduino platform.txt config files for the architecture you are using however in paid versions of visual micro you can create a local board.txt in the project folder that contains overrides for any build property.

Switch on vMicro>Compiler> "show build properties" and "verbose". Then you can more easily see the available {properties} and {build commands=}

  
Back to top
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: Additional compiler flags ignored
Reply #2 - Apr 2nd, 2017 at 5:57pm
Print Post  
Hi

I have now added the additional parameter "-std=c++11" to
Micro General (Project Global) -> Extra Flags - Project

Unfortunately the parameters are still not used.

Output:

-arduino5/bin/avr-g++" -c -g -Os -Wall -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=165 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR 8\cores\arduino" 8\variants\eightanaloginputs" -I"C:\Users\Michael\Documents\Arduino\libraries\RBD_Timer\src" -I"C:\Users\Michael\Documents\Arduino\libraries\ResponsiveAnalogRead\src" -I"C:\Users\Michael\Documents\Arduino\libraries\Smoother" 8\libraries\Wire" -I"C:\Program Files (x86)\Arduino\libraries" 8\libraries" -I"C:\Program Files (x86)\Visual Micro\Visual Micro for Arduino\Micro Platforms\default\debuggers" -I"C:\Users\Michael\Documents\Arduino\libraries" \Controller.cpp" -o \Controller.cpp.o"
[...]
-arduino5/bin/avr-gcc" -w -Os -Wl,--gc-sections -mmcu=atmega328p -o /Controller.elf" \Controller.cpp.o" \RBD_Timer\RBD_Timer.cpp.o" \ResponsiveAnalogRead\ResponsiveAnalogRead.cpp.o" \Smoother\Smoother.cpp.o" \Wire\Wire.cpp.o" \Wire\utility\twi.c.o" /core.a" 28" -lm
-arduino5/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0 /Controller.elf" /Controller.eep"
-arduino5/bin/avr-objcopy" -O ihex -R .eeprom /Controller.elf" /Controller.hex"

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Additional compiler flags ignored
Reply #3 - Apr 2nd, 2017 at 8:25pm
Print Post  
Sorry I missed the fact you are using atmel 6.2. It's very old now and represents code from some years ago. Sounds like that didn't work in the 6.2 version.

There might be a new release of 6.2 during the next 4-6 weeks. In the meantime you can add any flags you need to the board.txt or platform.txt in C:\Users\Michael\AppData\Roaming\arduino15\packages\arduino\hardware\avr\ver

Alternatively atmel studio 7 is a better option if your hardware can run it.
  
Back to top
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: Additional compiler flags ignored
Reply #4 - Apr 2nd, 2017 at 8:35pm
Print Post  
Thanks for your help.

My hardware is not the problem. Windows Vista and the system requirements of more recent Visual Studio versions is it.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Additional compiler flags ignored
Reply #5 - Apr 2nd, 2017 at 8:53pm
Print Post  
I see, how about update to windows 10. You can get the classic shell for it that makes it work the same as windows7 which I think is like the old vista system?
  
Back to top
WWW  
IP Logged
 
Arecon
Junior Member
**
Offline


Posts: 53
Joined: Apr 2nd, 2017
Re: Additional compiler flags ignored
Reply #6 - Apr 17th, 2017 at 9:52pm
Print Post  
Setting up a new environment with about a hundred configured tools installed is a heap of work I tried to avoid as long as possible.
As an intermediate solution I have now set-up a VM with Windows 8.1 and the newest versions of Atmel Studio and Visual Micro. I'm now moving my projects over to this machine and check if everything still works.

BTW: I didn't know that the licence is per installation. I thought is was per user.

Michael
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Additional compiler flags ignored
Reply #7 - Apr 18th, 2017 at 9:50am
Print Post  
if you have an issue reactivating after upgrading or re-instlling windows then email visualmicro.com and request reset
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint