cannot find "__device_[device name]" #api

Justin Huang


I am building a device driver for Zephyr and when calling the macro, DEVICE_GET(), like DEVICE_GET(my_dev), I get a build error complaining about undefined __device_my_dev.
I tried to locate where the variable is assembled during the build process but have no luck so far.

Could you please shed some light on where to look for what might go wrong?


Join to automatically receive all group messages.