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

Zephyr timing implementation refactored into two separate files #294

Merged
merged 4 commits into from
Oct 25, 2023

Conversation

erlingrj
Copy link
Collaborator

@erlingrj erlingrj commented Oct 24, 2023

Clean up Zephyr platform implementation:

  • Remove the use of preprocessor to conditionally compile the two different timing APIs
  • Implement the kernel timing API and counter timing API in two separate files
  • remove the _lf_ prepending of all the static local variables. They are static and local to that file, so no need to add long complicated variable names that are hard to parse
  • Allow the user to pick which Timing API to use by setting the flag LF_ZEPHYR_CLOCK_COUNTER or LF_ZEPHYR_CLOCK_KERNEL. If no such flag is defined then we pick what is available but we prefer the counter version
  • Let the user set LF_ZEPHYR_STACK_SIZE and LF_ZEPHYR_THREAD_PRIORITY to configure stack sizes and priorities of the threads created. Defaults to 1024 and 5 if nothing is chosen.

Closes lf-lang/lingua-franca#2063

@erlingrj erlingrj marked this pull request as draft October 24, 2023 12:36
@erlingrj erlingrj marked this pull request as ready for review October 24, 2023 15:21
@erlingrj erlingrj requested a review from lhstrh October 24, 2023 15:21
Copy link
Member

@lhstrh lhstrh left a comment

Choose a reason for hiding this comment

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

Nice! Looks great to me. I guess this doesn't require any changes in the code generator?

@erlingrj
Copy link
Collaborator Author

Correct, no changes required in lingua franca

@erlingrj erlingrj merged commit e5ae698 into main Oct 25, 2023
25 checks passed
@lhstrh lhstrh changed the title Refactor zephyr timing implementation into two separate files Zephyr timing implementation refactored into two separate files Jan 23, 2024
@lhstrh lhstrh deleted the zephyr-house-keeping branch February 1, 2024 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Refactor Zephyr platform timing API
2 participants