This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

nRF53: What files to add to project Git Repo

Sorry if this is a repeat ticket. I've done some searches and they result in information around Zephyr and RF Connect SDK Git repos and West usage to manages related source files and builds. But the search hasn't not yet reveled any info about what directories / files in my development environment I should be put in my project Git repo to be able to reproduce the build at a later date.

In my case, I used VSCode with the nRF Connect Extension Pack plugin and started with the peripheral UART sample created as a "workspace". So, I think my environment has all of the source files, moet cloned from versioned repos by west, and some files I am modifying or adding to the project.

So now I want to take what I have created and get it into a new project Git repo that I will manage on Github. But I don't know what directory to init my git repo, how to define my .gitignore (is there a standard nRF Connect SDK ignore file?), and what files to confirm are under source code management.

Any suggestions or pointers to info that defines how to manage my files with Git would be great.

-Brad

Parents
  • To summarize, if I've understood your configuration properly, you will have to add the whole SDK to the git repo to get it to work as you describe. I would instead recommend you to install the SDK locally either through the automatic install in nRF Connect for Desktop or the manual installation guide linked above, and to only have your application in the repository. Every project I've worked on with NCS has used this "workspace philosophy", since what you want to change is on the application level of folders, and extremely rarely in the SDK files. 

    Actually, I don't think you have understood this correctly. I suggest that you try creating a project from a sample as I have with the Nordic tools, specifically in VS Code with the nRF Connect Extension Pack. If you follow the steps I did, creating the project as a "Workspace" (not Freestanding) you will find that I did not "add the whole SDK to the git repo", but the nRF Connect VS Code plug-in (through the use of "west workspace") cloned all these additional git repos. As you can see in the following screenshot, the Nordic tool tells you the "west workspace" is used to manage the SDK version and it will create its own instance.

    This is not bad, it is actually good. The "west" pulls in the correct version of every thing needed to build the app. But, as you said, I do not want to add these to my git repo as it is unnecessary. I do not need a copy in my git repo because the "west" tool will pull in the correct version of the other git repos; that is its purpose.

    The guidance I need from your engineering team (please reach out to them for their guidance) is clear definition of what items need to be in my git repo so, when cloned and "west update" is executed, the west tool has the correct information to pull in everything else correctly. 

    Again, these are the initial steps I did in VS Code (please, try it yourself): 

    As I stated I’m used VSCode with the nRF Connect Extension Pack plugin. From the “nRF Connect for VS Code” welcome screen I selected “Create a new application from sample…”. In the next screen, for Application type I selected “Workspace”.

    If you try this and look in the director above your project you will see all the other repos were cloned as the workspace was created from the sample. 

Reply
  • To summarize, if I've understood your configuration properly, you will have to add the whole SDK to the git repo to get it to work as you describe. I would instead recommend you to install the SDK locally either through the automatic install in nRF Connect for Desktop or the manual installation guide linked above, and to only have your application in the repository. Every project I've worked on with NCS has used this "workspace philosophy", since what you want to change is on the application level of folders, and extremely rarely in the SDK files. 

    Actually, I don't think you have understood this correctly. I suggest that you try creating a project from a sample as I have with the Nordic tools, specifically in VS Code with the nRF Connect Extension Pack. If you follow the steps I did, creating the project as a "Workspace" (not Freestanding) you will find that I did not "add the whole SDK to the git repo", but the nRF Connect VS Code plug-in (through the use of "west workspace") cloned all these additional git repos. As you can see in the following screenshot, the Nordic tool tells you the "west workspace" is used to manage the SDK version and it will create its own instance.

    This is not bad, it is actually good. The "west" pulls in the correct version of every thing needed to build the app. But, as you said, I do not want to add these to my git repo as it is unnecessary. I do not need a copy in my git repo because the "west" tool will pull in the correct version of the other git repos; that is its purpose.

    The guidance I need from your engineering team (please reach out to them for their guidance) is clear definition of what items need to be in my git repo so, when cloned and "west update" is executed, the west tool has the correct information to pull in everything else correctly. 

    Again, these are the initial steps I did in VS Code (please, try it yourself): 

    As I stated I’m used VSCode with the nRF Connect Extension Pack plugin. From the “nRF Connect for VS Code” welcome screen I selected “Create a new application from sample…”. In the next screen, for Application type I selected “Workspace”.

    If you try this and look in the director above your project you will see all the other repos were cloned as the workspace was created from the sample. 

Children
No Data
Related