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 Release build uses -g and -DVM_DEBUG_GDB options (Read 704 times)
TVC
Junior Member
**
Offline


Posts: 12
Joined: Dec 19th, 2016
Release build uses -g and -DVM_DEBUG_GDB options
Jan 23rd, 2020 at 5:28pm
Print Post  
Hello VM Community.

I am trying to do a Release build for a project using Visual Studio 2019 16.4.3 and Visual Micro 1912.28.2.

It seems no matter which build configuration I select (Debug/Release), the compiler always adds the -g and -DVM_DEBUG_GDB options as follows (snipped from actual Release mode build):

arm-none-eabi-g++ -mcpu=cortex-m4  -g -DVM_DEBUG_GDB... 

which is coming from build.vm.extra_flags.

Under Externsions/VMicro/Debugger, "Debug" is set to "Debug: Off" (under "Misc" in "Advanced Settings", "(Micro Debug)" is set to None. It should not be set here, but I mention it for completeness). It also appears in the file Compile.vmps.xml.

Any idea what is going on here? I don't recall seeing this in previous versions of VM. I tried it on VM version 1902.17.0 in VS2015 and did not see this behavior.

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Release build uses -g and -DVM_DEBUG_GDB options
Reply #1 - Jan 23rd, 2020 at 8:22pm
Print Post  
Ignore the poject properties they relate to the serial debugger, please set vMicro>Debugger to Off. If it is already set to off then select Off again and see if that resolves

Otherwise, In Release, please follow the guide in yellow above so that we can replicate/see your config.

Thanks
« Last Edit: Jan 23rd, 2020 at 8:24pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
TVC
Junior Member
**
Offline


Posts: 12
Joined: Dec 19th, 2016
Re: Release build uses -g and -DVM_DEBUG_GDB options
Reply #2 - Jan 23rd, 2020 at 9:12pm
Print Post  
Switching the debugger option on and then off resolved the issue. Note that this had to be done for both the Debug and Release configurations.
Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Release build uses -g and -DVM_DEBUG_GDB options
Reply #3 - Jan 23rd, 2020 at 9:27pm
Print Post  
Great, it is intentional for debug to be on with debug config. If you switch off "vMicro>Debugger>Automatic debugging" then that will no longer be the case. When you set the options yourself that also overrides the default.

  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint