create_nordic_project.py failed(1) when trying to add existing file in CMakeLists.txt

Hi,

I am trying add existing file in CMakeLists.txt a main.cpp file inside Project libapp.a, at which i am getting this python error.
Kindly help.

Regards,

Parents
  • Hello, 

    Can you please elaborate more on what you are trying to achieve? What version of the nRF Connect SDK are you using? What project are you trying to add this file to? Have you read the output error that is provided in the output of SES?

    -Øyvind

  • Hello ,

    I am just trying to add main.cpp in light_switch sample app, So to add that i have placed the file main.cpp in src folder, and i right click on project libapp.a and select "Add existing file to CmakeLists.txt" and select the main.cpp file.


    After which I am getting the error 

    create_nordic_project.py failed(1)

    Output error says:

    Creating solution light_switch.emProject
    D:/CHAMP2/Nordic_App/Nordic_SDK/nCS/v1.7.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=bl653_dvk -DBOARD_DIR=D:\CHAMP2\Nordic_App\Nordic_SDK\nCS\v1.7.0\zephyr\boards\arm\bl653_dvk -BD:\CHAMP2\Nordic_App\Nordic_SDK\nCS\v1.7.0\nrf\samples\bluetooth\mesh\light_switch\build_bl653_dvk -SD:\CHAMP2\Nordic_App\Nordic_SDK\nCS\v1.7.0\nrf\samples\bluetooth\mesh\light_switch -DNCS_TOOLCHAIN_VERSION=1.7.0 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=D:\CHAMP2\Nordic_App\Nordic_SDK\nCS\v1.7.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
    -- Configuring incomplete, errors occurred!
    CMake Error at CMakeLists.txt:20:
    Parse error. Expected "(", got newline with text "

    ".



    error: cmake failed
    create_nordic_project.py failed (1)

    I also found that this has corrupted my light_switch sample app itself, because when I am trying to open light_switch sample app again from nRF Desktop app, it is running CMake and again generating create_nordic_project.py failed(1) error

     

  • Thanks for providing this information. 

    There have been issues with path length earlier, and the use of D:\ instead of C:\. Can you try the following:

    1. Shorten path to e.g. D:\NCS\v1.7.0.
    2. Move to C:\NCS\v1.7.0
    Ubaid_M said:
    -- Configuring incomplete, errors occurred!
    CMake Error at CMakeLists.txt:20:
    Parse error. Expected "(", got newline with text "

    ".

    Have you addressed this issue in the CmakeFile.txt on line 20?

Reply
  • Thanks for providing this information. 

    There have been issues with path length earlier, and the use of D:\ instead of C:\. Can you try the following:

    1. Shorten path to e.g. D:\NCS\v1.7.0.
    2. Move to C:\NCS\v1.7.0
    Ubaid_M said:
    -- Configuring incomplete, errors occurred!
    CMake Error at CMakeLists.txt:20:
    Parse error. Expected "(", got newline with text "

    ".

    Have you addressed this issue in the CmakeFile.txt on line 20?

Children
Related