zephyrproject-rtos/west

Is there anyway to tell 'west' a different path to find board file

fidus-kai opened this issue · 8 comments

I have installed Nordic nRF SDK at C:\ncs drive, which has zephyr SDK and board folder. My app project is located at different path, say D drive. when I run 'west build -b board-name', the tool is automatically to go C:\ncs to find existing board-name, what if the customized board-name is within my project folder at D drive? I can't find a command/configure to define the board folder path.

I believe west is merely passing the board name to CMake so this is technically not a west issue but a zephyr issue.

Does everything work if you temporarily move your board folder next to the existing boards?

Have you followed all the instructions here?
https://docs.zephyrproject.org/latest/hardware/porting/board_porting.html#create-your-board-directory

it works if I move the new-board to zephyr's boards folder. Still looking for a way to point the new-board at different path.

IIRC west looks in the top project and all imported projects for the boards folder. https://github.com/zephyrproject-rtos/example-application is such a top level project that imports other projects via its west.yml. See the boards/arm/custom_plank folder.

One thing I had problems with was when the top level project was not checked out into the folder that was given in path (see west.yml).

manifest:
  self:
    path: example-application

So make sure that you check out the project into the right folder or don't put path into your west.yml at all. You can also add additional modules to your build system by some CMake variables (e.g. ZEPHYR_EXTRA_MODULES).

You are of course using -DBOARD_ROOT=?

You are of course using -DBOARD_ROOT=?

That's not necessary if one structures ones project following the zephyr directory layout and makes sure the the project is considered a ZEPHYR_MODULE (via ZEPHYR_EXTRA_MODULES or by configuring west.yml correctly).

The advantage is that the board directory is then not only what one has given via -DBOARD_ROOT= but the set of all boards directories of all referenced projects.

That's not necessary if...

Sounds great but I'm urging @fidus-kai to at least temporarily try -DBOARD_ROOT= and see is that helps.