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
Hot Topic (More than 8 Replies) Compiler Command line options (Read 3120 times)
coder
Newbies
*
Offline


Posts: 6
Joined: Jul 8th, 2022
Compiler Command line options
Jul 8th, 2022 at 9:26pm
Print Post  
I was wanting to change the compiler command line warning options per file in the project.  I could not figure out how do this?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #1 - Jul 8th, 2022 at 10:09pm
Print Post  
On the vMicro>Compiler menu warnings can be enabled/disabled for three groups of files Project, Libraries, Core.

It is no currently possible to configure warning level for a specific file. It might be possible to enable/disable warning in code using a #pragma statement. It would be important to ensure you look at gcc documentation and not visual studio VC++ for that.

« Last Edit: Jul 8th, 2022 at 10:10pm by Tim@Visual Micro »  
Back to top
IP Logged
 
coder
Newbies
*
Offline


Posts: 6
Joined: Jul 8th, 2022
Re: Compiler Command line options
Reply #2 - Jul 9th, 2022 at 2:28pm
Print Post  
Thanks! 

I guess I should have used the free trial before purchasing...   

Oh the price of an education. 

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #3 - Jul 9th, 2022 at 3:34pm
Print Post  
It's a good idea and should be quite easy to implement, we will add it to the list and next release if time allows.
  
Back to top
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #4 - Jul 9th, 2022 at 3:54pm
Print Post  
We are  also looking into a possible bug with the enabling of compiler warnings. If there is an issue that will be resolved during the next few days

You can override the global compiler warnings using the following board.txt property:-

compiler.warning_flags.more=-W__myWarningSwitches

tip: Use the vMicro menu to create a board.txt file in the project folder or create manually.

fyi: all build commands can be overriden via board.txt. Use the yellow box near the top of this page to see how to switch on settings that show you the build properties.





  
Back to top
IP Logged
 
coder
Newbies
*
Offline


Posts: 6
Joined: Jul 8th, 2022
Re: Compiler Command line options
Reply #5 - Jul 9th, 2022 at 4:00pm
Print Post  
That is fine take all the time you want.   

One day with visual micro was enough for me to learn that is it not the tool I need to be using.   

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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #6 - Jul 9th, 2022 at 4:08pm
Print Post  
Drop us a line, we will help you deactivate and have refund. It would be useful to hear what type of build process you were looking for, at the same time.

fyi: It would never be possible to provide individual compiler settings for Arduino .ino code in any tool. That is not how Arduino works.


« Last Edit: Jul 9th, 2022 at 4:24pm by Tim@Visual Micro »  
Back to top
IP Logged
 
coder
Newbies
*
Offline


Posts: 6
Joined: Jul 8th, 2022
Re: Compiler Command line options
Reply #7 - Jul 9th, 2022 at 4:23pm
Print Post  
Basically I got a Visual Micro project from a customer.  They want to go to production of product using code. 

Visual Micro is no something you want to use for production as it abstracts much of the build process and settings.  Which is what Arduino and Visual Micro was designed to do.   So it is not about what is missing, but rather the use case. 

To keep it very simple, if I can not script visual micro such that I run the build on a CI system like TravisCI. Then I feel it should not be used for commercial applications.   

Now if you basically export a makefile, nijia, cmake build system then it might be useful.  However again that is not your market segment.   

As such I will need to take this project and converting it to a more traditional build system.  At which point VSCode or other editors/IDEs can be used, and it works with TravisCI.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #8 - Jul 9th, 2022 at 4:28pm
Print Post  
Ah yes, if you have a fixed project and know how to comfigure the compiler then any gcc compatible environment will work. Visual Micro and Arduino is not esigned to cater for advanced programmers in that way.

It shouldn't be difficult to create your own environment, the tool chain and builds commands are all shown in the verbose output (see yellow box above).

The .ino code can be combined into a single cpp and then you should only need to add an #include "Arduino.h" to the top of the source cpp.

See my prev note too. 


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #9 - Jul 9th, 2022 at 4:32pm
Print Post  
ps: the verbose build commands that visual micro shows are each an external process. You can tweak the warnings or other params and then run then in a cmd.exe prompt. Same end result just a little more cumbersome for repeated use.
  
Back to top
IP Logged
 
coder
Newbies
*
Offline


Posts: 6
Joined: Jul 8th, 2022
Re: Compiler Command line options
Reply #10 - Jul 9th, 2022 at 4:33pm
Print Post  
As a generalization I tell customer that Arduino based projects are like living in a tent verses a house. Sure it quick to get built and working, but not anything you want to live with long term. 

Visual Micro appears to be just a Visual Studio IDE lip stick on that pig.   


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


Posts: 12191
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Compiler Command line options
Reply #11 - Jul 9th, 2022 at 4:36pm
Print Post  
It's only a pig from your perspective, there is a huge Arduino community and many commercial projects, many more prototypes for commercial. 

For an advanced programmer Arduino is certainly too simple but for a "maker" it's perfect. Minimum learning curve, simple installation, easy to support, well tried and tested open source libraries and examples. Rapid developement makes commercial sense too.

If you do decide to teak the build params for a file using the verbose output suggested earlier you can also re-link if need be. If you reporduce the output files then you can use "vMicro>Uploader>Upload Last Build" to upload. That will avoid your custom build from being destroyed by a new build prior to upload.
« Last Edit: Jul 9th, 2022 at 4:40pm by Tim@Visual Micro »  
Back to top
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint