-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
Add MKS UI option (TFT_LITTLE_VGL_UI) #18071
Add MKS UI option (TFT_LITTLE_VGL_UI) #18071
Conversation
Bugfix 2.0.x
Bugfix 2.0.x
Bugfix 2.0.x
Bugfix 2.0.x
Bugfix 2.0.x
LVGL looks promising. I'll be able to test this on a Robin Nano 1.2 once it passes checks 🙂 |
This looks interesting, especially if it can be used with any of the displays and microcontrollers supported by LVGL. I had been hoping that Marlin would support ILI9341 displays for a while. |
Gosh, seems we are quite a few to have LVGL running on our printers!!! |
Hmm, this is SPI based, right? |
@vivian-ng And, yes, our alfawise flavour is since a while using ili9341 |
@hobiseven ,we have implemented LVGL in both SPI interface and FSMC interface. |
Do any motherboards provide a breakout for the FSMC interface? |
@makerbase-mks |
Did some cleanup. A few more hours of code cleanup will be needed. |
@makerbase-mks Is this implementation generic? Such that I can test it by defining |
Marlin/src/HAL/STM32F1/../../inc/SanityCheck.h:691:4: error: #error "CUSTOM_STATUS_SCREEN_IMAGE requires a Graphical LCD."
#error "CUSTOM_STATUS_SCREEN_IMAGE requires a Graphical LCD." Do Conditionals_LCD.h needs update? Or am I doing something wrong? I just changed from FSMC_GRAPHICAL_TFT to TFT_LITTLE_VGL_UI/SPI_GRAPHICAL_TFT, and it won't compile because of the graphical related defines I did. |
Even disable all the graphical "dependent" features, I can't compile it. Now there're references to a folder that doesn't exist. Or am I doing something wrong? |
The same for me... |
For a PR of this size and complexity, I prefer to leave it to the contributor to be the maintainer. We don't like to go on safaris to find bugs, so if there's some obvious typo causing a compile error, someone should drop us a set of Configuration files so we can just drop them into Marlin and compile to see the same error you see. Maybe it's easy to fix. |
Here's a ready-to-build branch to view said errors. I just put in PR #18401 to address the file include errors, but there are others that I'm unsure how to resolve (see PR for details). |
I could get it compiling. But I got linker errors too. |
I have a Robin Nano with TFT35 combo this LVGL PR is meant to run so I can easily test working code, but I couldn’t get it to compile before or after fixing the includes (again, see my PR for details). Here’s the error output from the linked PR: Log OutputCompiling .pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/printer_opration.cpp.o *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_about.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_change_speed.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_error_message.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_dialog.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_extrusion.cpp.o] Error 1 In file included from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h:48:0, from Marlin/src/lcd/extui/lib/mks_ui/draw_opration.cpp:27: Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:41: error: variable or field 'lv_draw_error_message' declared void extern void lv_draw_error_message(PGM_P const msg); ^~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:35: error: 'PGM_P' was not declared in this scope extern void lv_draw_error_message(PGM_P const msg); ^~~~~ *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_language.cpp.o] Error 1 In file included from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h:48:0, from Marlin/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp:27: Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:41: error: variable or field 'lv_draw_error_message' declared void extern void lv_draw_error_message(PGM_P const msg); ^~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:35: error: 'PGM_P' was not declared in this scope extern void lv_draw_error_message(PGM_P const msg); ^~~~~ *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_opration.cpp.o] Error 1 In file included from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h:48:0, from Marlin/src/lcd/extui/lib/mks_ui/draw_printing.cpp:27: Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:41: error: variable or field 'lv_draw_error_message' declared void extern void lv_draw_error_message(PGM_P const msg); ^~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:35: error: 'PGM_P' was not declared in this scope extern void lv_draw_error_message(PGM_P const msg); ^~~~~ In file included from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h:48:0, from Marlin/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp:36: Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:41: error: variable or field 'lv_draw_error_message' declared void extern void lv_draw_error_message(PGM_P const msg); ^~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:35: error: 'PGM_P' was not declared in this scope extern void lv_draw_error_message(PGM_P const msg); ^~~~~ *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_preHeat.cpp.o] Error 1 In file included from Marlin/src/lcd/extui/lib/mks_ui/draw_ui.h:48:0, from Marlin/src/lcd/extui/lib/mks_ui/draw_tool.cpp:27: Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:41: error: variable or field 'lv_draw_error_message' declared void extern void lv_draw_error_message(PGM_P const msg); ^~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_error_message.h:28:35: error: 'PGM_P' was not declared in this scope extern void lv_draw_error_message(PGM_P const msg); ^~~~~ *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_printing.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_ready_print.cpp.o] Error 1 *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_tool.cpp.o] Error 1 Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp:49:1: error: 'CFG_ITMES' does not name a type CFG_ITMES gCfgItems; ^~~~~~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp:50:1: error: 'UI_CFG' does not name a type UI_CFG uiCfg; ^~~~~~ Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp:51:1: error: 'DISP_STATE_STACK' does not name a type; did you mean 'SPI_STATE_READY'? DISP_STATE_STACK disp_state_stack; ^~~~~~~~~~~~~~~~ SPI_STATE_READY Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp:52:1: error: 'DISP_STATE' does not name a type; did you mean 'LS_DATE'? DISP_STATE disp_state = MAIN_UI; ^~~~~~~~~~ LS_DATE Marlin/src/lcd/extui/lib/mks_ui/draw_ui.cpp:53:1: error: 'DISP_STATE' does not name a type; did you mean 'LS_DATE'? DISP_STATE last_disp_state; ^~~~~~~~~~ LS_DATE compilation terminated due to -fmax-errors=5. *** [.pio/build/mks_robin_nano35/src/src/lcd/extui/lib/mks_ui/draw_ui.cpp.o] Error 1 |
@thisiskeithb great. I will push my branch so you can test. Reach me in marlin discord, if you want. rhapsodyv |
Add LVGL GUI library for MKS Robin Nano.