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

adafruit_feather_nrf52840: tests/subsys/portability/cmsis_rtos_v2/portability.cmsis_rtos_v2 fails when building #80215

Open
fkokosinski opened this issue Oct 22, 2024 · 1 comment
Assignees
Labels
area: Portability Standard compliant code, toolchain abstraction bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@fkokosinski
Copy link
Member

Describe the bug

The test in tests/subsys/portability/cmsis_rtos_v2/portability.cmsis_rtos_v2 fails to build for the following two Zephyr targets:

  • adafruit_feather_nrf52840/nrf52840/sense
  • adafruit_feather_nrf52840/nrf52840/sense/uf2

The following compilation error is reported:

/home/filip/zephyrproject/zephyr/drivers/sensor/voltage_divider/voltage.c:118:41: warning: implicit
declaration of function 'K_TIMEOUT_ABS_TICKS'; did you mean 'Z_TIMEOUT_MS_TICKS'? [-Wimplicit-function-declaration]
  118 |                 data->earliest_sample = K_TIMEOUT_ABS_TICKS(
      |                                         ^~~~~~~~~~~~~~~~~~~
      |                                         Z_TIMEOUT_MS_TICKS
/home/filip/zephyrproject/zephyr/drivers/sensor/voltage_divider/voltage.c:118:41: error: incompatible types when assigning to type 'k_timeout_t' from type 'int'
/home/filip/zephyrproject/zephyr/drivers/sensor/voltage_divider/voltage.c: In function 'voltage_ini
':
/home/filip/zephyrproject/zephyr/drivers/sensor/voltage_divider/voltage.c:145:33: error: incompatible types when assigning to type 'k_timeout_t' from type 'int'
  145 |         data->earliest_sample = K_TIMEOUT_ABS_TICKS(0);

To Reproduce
Steps to reproduce the behavior:

  1. west build -p -b adafruit_feather_nrf52840/nrf52840/sense tests/subsys/portability/cmsis_rtos_v2
  2. See error

Expected behavior

Build doesn't end with an error.

Impact

Showstopper (failing CI). See #80038.

Environment (please complete the following information):

  • OS: Linux
  • Toolchain: Zephyr SDK
  • Commit SHA or Version used: 185432c
@fkokosinski fkokosinski added the bug The issue is a bug, or the PR is fixing a bug label Oct 22, 2024
@fkokosinski
Copy link
Member Author

For context: this bug is most likely caused by this sample's config, because it explicitly n-selects CONFIG_TIMEOUT_64BIT: https://github.com/zephyrproject-rtos/zephyr/blob/main/tests/subsys/portability/cmsis_rtos_v2/prj.conf#L16.

Whereas K_TIMEOUT_ABS_TICKS is only defined when CONFIG_TIMEOUT_64BIT is y-selected: https://github.com/zephyrproject-rtos/zephyr/blob/main/include/zephyr/kernel.h#L1442-L1456.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Portability Standard compliant code, toolchain abstraction bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

No branches or pull requests

3 participants