Please Help me get this Firmware to compile

Hi Everyone,
I am very new and inexperienced with Arduino IDE and coding in general, so please forgive my lack of knowledge.
I have installed a Ramps 1.4/Arduino 2560 kit with reprap discount graphic controller to my Printrbot Simple Metal and Im trying to compile firmware for this board. I spent 3 weeks working on Marlin error messages and have given up and moved on to Repetier. I have used the online Repetier configuration tool and on my second attempt I am having the following error message on Arduino IDE when attempting to compile.

Arduino: 1.8.15 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Configuration.h:41:0,

             from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Repetier.h:198,

             from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Repetier.ino:151:

pins.h:395:24: error: missing binary operator before token "18"

#define ORIG_Z_MIN_PIN 18

                    ^

C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Repetier.h:264:36: note: in expansion of macro 'ORIG_Z_MIN_PIN'

#if FEATURE_Z_PROBE && Z_PROBE_PIN ORIG_Z_MIN_PIN

                                ^

exit status 1

missing binary operator before token "18"

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

I opened the pins.h file and I dont see any obvious errors, but Im not too knowledgeable with this stuff. I deleted the line of code in question and retyped it with no success. I also need to know how to fix the z probe issue. I am using an inductive sensor as the z probe and its using the z min pin connector on the Ramps 1.4.

Apparently I cannot upload the file into this post because Im a new user. Can someone let me know the appropriate way to add this file so that you all may see it? thanks

Hi,

I'm not quite sure but it looks like a missing operand in fact, try to see me as I do:

Let's replace variable names with var1 var2 and var3

The line says: if var1 && var2 var3

The && is a boolean operator, see this link.

So to me, it's missing a operator between the var2 and var3... I can't tell what it is but try maybe a && ?

Hope you understand the problem better.

post the entire code using </>

I don't think that is practical in this case. 3D Printer firmware is often thousands of lines of code spread over dozens of files. Do you really want to go through all of it to figure out what the missing operator is?

#if FEATURE_Z_PROBE && Z_PROBE_PIN    ORIG_Z_MIN_PIN
                                     ^

should there be an && before "ORIG_Z..."

Ill try to copy and paste the segments of code with which Im having errors, maybe something will stand out.

#ifdef RAMPS_V_1_3

#define ORIG_X_STEP_PIN 54
#define ORIG_X_DIR_PIN 55
#define ORIG_X_ENABLE_PIN 38
#define ORIG_X_MIN_PIN 3
#define ORIG_X_MAX_PIN 2

#define ORIG_Y_STEP_PIN 60
#define ORIG_Y_DIR_PIN 61
#define ORIG_Y_ENABLE_PIN 56
#define ORIG_Y_MIN_PIN 14
#define ORIG_Y_MAX_PIN 15

#define ORIG_Z_STEP_PIN 46
#define ORIG_Z_DIR_PIN 48
#define ORIG_Z_ENABLE_PIN 62
#define ORIG_Z_MIN_PIN 18
#define ORIG_Z_MAX_PIN 19

Error message for this states "missing binary operator before token "18"

Ok, not sure if its going to work properly but I went to that line and deleted the space between "ORIG_Z_MIN_PIN" and "18" and that error is now gone. Now I have only one error left to correct. Here's the code:

#if FEATURE_Z_PROBE && Z_PROBE_PIN ORIG_Z_MIN_PIN
#error You need to define Z_PROBE_PIN to use z probe!
#endif

Heres the error:
Arduino: 1.8.15 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Repetier.ino:151:0:

Repetier.h:264:36: error: missing binary operator before token "ORIG_Z_MIN_PIN"

#if FEATURE_Z_PROBE && Z_PROBE_PIN ORIG_Z_MIN_PIN

                                ^

exit status 1

missing binary operator before token "ORIG_Z_MIN_PIN"

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

I am about to try to insert the && to see if that will fix it.

Ok, when I change that line to Z_PROBE_PIN && ORIG_Z_MIN_PIN , The original error disappears and I then get a new error message with a different line of code. Here it is:

#define SENSITIVE_PINS                                                                                       \
  {                                                                                                          \
    0, 1, ORIG_X_STEP_PIN, ORIG_X_DIR_PIN, ORIG_X_ENABLE_PIN, ORIG_X_MIN_PIN, ORIG_X_MAX_PIN,                \
        ORIG_Y_STEP_PIN, ORIG_Y_DIR_PIN, ORIG_Y_ENABLE_PIN, ORIG_Y_MIN_PIN, ORIG_Y_MAX_PIN, ORIG_Z_STEP_PIN, \
        ORIG_Z_DIR_PIN, ORIG_Z_ENABLE_PIN, ORIG_Z_MIN_PIN, ORIG_Z_MAX_PIN, LED_PIN, ORIG_PS_ON_PIN,          \
        HEATER_0_PIN, HEATER_1_PIN, /*ORIG_FAN_PIN,*/ E0_PINS E1_PINS E2_PINS TEMP_0_PIN, TEMP_1_PIN, SDSS   \
  }

Here is the error message I receive
Arduino: 1.8.15 (Windows 8.1), Board: "Arduino/Genuino Mega or Mega 2560, ATmega2560 (Mega 2560)"

In file included from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Configuration.h:41:0,

             from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Repetier.h:198,

             from C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Commands.cpp:22:

pins.h:3351:44: error: 'ORIG_Z_MIN_PIN' was not declared in this scope

     ORIG_Z_DIR_PIN, ORIG_Z_ENABLE_PIN, ORIG_Z_MIN_PIN, ORIG_Z_MAX_PIN, LED_PIN, ORIG_PS_ON_PIN,          \

                                        ^

C:\Users\Geoffrey\Desktop\3D Modeling and Printing Software\Firmware Files for Printrbot with Ramps 1.4\Repetier-Firmware\Repetier\Commands.cpp:24:41: note: in expansion of macro 'SENSITIVE_PINS'

const int8_t sensitive_pins[] PROGMEM = SENSITIVE_PINS; // Sensitive pin list for M42

                                     ^

exit status 1

'ORIG_Z_MIN_PIN' was not declared in this scope

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

More clear than what I said but same idea

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