modm canopen (lely-core) implementation & port #698
kikass13
started this conversation in
Show and tell
Replies: 1 comment
-
updateThe Stm32 example project and used submodules are now public :) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
@pem-flr @rleh @daixtrose
I want to share our endeavors in porting the canopen implementation of the lely-core stack
There was some of back and forth communication with the developer (and the involved ECSS [European Cooperation for space standardization] team) and we adapted lely for our modm projects
the ecss team tries to fix lely, so that it only uses static memory. Currently lely consists of a core C - API (which the ecss is working on) and a wrapping c++ api (which is easier to use and more comfortable, cause c++ and stuff). The ecss currently only works on the C part of lely-core, (and will sadly not support the c++ part).
So I added some static memory fixes into the c++ api (although i must admit, that a lot of heap is still used and I wont try removing that because it is way to complicated). and got this stack working with modm.
The resulting core library is here:
The modm repository + module (which includes teh core as a submodule) is here:
Most of my code is about fixing random C stuff (enums , type declarations), fixing things that are not feasible to do on embedded (native filesystem / device tree support) and a lot of ifdefs to remove parts of the stack code, that does not work properly on embedded systems.
Its not pretty, but it works very well.
We are currently half way through implementing CiA402 motor profile (on top of the existing CiA301/CiA302 canopen implementation lely provides) and have tested the communication using our own CiA302 Masters & Slaves (both modm, stm32) as well as Elmo Motor controllers.
As far as I can tell, canopen will not be a part of modm in the future. So I can only share my work here for people who are interested in adding canopen support for their modm projects.
I will make our master / slave stm32 example projects public in the coming weeks (CTO has to approve that first), and If someone is interested, i can probably share some code for the CiA402 implementation as well (that needs some more time though).The Stm32 example project and used submodules are now public :)
full example
Beta Was this translation helpful? Give feedback.
All reactions