Hello,
I am compiling Marlin bugfix-2.0.x for SKR v1.3 with TMC 2130, dual extruder E0 and E1,
getting errors during compilation:
Marlin/src/module/stepper_indirection.cpp:161:86: error: conflicting declaration 'TMCMarlin<TMC2130Stepper, 'E', '1', (AxisEnum)3> stepperE1' #define __TMC_SPI_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_CS_PIN, ST##_RSENSE, TMC_SW_MOSI, TMC_SW_MISO, TMC_SW_SCK)
any idea on this ?
thx
Please include your config files for testing.
Here are the config files
config.zip
thx
Config files aren't needed here as an improper configuration didn't cause this. A recent update to some macros broke a number of things.
https://github.com/MarlinFirmware/Marlin/commit/1c86fbc60bad74957c872cbd6bc87900a3f127d8
This also broke double extruders for TMC2208. Here is the problem:
stepper_indirection.cpp line 175
#if ENABLED(DISTINCT_E_FACTORS) && E_STEPPERS > 1
#define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E##AI)
#define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E##AI)
#else
#define TMC_SPI_DEFINE_E(AI) TMC_SPI_DEFINE(E##AI, E)
#define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E)
#endif
is incompatible with this marco in stepper_indirection.h lin 69
#define ____TMC_CLASS(MODEL, A, I, E) TMCMarlin<TMC##MODEL##Stepper, A, I, E>
#define ___TMC_CLASS(MODEL, A, I, E) ____TMC_CLASS(MODEL, A, I, E)
#define __TMC_CLASS(MODEL, A, I, E) ___TMC_CLASS(_##MODEL, A, I, E)
#define _TMC_CLASS(MODEL, L, E) __TMC_CLASS(MODEL, L, E)
#define TMC_CLASS(ST) _TMC_CLASS(ST##_DRIVER_TYPE, TMC_##ST##_LABEL, ST##_AXIS)
The macro in the .h expands like this:
_TMC_CLASS(E1_DRIVER_TYPE, TMC_E1_LABEL, E1_AXIS)
It can only give a declaration in the form of
TMC_UART_DEFINE(SW, E1, E1)
Whereas the macro in the .cpp line 59 is giving a declaration in the form of
TMC_UART_DEFINE(SW, E1, E)
So one of the two defines has to be changed. This is what is causing the conflicting declaration issue.
Marlin\src\module\stepper_indirection.cpp:167:86: error: conflicting declaration 'TMCMarlin<TMC2208Stepper, 'E', '1', (AxisEnum)3u> stepperE1'
#define TMC_UART_SW_DEFINE(IC, ST, L, AI) TMCMarlin<IC##Stepper, L, AI> stepper##ST(ST##_SERIAL_RX_PIN, ST##_SERIAL_TX_PIN, ST##_RSENSE, ST##_SERIAL_RX_PIN > -1)
^
Marlin\src\module\stepper_indirection.cpp:172:46: note: in expansion of macro 'TMC_UART_SW_DEFINE'
#define _TMC_UART_DEFINE(SWHW, IC, ST, AI) TMC_UART_##SWHW##_DEFINE(IC, ST, TMC_##ST##_LABEL, AI)
^
Marlin\src\module\stepper_indirection.cpp:173:41: note: in expansion of macro '_TMC_UART_DEFINE'
#define TMC_UART_DEFINE(SWHW, ST, AI) _TMC_UART_DEFINE(SWHW, ST##_DRIVER_TYPE, ST, AI##_AXIS)
^
Marlin\src\module\stepper_indirection.cpp:180:41: note: in expansion of macro 'TMC_UART_DEFINE'
#define TMC_UART_DEFINE_E(SWHW, AI) TMC_UART_DEFINE(SWHW, E##AI, E)
^
Marlin\src\module\stepper_indirection.cpp:376:7: note: in expansion of macro 'TMC_UART_DEFINE_E'
TMC_UART_DEFINE_E(SW, 1);
^
In file included from Marlin\src\module\stepper_indirection.cpp:34:0:
Marlin\src\module\stepper_indirection.h:398:26: note: previous declaration as 'TMCMarlin<TMC2208Stepper, 'E', '1', (AxisEnum)4u> stepperE1'
extern TMC_CLASS(E1) stepperE1;
^
Marlin\src\module\temperature.cpp: In static member function 'static bool Temperature::wait_for_hotend(uint8_t, bool)':
Marlin\src\module\temperature.cpp:2909:35: warning: variable 'first_loop' set but not used [-Wunused-but-set-variable]
bool wants_to_cool = false, first_loop = true;
^
*** [.pioenvs\megaatmega2560\src\src\module\stepper_indirection.cpp.o] Error 1
Hello,
from the error seems something like that.
Ok, so I will wait for a bug fix.
Any idea if someone is working on it?
thx, and great support !
I am working on it.
Fix added to https://github.com/MarlinFirmware/Marlin/pull/14134. Just waiting for Travis checks to complete.
Cool, I'll stop working on it then.
I can test it when ready, thx again!
That fixed it.
ok so I just need to download the marlin again?
thx
I was feeling impatient so I copy pasted from here:
Otherwise once the commit is pushed all the way you can use the desktop client or command line to get the latest code. I recommend against downloading the zip file. It is much better to use the source control tools.
I will wait and use the source code tool, thx!
@biskero You can close the issue if the problem has been fixed in the recent changes to the firmware.
great, I compiled yesterday and worked!
thx a lot for the support!
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.