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: MEMFAULT_METRICS_CPU_TEMP incorrectly enabled #79

Open
JordanYates opened this issue Jan 7, 2025 · 1 comment
Open

Zephyr: MEMFAULT_METRICS_CPU_TEMP incorrectly enabled #79

JordanYates opened this issue Jan 7, 2025 · 1 comment

Comments

@JordanYates
Copy link

JordanYates commented Jan 7, 2025

MEMFAULT_METRICS_CPU_TEMP is incorrectly enabled when there is no die-temp0 alias, as the depends on should not be checking against "".

depends on ADC && SENSOR && ("$(dt_alias_enabled,die-temp0)" != "")

The implementation of dt_alias_enabled returns either "y" or "n", which will never equal "".
https://github.com/zephyrproject-rtos/zephyr/blob/3f6d78c26c6fa1126eda7de51183bcf055afe9e7/scripts/kconfig/kconfigfunctions.py#L149

Additionally, there is no reason that ADC should be part of the dependencies, it is possible to read the internal die temperature without an ADC being enabled (see nRF modem AT%XTEMP)

The proper check should be:

 depends on SENSOR && "$(dt_alias_enabled,die-temp0)" 
@noahp
Copy link
Contributor

noahp commented Jan 7, 2025

Thanks @JordanYates ! I'll pull this into our next SDK release (scheduled for sometime this week), I'll update here when it's published.

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

No branches or pull requests

2 participants