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] 2  Send TopicPrint
Hot Topic (More than 8 Replies) Visual Micro and Marlin 2.0 (Read 13104 times)
Spawn32
Newbies
*
Offline


Posts: 1
Joined: Dec 2nd, 2017
Visual Micro and Marlin 2.0
Dec 2nd, 2017 at 8:56pm
Print Post  
Hi,
Trying to get Marlin 2.0 to compile on Visual studio (2017) with Visual Micro, but build fails even before it can start Smiley

Not sure what i am doing wrong, have a look her so you can se the directory structure of marlin:
https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x

and here is the error i get, it looks for the source files in the wrong place, have tried everything, can figure out how to fix this :

Compiling debug version of 'Marlin' for 'The Borg'
Build Folder: file:///C:/Users/Familien/AppData/Local/Temp/VMBuilds/Marlin/STM32GEN_BORG_F765
 
arm-none-eabi-g++*: error: pp: No such file or directory
arm-none-eabi-g++*: warning: -x c++ after last input file has no effect
 
arm-none-eabi-g++*: fatal error: no input files
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #1 - Dec 4th, 2017 at 2:15pm
Print Post  
Does it build if you switch the tool bar from Debug to Release?
  
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #2 - May 22nd, 2018 at 3:40pm
Print Post  
We have tried both mode (release and debug) but the error is the same! 
Can anyone help us?

Thanks for cooperation!
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #3 - May 22nd, 2018 at 4:42pm
Print Post  
Hi,

I see this is a new version of marlin for arduino 1.9 beta

Can you pls provide install instructions so we can replicate the error and see the verbose build output.

Thanks
  
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #4 - May 23rd, 2018 at 7:30am
Print Post  
Sure!
I try to list the steps that led me to the compilation error highlighted:
1) I need to use the 32bit FW to be implemented in the Ultratronics 1.0 cards
2) On the GitHub website, in the "MarlinFirmware/Marlin" section, I downloaded the "bugfix-2.0.x" version
3) I extracted the downloaded file in the folder "C:\Marlin32" trying to minimize the creation of subfolders to have short filenames
4) On the Arduino site I downloaded the version "arduino-1.9.0-beta-windows"
5) I extracted the file downloaded in "C:\Arduino"
6) I started arduino and in the "Manager Tabs" I downloaded and installed "Arduino SAM Boards (32-bits ARM Cortex-M3) by Arduino" version 1.6.11
7) I started VisualStudio2017 as an administrator:
   Version of VisualStudio2017 Community: 15.7.2
   Microsoft .NET Framework Version 4.7.03056
   Arduino for visual studio - 1.0
   Visual.Micro.GDB.Package2017 Extension 1.0
8) In the "Configure Ide Locations" window of VisualMicro I set:
   - Arduino 1.6/1.9
   - Ide Folder Location: "C:\Arduino"
9) In "vMicro" I perform "Open Existing Arduino Project" and open "C:\Marlin32\Marlin\Marlin.ino"
10) In "Configuration.h" I modified the "#define MOTHERBOARD BOARD_RAMPS_14_EFB" in  "#define BOARD_ULTRATRONICS_PRO" 
11) I select "Arduino 1.6/1.9" and "Arduino Due (Programming Port)"
12) Starting the compilation:

 
Code (C++)
Select All
      Compiling 'Marlin' for 'Arduino Due (Programming Port)'
Build Folder: se
Summary: Header=1 Prototypes=1 Imports=40
Additional Defines:
Architecture Tools: bi-gcc/4.8.3-2014q1/bin/
Api: 18051400
Sketch Book: file:///C:/Users/TIPS/Documents/Arduino
Sketch Include Paths
Core Include Paths
Include Path 11/cores/arduino
Include Path 11/variants/arduino_due_x

Deep search for libraries ...
Library Include Paths (1)
Include Path 'c:\Arduino\libraries\SD\src'
4.8.3-2014q1\bin\arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions   -Dprintf=iprintf -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10900 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" stem/libsam" stem/CMSIS/CMSIS/Include/" stem/CMSIS/Device/ATMEL/" -I"c:\Arduino\libraries\SD\src" -I"c:\Arduino\libraries\SD" res\arduino" riants\arduino_due_x" in.cpp" -o "nul"
4.8.3-2014q1\bin\arm-none-eabi-g++" -c -g -Os -w -std=gnu++11 -ffunction-sections -fdata-sections -nostdlib -fno-threadsafe-statics --param max-inline-insns-single=500 -fno-rtti -fno-exceptions   -Dprintf=iprintf -w -x c++ -E -CC -mcpu=cortex-m3 -mthumb -DF_CPU=84000000L -DARDUINO=10900 -DARDUINO_SAM_DUE -DARDUINO_ARCH_SAM -D__SAM3X8E__ -mthumb -DUSB_VID=0x2341 -DUSB_PID=0x003e -DUSBCON -DUSB_MANUFACTURER="\"Arduino LLC\"" -DUSB_PRODUCT="\"Arduino Due\"" stem/libsam" stem/CMSIS/CMSIS/Include/" stem/CMSIS/Device/ATMEL/" -I"c:\Arduino\libraries\SD\src" -I"c:\Arduino\libraries\SD" res\arduino" riants\arduino_due_x" in.cpp" -o "nul"

arm-none-eabi-g++*: error: n.cpp: No such file or directory
arm-none-eabi-g++*: warning: -x c++ after last input file has no effect

arm-none-eabi-g++*: fatal error: no input files
   compilation terminated

 

« Last Edit: May 26th, 2018 at 1:50am by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #5 - May 26th, 2018 at 2:00am
Print Post  
Hi,

Thanks for the info.

The arduino sketch/project is in the \Marlin folder where you see the Marlin.ino

All the other folders are for other build systems than arduino.

There is a clash in the name of the "master" cpp file name that visual micro uses in the build temp folder. This is because the Marlin project contains a .cpp file called Marlin.cpp

1)

If you rename the \Marlin folder and also the Marlin.ino in the folder to Marlin2 and Marlin2.ino then it will build.

2)

Because Marlin does not use Arduino Libraries, I suggest you open the Marlin2 project and then switch OFF "vMicro>Compiler>Deep Search for Libraries". That will give a much faster build (1st build will be slow anyway).


Attached is the Marlin project renamed to Marlin2. You can name it whatever you want but Marlin2 seemed appropriate.


tip: If you unpack the zip into your "MyDocuments\Arduino" folder it will appear in the arduino ide file>open menu and visual micro "file>open>arduino project". This is because "arduino" folder is where arduino projects are normally located. Arduino calls it your "sketch book" folder. It's not critical to work this way but more standard.



  

Please Register or Login to the Forum to see File Attachments
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #6 - May 29th, 2018 at 7:36am
Print Post  
Thanks for the support
we did as suggested and the situation is much improved, but there are still problems in the link phase, as shown in the following message:

  Error linking for board Arduino Due (Programming Port)
  Build failed for project 'Marlin2'
 
  arm-none-eabi-gcc*: error: CreateProcess: No such file or directory

Whe ave downloaded and installed from github 
-  gcc-arm-embedded
-  MinGW Webinstaller

Thanks for cooperation!!!

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #7 - May 29th, 2018 at 10:13am
Print Post  
Please give full install instructions

Thanks
  
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #8 - May 31st, 2018 at 6:22am
Print Post  
They are self-installing packages, so I started them and followed the instructions on the screen.
At the end of the installation of "gcc-arm-embedded" I have checked the option "Add path to environment variable".

For both packages I left the default installation paths.

I attached the text files with minGv installation messages and the complete compilation messages.

Thanks for cooperation
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #9 - May 31st, 2018 at 9:45am
Print Post  
If you are using  Arduino Due (Programming Port) then why have you not installed it using he Arduino Board Manager?

I think you should avoid installing anything and simply configure the Arduino Due (Programming Port) to work as normal.

The Arduino Due (Programming Port) is a normal Arduino board and does not require messing about outside the Board Manager

Then try your Marlin project.
  
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #10 - Jun 15th, 2018 at 6:36am
Print Post  
I tried to compile the project without installing anything and using the board manager, but as highlighted in previous posts, the following error came out:

   Error linking for board Arduino Due (Programming Port)
   Build failed for project 'Marlin2'

   arm-none-eabi-gcc *: error: CreateProcess: No such file or directory.

  
Back to top
 
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #11 - Jun 28th, 2018 at 8:18am
Print Post  
Problem still unresolved;
Can someone help me please?
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #12 - Jun 28th, 2018 at 11:52am
Print Post  
Sorry for the delay . I will take a look when I get a change.

Marlin is often a challenge because it comes with a layer of confusion not enjoyed by other boards Smiley

For example you are building using the standard arduino due board selection which if installed correctly via board manager does install the arm tool chain.

It's the tool chain that appears to be an issue I think I recall you or someone else posting some convoluted instruction of how to install it.

What I suggest is that you take the "blink" example project and prove that you can build it for the Due. 

If you can not build then install the board properly using the Arduino IDE board manager.

Then open Visual Micro and build blink for the due.

Only when you have a basic arduino ide installation working should we discuss marlin.
  
Back to top
WWW  
IP Logged
 
frankit
Newbies
*
Offline


Posts: 6
Joined: May 22nd, 2018
Re: Visual Micro and Marlin 2.0
Reply #13 - Jul 10th, 2018 at 11:40am
Print Post  
Unfortunately, after following the advice, the problem persists.
The project is correctly compiled under Arduino environment, while always reporting the same problems under visual micro environment.
  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #14 - Jul 10th, 2018 at 2:24pm
Print Post  
Thanks for the update.

If you compile the Blink example for the Arduino Due does it build okay?
  
Back to top
WWW  
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0 (SOLVED)
Reply #15 - Jul 15th, 2018 at 4:06pm
Print Post  
A rule for arduino projects is to ensure that an .ino file name matches the containing folder. 

If you rename from Marlin to Marlin2 then you need to ensure Marlin.ino is renamed to Marlin2.ino.  For visual micro the vcxproj also needs renaming to the same name such as "Marlin2". The easiest way to rename is to use the solution explorer > right click the Marlin.ino then click rename to Marlin2.ino. Then you are prompted to make all the file and folder name changes.

SOLUTION

I downloaded the link in the first post of this thread and then opened the Marlin.ino using "File>Open>Arduino project". There was a long pause due to the amount of code in the Marlin project but then Visual Micro opened the newly created Marlin project. 

I then selected the Mega 2560 board and also renamed Marlin.cpp to MarlinCore.cpp.

Then build was fine.

Does this work for you?
  
Back to top
WWW  
IP Logged
 
mgth
Newbies
*
Offline


Posts: 4
Joined: Aug 7th, 2012
Re: Visual Micro and Marlin 2.0
Reply #16 - Jul 25th, 2018 at 7:07pm
Print Post  
Hello,
The solution used to work, but now, it complains about too long command line. I tried to reduce temp folder path length but it is still too long

here is the start of the command line, but it's even too big for the forum.

another forum suggest to use relative path instead, i don't know if it is possible in visual micro.

Code
Select All
tmel3.5.4-arduino2/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections,--relax -mmcu=atmega2560 -o "C:\t\VMBuilds\Marlin\mega_atmega2560\Release/Marlin.ino.elf" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\Marlin.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\core\serial.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\core\utility.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\baricuda.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\caselight.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\controllerfan.cpp.o" " "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\fanmux.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\filwidth.cpp.o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\fwretract.cpp.o" .o" .o" "C:\t\VMBuilds\Marlin\mega_atmega2560\Release\src\feature\mixing.cpp.o"  

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


Posts: 12076
Location: United Kingdom
Joined: Apr 10th, 2010
Re: Visual Micro and Marlin 2.0
Reply #17 - Jul 25th, 2018 at 7:40pm
Print Post  
Hi,

If you click Reply instead of using the quick post on this page then you will be able to attach your full build output as a .txt file.

Thanks
  
Back to top
WWW  
IP Logged
 
mgth
Newbies
*
Offline


Posts: 4
Joined: Aug 7th, 2012
Re: Visual Micro and Marlin 2.0
Reply #18 - Jul 26th, 2018 at 9:58am
Print Post  
ok, here it is :
  

Please Register or Login to the Forum to see File Attachments
Back to top
 
IP Logged
 
mgth
Newbies
*
Offline


Posts: 4
Joined: Aug 7th, 2012
Re: Visual Micro and Marlin 2.0
Reply #19 - Jul 26th, 2018 at 10:23am
Print Post  
the problem is about CreateProcess cannot exceed 32k (32767 actually)

when compiling with arduino gui the command line is 29504 chars long so it is just a matter of time it will crash too.

with visual micro it is 34114 because the base path is a bit longer :

C:\t\arduino_build_328924\sketch\
C:\t\VMBuilds\Marlin\mega_atmega2560\Release\
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send TopicPrint