2025-02-10 5:54 PM - last edited on 2025-02-11 12:33 AM by Peter BENSCH
Hi Everyone
I face other problem of Counter driver on zephyr for STM32MP157 DK2 kit
Here is dts:
&timers5 {
status = "okay";
counter {
compatible = "st,stm32-counter";
status = "okay";
};
};
and prj config:
CONFIG_COUNTER=y
I face problem:
zephyr-sdk-0.17.0/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/../../../../arm-zephyr-eabi/bin/ld.bfd: app/libapp.a(main.c.obj): in function z_impl_counter_get_frequency': /home/dotaituan/Documents/2nd_LEAPS/03_git/134-zephyr/zephyr/include/zephyr/drivers/counter.h:301: undefined reference to __device_dts_ord_66' collect2: error: ld returned 1 exit status ninja: build stopped: subcommand failed.
Anyone could help?
Thank you so much!
2025-02-11 7:55 AM
Hello @dotaituan,
This is a linker error, check this troubleshooting devicetree: Troubleshooting devicetree — Zephyr Project Documentation.
To fix it, you need to make sure that:
The node is enabled: the node must have status = "okay"; (Recall that a missing status property means the same thing as status = "okay")
A device driver responsible for allocating the struct device is enabled. That is, the Kconfig option which makes the build system compile the driver sources into your application needs to be set to y.
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.