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

Fixed removal of z_impl_clock_gettime in zephyr 3.5.99 #378

Merged
merged 3 commits into from Jan 19, 2024

Conversation

danielallstar
Copy link
Contributor

Solution to the following problem: micro-ROS/micro_ros_zephyr_module#134

The notified problem is: " in function uxr_nanos': undefined reference to z_impl_clock_gettime' "
The Zephyr developers have removed the `z_impl_clock_gettime' function and replaced it by the clock_gettime function.
I have implemented the new function in the time.c file, while maintaining compatibility with the older zephyr versions.

@richiprosima
Copy link
Contributor

Build status:

  • Linux Build Status
  • Windows Build Status

@pablogs9
Copy link
Member

The CI is failing due to uncrustify failure, you can fix it using the following operation inside the folder and pushing the changes.

# Install uncrustify
# git clone https://github.com/uncrustify/uncrustify --branch uncrustify-0.72.0 --single-branch uncrustify
# mkdir -p uncrustify/build
# cd uncrustify/build
# cmake -DCMAKE_INSTALL_PREFIX=../install ..
# make -j$(nproc)
# cd ../..
# export PATH=${PWD}/uncrustify/install/bin:$PATH

# Get the config and check
curl -l https://raw.githubusercontent.com/eProsima/cpp-style/master/uncrustify.cfg -o uncrustify.cfg
find src test include examples \( -name "*.cpp" -o -name "*.c" -o -name "*.h" -o -name "*.hpp" \) -exec uncrustify -c uncrustify.cfg --check {} +

@danielallstar
Copy link
Contributor Author

After running the crustify operation inside the folder, git does not see any changes to commit. This does not seem to be the expected behavior. What do you suggest to do now?

@pablogs9
Copy link
Member

Sorry I did not write the correct command, instead of --check use --no-backup in uncrustify command

@danielallstar
Copy link
Contributor Author

I pushed the code with the applied crustify changes

src/c/util/time.c Outdated Show resolved Hide resolved
@richiprosima
Copy link
Contributor

Build status:

  • Linux Build Status
  • Windows Build Status

@pablogs9 pablogs9 changed the base branch from master to develop January 16, 2024 14:29
@pablogs9
Copy link
Member

Testing here: micro-ROS/micro_ros_zephyr_module#136

@pablogs9
Copy link
Member

micro-ROS/micro_ros_zephyr_module#136 is green, so I merge this.

@danielallstar thanks a lo for the contribution!

@pablogs9 pablogs9 merged commit 83f129a into eProsima:develop Jan 19, 2024
2 of 3 checks passed
@eProsima eProsima deleted a comment from richiprosima Jan 19, 2024
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

3 participants