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 DEBUG RELEASE selection (Read 2794 times)
amelia
Junior Member
**
Offline


Posts: 10
Location: ITALY
Joined: Apr 23rd, 2013
DEBUG RELEASE selection
Sep 29th, 2017 at 1:28pm
Print Post  
OS: Windows 10.0.15063 Build 15063
Visual Studio: 2017 15.3.5
Visual Micro: 1709.6.0 free.

It may be that I have not read all the documentation, but I did not understand what the selection of DEBUG or RELEASE, in the control bar, does, since:

1- Compilation is always done with the -Os flag;
2- For example, if you put -O3 in [VisualMicro-Project Properties] extra-flags, they are valid both for the DEBUG and RELEASE options;

In fact I did not find the option of inserting different flags for the two modes;
If it is so, I suggest:
1- Duplicate extra flag lines in [VisualMicro-Project Properties];
or
2- Use the [VisualStudio-Project Properties]: C ++ panels for all the compilation parameters
(General, Optimization ...), leaving everything in the [VisualMicro-Project Properties] all what that concerns the environment.

Years ago I developed the extension in VisualStidio 2012 for Microchip PICs;
  now I went to Arduino and VisualMicro is doing very well (I'm old to reinvent the wheel).
Thank you.

amelia
  
Back to top
 
IP Logged
 
amelia
Junior Member
**
Offline


Posts: 10
Location: ITALY
Joined: Apr 23rd, 2013
Re: DEBUG RELEASE selection
Reply #1 - Sep 30th, 2017 at 9:16am
Print Post  
I found:

Options->Visual Micro->Compiler: [Debug Configuration] or [Release Configuration]

where I can specify a file config, but:
1- where;
2- contents;


My needs are:

1- DEBUG:
compiler.c.extra_flags=-O0
compiler.c.elf.extra_flags=-O0
compiler.cpp.extra_flags=-O0

2- RELEASE
compiler.c.extra_flags=-Ofast
compiler.c.elf.extra_flags=-Ofast
compiler.cpp.extra_flags=-Ofast

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: DEBUG RELEASE selection
Reply #2 - Sep 30th, 2017 at 9:46am
Print Post  
Thanks for the post and sorry for the delay.

Ignore tools>options. These settings simply control when visual micro will work or when it will leave Visual Studio C++ to compile the project. You need to leave the options empty.

The Visual Studio project property pages are for intellisense only.

When building we use the boards.txt and platform.txt provided with the hardware core to determine build commands this is how the arduino ide works and why we are compatible with arduino.

The Visual micro project properties have extra flags either for project global or for the current "configuration" such as DEBUG/RELEASE. It sounds like the extra flags > "configuration" might help you. 

The arduino core has optimization hard coded for each board. I will add to the to do list to try to give some future options but the arduino design does not support your request.

There is a relatively new feature in visual micro which allows you to override the hardware core build commands. However this feature is not ideal for your request because it is not configuration specific but I will look at a short term change to support that. Try it anyway because you might find it is acceptable for the short term.

Switch on vmicro>compiler>show build properties. Then build and in the output you will see the .c, .cpp and objcopy (elf) commands.

Create a board.txt in the local project and add any commands that you want to override. Then click save on board.txt and build.
  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint