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 Zephyr support #1615

Merged
merged 9 commits into from
Mar 24, 2023
Merged

Conversation

PatrickM-ZS
Copy link
Contributor

This PR adds basic support for running CycloneDDS on Zephyr RTOS.

It was validated on Zephyr targets qemu_x86, qemu_cortex_a53 (emulators) and s32z270dc2_rtu0_r52 (physical board), using the CycloneDDS examples and ddsperf tool. Supporting code and usage examples are still in my personal repository here but I intend to clean that up and merge it (into the ports directory) in a future PR.

Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @PatrickM-ZS, this is a nice addition to the set of platforms that Cyclone runs on. LGTM, except for the build failures on Windows (sign conversion warning, but all warnings get treated as errors). That shouldn't take much effort to fix.

@PatrickM-ZS
Copy link
Contributor Author

It seems GCC is unhappy about struct signedness now, I'll take another look...

PatrickM-ZS and others added 9 commits March 23, 2023 14:51
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Extend Zephyr RTOS support

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Add workaround for plist struct alignment for Zephyr

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Move plist alignment workaround for Zephyr to ddsrt_alignof and deal with arm32 short enums

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Fix joining mcgroups multiple times and add igmp support for Zephyr

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Add sockwaitset support + some other fixes for Zephyr

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Revert "Move plist alignment workaround for Zephyr to ddsrt_alignof and deal with arm32 short enums"

This reverts commit 73b1bf0.

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>

Revert "Add workaround for plist struct alignment for Zephyr"

This reverts commit 4927618.

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
The (gcc) option -fshort-enums causes the enumerated types used in the
discovery information to become char-sized things instead of int-sized
things. This breaks the plist serializer in really bad ways.

Additionally, there are some platforms where _Alignof returns a larger
alignment than what the compiler uses as alignment of a struct
member (without having used #pragma pack or similar). This also breaks
the plist serializer in really bad ways.

This commit attempts to address these issues by serialising an enum
using a enum type that also fits in 1 byte, and by computing the
alignment of a struct member via offsetof in the plist handling.

Signed-off-by: Erik Boasson <eb@ilities.com>
…ilters in nxp s32 ethernet driver

Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
Signed-off-by: Patrick Masselink <patrick.masselink@zettascale.tech>
@PatrickM-ZS
Copy link
Contributor Author

This test fail on the macOS 11 target seems to be a common issue, caused by slow cloud infra?
843 - CUnit_ddsc_multi_sertype_remote_slowpath (Timeout)

@eboasson
Copy link
Contributor

This test fail on the macOS 11 target seems to be a common issue, caused by slow cloud infra?
843 - CUnit_ddsc_multi_sertype_remote_slowpath (Timeout)

Yes, those macOS targets often have such timing issues. Timing out on a "slow path" is quite fitting, I must say 😂

Copy link
Contributor

@eboasson eboasson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me now, thanks @PatrickM-ZS 🙂

@eboasson eboasson merged commit 11b923a into eclipse-cyclonedds:master Mar 24, 2023
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.

None yet

2 participants