Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TMCSTEPPER_SW_SERIAL to force usage of SW/HW serial #231

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

skruppy
Copy link

@skruppy skruppy commented Jan 11, 2022

This PR adds a method to force the usage of HW/SW serial, while still maintaining backwards compatibility. This new method can be used together with small changes to Marlin to automatically select the best method.

Related issues:

Aspects of the PR:

  • Don't break code / be backwards compatible
  • Changes not tailored specifically for Marlin (don't "detect" the presence of Marlin and behave appropriately)
  • Prevent future name clashes: prefix / scope the new macro with the lib name TMCSTEPPER_
  • Allow forcing "HW serial only" mode as well as "SW serial" mode (with a single macro)

If you are planing to release a 0.7.4 with this PR, then I will file the corresponding Marlin PR. If you don't plan to release any further v0 releases, in favor of v1, please add a similar mechanism 😃

@teemuatlut
Copy link
Owner

I can merge this in with 0.7.4 in mind but for the v1.0 branch I'd like to have something that doesn't rely so much on the preprocessor and works across IDEs and frameworks.

@phizev
Copy link

phizev commented Aug 22, 2022

@skruppy thank you for this effort, I've been happily using this after failing to find a solution myself.

I've added a suggestion to the commit with the changes needed on Marlins side which accounts for a sanity check between software serial, and endstop interrupts.

@KevWal
Copy link

KevWal commented Aug 4, 2024

Thankyou everyone for the great work. I'd also like to use TMCStepper with Hardware Serial (so I don't need Software Serial) and have ENDSTOP_INTERRUPTS_FEATURE turned on in Marlin. Is it possible to progress a resolution to this? Thanks very much.

@phizev
Copy link

phizev commented Aug 5, 2024

@KevWal if you patch this library with this PR, and apply the changes detailed in skruppy/Marlin@c53622b to Marlin, you can use hardware serial. I can't recall the exact steps involved to use a patched version of a library when compiling Marlin.

I wouldn't hold my breath on this being resolved on both sides. There are blockers raised in the Marlin issue which I do not understand, with questions which remain unanswered in terms of an acceptable path forward.

I've since moved to Klipper as I got tired of patching multiple projects to have basic functionality with seemingly no resolution in sight. I think the affected audience is just too small for this to be prioritised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants