Skip to content
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

Fix MKS LVGL includes #18401

Conversation

thisiskeithb
Copy link
Member

@thisiskeithb thisiskeithb commented Jun 24, 2020

Requirements

MKS Robin Nano with "dumb" TFT35: env:mks_robin_nano35 and TFT_LITTLE_VGL_UI.

Description

This PR corrects some include path errors in MKS' LVGL UI. Compiling still results in a bunch of errors, but at least the includes have been fixed:

Log Output
Compiling .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

Here's a ready-to-build branch for a Tevo Nereus with LVGL enabled to view/test said errors.

Benefits

This will start to get the ball rolling on successfully compiling for MKS' new LVGL UI on a Robin Nano + TFT35.

Related Issues

PR #18071

@thisiskeithb thisiskeithb marked this pull request as draft June 24, 2020 06:46
@thisiskeithb thisiskeithb added Needs: Work More work is needed S: Don't Merge Work in progress or under discussion. labels Jun 24, 2020
@thisiskeithb
Copy link
Member Author

thisiskeithb commented Jun 24, 2020

This board/LCD combo is used in the Tevo Nereus, which we have a config for, but to get it into Marlin originally, we had to use FSMC_GRAPHICAL_TFT and TOUCH_BUTTONS (and users lost the original "MKS UI" that TFT_LITTLE_VGL_UI now replaces).

Would it make sense to create a copy of the config and call it "Tevo Nereus LVGL" so users have a choice? It'd allow us to easily add it to the CI tests at least.

I basically have the "Tevo Nereus LVGL" config ready to go as mentioned in the above post, but I had to disable a bunch of features like ADVANCED_PAUSE_FEATURE/etc. since it wouldn't pass sanity checks. I haven't looked into if sanity checks needed to be updated or if they are in fact, no longer compatible when LVGL is enabled.

@thisiskeithb thisiskeithb removed Needs: Work More work is needed S: Don't Merge Work in progress or under discussion. labels Jun 24, 2020
@thisiskeithb
Copy link
Member Author

Superseded by #18410.

@thisiskeithb thisiskeithb deleted the pr/fix_mks_lvgl_includes branch June 24, 2020 23:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant