Welcome! Log In Create A New Profile

Advanced

ENDSTOP_INTERRUPTS feature error

Posted by Alter3go 
ENDSTOP_INTERRUPTS feature error
November 03, 2019 11:24AM
Hi guys, I hope someone can help me.
My knowledge with coding is novice level, but I have a fair understanding of how the structure works.

I want to install Marlin (Anet A8 version) on my MKS Gen 1.4 with TMC2208 drivers, I got everything working as it should, BUT when compiling I run into this error:


#if HAS_Y_MIN
    #if digitalPinToInterrupt(Y_MIN_PIN) != NOT_AN_INTERRUPT
      attachInterrupt(digitalPinToInterrupt(Y_MIN_PIN), endstop_ISR, CHANGE);
    #else
      // Not all used endstop/probe -pins can raise interrupts. Please deactivate ENDSTOP_INTERRUPTS or change the pin configuration!
      static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");

if I comment out
// Enable this feature if all enabled endstop pins are interrupt-capable.
// This will remove the need to poll the interrupt pins, saving many CPU cycles.
//#define ENDSTOP_INTERRUPTS_FEATURE

then the sketch compiles without any errors and I can upload it to the board., but as soon as I un-comment it, this error comes up.

I then went and started at the beginning, using the Example sketch for the A8 that comes with Marlin, I get the same error.

I have the TMC2208Stepper 0.25 installed in my library.

It was suggested to me by Marlin on Twitter to:

Comment out the sanity check. Some platforms incorrectly implemented our check for interrupt-capable pins as a runtime function instead of making it work in the preprocessor. The developers have been reprimanded.

but I have NO idea where to find this specific sanity check

I would be so great-full for assistance please!!

Thank you guys!
Re: ENDSTOP_INTERRUPTS feature error
November 03, 2019 04:08PM
No error actually posted and no configuration files....

Did you change the MOTHERBOARD to BOARD_MKS_GEN_13 in Configuration.h
Re: ENDSTOP_INTERRUPTS feature error
November 03, 2019 06:29PM
Also, ENDSTOP_INTERRUPTS_FEATURE is really not needed at all. By default Marlin only checks physical endstops while homing, and homing moves are blocking, so polling the endstops does not affect performance. The only case where ENDSTOP_INTERRUPTS_FEATURE makes sense is if you also set ENDSTOPS_ALWAYS_ON_DEFAULT.
Re: ENDSTOP_INTERRUPTS feature error
November 03, 2019 10:15PM
seem to be in the bug list now

[github.com]
Re: ENDSTOP_INTERRUPTS feature error
November 04, 2019 01:06AM
Quote
Dust
No error actually posted and no configuration files....

Did you change the MOTHERBOARD to BOARD_MKS_GEN_13 in Configuration.h

yes, when I was compiling it for the MKS board and changed to the Anet when I tried using the example that comes with Marlin.

Like I mentioned, I can load it to the MKS board when I comment out the ENDSTOP_INTERRUPTS_FEATURE without any problems

Edited 2 time(s). Last edit at 11/04/2019 01:10AM by Alter3go.
Re: ENDSTOP_INTERRUPTS feature error
November 04, 2019 01:19AM
Quote
MMcLure
Also, ENDSTOP_INTERRUPTS_FEATURE is really not needed at all. By default Marlin only checks physical endstops while homing, and homing moves are blocking, so polling the endstops does not affect performance. The only case where ENDSTOP_INTERRUPTS_FEATURE makes sense is if you also set ENDSTOPS_ALWAYS_ON_DEFAULT.


So I would be fine with leaving them commented out with a MKS board with standard mechanical endstops?
Re: ENDSTOP_INTERRUPTS feature error
November 04, 2019 01:24AM
Yip
Re: ENDSTOP_INTERRUPTS feature error
November 04, 2019 01:26AM
Quote
Dust
No error actually posted and no configuration files....

this is the error Arduino is displaying at the end when compiling

exit status 1
non-constant condition for static assertion

I have attached my configuration.h and the endstop_interrupts.h which the check is referring to.

This config file I have attached is based on the A8 example, which I will then adapt for the MKS board
Attachments:
open | download - Configuration.h (70.5 KB)
open | download - endstop_interrupts.h (10 KB)
Re: ENDSTOP_INTERRUPTS feature error
November 04, 2019 11:04AM
Quote
Dust
Yip
awesome news, will give that a go now
Sorry, only registered users may post in this forum.

Click here to login