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

Segger SES NCS CmakeList and add files

Hi all,

I have really strange behavior with Sesgger SES. I'm working on Linux Kubuntu lastest version.

Segger version is : 

SEGGER Embedded Studio for ARM

Release 4.52  Build 2020033100.41808
Linux x64

After installing all the tool i can build ,debug ,program with my nrf52833 DK ,no problem.

I'm using the blinky example of latest ncs sdk from zephy folder.

But When i want to follow this tutorial:

developer.nordicsemi.com/.../gs_modifying.html

Problem 1: CMake List:

Unlike to the tutorial, option to manage CmakeList are not present.

Problem 2 : Add new files:

I can't add files, and moreover, sometimes the add new files is there sometimes not, just by clikcing right several times on project folder.

I've never succeed in adding a folder too.

Segger check for updates propose v4.52 b , but when i dowsnload it, there no OPen nRf connect anymore, i guess it is because SES with Nordic is not the same software...

Am I the own to have this kind of issue please ?

Thank you very much cause i'm really stuck here. I tried to go on Eclipse but i have other kind of issue...

Parents
  • Hi!

    I'm seeing the same thing as you regarding problem 1. However, when I open a sample from nrf instead of zephyr, I see the options. So I'm not sure what's going on, but I'll look into that. 

    Regarding your second question, it's not clear to me what you're having issues with. When you right-click on the project, you're not seeing the "Add New File..." etc. options? Or sometimes you are, and sometimes you're not?

     

    Segger check for updates propose v4.52 b , but when i dowsnload it, there no OPen nRf connect anymore, i guess it is because SES with Nordic is not the same software...

     Yes, Segger will recommend upgrades to you that are not the Nordic Edition which means there will be no Open nRF Connect SDK Project options. So, stick to the available Nordic Edition versions of SES.

    Best regards,

    Heidi

  • Hi Heidi , i have found the second problem !

    To have the context menu with Cmake option stuff, it seems we need to add #NORDIC stuff around taget sources !

    To sum up :

    SOLUTION Probleme 1 :

    build.emproject replace :

    <import can_modify_solution="No" file_name="build.emProject"/>, by 

    <import can_modify_solution="Yes" file_name="build.emProject"/>,

    SOLUTION Probleme 2:

    Surroung target_sources with :

    # NORDIC SDK APP START
    target_sources(app PRIVATE ${app_sources})
    # NORDIC SDK APP END

    So i dont't know really why but it works...

    How to solve cleanly this two issue then ? Do we have to change a settings somewhere or should it be done by you and correct that in the new realease of SES nRF and sdk  please ?

Reply
  • Hi Heidi , i have found the second problem !

    To have the context menu with Cmake option stuff, it seems we need to add #NORDIC stuff around taget sources !

    To sum up :

    SOLUTION Probleme 1 :

    build.emproject replace :

    <import can_modify_solution="No" file_name="build.emProject"/>, by 

    <import can_modify_solution="Yes" file_name="build.emProject"/>,

    SOLUTION Probleme 2:

    Surroung target_sources with :

    # NORDIC SDK APP START
    target_sources(app PRIVATE ${app_sources})
    # NORDIC SDK APP END

    So i dont't know really why but it works...

    How to solve cleanly this two issue then ? Do we have to change a settings somewhere or should it be done by you and correct that in the new realease of SES nRF and sdk  please ?

Children
  • Hi! 

    I'm glad you sorted this issue out.

    I'll forward this to the relevant people. Depending on if this is a SES issue, or just a lack of documentation, fixes will be made accordingly. :) 

    Best regards,

    Heidi

  • Thank you ! There is really stuff to do here because even when i create folder, it doesn't appear in linux tree. Moreover, i had the experience where it desapear also in SES. and each time i re import the project ( because dts change for example) option No comme back. So i deicided to put all my files in src. I have the feeling that we should create a kind of external librairie like all the other "projects" of the project.

    By the way i'm spending 2hours to avec a gpio in input working... between deprecated flags, .proj options, .dts and .yaml stuff to set, this frameork is not really friendly for the moment Disappointed ...

  • Hi! I heard back from the NCS team.

    In the tutorial, section SES tags in CMakeLists.txt describes this:

    "To be able to manage CMakeLists.txt with SES, the CMake commands that are specific to the nRF Connect SDK application must be marked so SES can identify them. Therefore, they must be surrounded by # NORDIC SDK APP START and # NORDIC SDK APP END tags."

    Zephyr samples do not have this option, only nRF Connect SDK samples.

    So what you're seeing is apparently the intended behavior.

    Best regards,

    Heidi

  • Ok ok sorry to have missed it.

    And to viez .h , should we start a new librairies ? Becasue when i add my header files in subfolder, it disappear and doesn't stay in C_complier_app. How do you work with your differents source files usually with SES ? I have never seen this kind of project arichecture... It is a pitty, because the rest is quiet ok .

  • I'm trying to do what you're describing and having a lot of trouble with it, as well. 

    To add source files in a project, I recommend you just use the file explorer on your computer to add them. Changes to your project in SES (such as adding files or adding configurations) don't get saved between closing and opening the project again, so doing that through SES is not recommended by us. 

    Best regards,

    Heidi

Related