Closed j54n1n closed 5 years ago
I'd rather not rename this file, if it can be avoided. It would be better to rename the Marlin.ino
file instead. Or, we can simply continue to not support Visual Studio Community 2017 and simply keep supporting PlatformIO (Atom or Visual Studio Code) and Arduino IDE.
But is this Marlin.cpp not the successor of the Marlin_main.cpp from the bugfix-1.1.x branch? Is the new build system with PlatformIO so much different that it does not allow a rename of this file?
Moving away from the PlatformIO (Atom or Visual Studio Code) and Arduino IDE is a very big step, and it is not necesary at all. By making a small name change the idea is only to increase the compatibility across other platforms. I think that Atom (which also runs on Visual Studio as a plug-in) is a great platform, and up till a few days ago I had never tried out the Visual Micro plug-in, but I too am very impressd at the time saving when compiling with Visual Micro. Either way, this is not about choosing between ONLY one platform, but instead, with a tiny change FromMarin.ccp to MarlinXYZ.ccp, we can all now enjoy the use of ALL platforms. That has to be a plus, don't you think ?
Or, we can simply continue to not support Visual Studio Community 2017
that's not true. I'm still using and compiling with Visual studio community edition for AVR system , using platform
@j54n1n problem solved?
@j54n1n problem solved?
Not really. I asked also in the Visual Micro forum (see: https://www.visualmicro.com/forums/YaBB.pl?num=1545386155/0#1) but it seems it is one of the expected results of VMicro. Basically with the .cpp file named in the same way as the .ino you can hide the cpp file for compilation.
With the latest versions of Arduino IDE 1.8.8 and the Visual Micro plugin 1902.17 you can get it to compile if you do one of the following changes:
Marlin/Marlin/src/Marlin.cpp
to Marlin/Marlin/src/Marlin_main.cpp
or
Marlin/Marlin
to Marlin/Marlinfw
with the consequence of renaming the .ino to Marlin/Marlinfw/Marlinfw.ino
such that Arduino IDE is happyNote: I used full paths here to make not to much confusion about which part has to be renamed.
@thinkyhead suggested once to rename the Marlin.ino
file. If he is happy with that, we could try to find a better name instead of Marlinfw
. I am open for suggestions.
Not VMicro but vs code and platform io extension
Or arduino Ide 1.9
Ah ok, but in this issue we never talked about VS code and/or PlatformIO. @thinkyhead only mentioned them that he wants to support them instead of VMicro.
Since I am not using them I can give you no hints. Maybe you should try to open a new issue if you found some problem!?
Reason I asked was to find issues that where fixed but not closed. There where many.
But for this one I think we need @thinkyhead to have a look again
Reason I asked was to find issues that where fixed but not closed. There where many.
But for this one I think we need @thinkyhead to have a look again
Yes, I agree
We should modify the readme actually, 1.8.7 and newer is fine, no need to use the 1.9.0 beta anymore on the arduino ide.
Is there a project file for VisualMicro that can be saved in a location relative-to (above) the source files, such that the project file contains the path to the source files?
Is there a project file for VisualMicro that can be saved in a location relative-to (above) the source files, such that the project file contains the path to the source files?
Do you mean something like a makefile?
VMicro does generate a Visual Studio solution file but to get there you first have to open it within Visual Studio by File -> Open -> Arduino Project which then invokes the VM plugin. At that stage the plugin does first a deep search of the entire Arduino "Marlin" sketch. But the scan fails if you do not rename either Marlin.cpp or the Marlin.ino sketch.
The last time I looked at this issue in December the scanning part was successful but I would get a linker error because the Marlin.cpp would get hidden as it is intended by plugin (see: https://www.visualmicro.com/forums/YaBB.pl?num=1545386155/0#1). Now with the most recent version of VMicro the sketch can not be imported anymore because due the Marlin.cpp/Marlin.ino pair it thinks to find the wrong include paths for the SD library.
As mentioned before the VMicro does not expect that there exist a .cpp file with the same name as the .ino file. Till now as a workaround you have to rename one of the files.
Anyhow the folder structure is like this if I go for the Marlinfw.ino workaround:
I highlighted the added files from the VMicro plugin and you can find them as an attachment Marlinfw.zip
Edit:
In the .vcxproj and the .vcxproj.filters file you can find a reference to: <ClCompile Include="src\Marlin.cpp" />
Just to know, I don't use your plugin but I use visual studio and I compile for mega2560 via platformIO. I'm wondering why are you using such pluging instead of VS without it? Which benefit do you have with it?
N.B: In my case platformio generated a native visual studio project, using a plugin I'm able to see the whole project in a tree structure (folder -> subfolder - > file) and manage such project
Just to know, I don't use your plugin but I use visual studio and I compile for mega2560 via platformIO. I'm wondering why are you using such pluging instead of VS without it? Which benefit do you have with it?
N.B: In my case platformio generated a native visual studio project, using a plugin I'm able to see the whole project in a tree structure (folder -> subfolder - > file) and manage such project
I think the main difference between the two options is that PlatformIO uses Visual Studio Code. VMicro is instead a plugin for the native Visual Studio (not VS Code) with the avr-gcc from Arduino IDE.
I used this plugin for other projects, and also for Marlin 1.1.x, but with the new 2.0.x branch and the changed files/folder layout it causes the above mentioned problem.
One of the main features of VMicro is faster build times. With multicore build I can get down to 48 seconds on my laptop for the first build, and from the second build onwards I can get down to 4 seconds for the 2.0.x branch. Has PlatformIO similar build times?
I think the main difference between the two options is that PlatformIO uses Visual Studio Code. VMicro is instead a plugin for the native Visual Studio (not VS Code) with the avr-gcc from Arduino IDE.
that's wrong...I'm using VS2017 community edition, not vs code
One of the main features of VMicro is faster build times.
that may a good reason.
Lack of Activity This issue is being closed due to lack of activity. If you have solved the issue, please let us know how you solved it. If you haven't, please tell us what else you've tried in the meantime, and possibly this issue will be reopened.
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Description
I am working on the firmware for the PowerWASP 3D printer that uses an ATmega2560 on its mainboard. While using a slightly fixed version of the Arduino IDE plugin for Visual Studio I get a linker error of multiple definitions if I do not rename Marlin.cpp from within the src folder.
Steps to Reproduce
Expected behavior: That a fresh download of the Marlin-bugfix-2.0.x firmware compiles without renaming the Marlin.cpp file. With a renamed Marlin.cpp I get:
Actual behavior: Current releases of Marlin-bugfix-2.0.x generate a linker error:
Additional Information
Could this change be included in the Marlin-bugfix-2.0.x repository?