-
Notifications
You must be signed in to change notification settings - Fork 398
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
iox-#1982 FreeRTOS platform implementation #1983
iox-#1982 FreeRTOS platform implementation #1983
Conversation
Hi all! I have now finally got the green light to open this long-promised FreeRTOS platform implementation. Please do review carefully and ask any and all questions that you have! Also, if you think it could be beneficial, I would be happy to jump on a call with you guys (perhaps the bi-weekly iox call?) in order to properly explain everything and answer any more complex and involved things and questions. |
@JakubSosnovec awesome! As soon as I have time I will look at it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just an initial brief look at the code. Did not yet look at all the platform files
...yx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/shared_memory_object/shared_memory.hpp
Outdated
Show resolved
Hide resolved
@JakubSosnovec regarding the iceoryx developer meetup today. All of us have an important meeting at that time and we will only be available from 17:30. So if you want to join today keep in mind that it starts later |
@elBoberido Unfortunately today I wont be able to join at all. |
@JakubSosnovec no problem. Is the regular meeting in two weeks soon enough for you or would you like to have something sooner? |
I think that is fine for me :) |
@JakubSosnovec can you please run clang-format on the changed files? |
03d2c52
to
b47a677
Compare
@JakubSosnovec okay, there is still an issue left. Could you please add |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my POV just a few minor things. Sorry for the slow review :)
...yx_hoofs/include/iceoryx_hoofs/internal/posix_wrapper/shared_memory_object/shared_memory.hpp
Outdated
Show resolved
Hide resolved
Its already there :( https://github.com/eclipse-iceoryx/iceoryx/blob/master/tools/scripts/used-headers.txt#L37 Edit: Oh, I guess I need to add it to the |
@JakubSosnovec oh, my bad. Please remove all |
@JakubSosnovec I hope our slow response has not discouraged you :) |
Codecov Report
@@ Coverage Diff @@
## master #1983 +/- ##
==========================================
+ Coverage 74.05% 74.31% +0.26%
==========================================
Files 404 414 +10
Lines 15924 16086 +162
Branches 2243 2249 +6
==========================================
+ Hits 11793 11955 +162
+ Misses 3422 3416 -6
- Partials 709 715 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lets fix the comma and get it merged.
iceoryx_dust/BUILD.bazel
Outdated
|
||
cc_library( | ||
name = "iceoryx_dust", | ||
srcs = glob([ | ||
"source/**/*.cpp", | ||
"source/**/*.hpp", | ||
]), | ||
hdrs = glob(["include/**"] + glob(["vocabulary/**"])), | ||
hdrs = glob(["include/**"] + glob(["vocabulary/**"])) + [, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you have to remove the comma here to get the bazel CI running again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coma in the next line probably also :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@elBoberido coma ... sounds like you made a @budrus and this is not allowed under the Cobra License ;) ... Please correct your typo to something like cmoma
@JakubSosnovec you did a great job here. Now we have freertos support that is awesome, we only require a CI job for it and we are done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost done. Thanks for your effort
iceoryx_dust/BUILD.bazel
Outdated
|
||
cc_library( | ||
name = "iceoryx_dust", | ||
srcs = glob([ | ||
"source/**/*.cpp", | ||
"source/**/*.hpp", | ||
]), | ||
hdrs = glob(["include/**"] + glob(["vocabulary/**"])), | ||
hdrs = glob(["include/**"] + glob(["vocabulary/**"])) + [, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The coma in the next line probably also :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Updating the release notes would be nice but that can also be done in a follow up. Could be merged from my point of view
Pre-Review Checklist for the PR Author
iox-123-this-is-a-branch
)iox-#123 commit text
)task-list-completed
)iceoryx_hoofs
are added to./clang-tidy-diff-scans.txt
Notes for Reviewer
Changes
NamedPipe
, for further memory consumption optimization.int32_t
->int
for file descriptorssize_t
->uint64_t
for vector sizes/indicesstd::thread::native_handle_type
instead of pthread types, for the cases when the native handle has different type.Explanation
Adding this new platform implementation is unfortunately a bit more complicated than with the normal operating systems such as Linux. We tried to make this implementation is general and generic as possible, however, it just wasnt possible always.
Apart from the standard FreeRTOS kernel (https://freertos.org/RTOS.html), this implementation depends on the official FreeRTOS+POSIX extension (https://freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_POSIX/index.html) and additionally on a little third-party C++ threading library for FreeRTOS (https://github.com/grygorek/FreeRTOS_cpp11).
In order to test this implementation easily, we made this "integration" repository: https://github.com/NXPHoverGames/iceoryx_freertos It basically brings all of the dependencies as well as iceoryx together, provides the CMake build system and compiler toolchain (mostly taken from FreeRTOS_cpp11) in order to be able to build for a particular platform and execute it in an emulator environment (QEMU). Moreover, all of these steps can be easily reproduced because they are wrapped in Docker container image.
For further information and background, I recommend to read the README in our integration repo: https://github.com/NXPHoverGames/iceoryx_freertos/blob/main/README.md as well as the README in the C++ threading lib: https://github.com/grygorek/FreeRTOS_cpp11/blob/master/README.md
Checklist for the PR Reviewer
iceoryx_hoofs
have been added to./clang-tidy-diff-scans.txt
Post-review Checklist for the PR Author
References