Welcome! Log In Create A New Profile

Advanced

Building marlin with newer gcc

Posted by murasame 
Building marlin with newer gcc
January 18, 2018 07:50AM
Hi all, I'm trying to build Marlin 1.1.8 with avr-gcc 7.2, latest avr-libc and ArduinoIDE 1.8.5.
During compilation process gcc throws this error:

non-constant condition for static assertion

on this define:

#define digitalPinToPCICR(p) ( (((p) >= 0) && ((p) <= 31)) ? (&PCICR) : ((uint8_t *)0) )

invoked by:

static_assert(digitalPinToPCICR(X_MIN_PIN) != NULL, "X_MIN_PIN is not interrupt-capable");
static_assert(digitalPinToPCICR(Y_MIN_PIN) != NULL, "Y_MIN_PIN is not interrupt-capable");
static_assert(digitalPinToPCICR(Z_MIN_PIN) != NULL, "Z_MIN_PIN is not interrupt-capable");

in file endstop_interrupts.h.

Question is, it's safe to comment-out these instructions ?
If I do it the build process complete fine and I have a nice increment in free space on the avr that let me enable some features I left behind with stock gcc version.

My board is the Anet-1.0 based on Atmel 1284p.

Thanks in advance guys.

EDIT: almost forgot, with stock gcc that comes with ArduinoIDE it builds fine so I think it's some stricter processing policy of newer gcc that cause the problem.

Edited 1 time(s). Last edit at 01/18/2018 07:57AM by murasame.
Sorry, only registered users may post in this forum.

Click here to login