makerbase-mks / MKS-Robin

MKS Robin is a powerful 32-bit 3D printer control board with STM32F103ZET6 . Support Marlin2.0. Support MKS Robin TFT24/28/32... Screens. The motherboard integrates 5 AXIS interface, hot bed, 2 heating heads, 3 NTC100K, 2 MAX31855.Support MKS Robin WIFI for cloud printing.Supports firmware update by SD card…
https://es.aliexpress.com/item/32757129463.html?spm=a219c.12010612.8148356.9.5fc165f4oDUfFM
131 stars 129 forks source link

error compile marlin mks robin #147

Open NachoFrutos opened 4 years ago

NachoFrutos commented 4 years ago

Hello, I downloaded the marlin 2.0 version of the github of mks robin today. I use to compile Visual Studio Code. But when compiling the default files without modifying anything I get this error.

*** [.pioenvs\mks_robin\firmware.bin] TypeError : a bytes-like object is required, not 'str' Traceback (most recent call last): File "C:\Users\nacho.platformio\packages\tool-scons\script..\engine\SCons\Action.py", line 1209, in execute result = self.execfunction(target=target, source=rsources, env=env) File "C:\Temp\MKS-Robin-master\MKS Robin\firmware\Marlin2.0-MKS-Robin\buildroot\share\PlatformIO\scripts\mks_robin.py", line 25, in encrypt robin.write(byte) TypeError: a bytes-like object is required, not 'str'

makerbase-mks commented 4 years ago

Can you try to compile with ATOM or use the MKS Marlin 2.0 compilation tool? https://github.com/makerbase-mks/MKS-Marlin2.0-Compile-Tool

NachoFrutos commented 4 years ago

Hi, I've tried. because I saw this solution in another post. But I don't get it to work for me. I have tried two computers but I always get an error that I could not download the phyton. but I already have it installed and configured the variables as the manual says.

3Dangel commented 4 years ago

The latest upgrade from platformio to 4.1 none of the FW can be complied. Not sure if any other sees this or it is just me.

On Wed, Nov 20, 2019 at 04:10 NachoFrutos notifications@github.com wrote:

Hi, I've tried. because I saw this solution in another post. But I don't get it to work for me. I have tried two computers but I always get an error that I could not download the phyton. but I already have it installed and configured the variables as the manual says.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-Robin/issues/147?email_source=notifications&email_token=AFYWWXJAUO7XEYAMLAONZKTQUUEKJA5CNFSM4JOZWMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEROIJQ#issuecomment-555934758, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFYWWXLGQR7ZUEUORIC4DKDQUUEKJANCNFSM4JOZWMOA .

maureu-too commented 4 years ago

Unfortunately, after atualization, either vscode, atom or MKS-Marlin2.0-Compile generate the .bin file, but when writing the SD card, my board dont run.

NachoFrutos commented 4 years ago

Hi, I have compiled the firmware with the ATom and it gives me the same error. I have tried to download the original version of Marlin 2.0. With this code I can compile the mks robin board but when I upload the firmware I have a message on the tft screen that says "COMPLETE" and does nothing else.

maureu-too commented 4 years ago

Hi, I successfully compiled and execute until platformio updated. After that I tried to reinstall on different machines, both windows and linux and it didn't work more. I believe it is some library or something.

3Dangel commented 4 years ago

Then it is confirmed!!! Makerbase, would you please test and advise the solution!? Thanks a lot!!!

On Wed, Nov 20, 2019 at 15:16 maureu-too notifications@github.com wrote:

Hi, I successfully compiled and execute until platformio updated. After that I tried to reinstall on different machines, both windows and linux and it didn't work more. I believe it is some library or something.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-Robin/issues/147?email_source=notifications&email_token=AFYWWXO3FERSP6FW4ZFFKXTQUWSJRA5CNFSM4JOZWMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEEVBRJQ#issuecomment-556406950, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFYWWXK7GMFUFAEYCCBH35DQUWSJRANCNFSM4JOZWMOA .

makerbase-mks commented 4 years ago

This may be a bug in Marlin 2.0, and I seem to know where your problem lies. The Robin.bin file compiled with Marlin 2.0 must have the first character "D8". Otherwise, the update will complete, but the application will not be able to be entered. MKS re-downloads the latest Marlin, compiles, and produces the .bin file, which is normal for use. I can't deny that some libraries, or compilers, are flawed, causing the firmware to compile properly, but it can't be used. We will continue to pay attention this problem。

NachoFrutos commented 4 years ago

Hi, thanks for answering. Well, I'm waiting for news to see if you can solve the problem. I am hopeful because you said you know where it is and you have it identified. Cheers

maureu-too commented 4 years ago

After several unsuccessful attempts, I downloaded the latest Marlin file again, recompiled without configuring anything. I kept the default setting. After successfully compiling, I made all the necessary changes to MKS-Robin and everything went back to what it was before. Strangely this happened on two computers after the Platformio upgrade. I didn't understand what happened, but now it's all right.

makerbase-mks commented 4 years ago

This may be caused by some library files by the compiler, but it seems difficult to find the ultimate bug. It appears that Marlin has officially resolved this issue.

dnutt20x6 commented 4 years ago

I don't think so, I've been trying to compile for a Robin Mini for the past few days and it fails every time, across 2 different PCs, with the same errors that NachoFrutos posted.

Has anyone else managed to get it to compile in the meantime?

NachoFrutos commented 4 years ago

Hello, message to makerbase-mks. In this thread they have found a solution. Maybe it can help you find the problem. https://github.com/MarlinFirmware/Marlin/issues/15532

NachoFrutos commented 4 years ago

good news. with the latest version downloaded today from marlin 2.0. I can see information on the screen. The only problem is that there are no buttons to move through the menus

dnutt20x6 commented 4 years ago

Odd, I redownloaded Marlin 2.0 and it still won't compile for me.

NachoFrutos commented 4 years ago

Hello, since the latest version of the marlin works the compilation for the mks robin board. We have to use the sample files that come next. Please ask the manufacturer to update the repository with the files that work

dnutt20x6 commented 4 years ago

I confirmed that marlin compiles for the robin mini.

So next I need to use the sample configs to build a proper config then? All I got was a blank white screen when I flashed the board with the compiled firmware.

makerbase-mks commented 4 years ago

@dnutt20x6 This is Marlin's bug, you can refer to:https://github.com/makerbase-mks/MKS-Robin-mini/tree/master/marlin%20firmware or you change pins_MKS_ROBIN_MINI.h :

define LCD_RESET_PIN PF6 ---> #define LCD_RESET_PIN PC6

I have test it and this is OK.

dnutt20x6 commented 4 years ago

@makerbase-024 Thank you' I've been pulling my hair out all week over this.

The screen works now, but touch is nonresponsive.

dnutt20x6 commented 4 years ago

I did some testing and commenting that line out didn't seem to break anything.

I ran across TH3d's firmware for the Kingroon KP3 and it's more or less identical to the SW200, save that the KP3 lacks a parts cooling fan.

It works perfectly on my printer, so I'm guessing they must have figured out the issue with the touchscreen. It might be worth a look.

makerbase-mks commented 4 years ago

@dnutt20x6 Hello, can you provide a link and see the details

dnutt20x6 commented 4 years ago

@makerbase-mks Sure, here's the page for their firmware:

https://www.th3dstudio.com/knowledgebase/kingroon-kp-3-firmware-marlin-2-0-based/

The source code is provided in the download along with the firmware. and their Github is linked on that page as well.

mattdog01 commented 4 years ago

NachoFrutos What have you had success with so far? It seems like you have the following sorted out: Marlin bug fix 2.0 compiled (was this without errors?) Your screen is able to display but you don't have the buttons working. Do you have any details how you got this far?

Using platformio on VS code it will finish compiling. I can upload it to the MKS Robin from the SD card. I get the bar and the percent. When it is done it displays the "COMPLETED" screen. I restart the Robin by cycling the power(I have also tried pressing the reset). The display shows the "COMPLETED" screen again The red LED by the part cooling fan connector blinks on. The fan does the short spin up. The LED goes off. Then the Blue LED by the reset button starts blinking. and that is it :( so sad.

Does anyone have any ideas what to try next? The bin file seems very small to me. The Marlin bugfix 2.0 complied is only 193Kb the MKS firmware is 427Kb plus fonts and pics

dnutt20x6 commented 4 years ago

@mattdog01 There was some update to VS Code and some of the editor binaries that happened awhile back, and that seemed to fix my compiling errors.

I'd say try using the TH3d firmware I linked above. You may have to search for your specific printer or a clone of it that uses the same board you have, but it works.

My compiled bin file before I started using ABL was about 211kb for reference, so yeah, yours sounds a bit small.

NachoFrutos commented 4 years ago

mattdog01

Hi, I have the plate and tft fully operational. But I have used the original marlin 2.0 bugfix. As soon as I can I upload the two advanced configuration and configuration files. Because you have to activate an option that you don't know so that the tft works by emulating an lcd.

mattdog01 commented 4 years ago

Thanks NachoFrutos, I'm looking forward to those config files to see what I'm missing. I really appreciate the help. I'm so excited to get Marlin working on my board. It is disappointing to get so little help from Makerbase so thank you.

mattdog01 commented 4 years ago

@dnutt20x6 I have a home made coryxy printer so I don't see any TH3d printers or clones that are the same. I have not been able to figure how to tell which board is in which printer on the TH3d site. I'm using the MKS-Robin v2.3 board with the included TFT v1.1 screen in my printer (pre all the other robin flavours). It is a wonderful board but the flexibility of the firmware is very limiting and documentation is basically nonexistent. I have had to implement some physical workarounds to allow the use of two extruders with one nozzle but that should all be firmware configurable and with Marlin it is. Thanks for the help though. Hopefully NachoFrutos has the details I'm missing in the config files.

mattdog01 commented 4 years ago

@maureu-too Do you have working Marlin 2.0 firmware on your MKS-Robin? Are there any tricks that you used to overcome any of your issues?

I have it doing this Using platformio on VS code it will finish compiling. I can upload it to the MKS Robin from the SD card. I get the upload bar and the percent. When it is done it displays the "COMPLETED" screen. I restart the Robin by cycling the power(I have also tried pressing the reset). The display shows the "COMPLETED" screen again The red LED by the part cooling fan connector blinks on. The fan does the short spin up. The LED goes off. Then the Blue LED by the reset button starts blinking.

Did you even have this issue?

mattdog01 commented 4 years ago

@makerbase-mks What do you mean by this The Robin.bin file compiled with Marlin 2.0 must have the first character "D8". Otherwise, the update will complete, but the application will not be able to be entered. Do you mean it must start with Ø?

3Dangel commented 4 years ago

The repository from MKS is an old work from a gentlemen from Russia I think. He was able to make it to work with his own coding. Now the NEW official Marlin2 is not making the TTF V1.1 to work.

On Mon, Dec 30, 2019 at 15:45 mattdog01 notifications@github.com wrote:

@makerbase-mks https://github.com/makerbase-mks What do you mean by this The Robin.bin file compiled with Marlin 2.0 must have the first character "D8". Otherwise, the update will complete, but the application will not be able to be entered. Do you mean it must start with Ø?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-Robin/issues/147?email_source=notifications&email_token=AFYWWXIMEBBEPVJCIVMQEMTQ3J2W3A5CNFSM4JOZWMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEH3LZYY#issuecomment-569818339, or unsubscribe https://github.com/notifications/unsubscribe-auth/AFYWWXICMJYY3XLWCCXLTS3Q3J2W3ANCNFSM4JOZWMOA .

mattdog01 commented 4 years ago

@3Dangel Thanks for the reply. So if I want Marlin 2.0 then I need to get a different display? If I'm doing that then I should likely switch board and all, right?

NachoFrutos commented 4 years ago

Hi, I have the mks robin board operating with your tft. Using the latest version of marlin (bugfix-2.0x - https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.0.x). You have to use the sample configuration files that are located in this path "Marlin / config / examples / Mks / Robin /"

3Dangel commented 4 years ago

https://github.com/MarlinFirmware/Marlin/issues/16159 this might solve your issue it did for mine IMG-5614 IMG-5615 IMG-5617

mattdog01 commented 4 years ago

I never did come back and report on this. I have been running Marlin 2.0 on my Robin with the older screen version (V1.1)for several months now and it has been working great. It has required some tweaking of the settings (mostly due to more accurate temperature measuring) but I'm getting great prints. I have been using the latest VSCode and the latest Marlin2.0 bugfix and everything compiles and runs perfectly. Fixes that have been worked on in another string have been implemented into the main Marlin 2.0 and they work perfectly. I think this string should be closed by @NachoFrutos as it has been resolved. Happy Printing.

mattdog01 commented 4 years ago

Hello Eddie,

Thanks for the email. I have since resolved the problem or rather someone else has resolved the issue and it is now rolled into the main Marlin 2.0. My printer has been working great for a while. Thanks again for the note. Take care.

Matt

From: Eddie Moser notifications@github.com Sent: February 22, 2020 5:39 AM To: makerbase-mks/MKS-Robin MKS-Robin@noreply.github.com Cc: Matt Crawford 2001busa@gmail.com; Mention mention@noreply.github.com Subject: Re: [makerbase-mks/MKS-Robin] error compile marlin mks robin (#147)

you can fix the error by updating line 25 of the mks_robin.py file to this:

byte = chr(ord(byte) ^ key[position & 31]).encode()

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/makerbase-mks/MKS-Robin/issues/147?email_source=notifications&email_token=AIK6MYE4RQTNRAKIOBEJYHDRED6DFA5CNFSM4JOZWMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMU44HQ#issuecomment-589942302 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AIK6MYHKTQYI6SPTXSXXX2LRED6DFANCNFSM4JOZWMOA . https://github.com/notifications/beacon/AIK6MYCCY3GFY2REVC7XV63RED6DFA5CNFSM4JOZWMOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMU44HQ.gif

makerbase-mks commented 4 years ago

@mattdog01 Hi, I have checked the Robin.bin file. The first character must be ‘D8’. The other files can be updated, but the program cannot run on the motherboard.However, the new version of marlin seems to have solved this problem.

Kyosuke33 commented 4 years ago

Hello, just a question, i have a Kingroon KP3 who have a Robin mini and a TFT Robin. I upload Marlin and now i have the TFT who is in Marlin mode with 4 touch button in the bottom. It's not possible to run Marlin and keep the Mks touch screen ? IMG_20200611_011238 IMG_20200611_011215

makerbase-mks commented 4 years ago

Hi! @Kyosuke33 Can you provide your configuration.h and your board's pins.h

Kyosuke33 commented 4 years ago

Yes Configuration.h.txt pins.h.txt

qulet commented 1 year ago

CZEŚĆ ! @Kyosuke33 Proszę prześli plik ZIP z całym Folderem MARLINA i osobno plik kompilacj Robin_mni.bin. Mam ROBIN_MNI z MKS ROBIN TFT 24 V1.0 Próbuję od kilku tygodni kompilacji w VSC niestety bez powodzenia. Pytanie: Jak już teoretycznie będę miał od Ciebie plik ROBIN_MNI.bin czy wystarcz włożyć go do gniazda karty SD i nastąpi aktualizacja.? Poproszę udostępnić na dysku GOOGLE ? lub na maila: quletqwert@gmail.com Zgóry dziękuję za życzliwość i poświęcony czas !

qulet commented 1 year ago

Hello ! I am compiling Marlin for the printer: TH3D_Unified2_Kingroon_Robin_Mini receives the Robin_mini.bin file I check in the HxD program at the beginning there is a D8 bit Unfortunately, after updating the firmware, the message "Complete" appears and the Marlin screen does not appear...... Compilation in Marlin-2.0.6.1 and file "Robin_mni.bin" also not working on my MKS ROBIN TFT V1.0 No initialization. What else can I do?

qulet commented 1 year ago

my bin file

Robin_mini.zip

Startbh commented 11 months ago

Hi I need help. I have Easythreed X7 3d printer, and it is working on MKS Robin mini V2. It worked perfectly but last day reported on display an error when he start to print. What can be? You can start extruder an it is OK, you can move in x,y,z.