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) The Marlin project build fails (Arduino compiles Ok) (Read 3383 times)
audeo
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2019
The Marlin project build fails (Arduino compiles Ok)
Oct 10th, 2019 at 8:01pm
Print Post  
I love the tools that Visual Studio has to offer, so I downloaded and installed Visual Micro years ago when I had 2017 still. Now I'm running VS 2019 with the same issues as before. Basically, I am trying to modify and flash Marlin (3d printer firmware) onto an Atmega2560-powered board. It compiles and runs perfectly when flashed from Arduino, but it is super inconvenient to have to switch back and forth between two IDE's. I have no idea why this keeps happening, and has happened for the longest time, but it WILL. NOT. COMPILE. I just get a ton of errors.

Code (C++)
Select All
Compiling 'Marlin' for 'ATmega2560 (Mega 2560) (Arduino/Genuino Mega)'

MarlinConfig.h:40: In file included from
Marlin.ino:31: from

SanityCheck.h: 1119:5: error: non-constant condition for static assertion
   static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF)
   ^~~~~~~~~~~~~

fastio.h:50: In file included from
MarlinConfig.h:26: from
Marlin.ino:31: from

fastio_1280.h: 112:21: error: reinterpret_cast from integer to pointer
   #define DIO6_PWM    &OCR4AL
fastio.h:99: note  in expansion of macro DIO6_PWM
   #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
   ^~~
fastio.h:111: note  in expansion of macro _GET_TIMER
   #define GET_TIMER(IO) _GET_TIMER(IO)
   ^~~~~~~~~~
SanityCheck.h:1119: note  in expansion of macro GET_TIMER
   static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF)
   ^~~~~~~~~

MarlinConfig.h:40: In file included from
Marlin.h:36: from
blinkm.cpp:28: from

Error compiling project sources
SanityCheck.h: 1119:5: error: non-constant condition for static assertion
Build failed for project 'Marlin'
   static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF)
   ^~~~~~~~~~~~~

fastio.h:50: In file included from
MarlinConfig.h:26: from
Marlin.h:36: from
blinkm.cpp:28: from

fastio_1280.h: 112:21: error: reinterpret_cast from integer to pointer
   #define DIO6_PWM    &OCR4AL
fastio.h:99: note  in expansion of macro DIO6_PWM
   #define _GET_TIMER(IO) (DIO ## IO ## _PWM)
   ^~~
fastio.h:111: note  in expansion of macro _GET_TIMER
   #define GET_TIMER(IO) _GET_TIMER(IO)
   ^~~~~~~~~~
SanityCheck.h:1119: note  in expansion of macro GET_TIMER
   static_assert(GET_TIMER(E0_AUTO_FAN_PIN), "E0" AF_ERR_SUFF)
   ^~~~~~~~~
 



Yes, I have Arduino IDE 1.6/1.8 selected. Yes, I have the board selected. I feel like I'm missing something, anyone else have this problem?
« Last Edit: Oct 11th, 2019 at 3:43pm by Tim@Visual Micro »  
Back to top
 
IP Logged
 
Tim@Visual Micro
Administrator
*****
Offline


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #1 - Oct 10th, 2019 at 8:24pm
Print Post  
Please give download link for the project and also follow the guide in yellow above so we can ensure we have same tool chain and.or library version(s) to replicate.
« Last Edit: Oct 11th, 2019 at 3:44pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
audeo
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2019
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #2 - Oct 10th, 2019 at 10:19pm
Print Post  
https://github.com/MakerGear/m3firmware/tree/1.1.6

Please take note of the instructions, you have to uncomment a line in order to activate a printer. The machine I am using is the M3ID Rev1.

Quote:
Before you can compile, you must select your 3D printer configruation by editing the file

Marlin/Configuration_makergear.h

Uncomment one of the #define statements depending on your printer. For example if you have an M3-ID Rev1, find

//Standard M3 ID Rev1 with Probe

// #define MAKERGEAR_MODEL_M3_ID_REV1_000

and replace it with

//Standard M3 ID Rev1 with Probe

#define MAKERGEAR_MODEL_M3_ID_REV1_000


I'll attach the output as a text file.
« Last Edit: Oct 11th, 2019 at 3:44pm by Tim@Visual Micro »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #3 - Oct 11th, 2019 at 3:41pm
Print Post  
We have looked at this and suspect that if your project builds OK in the arduino ide then you are using a different arduino version than you have assigned to Visual Micro 1.6/1.8

Your project does not build in the recent arduino IDEs, however we found it built okay in Arduino IDE 1.8.2.

In Visual Micro, you do not have to change the IDE that Visual Micro points, that will not help. You just need to switch off the feature that adds a compiler include path for the current project folder. See attached image.

The issue is that in recent Arduino versions the project include path is added autoatmically, this is why it became an option in Visual Micro with the option being enabled by default. The Marlin project uses an spi.h which then confused the lookup for the expected SPI.h library. Windows is not case sensitive and I think the author or the mearlin project is not using windows so missed this fact.







« Last Edit: Oct 11th, 2019 at 3:44pm by Tim@Visual Micro »  

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


Posts: 5
Joined: Oct 10th, 2019
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #4 - Oct 12th, 2019 at 3:12pm
Print Post  
Thank you for this insight. Unfortunately this did not fix the problem.

A quick note: I am using Arduino IDE version 1.8.10.

Here is a screenshot of the compiler menu for the VMicro extension after making this change:

« Last Edit: Oct 12th, 2019 at 3:17pm by audeo »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #5 - Oct 12th, 2019 at 3:23pm
Print Post  
Please switch the tool bar from Debug to Relase and click build. The post the output as .txt.

Thanks
  
Back to top
WWW  
IP Logged
 
audeo
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2019
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #6 - Oct 12th, 2019 at 3:39pm
Print Post  
Update to a previous claim: I actually had updated to Arduino IDE 1.8.10 about a week ago, but I never tested Marlin on it. I get the same issues with Arduino IDE as I do with Visual Micro, that is multiple instances of SPI.h and build errors. Any other advice on fixing this issue?
  
Back to top
 
IP Logged
 
audeo
Newbies
*
Offline


Posts: 5
Joined: Oct 10th, 2019
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #7 - Oct 12th, 2019 at 3:43pm
Print Post  
Ran in "Release" mode, same issue.

BIG UPDATE: I uninstalled 1.8.10 and then installed 1.8.0 and now Arduino IDE and VMicro are working.
« Last Edit: Oct 12th, 2019 at 3:57pm by audeo »  

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


Posts: 12071
Location: United Kingdom
Joined: Apr 10th, 2010
Re: The Marlin project build fails (Arduino compiles Ok)
Reply #8 - Oct 12th, 2019 at 4:58pm
Print Post  
Thanks for the update that's good to hear. The issue happens when the following is defined.

// #define BLINKM



« Last Edit: Oct 12th, 2019 at 4:59pm by Tim@Visual Micro »  
Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint