Re: How to build external drivers


Bolivar, Marti
 

"Joris Offouga via Lists.Zephyrproject.Org"
<offougajoris=gmail.com@...> writes:

Hi all,

How to build external drivers with zephyr, like board with example :
west build -b board_name . -- -DBOARD=board_name
-DBOARD_ROOT=<path_to_board>.
Just a couple of notes:

- the board doesn't have to be specified twice
- the default source directory is the current working directory

So this could be written a bit more simply as:

$ west build -b board_name -- -DBOARD_ROOT=<path_to_board>


is there a similar command for drivers?
This is supported:

https://github.com/zephyrproject-rtos/zephyr/issues/8379

As far as I can tell, there's nothing to do. For example, the
downstream nrf repository has out of tree drivers in its drivers/
directory:

https://github.com/NordicPlayground/fw-nrfconnect-nrf

This supports building applications with west build out of the box.

E.g. you can build nrf/applications/nrf_desktop with an out of tree
board, using the out of tree pmw3360 driver, with:

west build -b nrf52840_pca20041 -- -DBOARD_ROOT=$HOME/ncs/nrf

(The BOARD_ROOT is not strictly necessary here because of some magic
in the nrf build system, but it doesn't hurt so I've put it in for
your reference.)

Please note that if you're going to try to replicate this exact
example yourself, you need to create a separate west installation
using the downstream getting started guide:

https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started.html

Otherwise, hopefully it's a starting point for you.

Best,
Marti


Best regards,

Joris Offouga



--
Best Regards,

Joris Offouga

Join {devel@lists.zephyrproject.org to automatically receive all group messages.