Skip to content
This repository was archived by the owner on Feb 9, 2023. It is now read-only.

Advanced configuration within src/ #5

Open
frealmyr opened this issue Oct 30, 2020 · 9 comments
Open

Advanced configuration within src/ #5

frealmyr opened this issue Oct 30, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@frealmyr
Copy link
Owner

frealmyr commented Oct 30, 2020

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.

@frealmyr frealmyr added the enhancement New feature or request label Oct 30, 2020
@ghost
Copy link

ghost commented Dec 12, 2020

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...

@frealmyr
Copy link
Owner Author

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. 🤔

@ghost
Copy link

ghost commented Jan 31, 2021

That sounds good to me!

@frealmyr
Copy link
Owner Author

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.

@ghost
Copy link

ghost commented Mar 10, 2021

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

@frealmyr
Copy link
Owner Author

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.

@ghost
Copy link

ghost commented Mar 11, 2021

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.

@jneilliii
Copy link

jneilliii commented May 3, 2021

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.

@mike-onehub
Copy link

You might want to look into the patch command

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants