-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
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
STM32F1: Dummy SoftwareSerial (as TMCStepper fallback) #14861
STM32F1: Dummy SoftwareSerial (as TMCStepper fallback) #14861
Conversation
c274174
to
943a543
Compare
943a543
to
b76bf93
Compare
sorry, rebased on previous commit to show it can build with it (travis) |
I would rather avoid hacks like this, if a simpler method will work. I'm working diligently within #14832 to determine whether |
didnt test yet, will check if that build with it |
So far it solves the issue for |
ok, doing a pause anyway.. the repo need some cleanup to do anything more... |
Its required to compile with last TMCStepper lib version. TODO: implement https://github.com/FYSETC/SoftwareSerialM (only if wanted)
4fb2be1
to
1b52c4b
Compare
Looks like @teemuatlut updated |
rmm, so this has_include will randomly use a lib which doesnt exist, even if not using TMC drivers at all ? |
i was more planning to include the needed code in the F1 HAL and enable it (require an extra timer) only with TMC220x_UART enabled |
Either
|
What [worries] me the most is not the C++17 standard on a compiler dated from 2017, but the fact the lib may use dangerous ressources outside the tracked source code (like hardware timers or worst). |
PlatformIO limitation to the way it includes libraries. If a library may be used in your code, but you're not sure, you cannot (easily) get the library to not compile. So, the TMCStepper library is compiled for every environment that includes it. So it is up to the library itself to manage the problems that could arise from trying to include stuff that doesn't exist for the current platform. |
So, in other words, you want to do a full implementation of SoftwareSerial within Marlin for the platforms that don't supply it? That would be great! Meanwhile, we'll still want to get There is something useful we can definitely do here with this dummy library to help out TMCStepper! We just need to add a |
|
Is the first issue (old compiler) going to produce a crappier binary? Is this a specific SoftwareSerial concern or a wider concern about other libraries? And are you also including any of the base platform libraries in that group? |
else gnu++17 seems to work the same... but the TMCStepper hasinclude has been pushed on the wrong branch... |
I see it on TMCStepper/master, and a version bump to 0.4.6. |
yep, in fact the hasinclude commit is after the 0.4.6 tag |
So it is! I think it's just waiting for some confirmation, and then it'll get a tag. |
Also added teemuatlut/TMCStepper#57 |
I don't think I'd need to act on this in any way. The TMCStepper can make the calls to your dummy SW Serial as per usual but they just don't do anything. #ifdef SW_SERIAL_PLACEHOLDER
#undef SW_CAPABLE_PLATFORM
#endif With this all your |
@teemuatlut yes, without the #undef, we could track/log what is sent to the TMC to debug... later. Anyway, travis/users problem should be resolved for the F1s for now... To be continued for real UART support... |
@thinkyhead I don't currently think I need to merge in your PR. This change here makes it possible for me include a "working" (=compiling) SW Serial for STM, but then your PR instructs me to not use any of it. Ok if we go with just this dummy version for now with no further changes to TMCStepper? Ultimately my goal is that TMCStepper would be able to use any installed SoftwareSerial implementation it can find (as long as API compatible), but if the header is not found, then disable the functionality. This should be doable with the |
Latest TMCStepper lib includes a lib not available on the F1 for Arduino... so lets simulate it for now...