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

Using Segger Embedded Studio and Zephry for nRF52840

Is there an example for setting up a Segger Embedded Studio project for using an nRF52840 with Zephyr.  The instructions on the Zephry site for adding Zephyr files to a project build do not seem to apply to how SES sets up a project.

  • OK.  I've started a brand new project.

    I created a base directory.
    Cloned zephyr into <baseDir>/zephyr.
    Followed instructions in "Getting Started Assistant" to do
          "git checkout tags/v1.13.99-ncs2" and
         "pip3 install -r zephyr\scripts\requirements.txt"
    Created empty 'build' directory.

    Then I activated emStudio and selected "Open Connect nRF SDK Project..."
             This failed.
              Error message:
                       "Can't load project file"
                       "The project file 'C:Users/info/Dropbox/64Seconds/NHM5G-Z/build/NHM5G-Z.emProject' is invalid"
                       "The reported error is 'solution load command failed (1)'
              This was followed by second error message:
                       "Can't read file"
                       "Can't open zephyr/cmake/extensions.cmake for reading"

    The file "<baseDire>/zephyr/cmake/extensions.cmake" does exist.

    Any thoughts?

  • Hi Craig

    Similar issues earlier have been caused by the following commands having failed during setup. Please try running these two commands and then load the project file.

    pip3 install --user -r zephyr/scripts/requirements.txt
    pip3 install --user -r nrf/scripts/requirements.txt

    Best regards,

    Simon

  • Simon,

    I do not execute the pip3 install of requirements for nrf scripts, because this project does not use any Nordic library and therefore it does not have an "nrf" directory.

    However, just to be sure...
    I have re-created the project from the start following all of the instructions in the "Getting Started Assistant" including cloning "mcuboot", "nrf" and "nrxlib" (in addition to cloning zephyr).  I followed all instructions, adding the two new pip3 commands suggested above.

    I got the same error message again.

    This time I walked through the build log in emStudio line-by-line and I noticed that there was a problem in my source code directory with a CMakeLists.txt file.  I have never used CMake before this, but I managed to fix the problems with the subdirectories.

    The "Open nRF Connect SDK Project" now runs without an error.  I have no idea why a problem in my CMakeLists.txt file would be reported as a missing file in the Zephyr build.

    I mention all of this in detail in case someone else gets a similar error message in their attempt to create their own project.
    My advice to them is read the build log details.  The error messages can cause confusion.

    I appreciate all of your support and patience in helping me figure this out.

    I have one final question before we can close this thread.  If I am not using any Nordic library and do not want "mcuboot" for this nRF52840 project, do you think I actually need the clone of "mcuboot", "nrf" and "nrxlib" to make emStudio work properly?

    -Craig

  • HI Craig

    Glad to hear you got it working! I believe Zephyr uses the CMakeLists file to build the actual project in SEGGER, which is why it is important to include. I agree that the error messages are somewhat confusing at times, and we are working on making this a better user experience.

    I think, as of now, you should use the clones of mcuboot, nrf and nrfxlib to ensure that the projects are working properly.

    Best regards,

    Simon

  • Hello Simonr,

    I'm trying to do exactly what this post is about, since it looks to be the best documentation aound to get it done.

    My problem is that "https://developer.nordicsemi.com/.pc-tools/nrfconnect-apps/nrf91.json" is no longer active, do you have an alternative for this part ? 

    Thanks in advance,

    Aloïs KYROU

Related