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

sys/ztimer: fix backend selection #17372

Merged

Conversation

leandrolanzieri
Copy link
Contributor

Contribution description

With the introduction of ztimer_no_periph_rtt in #17284 ztimer_msec and ztimer_sec don't fallback to ztimer_periph_timer when the pseudomodule is active. This adds the fallback selection again.

Testing procedure

  • Something like BOARD=samr21-xpro USEMODULE="ztimer_msec ztimer_no_periph_rtt" make -C examples/hello-world/ should work with this PR, but fails on master due to lack of backend selection.

Issues/PRs references

#17284

@leandrolanzieri leandrolanzieri added the Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) label Dec 10, 2021
@leandrolanzieri leandrolanzieri added this to the Release 2022.01 milestone Dec 10, 2021
@github-actions github-actions bot added Area: sys Area: System Area: timers Area: timer subsystems labels Dec 10, 2021
@leandrolanzieri leandrolanzieri added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Dec 10, 2021
@benpicco benpicco requested a review from kfessel December 10, 2021 11:51
@kfessel
Copy link
Contributor

kfessel commented Dec 10, 2021

Ad: with #16342 this issue would have had a nicer error message

Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

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

#16342 would had give you a nice message in case of a missing timer backend

read change ✔️
test master bug verified ✔️
test pr bug gone ✔️

@kfessel
Copy link
Contributor

kfessel commented Dec 10, 2021

with #16342

RIOT-master/sys/ztimer/init.c:182:6: error: #error No suitable ZTIMER_MSEC config. No rtt or basic timer?
  182 | #    error No suitable ZTIMER_MSEC config. No rtt or basic timer?
      |      ^~~~~
RIOT-master/sys/ztimer/init.c:188:38: error: ‘ZTIMER_RTT_CLK’ undeclared here (not in a function)
  188 | ztimer_clock_t *const ZTIMER_MSEC = &ZTIMER_RTT_CLK;

@fjmolinas fjmolinas merged commit 5f21ade into RIOT-OS:master Dec 10, 2021
@leandrolanzieri leandrolanzieri deleted the pr/sys/ztimer/fix_backend_selection branch December 10, 2021 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: sys Area: System Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants