Driver development outside zephyr tree

Venkat Rao Vallapaneni <vallapaneni@...>


I tried to add support for custom SoC and custom board without adding to zephyr tree and I could do that. I am able to compile hello_world by passing needed command line options to cmake (SOC_ROOT, BOARD_ROOT, DTS_APP_INCLUDE). I maintained similar directory structure as zephyr in my work area.

Now I needed to add drivers support. How do I add drivers support without adding them to zephyr tree?

I tried creating similar structure like drivers/i2c folder in my work area and added Kconfig.mysoc, CMakeLists.txt and my_i2c_driver.c. I have also created Kconfig and CMakeLists.txt under drivers folder also.

At my work area root level also, I have created CMakeLists.txt and Kconfig. I could enable config options by passing KCONFIG_ROOT to work area root.

Now the problem is with CMakeLists.txt. I tried to include my work area root CMakeLists.txt in samples and it didn't work.

What is the recommended way to develop drivers for custom soc without adding to zephyr tree?


Join to automatically receive all group messages.