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 How can I use cpp only without ino? (Read 7495 times)
YLL
Newbies
*
Offline


Posts: 2
Joined: May 16th, 2018
How can I use cpp only without ino?
May 16th, 2018 at 2:38pm
Print Post  
Hi,

I'm new to Arduino and VM. Just wondering if I can get rid of ino and build with cpp only. I scanned through documentation and didn't find anything except the suggestion of using cpp instead of ino.

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How can I use cpp only without ino?
Reply #1 - May 16th, 2018 at 2:53pm
Print Post  
If you do not want to use the visual micro serial debugger then you add a project_name.cpp to the project. You DO need to leave a project_name.ino but it can be empty and will not be compiled.

edit

You can also add a main.cpp to the project which will override the main.cpp in the arduino core and an arduino.h which will override the entire core. However this is expert mode.

Finally you can create your own core and have your own custom board definitions very easily by creating a core under mydocuments\hardware\[CoreName]. The folder structure must conform to the arduino 3rd party hardware spec. and contain boards.txt and optional platform.txt. The core can inherit part of another core or be an entirely new core.

« Last Edit: Oct 1st, 2018 at 11:44am by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
YLL
Newbies
*
Offline


Posts: 2
Joined: May 16th, 2018
Re: How can I use cpp only without ino?
Reply #2 - May 16th, 2018 at 3:57pm
Print Post  
Tim@Visual Micro wrote on May 16th, 2018 at 2:53pm:
If you do not want to use the visual micro serial debugger then you add a project_name.cpp to the project. You DO need to leave a project_name.ino but it can be empty and will not be compiled.



Got it. Thanks!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: How can I use cpp only without ino?
Reply #3 - May 16th, 2018 at 4:10pm
Print Post  
Great.If you use "add library", then #include examples will be put in the .ino for you to copy

++

In the last release there is a vMicro>Compiler option to override any core code. For example, with the option enabled, if the core you are using uses a main.cpp, then adding a main.cpp to the project would override the core.  It's the main.cpp that calls the ino setup() and loop() so often a better place to start if you want complete control.

« Last Edit: May 16th, 2018 at 4:11pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint