makerbase-mks / MKS-DLC32-FIRMWARE

The source code of MKS DLC32
GNU General Public License v3.0
69 stars 50 forks source link

How to build the firmware? #4

Open trashypopashy opened 1 year ago

trashypopashy commented 1 year ago

Can someone tell me step by step, how to make the firmware with the published source code?

Ondrashek commented 1 year ago

Interesting question. You want make a firmware and flash it to board but you don't know how to compile source code especially if you see platformio.ini file. It's suicide for your board. :-)

trashypopashy commented 1 year ago

Interesting question. You want make a firmware and flash it to board but you don't know how to compile source code especially if you see platformio.ini file. It's suicide for your board. :-)

Thank You for your... help?

It does not compile. I am compiling the firmware (Marlin) for many Years for my 3D-Printers, but I can not get the firmware to compile for this board.

Ondrashek commented 1 year ago

Interesting question. You want make a firmware and flash it to board but you don't know how to compile source code especially if you see platformio.ini file. It's suicide for your board. :-)

Thank You for your... help?

It does not compile. I am compiling the firmware (Marlin) for many Years for my 3D-Printers, but I can not get the firmware to compile for this board.

I am using Visual Studio Code with platformio addon. Open folder where platformio.ini is and with platformio.ini selected push build button (its in bottom row look as check mark icon)

trashypopashy commented 1 year ago

I am also using VS-Code. When trying to build, it prompts: "command 'platformio-ide.build' not found"

trashypopashy commented 1 year ago

Sorry, it compiles now. I have no idea what the problem was. Rebootet my PC an tried to build again with platform.ini selected. So thanks for Your hint with selecting the file.

edit: Compiling success with two warnings: "\include\ not found" (in Line 11) an "\include\ not found" (in Line 114)

I guess, this build is for V2.1 and not for V1.1 which I have. What do I have to change, to get my V1.1 work properly? IO32, IO22 and IO2 were changed: MKS_DLC32_V1 1_vs_V2 1

trashypopashy commented 1 year ago

Now: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

trashypopashy commented 1 year ago

I guess, this build is for V2.1 and not for V1.1 which I have. What do I have to change, to get my V1.1 work properly? IO32, IO22 and IO2 were changed: MKS_DLC32_V1 1_vs_V2 1

Now: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

@solawc @makerbase-mks @abinoer

solawc commented 1 year ago

Interesting question. You want make a firmware and flash it to board but you don't know how to compile source code especially if you see platformio.ini file. It's suicide for your board. :-)

Thank You for your... help?

It does not compile. I am compiling the firmware (Marlin) for many Years for my 3D-Printers, but I can not get the firmware to compile for this board.

Its compilation is the same as that of Marlin, but you need to make sure that your platformIO has loaded the library.

solawc commented 1 year ago

It's just a matter of changing the pin

trashypopashy commented 1 year ago

Its compilation is the same as that of Marlin, but you need to make sure that your platformIO has loaded the library.

As You could read above: compiling worked.

trashypopashy commented 1 year ago

It's just a matter of changing the pin

I know, but where? Which file do I need to edit?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

trashypopashy commented 1 year ago

I know, but where? Which file do I need to edit?

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" - correct, @solawc @makerbase-mks @abinoer?

There I need to change "#define USE_BOARD_V2_0" to "//#define USE_BOARD_V2_0" - correct, @solawc @makerbase-mks @abinoer?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

For this I found: "Grbl_Esp32/src/mks/MKS_LVGL.h" with the lines defining "GRBL_MOVE_SPEED", but I do not find, where to define die speeds "low"/"mid"/"high". Con You help me pleas, @solawc @makerbase-mks @abinoer?

Skorpi08 commented 1 year ago

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" ja

trashypopashy commented 1 year ago

How about my other questions?

trashypopashy commented 1 year ago

I know, but where? Which file do I need to edit?

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" - correct, @solawc @makerbase-mks @abinoer?

There I need to change "#define USE_BOARD_V2_0" to "//#define USE_BOARD_V2_0" - correct, @solawc @makerbase-mks @abinoer?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

For this I found: "Grbl_Esp32/src/mks/MKS_LVGL.h" with the lines defining "GRBL_MOVE_SPEED", but I do not find, where to define die speeds "low"/"mid"/"high". Con You help me pleas, @solawc @makerbase-mks @abinoer?

Hello Makerbase, where is Your support? Please answer my questions, @solawc @makerbase-mks @abinoer?

DirtyEngineer commented 1 year ago

MKS isn't in the business of supporting software. They are a hardware company. Demanding free software support isn't going to get you very far.

trashypopashy commented 1 year ago

But they helped me months ago with halfing the motors speeds given by the LCD-GUI. So I just want to know what needs to be changed, to get, what they made for me...

msy021 commented 1 year ago

I know, but where? Which file do I need to edit?

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" - correct, @solawc @makerbase-mks @abinoer?

There I need to change "#define USE_BOARD_V2_0" to "//#define USE_BOARD_V2_0" - correct, @solawc @makerbase-mks @abinoer?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

For this I found: "Grbl_Esp32/src/mks/MKS_LVGL.h" with the lines defining "GRBL_MOVE_SPEED", but I do not find, where to define die speeds "low"/"mid"/"high". Con You help me pleas, @solawc @makerbase-mks @abinoer?

The speeds are defined in Firmware/Grbl_Esp32/src/mks/MKS_draw_move.cpp starting line 109.

But unfortunately I am not able to compile a working firmware. I get the firmware.bin at 2mbytes, not at 4mbytes as the official firmware, and after I upload it, the board just gets reset by the watchdog. No screen image, no wifi, nothing.

Medina-ui commented 1 year ago

Hi , I am having same problem as @msy021, it compiles but it has only 2mbytes.... Does anyone knows what I am doing wrong? Because there is no errors or warnings and the board simply do not work, nothing.

Medina-ui commented 1 year ago

Hi @msy021, try to connect your board to you PC and "upload" the firmware instead of "build". Change port settings on \ini\mks_dlc32.ini if needed. I could't build the firmware and then upload it with MKSLasertool with success but this way I have. Already started to make changes like one more language with suscess. And trying now to fix bugs of the version.

msy021 commented 1 year ago

Hello @Medina-ui, thanks for the info. I also managed to bring the board to life using your method, but there are lots of bugs to fix. For now I will still use the 2.0.8 version compiled by the MKS team, as it seems a lot better.

solawc commented 1 year ago

I know, but where? Which file do I need to edit?

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" - correct, @solawc @makerbase-mks @abinoer? There I need to change "#define USE_BOARD_V2_0" to "//#define USE_BOARD_V2_0" - correct, @solawc @makerbase-mks @abinoer?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

For this I found: "Grbl_Esp32/src/mks/MKS_LVGL.h" with the lines defining "GRBL_MOVE_SPEED", but I do not find, where to define die speeds "low"/"mid"/"high". Con You help me pleas, @solawc @makerbase-mks @abinoer?

The speeds are defined in Firmware/Grbl_Esp32/src/mks/MKS_draw_move.cpp starting line 109.

But unfortunately I am not able to compile a working firmware. I get the firmware.bin at 2mbytes, not at 4mbytes as the official firmware, and after I upload it, the board just gets reset by the watchdog. No screen image, no wifi, nothing.

The main controller of MKS DLC32 is ESP32-S. The 2M firmware compiled by MKS DLC32 is no problem. The reason why you can't directly use the tool is that you don't know how to merge a complete ESP32 firmware. The firmware of ESP32 includes bootloader/par/firmware/mode_ Config and other four files. What you compile is firmware and par (memory allocation table)

solawc commented 1 year ago

PlatformIO is an open source, fully documented compilation tool that works well as a plug-in on vscode. https://docs.platformio.org/en/latest/ This is their document address, please check first.

Medina-ui commented 1 year ago

Hi @solawc thanks for the tip, I will look at documentation

Skorpi08 commented 1 year ago

https://youtu.be/GtvW54q12wc?t=47

flavioprattico commented 1 year ago

Hello! Does someone compile and upload the firmware with success? I followed the instructions, compiled the firmware with platformIO (no issues or errors in the process), uploaded with lasertool but the board does not work. I opened a new issue about this but I had no answers

https://github.com/makerbase-mks/MKS-DLC32-FIRMWARE/issues/12

christianbanach commented 1 year ago

I know, but where? Which file do I need to edit?

I guess it is located here: "Grbl_Esp32/src/Machines/i2s_out_xyz_mks_dlc32.h" - correct, @solawc @makerbase-mks @abinoer? There I need to change "#define USE_BOARD_V2_0" to "//#define USE_BOARD_V2_0" - correct, @solawc @makerbase-mks @abinoer?

And: How can I manipulate the motion-speeds, when moving with the buttons on the LCD? I need halfed speeds as I wanted to get here.

For this I found: "Grbl_Esp32/src/mks/MKS_LVGL.h" with the lines defining "GRBL_MOVE_SPEED", but I do not find, where to define die speeds "low"/"mid"/"high". Con You help me pleas, @solawc @makerbase-mks @abinoer?

The speeds are defined in Firmware/Grbl_Esp32/src/mks/MKS_draw_move.cpp starting line 109. But unfortunately I am not able to compile a working firmware. I get the firmware.bin at 2mbytes, not at 4mbytes as the official firmware, and after I upload it, the board just gets reset by the watchdog. No screen image, no wifi, nothing.

The main controller of MKS DLC32 is ESP32-S. The 2M firmware compiled by MKS DLC32 is no problem. The reason why you can't directly use the tool is that you don't know how to merge a complete ESP32 firmware. The firmware of ESP32 includes bootloader/par/firmware/mode_ Config and other four files. What you compile is firmware and par (memory allocation table)

Dear,

could you please explain how to merge a complete esp32 firmware please?

Thank you

christianbanach commented 1 year ago

Or basically wich files have to be merged too

Thank you

flavioprattico commented 1 year ago

Or basically wich files have to be merged too

Thank you

As suggested in the other issue my advice is to use directly FluidNC and follow their instruction to build the firmware.

msy021 commented 1 year ago

This will be a solution when FluidNC will support the LCD.

-------- Original Message -------- On 24 Feb 2023, 17:42, flavioprattico wrote:

Or basically wich files have to be merged too

Thank you

As suggested in the other issue my advice is to use directly FluidNC and follow their instruction to build the firmware.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

AndWalu commented 1 year ago

This will be a solution when FluidNC will support the LCD.

Please write to them a request, the more we ask, the greater the chance that we will succeed.