nrf Connect SDK in private repo

Hi Team,

We are currently using nrf Connect SDK 1.8.0 and developing our application using nrf52833.

Currently we use our own git to maintain our application and nRF SDK is not part of our private git. Now we are planning to integrate nRF SDK in our repo. Mainly to keep track of changes we have done in nRF Connect SDK and also for long term maintenance perspective.

Ideally, we would like new developer to:

- Clone our private repo (Our application + nRF Connect SDK)

- Install toolchain in their machine and start build application using VS Code

To accomplish this we were referring https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.0.0/nrf/dm_adding_code.html#id3

As per above link, this is what we did:

1. Cloned the v1.8.0 using : west init -m https://github.com/nrfconnect/sdk-nrf --mr {revision} ncs; cd ncs; west update

2. Added this folder in our repo

3. On other machine, cloned our private repo and opened our application in VS Code, selected nRF Connect SDK in Welcome Page. Toolchain is already selected (installed at different location)

4. Now when we try to go to build configuration there is no Board available to select.

Could you please guide on what's wrong here or what's the right way to achieve what we want to do?

We are using VS Code (1.68.0) on Windows.

Thanks!

Parents
  • Hi Dejan,

    Let me add all the steps I followed in details:

    1. I cloned my private repo in the local filesystem. Under "myprivategitrepo/"

    2. Opened VS Code (v1.68.0), from the nRF Connect Extension selected, Create New Application. Under create application selected Option "Workspace". Selected: nRF Connect SDK Tag: v1.8.0, Toolchain (already installed in standard path C:\ncs\v1.8.0\toolchain), Workspace location: myprivategitrepo/, Workspace Name: ncs_v1.8.0, Application Template: peripheral_lbs, Application name: peripheral_lbs

    3. After step-2, entire ncs v1.8.0 is cloned under "myprivategitrepo/" along with the peripheral_lbs:

    4. At this point I can build the peripheral_lbs in VS Code.

    5. Now I want to push this entire "ncs_v1.8.0/" to our private repo. However, since this flder has multiple git repo (.git directories), I can't add entire folder to my private repo. So, searched and removed all the ".git" folders under "ncs_v1.8.0/".

    6. At this point, If I try to build the peripheral_lbs again, it fails. And the error is what I mentioned earlier:

    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')

    So, it seems VS Code build is somehow dependent on the .git directories. I debugged this little bit more and found out that, if I put back two (nrf/ and zephyr/) ".git" directories back, application compiles.

    I hope I answered all your questions. This should be easily reproducible at your end too.

    At the end, our goal is to maintain the modified (we have our specific changes on top of the v1.8.0) ncs in our private git repo and use it. 

    Thanks!

  • Hi,

    You should not treat all different repositories inside NCS as one independent repository, but rather keep all needed repositories separated from each other. Most of the work for you can be done by the west tool. You can have a look at the structure of the west.yml file inside ncs\<your_version>\nrf. 

    Best regards,
    Dejan

Reply Children
No Data
Related