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

How to add new source file to Segger for nRF9160

Using SEGGER Embedded Studio for ARM v4.20a (64-bit).

I'd like to add a new source file to a nRF9160 sample project. The menu selection Project --> Add New File is grayed out.  Also grayed out is  Project --> Add Existing File.  Right clicking on the project items window offers no options for adding a file.  I tried editing the XML in file build.emProject but it was ignored. 

Thanks

Parents
  • One way to do this is to open CMakeLists.txt in the sample project root and add a new line, ie.

    target_sources(app PRIVATE src/your_new_file.c)

    When you reload the project in SES the new file will be shown under app/libapp.a.

Reply
  • One way to do this is to open CMakeLists.txt in the sample project root and add a new line, ie.

    target_sources(app PRIVATE src/your_new_file.c)

    When you reload the project in SES the new file will be shown under app/libapp.a.

Children
No Data