West workspace

Hello,

I have created a standalone application using the NCS nrf SDK and Zephyr. I do manage all my project dependencies using West. I have some questions related to the west workspace:

1. Should I always create a west workspace using the `west init` command? Can I store a west workspace with its .west/config file in git? Or should I only store the west.yml and source files? I think it would be easier for the user only to clone one repo and do a `west update` instead of creating a workspace, cloning a git repo inside the workspace, and finally updating the dependencies.

2. Is there a way to store all dependencies in a subfolder in the workspace or is the "Zephyr" folder mandatory?

Thank you and best regards.

Christopher

Parents Reply
  • Christopher said:
    1. In your example, I see this PR: https://github.com/OeySa/nRF9160-Hello_Board/pull/1. Should I make a Zephyr module or not ?

    I don't think this is necessary. I think this was done to be able to add an out-of-tree board to the project.

    Christopher said:
    I would be interested in having a .west folder on the top level of my repository, and I would also like to store the .west/config file in a repository. This would let the user clone the repo as any repo, and not learn and use a specific tool for that purpose.

    I will get back to you about this

    Christopher said:
    I would be interested in having a .west folder on the top level of my repository

    I was able to make this work using path-prefix, check it out here https://github.com/simon-iversen/application_as_manifest. If you follow the steps in the readme, you will end up with .west/config located in the root folder, and the ncs specific stuff will be put into the ncs_dependencies folder.

    Christopher said:
    and I would also like to store the .west/config file in a repository.

    I asked a developer internally that's working with west and got the following reply:

    "It is not recommended to store the entire workspace in a git repository. Some users try to do this and it may happen to work in some cases, but there are no guarantees. It is not a supported use case. Workspaces should be created via west init."

    Best regards,

    Simon

Children
Related