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

Calling of driver .h file in user defined file

Hello,

I am using the project as in7776.hello_world_cpp_additional_source_files.zip

It is building successfully on VSCode.

I need to evaluate interfacing any SDK file moving further, hence I would want to include: nCS\v1.7.0\zephyr\include\drivers\clock_control.h (#include clock_control.h)

In user defined "my_class.h" file present in the above project.

Kindly guide me on how I can include it (CMakeLists.txt modification perhaps) and build successfully on VSCode.

P.S: I know clock_control initialization is being done initially during project configuration, I just want to evaluate inclusion of a driver file is all.!

Parents
  • I've used the following include method and it worked so far:

    #include <drivers/clock_control.h>

    As for the CMakeList.txt, I think the following command includes driver directory(among other things):

    zephyr_library_include_directories(.)

  • Hello ,

    Thanks, that seems to work for me.

    As for the CMakeList.txt, I think the following command includes driver directory(among other things):

    zephyr_library_include_directories(.)

    Where can I find the list of such tags(zephyr_library_include_directories(.)) to be added in CMakeLists.txt, to include relevant drivers..?

    Can you kindly point me to any CMakeLists.txt tutorial or article for working with nCS.?

Reply
  • Hello ,

    Thanks, that seems to work for me.

    As for the CMakeList.txt, I think the following command includes driver directory(among other things):

    zephyr_library_include_directories(.)

    Where can I find the list of such tags(zephyr_library_include_directories(.)) to be added in CMakeLists.txt, to include relevant drivers..?

    Can you kindly point me to any CMakeLists.txt tutorial or article for working with nCS.?

Children
No Data
Related