DEV2 not compiling with default_envs = skr_mini_e3_v2_0

When I tryed to compile dev2 (https://github.com/repetier/Repetier-Firmware/commit/5ccc18ad0790f21979d6387f0fcc482c69aa4083) without adjusts, its finalized OK. But, when I changed default_envs = skr_mini_e3_v2_0 in platform.io and #define MOTHERBOARD MOTHERBOARD_E3_MINI_V2_0 in Configuration.h, I had compile failure:

In file included from src/boards/pins.h:121,
                 from src/Configuration.h:171,
                 from src/Repetier.h:302,
                 from src/PrinterTypes/PrinterTypeCartesian.cpp:19:
src/boards/STM32F1/HAL.h:141:34: error: pasting "GPIO_" and "-" does not give a valid preprocessing token
  141 |             LL_GPIO_SetOutputPin(GPIO_##port, GPIO_##port##_MASK); \
      |                                  ^~~~~
src/boards/STM32F1/HAL.h:157:23: note: in expansion of macro '_WRITE'
  157 | #define WRITE(pin, v) _WRITE(pin, v)
      |                       ^~~~~~
src/io/io_output.h:57:17: note: in expansion of macro 'WRITE'
   57 |                 WRITE(pin, 1); \
      |                 ^~~~~
src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
   52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
      | ^~~~~~~~~
src/boards/STM32F1/HAL.h:141:47: error: pasting "GPIO_" and "-" does not give a valid preprocessing token
  141 |             LL_GPIO_SetOutputPin(GPIO_##port, GPIO_##port##_MASK); \
      |                                               ^~~~~
src/boards/STM32F1/HAL.h:157:23: note: in expansion of macro '_WRITE'
  157 | #define WRITE(pin, v) _WRITE(pin, v)
      |                       ^~~~~~
src/io/io_output.h:57:17: note: in expansion of macro 'WRITE'
   57 |                 WRITE(pin, 1); \
      |                 ^~~~~
src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
   52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
      | ^~~~~~~~~
src/boards/STM32F1/HAL.h:143:36: error: pasting "GPIO_" and "-" does not give a valid preprocessing token
  143 |             LL_GPIO_ResetOutputPin(GPIO_##port, GPIO_##port##_MASK); \
      |                                    ^~~~~
src/boards/STM32F1/HAL.h:157:23: note: in expansion of macro '_WRITE'
  157 | #define WRITE(pin, v) _WRITE(pin, v)
      |                       ^~~~~~
src/io/io_output.h:57:17: note: in expansion of macro 'WRITE'
   57 |                 WRITE(pin, 1); \
      |                 ^~~~~
src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
   52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
      | ^~~~~~~~~
src/boards/STM32F1/HAL.h:143:49: error: pasting "GPIO_" and "-" does not give a valid preprocessing token
  143 |             LL_GPIO_ResetOutputPin(GPIO_##port, GPIO_##port##_MASK); \
      |                                                 ^~~~~
src/boards/STM32F1/HAL.h:157:23: note: in expansion of macro '_WRITE'
  157 | #define WRITE(pin, v) _WRITE(pin, v)
      |                       ^~~~~~
src/io/io_output.h:57:17: note: in expansion of macro 'WRITE'
   57 |                 WRITE(pin, 1); \
      |                 ^~~~~
src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
   52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
      | ^~~~~~~~~
src/boards/STM32F1/HAL.h:141:34: error: pasting "GPIO_" and "-" does not give a valid preprocessing token
  141 |             LL_GPIO_SetOutputPin(GPIO_##port, GPIO_##port##_MASK); \
      |                                  ^~~~~
src/boards/STM32F1/HAL.h:157:23: note: in expansion of macro '_WRITE'
  157 | #define WRITE(pin, v) _WRITE(pin, v)
      |                       ^~~~~~
src/io/io_output.h:59:17: note: in expansion of macro 'WRITE'
   59 |                 WRITE(pin, 0); \
      |                 ^~~~~
src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
   52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)
      | ^~~~~~~~~
compilation terminated due to -fmax-errors=5.

Comments

  • If course not. The mini has much less pins and several pins used in the sample config do not exist for the e3 mini.
    Always if you see something like
    error: pasting "GPIO_

    think first that you are trying to use a pin name that does not exist. If you look into error development further down you see
    src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
       52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)

    So that comes from using ORIG_E1_STEP_PIN which is the step pin for second extruder and that board has only 1 extruder. So reduce NUM_TOOLS to 1 and remove all references to second extruder from configuration. Then it should start to compile.
  • Repetier said:
    If course not. The mini has much less pins and several pins used in the sample config do not exist for the e3 mini.
    Always if you see something like
    error: pasting "GPIO_

    think first that you are trying to use a pin name that does not exist. If you look into error development further down you see
    src/Configuration_io.h:52:1: note: in expansion of macro 'IO_OUTPUT'
       52 | IO_OUTPUT(IOE2Step, ORIG_E1_STEP_PIN)

    So that comes from using ORIG_E1_STEP_PIN which is the step pin for second extruder and that board has only 1 extruder. So reduce NUM_TOOLS to 1 and remove all references to second extruder from configuration. Then it should start to compile.
    Increrible, that works! Tks!
Sign In or Register to comment.