MPCNC Build Complete (until my next good idea)

Hi Dan,
due the the fact in this period I have a lot of spare time, I started to study your BTT TFT35 2.0 firmware customization in order to align it to the latest BTT Release Vx.x.26.
Unfotunately the firmware baseline that you used to introduce the customizations is not available in github any more and it is difficult for me to make a reverse engineering in order to understand the principles of the modification you did.
Is there any resource available in order to better understand the BTT Firmware architecture or is better to perform a try and error long activity?

Thank you for your support,


7 posts were split to a new topic: Skr & laser?

I did a lot of trial and error. But the main things are so the TFT firmware most of the changes were more “cosmetic”. The SKR firmware for the main board took a bit more editing.

With that said, for the TFT most of the edits are in two main locations:

For languages I mostly edited in language_en.h
I found buttons I didn’t need and changed the language. This was based on what I saw on the different menu screens.

For Menus I edited the following boards:

  • Fan.c = this is the “laser” menu
  • Leveling.c = this is the screen for zero’ing everything (Job Setup). This is also a good screen to see how you can have the TFT run gcode commands based on button presses.
  • MainPage.c = the main page. Note I didn’t have it use unified menu.
  • Move.c is used but I don’t think I edited it
  • Printing.c = the page displayed when it use CNCing. I did edits to the menu but also spent awhile trying to get the stop button to convert to a back button upon completion. I probably should have committed that to BTT github. see lines 432 - 440 for an example of how the button function changes (stop vs back) based on what the CNC is doing. Lines 490-501 were modified to change to the back button.
  • Speed.c = I think I modified this to not allow “more” and just go back since we don’t need all the speed stuff for a CNC

In configuration.h I made sure that #define UNIFIED_MENU is commented out as is STATUS_SCREEN so it uses plain menus rather than the complicated ones. The complicated ones didn’t exist when I started and also appear more useful for 3d printing rather than CNC work.

Finally, edit the BMP images to match whatever function you want to use.

Hi there.

I am nearing the end of my build of a standard MPCNC, and I am using the firmware from the original post on this thread! I am running into a little bit of a snag though, and I’m hoping someone can help me figure it out. I’ve been testing axis movements from the touch screen, and my Y and Z axes work great, but the X axis has an issue. When I use the move commands from the TFT, it seems that the second motor on that axis (the one that is hooked into the E1 port) is rotating further than the one wired into the main X port. I have measured to see which one is correct, and found that the original X motor results in the correct travel for the gantry. What I can’t seem to figure out is why the other motor on that axis is behaving so oddly. I’ve even completely disconnected the pulleys to see how they rotate with no load, and the results are the same. Any help would be awesome; I’ve learned a lot about the firmware in the process of getting this far, but I am stuck now.


That must be a wiring issue. Unless you are using a clone mini, than those have a port hat has reversed wiring.

Are you sure you have the dual firmware installed?

I am fairly confident I have the firmware (mostly) correct since the y axis is working great with both motors! I’m on the SKR 1.3. I’ll check the connections to make sure, but it is odd since the offending motor seems to sound okay and has good holding torque, just spins too far. It does spin the correct direction though. I’ll admit though, that I am no firmware expert, so I am not sure exactly which part of it makes the board recognize that second motor as X2, but I’m wondering if there isn’t some place where its steps/mm is set differently than the regular X motor.

Sorry I didn’t see the SKR part. I have not messed with mine enough to help yet. Sorry.


You can run a M122 command and it will show you all the stats for the motors.

The lines to see the settings are in configuration_adv.h at “#if HAS_TRINAMIC” around line 1811. Make sure the current and microsteps for everything except Z is the same (you can even set Z to be the same if you want to make it easy).

If those are the same use an M503 and see what M92 is set for. Make sure they are the same since M92 sets the steps/mm.

I think you have to enable TMC_DEBUG too, right?

Yes but if he is running the firmware I made I enabled it.

First, a big THANK YOU for sharing your hard work with all of us! I specifically bought an SKR 1.3 and TFT35 V3 to copy your work because I know NOTHING about programming these blasted things!!

That said, I learned a LOT comparing your version to the 2.0 BUG FIX, so I was able to get it to build. It caused me some fits, because I tried to just copy your files and install them, but no dice. SO far the TFT WORKS and I appreciate the work you did setting it up for lasers. I’ve since tried my hand at making custom icons, and I’m really getting there. My machine isn’t built yet, but I needed to make sure I could get steppers to turn, and I did. Again, THANK YOU, brother.

Ok, my question…

Can you post your TFT Config.ini file? It was not in your github files. I’m trying to simply change some fonts, but I can’t get mine to load a modified config that I downloaded from BIGTREE’s github files. I’m seriously not sure what’s going on. I want the fonts to match a certain theme that I’m using, but I see no change when I try to update it, and the config.ini never changes to config.cur. I could totally be missing something simple, so ANY advice would be appreciated.

Again, thanks for sharing your work. I know I speak for all newbies like me when I tell you that you’ve helped me more than you know!


Bryan Roundtree (treeb52)

For the SKR board, did you have to adjust jumpers or leave them as they come on the board? I am setting-up the same SKR and TFT that you did…printed your case…nice job and I’m not sure on those jumpers. Thanks!

There are many skr boards. Do you mean the skr pro1. 2? Which drivers? 2209?

SKR V1.3 with 2209 drivers. I would like to use Dans setup as posted at the beginning of this post.

I was able to leave my jumpers as set since I ordered the board and drivers together and they came in UART mode. Otherwise I would have had to check them against the manual.

Chris Riley has a good video on this board with how to set it up in UR mode (not standalone). He says remove all the jumpers near the stepper drivers and then add the red jumpers to the red pins “below” the drivers:

Video: (go to around 5 minutes)

1 Like

The original version I ran doesn’t appear to have used config.ini. I know jeff was working with a more recent fork and had config.ini but I don’t see that anywhere in mine. I uploaded almost the entire folder structure to github.

I have BTT SKR 1.4 Turbo + BTT TFT35 v3.0 and the diode laser is controlled via 5v.
in Marlin use #define SPINDLE_LASER_PWM_PIN SERVO0_PIN.
how to change gcode control in TFT firmware from M106 to M3 and M107 to M5?

Thank you for your support,

In the firmware files in the TST\src\User\Menu
Go to leveling.c
On line 40 (off), 43 (5%), and 46 (100%) are the laser buttons on the job setup screen.

In Printing.c change line 519 to M5 rather than M107 so it turns off the laser.

In Fan.c is where the fan speed is set; however this calls a bunch of other classes to figure out the fan speed. To change this I believe you go to Configuration.h and on line 54 are all the FAN_CMD notes. Change all the M106 to M3. The P# is to pick the fan but if that doesn’t apply you can likely just remove it.

Hi Dan
Thank you for your answer.I’m change in files, but not working.
in leveling.c:
case KEY_ICON_4:
case KEY_ICON_5:
storeCmd(“M3 S5\n”);
case KEY_ICON_6:
storeCmd(“M3 S255\n”);
In Printing.c:
mustStoreCmd(“M5\n”); //kill the laser/fan
In Configuration.h:
#define FAN_CMD {“M3”, “M3”, “M3”, “M3”, “M3”, “M3” };
in video:
control of xyz from the tft display works very well, but as soon as I try to control the laser, control from the tft display over all functions is lost. control from the application is normal. what could be wrong?
video -

Best rgs