Compiling firmware for an unlisted board

Hey guys, i just started building my MPcnc Primo after finishing printing the parts and buying the hardware i have to decide which board to statt with, so i have a a Board from a 3D Printer (Brand Mingda) with built in TMC2208 drivers, i wouls to ask for your help on how to compile the marlin firmware for the mpcnc using this board, is it possible and what do i need to start the process? :slight_smile:

P. S : I am new to marlin so would be great if some9ne cann let me know which lines i need to uncomment/commemt to get the settings right.

Thanks in advance! :slight_smile:

I’m far from an expert with firmware, but I following firmware topics on the forum, and poke around in the source some. To start you need to know exactly what board you have. In looking at the firmware page for Mingda 3D printers, the only board that has a version of Marlin is MD-301. From a quick look, all other boards seemed to be using proprietary firmware, so If your board is not an MD-301, then you are probably SOL.

When I looked at the Marlin source provided for the MD-301, the source had been flattened and is two years old. In addition it does not appear that they folded their board back into the ongoing Marlin source. To me, this means you probably have some serious work tracing through the source in order to figure out how to integrate and/or update Marlin versions.

If you have a MD-301 then, if it were me, I’d start by installing PlatformIO and compiling and flashing their provided Marlin source. This would assure a functioning base version of Marlin as a starting point. After that, I’d use a difference tool like Meld to compare the configuration.h and configuration_adv.h files between the MD-301 version and a current V1 maintained version for the MPCNC.

2 Likes

geez…unless you have a death wish I would suggest you go buy a recognised board that has mainstream marlin or grbl support. You are already facing an uphill battle even when using a supported board

although I did find this -

ellensp commented on May 29

marlin 2 source from supplier https://www.3dmingda.com/uploads/soft/20210402/Marlin%20source.rar

It is for a Mingda rock 3 pro using 5 tmc2208

using a MD-301 BOARD_MD_D301

D301 V1.0 (STM32F103ZE)

Any use?

2 Likes

Thanks mike for your replay, yes i have the MD-301 BOARD_MD_D301, i tried to find the marlin source for it but they are all outdated , i will try to contact the people in the 3D printer group and then see if someone can give me that package :slight_smile:

Hey Robert thanks for your reply! :slight_smile:

so i do have the MD-301 BOARD_MD_D301 Board, so am gonna take your advice and start with compiling a firmware from the Marlin Package delivered from Mingda, i just installed Meld as well, so i have the following if i got your right :
1- find and compile working Marlin firmware for the Mingda MD301.
2- Install Meld, and compare the config files on both.
3- copy the Current V1 configs into the Mingda ones and compile.
4-flash it on the mingda Board and give it a try.

Is that right step by step. ? :slight_smile:
thanks for your Help!

Robert’s advice is right, but I agree with Mike. It would be much easier to start fresh. And any error you have later is going to bring up questions about this board and firmware.

The process you outline is correct with the following three points:

  • You only want to merge in what is needed, and many of the differences will be specific to the boards and not V1 CNC specific differences.
  • You are comparing Marlin versions that are two years different in age, so there may be differences in the config files that cannot be easily rectified.
  • What you would really like to do is the opposite of this process. That is take the features in the old version and merge them into a new version of Marlin, but that is a much larger job. I took a quick pass just in an attempt to figure out what PINS file they were using, and could not figure it out. Given the state of the source, they may have done some serious hack and slash to get the MD301 Marlin version running.

As long as you are enjoying yourself, this is not a bad pathway with the understanding there is a significant possibility that you will dead end. But the pathway of less work/frustration is to purchase one of the boards that has a V1 maintained firmware version, or at least one of the boards that is supported by the ongoing Marlin source.

Hey Roberts, am grateful for your Tips!

so after som asking and searching i found an updated marlin for this board on github

i think i will start there for now, should i donwload the Primo configs and use them on the config off the Mingda Board ?

Best Regards!

You cannot use the Primo configuration files directly. You will need to merge in the necessary changes you find using Meld. Some of the settings will be specific to the control board, stepper drivers, and the display. Other settings support the Primo.

Hi Robert! :slight_smile:

So I have now the ​configs for the MD301 Board with the latest Marlin, and I have Meld installed, which configs I need to download to make the compression and then the merge ?

i really appreciate your help with this one, sorry for asking a lot of a questions thought…

I’m on mobile for the next few days, so answers will be brief. Make sure your Marlin works before modifying. Use Meld to compare versions of configuration.h and configuration_adv.h.

ok no probleem thanks for your replys :slight_smile:

so the marlin works! jsut tested it today , i downloaded the Sourcecode for the Primo but there is only the Src Folder in it, and i didn’t know where to download the configuration.h and configuration_adv.h. files…

but the board works well just tried it connecting the steppermottors on in it and the endstops and all works, now i just have to map the pins on it to work for the primo like :

5 Steppers Plugs remapping from

1 Z to X1
2 Z to X2
3 X to Y1
4 Y to Y2
5 E to Z1

and after that merge the configs from the Primo to the Marlin version of the board :slight_smile:

The configuration files are just down a subdirectory or two, but are obvious. If you have trouble, just navigate to the root, and type in “configuration” in the explorer search field.

I saw your other post. I’m on mobile until Friday, so can only give brief help from memory. It is doubtful anyone can give you the lines to change since no one has the specifics of your board and configuration. You should not have to reassign any pins. All the changes should be confined to configuration.h and configuration_adv.h. The starting point is to run Meld between the two versions of the files. After you find the differences, look at the header for each section that has a change. You don’t want to change anything related to stepper drivers or your display, but other settings may need to be merged in. If you are undecided, post a specific question relating to specific settings.

2 Likes

Thanks man for your time, you are the only who truly give infos and i appreciate that much!

The thing is i don’t know which files i should Compare in meld or, i couldn’t find configuration.h oder configuration_ad.h of the mpcnc… On github there is only the src folder… I searched it and couldn’t find the files of configuration…

Ehat I’ve done till noe is that i have the marlin files for the board i have,

The configuration files are in Marlin or src/Marlin

Can you please give me a direct Dowland link for that, and sorry for the other thread i tries to delete it but i couldn’t, i guess an admin can delete that only

Thanks again Jeff :pray:

Of the V1 maintained firmware, they need to be unzipped twice. The first unzipping gets you a binary file and a second zip file. This second file has the source. And the configuration.h and configuration_adv.h files are near the top of the directory tree. More later.

So I am downloading the configs from here : https://github.com/V1EngineeringInc/MarlinBuilder

and still can’t find the configuration files, what I get is this only 3 folders, configs,core, and docs.

with files like : build for machine
config for machine

etc…

no configuration.h and configuration_adv.h

otherwise i am downloading the wrong folder or doing something wrong

That repo is a bunch of scripts that don’t contain the Marlin source or the configuration files. Those files instruct the build server to check out a fresh copy of Marlin, edit the configuration files, and then compile the code and zip it up.

Download a zip from here: MarlinBuilder releases.

Pick one like V1CNC_SkrPro_Dual and unzip it and then unzip the source inside there. Inside that folder should be Marlin/Configuration.h and Marlin/Configuration_adv.h. You’ll need to compare those to the version you already have. You won’t be able to just copy everything, you need to pick the right changes to apply. This is why meld is so useful.