-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] DWIN_CREALITY_LCD breaks MultiSerial #22299
Comments
Please attach your configuration files. |
Any configuration with DWIN LCD and MultiSerial fails. It can be easily reproduced using Configurations/config/examples/Creality/Ender-3 V2 with --- a/Marlin/Configuration.h
+++ b/Marlin/Configuration.h
@@ -123,7 +125,7 @@
* Currently Ethernet (-2) is only supported on Teensy 4.1 boards.
* :[-2, -1, 0, 1, 2, 3, 4, 5, 6, 7]
*/
-//#define SERIAL_PORT_2 -1
+#define SERIAL_PORT_2 2 |
Yes I can reproduce the original error.. But your diff to fix it, I cant replicate a compile at all. |
With
It would compile if you changed: --- a/Marlin/src/inc/Conditionals_LCD.h
+++ b/Marlin/src/inc/Conditionals_LCD.h
@@ -1076,7 +1076,7 @@
#endif
#if ENABLED(DWIN_CREALITY_LCD)
- #define SERIAL_CATCHALL 0
+ #define SERIAL_CATCHALL 2
#ifndef LCD_SERIAL_PORT
#define LCD_SERIAL_PORT 3 // Creality 4.x board
#endif It is defined for I would suggest a fix, but I don't know what |
Bump... with people using the DWIN_CREALITY_LCD on more and more hardware, this is becoming more of an issue |
Bump env STM32F103RC_btt_maple
if i disable serial port 2 it works but i want the second serial for my raspberry pi |
Let me try to follow the bouncing ball and try to make sense of this. This concept comes from #21336 by @X-Ryl669 and the value of // Hook Meatpack if it's enabled on the second leaf
#if ENABLED(MEATPACK_ON_SERIAL_PORT_2)
typedef MeatpackSerial<decltype(_SERIAL_LEAF_2)> SerialLeafT2;
extern SerialLeafT2 mpSerial2;
#define SERIAL_LEAF_2 mpSerial2
#else
#define SERIAL_LEAF_2 _SERIAL_LEAF_2
#endif Later, Should Or, is there some other condition, and the It's a lot to review and try to make sense of, but the fix is probably something simple. |
What is the expected port to use in those printer ? I think it can be removed and the proper serial port declared and used instead. @thinkyhead Can you explain what it was used for initially ? |
Bumping this, as is still an issue. |
As you suggested, fixed to compile issue for me, cannot test until i get everything assembled. |
Is there a fix for this yet ? I cant compile without multiSerial errors when enabling a second Serial Port |
Just a quick update it seems like PlatformIO wasn't clearing / updating when re-compiling even when using the clean all function. However after removing and re-installing PlatformIO disabling the SERIAL_CATCHALL 0 has done the trick. Main build 02000902) |
Only a single SERIAL_PORT is in use as this is for the Creality LCD MarlinFirmware#22299
This comment was marked as off-topic.
This comment was marked as off-topic.
How does this even remotely solve this? That uses fairly specific options for a specific board and stepper driver setup. Disabling the second serial port, and setting the first one to -1 seems to allow me to at least compile the firmware, but it refuses to use the LCD on my printer. EDIT: Well, I found MY issue out. It was that I had the wrong LCD selected. |
Issue still exists |
Issue still exists as of 3/26/2023 with bugfix build. |
I'm still having the error compiling using bugfix 2.1.x as of 12/9/2023. I'm using #define MOTHERBOARD BOARD_BTT_SKR_V2_0_REV_B My error is the same as @yuuahmad:
Neither the changes suggested by @denis1482 nor @Xlaits fixes it for me. My fix was to fall back to 2.1.2.1. |
This issue is specifically about having #define SERIAL_PORT and #define SERIAL_PORT_2 with any of the UI for Ender-3 v2 OEM display. If you do not have two serial ports enabled in marlin, you have a different issue |
Issue still exists as of 5/12/2024 (Please help us) |
IIRC, try this: |
Hi folks - I wanted to chime in that I'm still experiencing this issue as well - I added a Big Tree Tech SKR Mini E3 v3 controller board to my Ender 3 v2, which in my case has the TJC version of the DWIN LCD (see this page about the stock Ender 3 v3 displays (link)). My goal was to connect a Raspberry Pi Zero 2 W via UART2 (the TFT port) to the SKR Mini E3 v3 for OctoPrint use. Using Miguel Risco-Castillo's excellent Ender 3 optimized firmware (link) and a rewired display cable, I can get the TJC / DWIN display working just fine. However, when I uncomment "#define SERIAL_PORT_2" and select any serial port (I've tried -1, 0, 1, 2 and 3), I get the same "Marlin/src/HAL/STM32/../../inc/../core/serial.h:72:26: error: 'MYSERIAL' was not declared in this scope; did you mean 'MYSERIAL2'?" error reported in #23889 (link). I'm currently running Marlin Bugfix-2.1.x from 12/17/2024 (the current version of Miguel Risco-Castillo's optimized firmware), but I've experienced the error with the nightly Bugfix-2.1.x as well. I went back to Miguel's version to eliminate any potential misconfigurations by me. Thanks for any help you can provide! |
hey @ryan-makes-it , could you provide your configuration files? You can try my fork of mriscoc's firmware because I may have solved that issue there. edit: try thisin Marlin/src/inc/Conditionals-2-LCD.h comment out #if ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, SOVOL_SV06_RTS)
- #define SERIAL_CATCHALL 0
#if ANY(HAS_DWIN_E3V2, IS_DWIN_MARLINUI, SOVOL_SV06_RTS)
+ //#define SERIAL_CATCHALL 0 but if you have however, I tried messing around, and using in .vscode/c_cpp_properties.json, there is this:
and there is that file here:
but I am getting the error that it cannot find this file. so it seems the issue stems from trying to build off a variant in the wrong directory. |
Did you test the latest
bugfix-2.0.x
code?Yes, and the problem still exists.
Bug Description
Compilation with multiple serial ports while having
DWIN_CREALITY_LCD
enabled results in a cascade of errors similar to this one:It happens because
SERIAL_CATCHALL
is set here to an integer:Marlin/Marlin/src/inc/Conditionals_LCD.h
Line 1079 in de38cae
And here it is expected to be a compatible Serial class instance:
Marlin/Marlin/src/core/serial.h
Line 93 in de38cae
I guess a simple fix like one below would help (it does compile).
Yet I'm not sure of the function on
SERIAL_CATCHALL
and how it should be defined properly.@thinkyhead it seems you added it in #17719, I can't find any other reference nor documentation.
I think it got broken in #21306, but I'm not sure if it worked before.
Bug Timeline
No response
Expected behavior
No response
Actual behavior
No response
Steps to Reproduce
No response
Version of Marlin Firmware
bugfix-2.0.x
Printer model
No response
Electronics
No response
Add-ons
No response
Your Slicer
No response
Host Software
No response
Additional information & file uploads
No response
The text was updated successfully, but these errors were encountered: