West Integration:

I'm trying to integrate the following driver into my project 

https://github.com/nobodyguy/HX711_zephyr_driver

In order to load it I need to update the west manifest. 

Using nrfConnect in VSCode I've created a new application from one of the templates 

I've then run >nrf connect : west init

based on this tutorial 
https://nrfconnect.github.io/vscode-nrf-connect/connect/west.html

and using the "custom" option under "select manifest repository"  

But i'm getting the following error 

west init -m github.com/.../HX711_zephyr_driver --mr main

=== Initializing in C:\Users\anton\Desktop\NrfTest\bar
--- Cloning manifest repository from github.com/.../HX711_zephyr_driver, rev. main
Cloning into 'C:\Users\anton\Desktop\NrfTest\bar\.west\manifest-tmp'...
FATAL ERROR: can't init: no west.yml found in C:\Users\anton\Desktop\NrfTest\bar\.west\manifest-tmp
Hint: check --manifest-url=github.com/.../HX711_zephyr_driver and --manifest-rev=main You may need to remove C:\Users\anton\Desktop\NrfTest\bar\.west before retrying.

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

What's strange is it does appear to load the files from the repository. 

What am I doing wrong here that it's throwing a fatal error? Am I missing an earlier step? 
FATAL ERROR: can't init: no west.yml found in C:\Users\anton\Desktop\NrfTest\bar\.west\manifest-tmp



  • Also if I try to define a board west is throwing another error 


    Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\Users\anton\Desktop\NrfTest\bar

    Building bar
    west build --build-dir c:\Users\anton\Desktop\NrfTest\bar\build c:\Users\anton\Desktop\NrfTest\bar --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="c:/Users/anton/Desktop/NrfTest/weighty;c:/Users/anton/Desktop/NrfTest/peripheral_test2/peripheral_hr"

    usage: west [-h] [-z ZEPHYR_BASE] [-v] [-V] <command> ...
    west: error: argument <command>: invalid choice: 'build' (choose from 'init', 'update', 'list', 'manifest', 'diff', 'status', 'forall', 'help', 'config', 'topdir', 'selfupdate')

    * The terminal process terminated with exit code: 2.
    * Terminal will be reused by tasks, press any key to close it.

  • Hi,

    You are right that in order to get west to check out the additional repo you need to add it to west.yml. 

    But i'm getting the following error 

    west init -m github.com/.../HX711_zephyr_driver --mr main

    That is expected, as the west.yml you added is not here.

    What you probably want to do s to have a separate repository for your application, and that should include a west.yml. That in turn should refer to the nRF Connect SDK as well as any additional repositories you want to include. This is described in detail under Adding your own code Workflow 4: Application as the manifest repository. (Alternatively you can fork the entire sdk-nrf and modify the west.yml there to just add any additional repos, that would be workflow 3).

  • TLDR: I figured out what I should've been doing is setting up a workspace application instead of a freestanding one. 


    This set me up with the correct west integration. 

Related