Skip to content

[WIP] Creality Ender-5 S1#25382

Open
thinkyhead wants to merge 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
thinkyhead:port_creality_ender5_s1_bugfix-2.1.x
Open

[WIP] Creality Ender-5 S1#25382
thinkyhead wants to merge 4 commits intoMarlinFirmware:bugfix-2.1.xfrom
thinkyhead:port_creality_ender5_s1_bugfix-2.1.x

Conversation

@thinkyhead
Copy link
Member

@thinkyhead thinkyhead commented Feb 14, 2023

Creality Ender-5 S1 adds support for a new Resistive Touch Screen controller and a new motherboard. Many code changes and a few new options are included to support the new controller.

The Ender-5 S1 is a cube-shaped machine with a standard X / Y gantry and Z bed, so it should be configurable with the existing firmware options, plus whatever is needed to interact with the UI on the RTS. This machine can have an optional Wi-Fi add-on, so there is some code to also support that component.

This PR is a work in progress, with the aim to make the Ender-5 S1 work with the basic Marlin firmware as closely as possible, and to fix up any eccentric or extraneous customizations to the firmware behavior.

At this time this code is not functioning correctly and the machine simply reboots. So, it needs to be fixed up, refined, and tested. The closer we can get to the basic Marlin code without the added customizations, the better. Some changes by Creality may actually fix or work around existing bugs, so may be worth keeping.

Calling all brave Ender-5 S1 users to help develop and test this implementation! It would be nice to improve the UI, which is definitely in a rough form. The machine also ships with aggressive acceleration so that should also be re-tuned in the configuration, along with enabling any other motion options that make it perform fast, but reliably.

Configurations (also work-in-progress) are posted at https://github.com/MarlinFirmware/Configurations/tree/import-2.1.x/config/examples/Creality/Ender-5%20S1

The TODO on this can be seen by looking at the code changes. The ultimate aim is to get any required behavioral changes to be conditional so they only apply to this machine (and any others that want those changes), and to integrate any required bug-fixes or behavioral improvements that make sense for all.

@InsanityAutomation
Copy link
Contributor

I don't have one, tiny machines is not planning on carrying them currently so they didn't send me one, my marketing contacts that have sent me machines direct in the past from Creality have all moved on, so even though it looks trivial I don't have any reason to put time into it. The code shown here is nearly identical to the problematic code I eliminated in the past from prior iterations. If someone provides a machine ill get it done but im not buying a machine to add to my workload and im not putting time into a machine i have no reason to.

@sbur83
Copy link

sbur83 commented Mar 17, 2023

Did you get the printer booting? I'm not a developer but am generally able to modify examples and compile custom firmware; I have a machine I'm happy to test with, the stock firmware is rubbish

@thinkyhead thinkyhead force-pushed the bugfix-2.1.x branch 6 times, most recently from 27df113 to 8d31429 Compare March 25, 2023 04:25
@ThomasToka
Copy link
Contributor

just for fun tried to compile this today. after adding several missing commits i end up on

c:/users/master/.platformio/packages/toolchain-gccarmnoneeabi@1.90201.191206/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/STM32F401RE_CREALITY/src/src/gcode/feature/leds/M224_M225.cpp.o: in function `GcodeSuite::M224()':
C:\Users\master\Downloads\Marlin-port_creality_ender5_s1_bugfix-2.1.x\Marlin-port_creality_ender5_s1_bugfix-2.1.x/Marlin\src\gcode\feature\leds/M224_M225.cpp:33: undefined reference to `RTSSHOW::RTS_SetLED(bool)'
c:/users/master/.platformio/packages/toolchain-gccarmnoneeabi@1.90201.191206/bin/../lib/gcc/arm-none-eabi/9.2.1/../../../../arm-none-eabi/bin/ld.exe: .pio/build/STM32F401RE_CREALITY/src/src/gcode/feature/leds/M224_M225.cpp.o: in function `GcodeSuite::M225()':
C:\Users\master\Downloads\Marlin-port_creality_ender5_s1_bugfix-2.1.x\Marlin-port_creality_ender5_s1_bugfix-2.1.x/Marlin\src\gcode\feature\leds/M224_M225.cpp:39: undefined reference to `RTSSHOW::RTS_SetLED(bool)'

Seems like RTS_SetLED is missing in leds gcode.

Do you have something in the works for this which maybe is a bit more recent to bugfix-2.1.x ?

@thinkyhead thinkyhead force-pushed the port_creality_ender5_s1_bugfix-2.1.x branch from cf57de8 to 185ab02 Compare April 1, 2023 04:16
@ThomasToka
Copy link
Contributor

ThomasToka commented Apr 4, 2023

hej @thinkyhead .

this time is was able to get a bit further.
as i dont have the board here i tried to compile it on #define MOTHERBOARD BOARD_CREALITY_V24S1_301F4.

installing binary and watching on terminal i see this:

Log Output
Recv: //action:notification Hardcoded Default Settings Loaded
Recv: echo:Hardcoded Default Settings Loaded
Recv: echo:Settings Stored (624 bytes; crc 44421)
Recv: //action:notification Settings Stored
Recv: //action:notification Settings Stored
Recv: echo:EEPROM Initialized
Recv: //action:prompt_end
Recv: BL24CXX Check succeeded!
Recv: Error:EEPROM datasize error.
WARNING! Received an error from the printer's firmware, ignoring that as configured but you might want to investigate what happened here! Error: EEPROM datasize error.
Recv: echo:Index: 618 Size: 624
Recv: //action:notification Hardcoded Default Settings Loaded
Recv: echo:Hardcoded Default Settings Loaded
Recv: echo:Settings Stored (624 bytes; crc 44421)
Recv: //action:notification Settings Stored
Recv: //action:notification Settings Stored
Recv: echo:EEPROM Initialized
Recv: bootloader SD card...
Recv: 
Recv: SD¿¨ÖÐûÓÐupdate.binÎļþ
Recv: IAP_UpdateAppName is firmware-20230404-204716.bin
Recv: BIN data can use ...
Recv: IAP_CurrentAppName firmware-20230404-204716.bin
Recv: IAP_UpdateAppName firmware-20230404-204716.bin
Recv: Don not Need to updata app...
Recv: start
Recv:  Watchdog Reset
Recv: Marlin bugfix-2.1.x
Recv: 
Recv: echo: Last Updated: 2023-04-01 | Author: (none, default config)
Recv: echo: Compiled: Apr  4 2023 20:37:44
Recv: echo: Free Memory: 55735  PlannerBufferBytes: 1792
Recv: Error:EEPROM datasize error.
WARNING! Received an error from the printer's firmware, ignoring that as configured but you might want to investigate what happened here! Error: EEPROM datasize error.
Recv: echo:Index: 618 Size: 624

hardware failure or can i or you adjust something in order to make it work?

@thinkyhead thinkyhead force-pushed the port_creality_ender5_s1_bugfix-2.1.x branch 2 times, most recently from b31e097 to cf506ff Compare May 3, 2023 00:00
@thinkyhead
Copy link
Member Author

thinkyhead commented May 3, 2023

#ifdef TARGET_STM32F4
  #define DWIN_SERIAL Serial1
#else
  #define DWIN_SERIAL LCD_SERIAL
#endif

@InsanityAutomation — I'm curious about the LCD_SERIAL port used on the STM32F4 versus the F1. It would be good to remove the override that forces it to be Serial1 on the F4 and just make it a Configuration.h setting for the LCD when we know the board is going to have Serial1 on the LCD connector. At the moment we have this in Conditionals_adv.h

/**
 * LCD_SERIAL_PORT must be defined ahead of HAL.h and
 * currently HAL.h must be included ahead of pins.h.
 */
#if LCD_IS_SERIAL_HOST && !defined(LCD_SERIAL_PORT)
  #if MB(BTT_SKR_MINI_E3_V1_0, BTT_SKR_MINI_E3_V1_2, BTT_SKR_MINI_E3_V2_0, BTT_SKR_MINI_E3_V3_0, BTT_SKR_E3_TURBO, BTT_OCTOPUS_V1_1)
    #define LCD_SERIAL_PORT 1
  #elif MB(CREALITY_V24S1_301, CREALITY_V24S1_301F4, CREALITY_V423, MKS_ROBIN, PANOWIN_CUTLASS, KODAMA_BARDO)
    #define LCD_SERIAL_PORT 2
  #else
    #define LCD_SERIAL_PORT 3
  #endif
  #ifdef LCD_SERIAL_PORT
    #define AUTO_ASSIGNED_LCD_SERIAL 1
  #endif
#endif

…so we can modify or extend that as needed to account for certain boards. In the long run it will be good to move the LCD serial port definitions to a new header that comes later in the MarlinConfig.h ordering so that all the serial ports (or their defaults) can be pre-defined in the pins files. But for the moment they're set up in HAL.h so we don't have that flexibility just yet.

@thinkyhead thinkyhead force-pushed the port_creality_ender5_s1_bugfix-2.1.x branch 4 times, most recently from 577ba3c to 2073410 Compare May 5, 2023 22:20
@thinkyhead
Copy link
Member Author

I see there is a newer version of Ender-5 S1 firmware over at https://github.com/CrealityOfficial/Ender-5S1 … So we'll have compare that and bring over any updates. Pretty soon….

@CRCinAU
Copy link
Contributor

CRCinAU commented Jun 13, 2023

Just wondering what the current status of this is?

Are we at least at a point to boot and be able to flash the machine if there's issues?

I saw from the README in the configs directory that there's weird bootloader interactions that might essentially brick a board without strange sketches... Is there a known / shareable recovery method if they do have issues?

I was going to start building daily builds with notes etc - but looks like things are still a bit up in the air on this particular printer...

@sbur83
Copy link

sbur83 commented Jun 19, 2023

Just wondering what the current status of this is?

Are we at least at a point to boot and be able to flash the machine if there's issues?

I saw from the README in the configs directory that there's weird bootloader interactions that might essentially brick a board without strange sketches... Is there a known / shareable recovery method if they do have issues?

I was going to start building daily builds with notes etc - but looks like things are still a bit up in the air on this particular printer...

Good luck getting any response, love thinkyheads work, some detail of progress would be nice

@fvalladaresg1975
Copy link

Hello, how are you? Do you have any news? I would like to have a modified Marlin firmware, especially to exploit some features of Octoprint, since the printer does not deliver or refresh the screen at all.

@sbur83
Copy link

sbur83 commented Aug 28, 2024

Hi thinkyhead, I am running klipper but don't mind testing this when it's ready. Does the machine still reboot?

@thinkyhead
Copy link
Member Author

@sbur83 — Thanks for the testing offer. I haven't had a chance to flash this on my own machine yet, so I don't know if it reboots or not. I'll do another pass at merging this with the latest codebase, then I'll do another pass to examine the changes Creality made in their latest version of the firmware, and once we know this has good parity with Creality's latest offering it will be merged.

@KunalGehlot
Copy link

➕ Following the thread

Please let me know if you need any help testing this, I have the Latest Ender 5 S1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants