eclipse-cyclonedds / cyclonedds

Eclipse Cyclone DDS project
https://projects.eclipse.org/projects/iot.cyclonedds
Other
878 stars 360 forks source link

Porting to VxWorks #1909

Open gongqinpeng opened 10 months ago

gongqinpeng commented 10 months ago

I want to port "cyclonedds" to VxWorks, Do I need to implement a VxWorks version for all methods within "ddsrt" for the convenience of "ddsi" layer calls? How to implement it? Thanks!

PatrickM-ZS commented 10 months ago

Hello, You are right all platform abstraction is in ddsrt. So if you can build that component, you can be pretty sure the rest of the codebase works as well or at least can be made to work with some caveats.

There's already (untested) support for VxWorks in ddsrt since the code, in one of its former incarnation, did actually support VxWorks. Today, i believe if you target VxWorks RTP mode and enable the posix options, it should still mostly work as is. VxWorks at some point (version 7 or maybe before?) started supporting cmake so it provides a ready to use toolchain file that should get you started.

gongqinpeng commented 10 months ago

I am sorry that I need to port to VxWorks version 5.4, and there are only a small number of library files that can be used, which do not support the posix standard.

eboasson commented 10 months ago

@gongqinpeng Cyclone doesn't assume POSIX, just C99, so it should be possible. You might want to have a look at the FreeRTOS support, that might be a useful starting point.

razr commented 7 months ago

it is ported and the patch is here: https://github.com/razr/vxworks7-layer-for-ros2/blob/humble-release-23.09/cyclonedds/usr_src/0001-cyclonedds.patch And it is for VxWorks 7, not for the VxWorks 5.4

eboasson commented 7 months ago

@razr it is a nice small patch. Now it obviously would involve some work to turn that patch into a PR that I could merge because we can't just flip some of these defaults and settings, but it looks to me like it shouldn't be very hard to get there. I don't have access to VxWorks myself, but if you would be willing to give it a shot, it seems like we should be able to make it happen.

razr commented 7 months ago

@eboasson VxWorks SDK is freely available here https://labs.windriver.com/vxworks-sdk/#read It is possible to run VxWorks on QEMU or Raspberry Pi4 with it. I'm not sure how much time I need to provide a clean PR.