Re: How to build external drivers

Bolivar, Marti

"Joris Offouga via Lists.Zephyrproject.Org"
<> writes:

Hi all,

How to build external drivers with zephyr, like board with example :
west build -b board_name . -- -DBOARD=board_name
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:

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/

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:

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


Best regards,

Joris Offouga

Best Regards,

Joris Offouga

Join to automatically receive all group messages.