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

Fixed syntax errors, error in bed leveling percentage and firmware.bin nameing #41

Open
wants to merge 4 commits into
base: s1_pro_plus
Choose a base branch
from

Conversation

Pethical
Copy link

No description provided.

Pethical and others added 4 commits January 15, 2023 07:39
Syntax error in Marlin/Configuration.h (extra slash)
Unclosed commnt in Marlin/Configuration.h
…al points to these firmware-XXXXXX.bin random named binaries, and the simple firmware.bin can confuse the user.
Fixed: The bed leveling percentage on the display does not respect th…
@synman
Copy link

synman commented Jan 29, 2023

Hi @Pethical sorry to bother you here but I've got your PR building on a linux arm machine (pi) with some capabilities added that I've been wanting.

Before I actually flash this, is there anything you can share about what we do with the stock LCD?

Will this break it?

Assuming Creality's branch is the source for the laser version, if I'm not already on it, is there anything we should be doing with it -- like doing the LCD flash? I'm still a little confused about why the LCD has a flash of its own. I thought we just need to talk to it over tty port on the stm board. Are there Marlin unrelated updates Creality is periodically pushing to it?

Apologies again for posting this in your PR. Any insight you can provide is greatly appreciated!

@Pethical
Copy link
Author

Hi,
don't worry, ask anytime.
The LCD is not published, but this is not problem, this code works with the stock LCD. You can modify and flash this without problems. The 3d printer, the screen and the laser will working until you don't modify the files in the lcd directory.

The LCD has it own firmware, because this screens are very smart. The used display is a smart hmi with ARM CPU, ram, flash, etc.

I am working on a compatible, open source screen firmware. It's in work in progress state, you can follow the development on my Github repository.

@synman
Copy link

synman commented Jan 29, 2023

thank you so much for getting back to me. I am going to go flash my variant now!

@synman
Copy link

synman commented Jan 29, 2023

@Pethical, I'm unable to flash any firmwares I build out of platformio from this branch to my S1 Pro. The LCD hangs at the beginning of its boot animation.

I can flash the stock January 2022 and laser firmwares without issue.

If I try to flash with just the .bin file in the root of the SD, nothing happens.

If I place the .bin in the root and inside STM32F4_UPDATE I experience the condition noted above.

I'll take the back panel off my machine later today to check versions / chip ids as a sanity check.

I also noticed the bin in the STM32F4_UPDATE folder with the stock firmwares differs in size from the one on the root. Perhaps I'm missing something fundamental in how to stage the bin?

@Pethical
Copy link
Author

This firmware is newer, contains the laser functionality, but your screen not. You can download the latest firmware package from Creality and you need to update the screen with the screen firmware what sits in this package:
https://www.creality.com/pages/download-ender-3-s1-pro

@synman
Copy link

synman commented Jan 29, 2023

I am on the laser firmware as my base. This includes the update for the display.

It was the first thing I did knowing the commit trail for the S1 Pro branch.

@synman
Copy link

synman commented Jan 29, 2023

@Pethical I think I've got the F4 chip and the default env is for the F1 one.

; default_envs = STM32F401RC_creality

default_envs = STM32F103RET6_creality

Before I take the bottom cover off the machine, I'm going to simply swap out the default env.

I'm guessing you just drop your .bin in the root directory of your SD?

Researching this, I have learned the F4 chip uses the STM32F4_UPDATE folder and I previously noted my S1 Pro ignores the .bin if it is in the root.

I'm a newbie with these STM chips but I bet this is my problem.

I'm AFK for most of the day today so I won't be able to validate this until later tonight.

@Pethical
Copy link
Author

By default the F103 is selected.
I think you have F401, as me. In this case you must change the environment in the platformio.ini and the define in the Configuration.h:
#define USER_STM32F401
And yes, you must put your binary into the STM32F4_UPDATE folder.

Basically the bootloader will flash only the right firmware.

@synman
Copy link

synman commented Jan 30, 2023

very nice... I'm running UBL, emergency parser, host action commands, and a few other capabilities now.

@CrealityTech
Copy link
Member

By default the F103 is selected. I think you have F401, as me. In this case you must change the environment in the platformio.ini and the define in the Configuration.h: #define USER_STM32F401 And yes, you must put your binary into the STM32F4_UPDATE folder.

Basically the bootloader will flash only the right firmware.

Perfect!!

@joepadmiraal
Copy link

Hi @Pethical
Thanks for working on these fixes!
I am trying to compile your s1_pro_fixes branch in vscode via the platformio plugin, but I get this error:

In file included from Marlin/src/MarlinCore.cpp:83:0:
Marlin/src/lcd/dwin/lcd_rts.h:5:10: fatal error: arduino.h: No such file or directory

*****************************************************************
* Looking for arduino.h dependency? Check our library registry!
*
* CLI  > platformio lib search "header:arduino.h"
* Web  > https://registry.platformio.org/search?q=header:arduino.h
*
*****************************************************************

 #include <arduino.h>
          ^~~~~~~~~~~
compilation terminated.
*** [.pio/build/STM32F103RET6_creality/src/src/MarlinCore.cpp.o] Error 1

I do not get this error when compiling the main branch.
Do I need to add some kind of dependency somewhere in order to let it find this file?

@Pethical
Copy link
Author

Pethical commented Feb 7, 2023

Try change arduino.h to Arduino.h in Marlin/src/lcd/dwin/lcd_rts.h

@joepadmiraal
Copy link

Thanks, I needed to change a couple of similar casing issues so I created a PR on your repo.

@joepadmiraal
Copy link

The version in the official PR seems to be 2.0.8.24.
The version on the website is already 2.0.8.26.
Does anyone have an idea on what the difference is, so what we are missing when using our own build?

@synman
Copy link

synman commented Feb 7, 2023

I apologize if this comes across as negative, and or, critical, but my thoughts are we are likely missing a couple new bugs.

The very first thing I did once I got a good build was port it to Marlin 2.1.2.

I have not looked back since.

@Pethical has an open source screen firmware in the works. Things are about to get even more exciting for us!

There are no major changes in the UI firmware between .24 and .26 (at least at it applies to lcd_rts). There is probably some fixes for lcd_rts_laser is my best guess.

@dmention7
Copy link

dmention7 commented Mar 26, 2023

By default the F103 is selected. I think you have F401, as me. In this case you must change the environment in the platformio.ini and the define in the Configuration.h: #define USER_STM32F401 And yes, you must put your binary into the STM32F4_UPDATE folder.

Basically the bootloader will flash only the right firmware.

Complete noob here trying to enable linear advance on my S1 Pro. I'm able to get the "Ender-3S1-s1_pro_fixes" firmware to compile with the files as provided, but when I make these indicated changes to Configuration.h & platformio.ini to be compatible with the F4 chip, I get the following error on compiling:

image

I suspect it's user error at some level, but I'm not sure how to troubleshoot this, so any advice is appreciated!

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.

5 participants