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

I cannot load project in Segger Embedded Studio - emProject file is invalid

I am having problems loading an existing project that I successfully built and ran in the past.

I open IDE from nRF Connect > Toolchain Manager > Open IDE

The SES opens with the last project (different from the one I would like to load) running on the nRF5340pdk.

I then do File > Open nRF Connect SDK Project... > select the CMakeLists.txt for the project I want to load.

I get the error below. I then deleted all the files in the build folder but the error would not go away.

Any idea what could be causing this?

Thank you for your support.

Mohamed

Top Replies

  • Hi Simon,

    I only build in SES and the project is building and running fine now. All I have done is get rid of the .overlay file and delete all files from the build folder. Your colleague Heidi has identified a problem in the .overlay file. I think other than the .overlay, I was not doing anything wrong.

    But why would an .overlay file cause a project not to load? I'd understand if it caused a build to fail.

    I would also like you to answer the question I asked 9 days ago and that is,

    I can see both v2.3.99 and v2.3.0 mentioned in the build log.

    -- Zephyr version: 2.3.99 (C:/zephyrproject/zephyr)

    C:\gnuarm\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=zephyr-v2.3.0-2211-g9163da09d69d ...

    What are these two lines telling us?

    Kind regards

    Mohamed

  • I see that you are building your projects from C:/zephyrproject/zephyr, and I assume you have gotten this from https://docs.zephyrproject.org/latest/getting_started/index.html#get-zephyr-and-install-python-dependencies. Am I right? You should not do this. The tutorial was written using NCS v1.3.0 and you should use that, not Zephyr upstream.

    Where it's coming from

    It seems like the first line ("Zephyr version: 2.3.99 (C:/zephyrproject/zephyr)"), comes from C:/zephyrproject/zephyr. I think this is because you are in a Zephyr directory when building and it will automatically get the Zephyr version of this repo (try running git describe --tags from C:/zephyrproject/zephyr and you will probably see 2.3.99). 

    I'm actually not sure where the Zephyr base from the second line ("C:\gnuarm\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=zephyr-v2.3.0-2211-g9163da09d69d ..."), comes from. However I saw the same behaviour when I built the light controller from C:/zephyrproject/zephyr with cmd not from the Toolchain Manager, and without setting Zephyr Base. However, if you build it from cmd/Git Bash from the Toolchain Manager, you don't need to set the Zephyr base, as it is set by default.

    Solution

    • Open Git bash (or cmd) from the Toolchain Manager as described here
    • cd into C:\Dev\NCS_projects\light_controller
    • Run west build -b nrf5340pdk_nrf5340_cpuapp -d build_53app

    Best regards,

    Simon

  • Thank you Simon.

1 2