Skip to content

samples: counter: sample.drivers.counter.alarm : sample missing dts dependency #90714

@hakehuang

Description

@hakehuang

Describe the bug

  • Platforms
    all NXP platform has such issue
  • git bisect found below commit introduce problem
022962c90d75c871bc0aa4ba100249ce34c25798
samples: counter: alarm: remove platform_allow filterring

Because this is a common testing scenario, almost any counter instance
should be able to run. Some counter instances cannot run this sample
should be filtered by platform_exclude or filter keywords.

Signed-off-by: The Nguyen <[email protected]>

this sample need dts be defined for different platform, which need get aligned in dts level, however this code sets to be platform dependent.

Regression

  • This is a regression.

Steps to reproduce

west scripts/twister -p frdm_k82f -j 12 -T samples/drivers/counter/alarm --build-only

Relevant log output

/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/include/zephyr/device.h:96:41: note: each undeclared identifier is reported only once for each function it appears in 96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~~~/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/include/zephyr/toolchain/common.h:168:26: note: in definition of macro '_DO_CONCAT' 168 | #define _DO_CONCAT(x, y) x ## y | ^/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/include/zephyr/device.h:96:33: note: in expansion of macro '_CONCAT' 96 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id) | ^~~~~~~/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/include/zephyr/device.h:293:37: note: in expansion of macro 'DEVICE_NAME_GET' 293 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id)) | ^~~~~~~~~~~~~~~/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/include/zephyr/device.h:310:34: note: in expansion of macro 'DEVICE_DT_NAME_GET' 310 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id)) | ^~~~~~~~~~~~~~~~~~/home/jenkins/agent/workspace/bitbucket_build_platform/zephyr/samples/drivers/counter/alarm/src/main.c:117:50: note: in expansion of macro 'DEVICE_DT_GET' 117 | const struct device *const counter_dev = DEVICE_DT_GET(TIMER); | ^~~~~~~~~~~~~ninja: build stopped: subcommand failed.

Impact

Annoyance – Minor irritation; no significant impact on usability or functionality.

Environment

  • Version: v4.1.0-4825-g3e8ec3aaf299

Additional Context

No response

Metadata

Metadata

Assignees

Labels

area: SamplesSamplesbugThe issue is a bug, or the PR is fixing a bugpriority: highHigh impact/importance bug

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions