Open 3DSmitty opened 1 year ago
A standard implementation is being worked on:
Lack of watchdog support from MKS is a bit concerning since that requires you to disable this key safety feature for this board/LPC5528 HAL.
Broken src/HAL/platform.h
#elif 1
#define HAL_PATH(PATH, NAME) XSTR(PATH/LPC5528/NAME)
#ifndef HAS_LPC55XX
#define HAS_LPC55XX // set define with LPC5528 and LPC5516 for MKS
#endif
everything after here is ignored..
This is a nasty thing to do...
@thisiskeithb Hi Keith! Very Happy to hear that! The HAL code seems very different compared to the other NXP chips...
@ellensp Yes I noticed that....ugh.
They also hacked this in MKS_OWL/Marlin/src/MarlinCore.cpp
inline void finishSDPrinting() {
if (marlin_state == MF_SD_COMPLETE) {
if (once_flag == 0) {
stop_print_time();
flash_preview_begin = false;
default_preview_flg = false;
clear_cur_ui();
lv_draw_dialog(DIALOG_TYPE_FINISH_PRINT);
once_flag = true;
#if HAS_SUICIDE
if (gCfgItems.finish_power_off) {
gcode.process_subcommands_now(F("M1001"));
queue.inject(F("M81"));
marlin_state = MF_RUNNING;
}
#endif
}
}
if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued
marlin_state = MF_RUNNING; // Signal to stop trying
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
}
}
Which breaks if you try to define a different type of LCD screen.
The original code looks like:
inline void finishSDPrinting() {
if (queue.enqueue_one(F("M1001"))) { // Keep trying until it gets queued
marlin_state = MF_RUNNING; // Signal to stop trying
TERN_(PASSWORD_AFTER_SD_PRINT_END, password.lock_machine());
TERN_(DGUS_LCD_UI_MKS, ScreenHandler.SDPrintingFinished());
}
}
After building this board in VSCode / PlatformIO I an unable to build any other board / any version of marlin. Every platform can not be found. I had to uninstall everything and re-install to be able to build marlin again. This firmware is very disappointing full of many bugs. I am going back to SGEN L until this firmware can be fixed.