This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Errror linking Omnivision video driver

Hi, 

I'm new to nRF/Zephyr development and trying to integrate the OV7670 camera with the nRF52840 board. Since there was no driver for this particular camera I ported the one available for OV7725 in the Zephyr SDK. As far as I know I've adjusted all the kconfig files correctly and I've set  CONFIG_VIDEO_OV7670=y in the prj.conf file. The driver seems to be getting compiled when performing west build but I get the following error when building main.c "src/main.c:90: undefined reference to `ov7670_init_0'". I have added the #include <drivers/video.h> so I'm not sure why I'm getting this error. Have I missed a configuration setting?

Parents Reply
  • Don't worry, I would never judge someone who is trying to learn. :)

    The first problem is in your main.c, you can't call the init function of a driver like that. Try this instead:

    const struct device *dev;
    dev = device_get_binding("ov7670");
    if (dev == NULL) {
        printk("Error: Could not get ov7670 device binding\n");
    }

    The CMakeLists.txt I wanted to see was the one in zephyr/drivers/video. But just add this line to it if you haven't already:

    zephyr_library_sources_ifdef(CONFIG_VIDEO_OV7670	ov7670.c)

    I also wanted to see the .yaml file you put in zephyr/dts/bindings/video, but as long as it's there it should be fine.

Children
Related