MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.3k stars 19.25k forks source link

[BUG] not compiling skr e3 dip TMC2208 #14892

Closed UncleBansh closed 5 years ago

UncleBansh commented 5 years ago

compile errors

Linking .pio\build\BIGTREE_SKR_MINI\firmware.elf .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::read()': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:331: multiple definition ofSoftwareSerial::read()' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:44: first defined here .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::available()': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:340: multiple definition ofSoftwareSerial::available()' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:40: first defined here .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::flush()': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:362: multiple definition ofSoftwareSerial::flush()' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:50: first defined here .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::write(unsigned char)': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:343: multiple definition ofSoftwareSerial::write(unsigned char)' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:48: first defined here .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::stopListening()': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:133: multiple definition ofSoftwareSerial::stopListening()' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:57: first defined here .pio\build\BIGTREE_SKR_MINI\liba72\libTMCStepper.a(SW_UART.cpp.o): In function SoftwareSerial::listen()': c:\Marlin/.pio\libdeps\BIGTREE_SKR_MINI\TMCStepper\src\source/SW_UART.cpp:114: multiple definition ofSoftwareSerial::listen()' .pio/build/BIGTREE_SKR_MINI/src/src/HAL/HAL_STM32F1/SoftwareSerial.cpp.o:c:\Marlin/Marlin\src\HAL\HAL_STM32F1/SoftwareSerial.cpp:53: first defined here collect2.exe: error: ld returned 1 exit status *** [.pio\build\BIGTREE_SKR_MINI\firmware.elf] Error 1

tpruvot commented 5 years ago

i dont see any SW_UART.cpp in https://github.com/teemuatlut/TMCStepper/tree/master/src/source

UncleBansh commented 5 years ago

I use this lib https://github.com/bigtreetech/TMCStepper

i dont see any SW_UART.cpp in https://github.com/teemuatlut/TMCStepper/tree/master/src/source

tpruvot commented 5 years ago

ok, so.. try this for now... (ignore the .py stuff) https://github.com/MarlinFirmware/Marlin/pull/14893/files

tpruvot commented 5 years ago

We only start this sotfware serial.. nice to see some code is already made...

UncleBansh commented 5 years ago

change platformio.ini [env:BIGTREE_SKR_MINI] -DDEBUG_LEVEL=0 to -DDEBUG_LEVEL=0 -DHAVE_SW_SERIAL

and Marlin\src\HAL\HAL_STM32F1\SoftwareSerial.cpp 19 string to #if defined(__STM32F1__) && !defined(HAVE_SW_SERIAL)

compiling with this fine. but cant check work on the board for now

tpruvot commented 5 years ago

its a good start..

UncleBansh commented 5 years ago

one more compile bug(

Marlin\src\lcd\ultralcd.cpp: In static member function 'static void MarlinUI::update()': Marlin\src\lcd\ultralcd.cpp:767:9: error: 'touch_buttons' was not declared in this scope if (touch_buttons) { ^~~~~ Marlin\src\lcd\ultralcd.cpp:767:9: note: suggested alternative: 'update_buttons' if (touch_buttons) { ^~~~~ update_buttons Marlin\src\lcd\ultralcd.cpp:805:5: error: 'else' without a previous 'if' else wait_for_unclick = false; ^~~~ *** [.pio\build\BIGTREE_SKR_MINI\src\src\lcd\ultralcd.cpp.o] Error 1

sl1pkn07 commented 5 years ago

thats is other error unrelated to this bug

https://github.com/MarlinFirmware/Marlin/pull/14912

UncleBansh commented 5 years ago

change platformio.ini [env:BIGTREE_SKR_MINI] -DDEBUG_LEVEL=0 to -DDEBUG_LEVEL=0 -DHAVE_SW_SERIAL

check on board. all works fine somebody can add this in pull request? this looks like a fix of compiling for skr mini and skr e3. then it can be closed. thanx.

tpruvot commented 5 years ago

the -DHAVE_SW_SERIAL is only when you add the lib, the custom TMCStepper lib from BIQ is not used in current platformio.ini

UncleBansh commented 5 years ago

the -DHAVE_SW_SERIAL is only when you add the lib, the custom TMCStepper lib from BIQ is not used in current platformio.ini

Okey. can be closed. thank you alot

github-actions[bot] commented 4 years ago

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.