Topics

[Zephyr-users] Adding an out of tree driver


Bolivar, Marti
 

Hi,

You should just need to add it to the build system's Kconfig and
CMakeLists.txt hierarchy like any other file in your module.

There are worked examples in
https://github.com/nrfconnect/sdk-nrf/tree/master/drivers.

HTH,
Martí

"Lawrence King via lists.zephyrproject.org"
<lawrence.king=irdeto.com@lists.zephyrproject.org> writes:

Adding an out of tree board is easy, I just set the variable BOARD_ROOT and the build system happily finds my_custom_board. This is nicely described by following the links from here: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.zephyrproject.org%2Flatest%2Fapplication%2Findex.html%23boards&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659844236%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=HLSJWOCIo1bmNd7toN8PiWy4yPKgDoKUSgwu4dc6HMY%3D&amp;reserved=0

Now I want to do the same for my_custom_sensor_driver. Is there a variable I can set (like SENSOR_ROOT) that will find my out of tree sensor driver? Unfortunately the documentation at https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdocs.zephyrproject.org%2F2.3.0%2Fsamples%2Fapplication_development%2Fout_of_tree_driver%2FREADME.html&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=4qznVND3NnjhnL6oS0evZVz89Uqi0Tk4zIpPycsMX3I%3D&amp;reserved=0 is a little sparse.

How do I include an out of tree sensor driver?

Lawrence King
Principal Developer
Connected Transport Market Unit
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.irdeto.com%2F&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=DuktziXbXA7dDl%2BDxoD5cMHtFNUn0EtQfEKdmMK9SDI%3D&amp;reserved=0
+1(416)627-7302

[1]<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcareers.irdeto.com%2F&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Z8rh2RzZbwZp0PtsYk8Asrn2CALvLKN6B7SRKWNDR3g%3D&amp;reserved=0> [2 - linkedin] <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.linkedin.com%2Fcompany%2Firdeto%2F&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=hojClORdOoJtcW8pt162xhoVOkFpDSAlHFdpi4ixj9U%3D&amp;reserved=0> [3 - instagram] <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.instagram.com%2Flifeatirdeto%2F%3Fhl%3Den&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=SBEqwhWg5Wsp2LhpAqZh5JBYbVqaXvF6X0O1shAvBCU%3D&amp;reserved=0> [4 - youtube] <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.youtube.com%2Fchannel%2FUCwgT0-wMbEqx3qLfrPIEnRg&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=a9wID1YYPeFdVXijSjIDOCdAJJ%2FcAIA7T1md1y%2FQj8o%3D&amp;reserved=0> [6 - facebook] <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.facebook.com%2FJoinIrdeto%2F&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=urIrDp3t2mZKOMMewzbWZiv6hS3v%2FYg%2FGgNGhkHzL2U%3D&amp;reserved=0> [7] <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Ftwitter.com%2FIrdeto%3Fref_src%3Dtwsrc%255Egoogle%257Ctwcamp%255Eserp%257Ctwgr%255Eauthor&;amp;data=04%7C01%7Cmarti.bolivar%40nordicsemi.no%7C8f5afeb9e53b4b11f9b808d87b63fcf5%7C28e5afa2bf6f419a8cf6b31c6e9e5e8d%7C0%7C0%7C637395016659854203%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=6rPAMHp%2FoV4OnZlM8rx43YOkNtzFsD60KTLHvTwDi8E%3D&amp;reserved=0>

CONFIDENTIAL: This e-mail and any attachments are confidential and intended solely for the use of the individual(s) to whom it is addressed. It can contain proprietary confidential information and be subject to legal privilege and/or subject to a non-disclosure Agreement. Unauthorized use, disclosure or copying is strictly prohibited. If you are not the/an addressee and are in possession of this e-mail, please delete the message and notify us immediately. Please consider the environment before printing this e-mail. Thank you.