Marlin compiler error

Hi,

some months ago I compiled Marlin 2 on a Windows 7 notebook with an unknown Arduino version (ATmega 2560) without any issues.
Now I tried to verify the same sketch on a Windows 10 notebook and Arduino 1.8.19 but it fails with this error:
pasting "/ beeper*/" and "_RPORT" does not give a valid preprocessing token*

Can someone help please how I can fix this?

Br, Michael

Welcome to the forum

Please post the full error message in code tags

the complete error message is:











In file included from C:\Users\Michael\Desktop\Marlin\HAL.h:33:0,
                 from C:\Users\Michael\Desktop\Marlin\MarlinConfig.h:39,
                 from C:\Users\Michael\Desktop\Marlin\ultralcd.cpp:23:
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:84:39: note: in definition of macro '_TOGGLE'
 #define _TOGGLE(IO)           (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN))
                                       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:62:7: note: in expansion of macro 'TOGGLE'
       TOGGLE(BEEPER_PIN);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:62:14: note: in expansion of macro 'BEEPER_PIN'
       TOGGLE(BEEPER_PIN);
              ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:84:65: note: in definition of macro '_TOGGLE'
 #define _TOGGLE(IO)           (DIO ## IO ## _RPORT = _BV(DIO ## IO ## _PIN))
                                                                 ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:62:7: note: in expansion of macro 'TOGGLE'
       TOGGLE(BEEPER_PIN);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:62:14: note: in expansion of macro 'BEEPER_PIN'
       TOGGLE(BEEPER_PIN);
              ^
In file included from C:\Users\Michael\Desktop\Marlin\HAL.h:33:0,
                 from C:\Users\Michael\Desktop\Marlin\MarlinConfig.h:39,
                 from C:\Users\Michael\Desktop\Marlin\ultralcd.cpp:23:
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:82:48: note: in definition of macro '_WRITE'
 #define _WRITE(IO,V)          do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)
                                                ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:72:21: note: in definition of macro '_WRITE_NC'
   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                     ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:72:42: note: in definition of macro '_WRITE_NC'
   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                                          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:73:21: note: in definition of macro '_WRITE_NC'
   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                     ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:73:42: note: in definition of macro '_WRITE_NC'
   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                                          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:77:30: note: in definition of macro '_WRITE_C'
   uint8_t port_bits = DIO ## IO ## _WPORT;                  /* Get a mask from the current port bits */ \
                              ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:79:10: note: in definition of macro '_WRITE_C'
   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:79:48: note: in definition of macro '_WRITE_C'
   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
                                                ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, LOW);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:70:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, LOW);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:82:48: note: in definition of macro '_WRITE'
 #define _WRITE(IO,V)          do{ if (&(DIO ## IO ## _RPORT) < (uint8_t*)0x100) _WRITE_NC(IO,V); else _WRITE_C(IO,V); }while(0)
                                                ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:72:21: note: in definition of macro '_WRITE_NC'
   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                     ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:72:42: note: in definition of macro '_WRITE_NC'
   if (V) SBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                                          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:73:21: note: in definition of macro '_WRITE_NC'
   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                     ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:73:42: note: in definition of macro '_WRITE_NC'
   else   CBI(DIO ## IO ## _WPORT, DIO ## IO ## _PIN); \
                                          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_WPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:77:30: note: in definition of macro '_WRITE_C'
   uint8_t port_bits = DIO ## IO ## _WPORT;                  /* Get a mask from the current port bits */ \
                              ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:79:10: note: in definition of macro '_WRITE_C'
   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
          ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:79:48: note: in definition of macro '_WRITE_C'
   DIO ## IO ## _RPORT = port_bits & _BV(DIO ## IO ## _PIN); /* Atomically toggle the output port bits */ \
                                                ^
C:\Users\Michael\Desktop\Marlin\fastio.h:94:31: note: in expansion of macro '_WRITE'
 #define WRITE(IO,V)           _WRITE(IO,V)
                               ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:7: note: in expansion of macro 'WRITE'
       WRITE(BEEPER_PIN, HIGH);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:78:13: note: in expansion of macro 'BEEPER_PIN'
       WRITE(BEEPER_PIN, HIGH);
             ^
In file included from C:\Users\Michael\Desktop\Marlin\HAL.h:33:0,
                 from C:\Users\Michael\Desktop\Marlin\MarlinConfig.h:39,
                 from C:\Users\Michael\Desktop\Marlin\ultralcd.cpp:23:
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_DDR" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:87:42: note: in definition of macro '_SET_OUTPUT'
 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
                                          ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:95:7: note: in expansion of macro 'SET_OUTPUT'
       SET_OUTPUT(BEEPER_PIN);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:95:18: note: in expansion of macro 'BEEPER_PIN'
       SET_OUTPUT(BEEPER_PIN);
                  ^
pins_RAMPS.h:585:34: error: pasting "/* beeper*/" and "_PIN" does not give a valid preprocessing token
   #define BEEPER_PIN          37 // beeper
                                  ^
C:\Users\Michael\Desktop\Marlin\fastio.h:87:61: note: in definition of macro '_SET_OUTPUT'
 #define _SET_OUTPUT(IO)       SBI(DIO ## IO ## _DDR, DIO ## IO ## _PIN)
                                                             ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:95:7: note: in expansion of macro 'SET_OUTPUT'
       SET_OUTPUT(BEEPER_PIN);
       ^
C:\Users\Michael\Desktop\Marlin\buzzer.h:95:18: note: in expansion of macro 'BEEPER_PIN'
       SET_OUTPUT(BEEPER_PIN);
                  ^
In file included from C:\Users\Michael\Desktop\Marlin\ultralcd.cpp:96:0:
ultralcd_impl_DOGM.h:46:20: fatal error: U8glib.h: No such file or directory
 #include <U8glib.h>
                    ^
compilation terminated.
exit status 1
pasting "/* beeper*/" and "_RPORT" does not give a valid preprocessing token

found the problem: I forgott to installe U8glib

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.