This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Nrf sdk and Segger Embedded Studio which files to add to source control

Hi,

I am just starting to use nrf connect sdk for 5340; and wading through the confusion or build systems, west, SES, Visual studio; no clear path.

As we have used SES and the old nordic sdks in the past; the learning curve here should be less hopefully.

To start a new project I have copied a sample l lock stock and barrel from th nrf samples directory; then used the "open nrf connect project" wizard to create a new project for my board based on this copy..This creates a build directory with numerous directories and files; I then do a build.

My question is what files should be added to source control from within my build directory.

I should add everything for the original copied sample but what from the wizard created build directory?

I should add the *.emproject files; but what else?
I assume on entering SES next time I work on the project Ithen just "open a solution" and browse to that project file.

The if one reconfigures the project via segger "configure nrf connect sdk project"; again which files must be saved to source control.

Regards,

Owain

Parents
  • Hi Owain, 

    I am just starting to use nrf connect sdk for 5340; and wading through the confusion or build systems, west, SES, Visual studio; no clear path.

    I'm sorry to hear that this is causing some confusion around our nRF Connect SDK (NCS) and the nRF5340. I assume you have read our SDK documentation, currently at v1.7.0.

    Especially I would encourage to read the Working with nRF53-series.

    To start a new project I have copied a sample l lock stock and barrel from th nrf samples directory; then used the "open nrf connect project" wizard to create a new project for my board based on this copy..This creates a build directory with numerous directories and files; I then do a build.

    Depending on how you would like to program your kit, I do recommend testing out our new VS Code extension as this often make a more clear overview of the project, and easier to jump back to where you left.

    As you mention, opening the Segger Embedded Studio Nordic Edition (SES) you can start working with "Open nRF Connect SDK project". In here you can select the project you like test e.g. Bluetooth: Peripheral HIDS keyboard (please make sure that sample supports nRF5340) Following the steps provided in Building and programming a sample under Working with nRF53-series:

    (Here I'm using the Toolchain Manager)

    This will generate a build folder in v1.7.0/nrf/samples/bluetooth/peripheral_hids_keyboard/

    After clicking OK, you should now be able to go to Build -> Build Solution. 

    Now, as described under Multi-Image build, I add Bluetooth: HCI RPMsg with New project -> Add to current solution.

    When you get to step 14, you are asked to download the network core image, and if you get an error, you might need to run nrfjprog --recover from your terminal.

         --recover               Erases all user available non-volatile memory and
                                 disables the read back protection mechanism if
                                 enabled.

    If you have followed the steps correctly, you should now have a complete programmed nRF5340 DK running the sample you want.

    The next time you open this project with the same settings in picture above, you should be able to work from where you left.

    Kind regards,
    Øyvind

  • I can do the multi imge builds fine; but which SES files should I check in to source control such that anyone else on doing a checkout will pickup same project as myself.

    Up to now I have just been checking in the zephyr required project and source files; but as the multi-imzge build is a SES thing in this case. 

    Do I need to check any files under the build directory or not; or just rely on colleagues using the wizard (file->open nrf connect sdk project) to browse to setup the project?

  • We would strongly recommend using nRF Connect for VS Code extension when doing projects in a team. And have a look at our Development model - Adding your own code, and the Build and Configuration system chapter.

    When sharing your project with your team, you should not share the build folder. This is built based on your project files e.g. Bluetooth: Peripheral HIDS keyboard

    nrf\samples\bluetooth\peripheral_hids_keyboard\child_image
    nrf\samples\bluetooth\peripheral_hids_keyboard\child_image\hci_rpmsg.conf
    nrf\samples\bluetooth\peripheral_hids_keyboard\src
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\app_nfc.c
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\app_nfc.h
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\main.c
    nrf\samples\bluetooth\peripheral_hids_keyboard\CMakeLists.txt
    nrf\samples\bluetooth\peripheral_hids_keyboard\Kconfig
    nrf\samples\bluetooth\peripheral_hids_keyboard\prj.conf
    nrf\samples\bluetooth\peripheral_hids_keyboard\README.rst
    nrf\samples\bluetooth\peripheral_hids_keyboard\sample.yaml

    When you build this project for e.g. nRF5340dk_nrf5340_cpuapp, it will pull in relevant configurations for the board and project, and generates the build folder. 

Reply
  • We would strongly recommend using nRF Connect for VS Code extension when doing projects in a team. And have a look at our Development model - Adding your own code, and the Build and Configuration system chapter.

    When sharing your project with your team, you should not share the build folder. This is built based on your project files e.g. Bluetooth: Peripheral HIDS keyboard

    nrf\samples\bluetooth\peripheral_hids_keyboard\child_image
    nrf\samples\bluetooth\peripheral_hids_keyboard\child_image\hci_rpmsg.conf
    nrf\samples\bluetooth\peripheral_hids_keyboard\src
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\app_nfc.c
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\app_nfc.h
    nrf\samples\bluetooth\peripheral_hids_keyboard\src\main.c
    nrf\samples\bluetooth\peripheral_hids_keyboard\CMakeLists.txt
    nrf\samples\bluetooth\peripheral_hids_keyboard\Kconfig
    nrf\samples\bluetooth\peripheral_hids_keyboard\prj.conf
    nrf\samples\bluetooth\peripheral_hids_keyboard\README.rst
    nrf\samples\bluetooth\peripheral_hids_keyboard\sample.yaml

    When you build this project for e.g. nRF5340dk_nrf5340_cpuapp, it will pull in relevant configurations for the board and project, and generates the build folder. 

Children
No Data
Related