garychen99 / D9MK2

D9Mk2 Source Code
GNU General Public License v3.0
5 stars 1 forks source link

This Error is occurs while compiling the sketch #2

Open jayjoshi008 opened 4 years ago

jayjoshi008 commented 4 years ago

Arduino: 1.8.13 (Windows Store 1.8.39.0) (Windows 10), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

sketch\Marlin_main.cpp: In function 'void mySetupApi()':

Marlin_main.cpp:10810:9: error: non-constant condition for static assertion

     static_assert(digitalPinToPCICR(POW_BREAK_CHECK_PIN) != NULL, "POW_BREAK_CHECK_PIN is not interrupt-capable");

     ^~~~~~~~~~~~~

In file included from C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.39.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\cores\arduino/Arduino.h:258:0,

             from sketch\MarlinConfig.h:14,

             from sketch\Marlin.h:12,

             from sketch\Marlin_main.cpp:1:

C:\Program Files\WindowsApps\ArduinoLLC.ArduinoIDE_1.8.39.0_x86__mdqgnx93n4wtt\hardware\arduino\avr\variants\mega/pins_arduino.h:92:67: error: reinterpret_cast from integer to pointer

                               (((p) >= 62) && ((p) <= 69)) ? (&PCICR) : ((uint8_t *)0) )

                                                              ~^~~~~~~

sketch\Marlin_main.cpp:10810:23: note: in expansion of macro 'digitalPinToPCICR'

     static_assert(digitalPinToPCICR(POW_BREAK_CHECK_PIN) != NULL, "POW_BREAK_CHECK_PIN is not interrupt-capable");

                   ^~~~~~~~~~~~~~~~~

exit status 1

non-constant condition for static assertion

This report would have more information with "Show verbose output during compilation" option enabled in File -> Preferences.

Dan-Rdd commented 2 years ago

use the older Arduino IDE 1.6.12 to compile without errors :)