VS Arduino
Visual Micro >> Microchip Studio (Atmel Studio 7) >> How can I use cpp only without ino?
https://www.visualmicro.com/forums/YaBB.pl?num=1526481480

Message started by YLL on May 16th, 2018 at 2:38pm

Title: How can I use cpp only without ino?
Post by YLL on May 16th, 2018 at 2:38pm
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.

Title: Re: How can I use cpp only without ino?
Post by Visual Micro 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.

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.


Title: Re: How can I use cpp only without ino?
Post by YLL on May 16th, 2018 at 3:57pm

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!

Title: Re: How can I use cpp only without ino?
Post by Visual Micro on May 16th, 2018 at 4:10pm
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.


VS Arduino » Powered by YaBB 2.6.12!
YaBB Forum Software © 2000-2024. All Rights Reserved.