Compilation

Hello,

I'm using Arduino 1.6.7. and Repetier Firmware 0.92.8 (but I've tried several versions of Arduino) an I'm still getting thease errors :

Arduino: 1.6.7 (Windows 7), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from sketch\Repetier.h:475:0,

                 from sketch\HAL.cpp:1:

sketch\ui.h:1398:0: warning: "SDSUPPORT" redefined [enabled by default]

 #define SDSUPPORT 1

 ^

In file included from sketch\Repetier.h:190:0,

                 from sketch\HAL.cpp:1:

sketch\Configuration.h:469:0: note: this is the location of the previous definition

 #define SDSUPPORT 0

 ^

In file included from sketch\HAL.h:83:0,

                 from sketch\Repetier.h:468,

                 from sketch\HAL.cpp:1:

sketch\HAL.cpp: In function 'void __vector_22()':

fastio.h:29: error: 'DIOFAN2_PIN_WPORT' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                       ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:853:75: note: in expansion of macro 'WRITE'

   if((pwm_pos_set[PWM_FAN2] = (pwm_pos[PWM_FAN2] & COOLER_PWM_MASK)) > 0) WRITE(FAN2_PIN,1);

                                                                           ^

fastio.h:29: error: 'DIOFAN2_PIN_PIN' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                    ^

sketch\fastio.h:17:30: note: in definition of macro 'MASK'

  #define  MASK(PIN)    (1 << PIN)

                              ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:853:75: note: in expansion of macro 'WRITE'

   if((pwm_pos_set[PWM_FAN2] = (pwm_pos[PWM_FAN2] & COOLER_PWM_MASK)) > 0) WRITE(FAN2_PIN,1);

                                                                           ^

fastio.h:29: error: 'DIOFAN2_PIN_WPORT' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:853:75: note: in expansion of macro 'WRITE'

   if((pwm_pos_set[PWM_FAN2] = (pwm_pos[PWM_FAN2] & COOLER_PWM_MASK)) > 0) WRITE(FAN2_PIN,1);

                                                                           ^

fastio.h:29: error: 'DIOFAN2_PIN_PIN' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                                              ^

sketch\fastio.h:17:30: note: in definition of macro 'MASK'

  #define  MASK(PIN)    (1 << PIN)

                              ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:853:75: note: in expansion of macro 'WRITE'

   if((pwm_pos_set[PWM_FAN2] = (pwm_pos[PWM_FAN2] & COOLER_PWM_MASK)) > 0) WRITE(FAN2_PIN,1);

                                                                           ^

fastio.h:29: error: 'DIOFAN2_PIN_WPORT' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                       ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:966:92: note: in expansion of macro 'WRITE'

  if(pwm_pos_set[PWM_FAN2] == pwm_count_cooler && pwm_pos_set[PWM_FAN2] != COOLER_PWM_MASK) WRITE(FAN2_PIN,0);

                                                                                            ^

fastio.h:29: error: 'DIOFAN2_PIN_PIN' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                    ^

sketch\fastio.h:17:30: note: in definition of macro 'MASK'

  #define  MASK(PIN)    (1 << PIN)

                              ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:966:92: note: in expansion of macro 'WRITE'

  if(pwm_pos_set[PWM_FAN2] == pwm_count_cooler && pwm_pos_set[PWM_FAN2] != COOLER_PWM_MASK) WRITE(FAN2_PIN,0);

                                                                                            ^

fastio.h:29: error: 'DIOFAN2_PIN_WPORT' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:966:92: note: in expansion of macro 'WRITE'

  if(pwm_pos_set[PWM_FAN2] == pwm_count_cooler && pwm_pos_set[PWM_FAN2] != COOLER_PWM_MASK) WRITE(FAN2_PIN,0);

                                                                                            ^

fastio.h:29: error: 'DIOFAN2_PIN_PIN' was not declared in this scope

 #define  _WRITE(IO, v)   do { if (v) {DIO ##  IO ## _WPORT |= MASK(DIO ## IO ## _PIN); } else {DIO ##  IO ## _WPORT &= ~MASK(DIO ## IO ## _PIN); }; } while (0)

                                                                                                                              ^

sketch\fastio.h:17:30: note: in definition of macro 'MASK'

  #define  MASK(PIN)    (1 << PIN)

                              ^

sketch\fastio.h:48:25: note: in expansion of macro '_WRITE'

 #define  WRITE(IO, v)   _WRITE(IO, v)

                         ^

sketch\HAL.cpp:966:92: note: in expansion of macro 'WRITE'

  if(pwm_pos_set[PWM_FAN2] == pwm_count_cooler && pwm_pos_set[PWM_FAN2] != COOLER_PWM_MASK) WRITE(FAN2_PIN,0);

                                                                                            ^

exit status 1
'DIOFAN2_PIN_WPORT' was not declared in this scope

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

Comments

  • As you see from the error message you are using FAN2_PIN but your board does not define a second fan. So you need to set the exact digital pin number instead to use it.
  • Thank you for your fast reply... 

    I've changed it to pin 09 and it was succefully compiled and uploaded...

    But... My board (MicroMake V1.2, probably cusomized Arduino 2560 (ATMEGA2560 chip) stopped working completly... :(

    so I have to go back to Micromake firmware... 

    It some other way how to use ZCorrection in Repetier?

    ...clad

  • Never heard about the board. Is it pin compatible with something existing?

    I can only say about our firmware what we can. One important thing is to select the right board or you have nothing working
     and might even damage the board.
  • Its almost like this board http://reprap.org/wiki/MKS_MINI#USB_Driver

    but it have pins fot Hot bed and Second fan...
  • Basic pins seem identical but expansion ports may differ, at least the MKS seems to do so, so watch out for every external/new pins to use the correct D-pin number directly instead of named pins.
  • I was messing around with the Config.h and turned this on for some reason. #define FEATURE_FAN2_CONTROL 1, 0 is the right answer for my board. Maybe this will help someone else. Caused me to get the same compile error.
Sign In or Register to comment.