- Posts: 459
- Thank you received: 158
LinuxCNC S-Curve Accelerations
- arvidb
- Offline
- Platinum Member
-
Less
More
5 years 5 months ago #208482
by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
Thanks!
Was your plasmatask a separate module (.so/.ko) or was it part of some existing module?
I need to call Rust's dependency manager 'cargo' (kind of the equivalence to C's make) to build my code, which produces an archive file (which is just a collection of - quite a few - object files). This then needs to be linked into the motmod module.
It's not that difficult to write a special rule for motmod.so that takes care of this for uspace builds, but it would be nice to add some more generic support for Rust source files. That's why I feel I need to understand the build system pretty well.
When it comes to kbuild builds, support for Rust in the kernel is on its way , but it's still very early days. So I'm thinking it's a good idea to get jerk-limited jogs working well in uspace first, and then see where the kernel support is.
Was your plasmatask a separate module (.so/.ko) or was it part of some existing module?
I need to call Rust's dependency manager 'cargo' (kind of the equivalence to C's make) to build my code, which produces an archive file (which is just a collection of - quite a few - object files). This then needs to be linked into the motmod module.
It's not that difficult to write a special rule for motmod.so that takes care of this for uspace builds, but it would be nice to add some more generic support for Rust source files. That's why I feel I need to understand the build system pretty well.
When it comes to kbuild builds, support for Rust in the kernel is on its way , but it's still very early days. So I'm thinking it's a good idea to get jerk-limited jogs working well in uspace first, and then see where the kernel support is.
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
5 years 5 months ago #208483
by rodw
No it as just a short lived experiment (read 1 day). Andy had often said that there could be a need for a seperate task (and io) module for plasma, so I just made a copy of the existing modules and incorporated them into the build process as a proof of concept and subsequently loaded them from the ini file
The capability now included in plasmac.comp and supporting GUI's means going down this path is not warranted.
Sounds like what you need is the ability to load a seperate motion module
Replied by rodw on topic LinuxCNC S-Curve Accelerations
arvidb wrote: Thanks!
Was your plasmatask a separate module (.so/.ko) or was it part of some existing module?
No it as just a short lived experiment (read 1 day). Andy had often said that there could be a need for a seperate task (and io) module for plasma, so I just made a copy of the existing modules and incorporated them into the build process as a proof of concept and subsequently loaded them from the ini file
The capability now included in plasmac.comp and supporting GUI's means going down this path is not warranted.
Sounds like what you need is the ability to load a seperate motion module
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
-
Less
More
- Posts: 459
- Thank you received: 158
5 years 5 months ago #208494
by arvidb
(It could perhaps be useful to keep motmod as it is and build an alternative motion module with jerk-limited jogging, but the problem I have to solve - how to add support for linking a motion module with a static archive built from Rust source - would be the same.)
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
I'm not so sure about that: the motion module (motmod) contains lots of stuff, simple_tp (that I'm replacing) is just a small part. Look from line 1103 in the Makefile .rodw wrote: Sounds like what you need is the ability to load a seperate motion module
(It could perhaps be useful to keep motmod as it is and build an alternative motion module with jerk-limited jogging, but the problem I have to solve - how to add support for linking a motion module with a static archive built from Rust source - would be the same.)
Please Log in or Create an account to join the conversation.
- rodw
- Offline
- Platinum Member
-
Less
More
- Posts: 12170
- Thank you received: 4153
5 years 5 months ago #208501
by rodw
Replied by rodw on topic LinuxCNC S-Curve Accelerations
I don't know anything about Rust and very little about the Make build process but it seems its all there. Such interoperability is supported in Rust.
docs.rust-embedded.org/book/interoperability/rust-with-c.html
I would create a new folder under /src/emc/, Edit the SUBDIRS to execute that folder at compile time and have your submakefile call the rust build process having regard for all of the extra interoperability overhead mentioned on that link. Then you have an object file that culd be included in the link process.
The first win I would be looking for is getting the submakefile calling the rust build process.
I would create a new folder under /src/emc/, Edit the SUBDIRS to execute that folder at compile time and have your submakefile call the rust build process having regard for all of the extra interoperability overhead mentioned on that link. Then you have an object file that culd be included in the link process.
The first win I would be looking for is getting the submakefile calling the rust build process.
Please Log in or Create an account to join the conversation.
- Grotius
- Offline
- Platinum Member
-
Less
More
- Posts: 2419
- Thank you received: 2349
5 years 5 months ago #208517
by Grotius
Replied by Grotius on topic LinuxCNC S-Curve Accelerations
Hi,
For info, attached a cleaned up makefile that compiles the core of lcnc. Maybe it helps a bit.
For info, attached a cleaned up makefile that compiles the core of lcnc. Maybe it helps a bit.
Please Log in or Create an account to join the conversation.
- arvidb
- Offline
- Platinum Member
-
Less
More
- Posts: 459
- Thank you received: 158
5 years 5 months ago #209377
by arvidb
Replied by arvidb on topic LinuxCNC S-Curve Accelerations
Just a small update:
I've cobbled together an MPG
input using a 7i77 I had lying around, an old used Siemens MPG and this luxurious cardboard box. 
It's meant for testing of the planner, and sure enough, I immediately found a bug that I'm now working on ironing out. I've managed to create a test that repeats it and identified where things go wrong - now I just need to figure out how to fix it...
---
No real progress on build integration yet, but I have an idea on how to do that now at least.
It's meant for testing of the planner, and sure enough, I immediately found a bug that I'm now working on ironing out. I've managed to create a test that repeats it and identified where things go wrong - now I just need to figure out how to fix it...
---
No real progress on build integration yet, but I have an idea on how to do that now at least.
The following user(s) said Thank You: tommylight, rodw
Please Log in or Create an account to join the conversation.
Time to create page: 0.502 seconds