marlin-build
marlin-build copied to clipboard
Advanced configuration within src/
In some cases you might want to change the variables not covered by .h
configuration files alone, and you need to make changes inside the MarlinFirmware/Marlin/src
folder.
The script currently have no logic for replacing files inside sub-folders.
It would be amazing if we could use some kind of patching system for this. That way, we could make a repo which has a selection of different mods, and the user can pick and choose which they want, and the script applies them by patching after the git pull.
Not sure if I'm explaining this well...
A repository is a good idea, but sounds like a lot of work to make it possible 😅
However, a solution could be a list of files with corresponding rules that can be applied using sed
. Then we could apply a set of patches even if using the MarlinFirmware/Marlin repository and different tags. 🤔
That sounds good to me!
Advanced configuration can be solved by forking the marlin
repository, making the desired changes and then use the repo override variable introduced in #12
I still like the idea for a solution with sed
for simple tweaks, like changing a PIN to something else.
Right, that's what I'm doing now... Trouble is that it requires a separate branch for each feature combo you may want to include.
One example would be let's say I want to compare Linear Advance and S-Curves (mutually exclusive options in marlin) so now I require two separate branches... Not too bad, but now let's say I introduce another feature I'd like to compare in combination with these two, like say different PID tunings and how they interact with the above... Now I need four....You can see how this grows pretty awkward pretty fast. I've got a set of about 8 of those so I'm up to 2^8 branches hahaha
Right, that's what I'm doing now... Trouble is that it requires a separate branch for each feature combo you may want to include.
One example would be let's say I want to compare Linear Advance and S-Curves (mutually exclusive options in marlin) so now I require two separate branches... Not too bad, but now let's say I introduce another feature I'd like to compare in combination with these two, like say different PID tunings and how they interact with the above... Now I need four....You can see how this grows pretty awkward pretty fast. I've got a set of about 8 of those so I'm up to 2^8 branches hahaha
I see, haven't considered using it in such a way.
I only have one printer, so in such cases i would temporary create a bunch of firmware's locally using docker-compose. Mounting the MarlinFirmware folder to /home/platformio/Marlin
as a volume should do the trick.
Thanks for the tip, I'll give that a try shortly. My extruder decided that it was time for a break, so I'll let you know how I fare when the thing is back in action.
I think it would be awesome to be able to supply recursive file overrides from the Firmware/Configuration/
folder. For example, I have an issue with the default pins defined for my board and have to manually override that. To do that with the marlin-build I end up having to maintain a complete fork of Marlin and supply that to the builder. Would be great if I could just save my pins file in Firmware/Configuration/src/pins/rambo/
and have it move that file into the equivalent folder within the Marlin downloaded source. To me this seems like it would be easier than dealing with any sed commands, but I'm not an advanced linux user like some of you I'm sure.
Thanks again for this wonderful project, it really is a great tool.
You might want to look into the patch command