Replies: 2 comments 1 reply
-
Provided tests/lib/devicetree/devices runs just fine, it looks like a problem on your setup. I'd also discourage usage of this API, not even sure why it's there. |
Beta Was this translation helpful? Give feedback.
1 reply
-
This looks to be caused by static here: zephyr/include/zephyr/device.h Line 972 in 38010c1 The unit test works because the device is declared in the same file. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Describe the bug
I'm trying to get the
init_entry
of a device usingDEVICE_INIT_DT_GET
macro but when compiling the resulting__init___device_dts_ord_N
is undeclared.In my specific case
DEVICE_DT_GET(DT_NODELABEL(spiflash))
expands to&__device_dts_ord_104
(which is correct)DEVICE_INIT_DT_GET(DT_NODELABEL(spiflash))
expands to&__init___device_dts_ord_104
(which is undeclared)The grep result from build folder (without the offending lines)
So clearly the init function does exist but something goes wrong compiling. The actual init function can also be found in zephyr.map if I remove the offending lines.
To Reproduce
I can't say more than try to use the macro, it does not work for any device in my project. However,
tests/lib/devicetree/devices
runs just fine.Expected behavior
Get reference to the devices init_entry.
Impact
Major annoyance
Logs and console output
Environment (please complete the following information):
Beta Was this translation helpful? Give feedback.
All reactions