This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

VS Code: Unable to determine what CMake generator to use.

When I create a new project from samples in VS Code I get this error
[variant] Loaded new set of variants
[kit] Successfully loaded 9 kits from C:\Users\Andrea\AppData\Local\CMakeTools\cmake-tools-kits.json
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
[main] Configuring folder: hello_world
[main] Unable to determine what CMake generator to use. Please install or configure a preferred generator, or update settings.json, your Kit configuration or PATH variable. Error: No usable generator found.
How can I fix it?
Parents
  • Help me guys. I've unistalled  completely VS Code with all its settings and extensions deleting the

    %UserProfile%\.vscode
    %AppData%\CodeCode

    folders. So I started with a completly blank environment. But again when I create a new application with the nRF extension and build it, the environment doesn't find a vali cMake

    > Executing task: nRF Connect: Generate config nrf52833dk_nrf52833 for c:\Users\Andrea\Documents\NordicApps\blinky <
    
    Building blinky
    west build --build-dir c:\Users\Andrea\Documents\NordicApps\blinky\build_3 c:\Users\Andrea\Documents\NordicApps\blinky --pristine --board nrf52833dk_nrf52833 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    FATAL ERROR: CMake is not installed or cannot be found; cannot build

    When I launched the VS Code for the first time from the nRF Toolchain Manager (after installed all the extensions needed) the program asked me to install the cMake Tools extension to configure the project. After that the cMake Toll asked me

    but if I choose 'yes' I can't see the kit of nRF toolchain

    . For this reason I don't select anyting but when I add building configuration to my application and click on the 'Build Configuration' button I get again the error above.


    I repeat that on my another personal notebook I didn't have any problem. I don't understand why.


    The situation begins to be frustrating and I'm thinking to change approach. Do you have any suggestion?

Reply
  • Help me guys. I've unistalled  completely VS Code with all its settings and extensions deleting the

    %UserProfile%\.vscode
    %AppData%\CodeCode

    folders. So I started with a completly blank environment. But again when I create a new application with the nRF extension and build it, the environment doesn't find a vali cMake

    > Executing task: nRF Connect: Generate config nrf52833dk_nrf52833 for c:\Users\Andrea\Documents\NordicApps\blinky <
    
    Building blinky
    west build --build-dir c:\Users\Andrea\Documents\NordicApps\blinky\build_3 c:\Users\Andrea\Documents\NordicApps\blinky --pristine --board nrf52833dk_nrf52833 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y
    
    -- west build: generating a build system
    FATAL ERROR: CMake is not installed or cannot be found; cannot build

    When I launched the VS Code for the first time from the nRF Toolchain Manager (after installed all the extensions needed) the program asked me to install the cMake Tools extension to configure the project. After that the cMake Toll asked me

    but if I choose 'yes' I can't see the kit of nRF toolchain

    . For this reason I don't select anyting but when I add building configuration to my application and click on the 'Build Configuration' button I get again the error above.


    I repeat that on my another personal notebook I didn't have any problem. I don't understand why.


    The situation begins to be frustrating and I'm thinking to change approach. Do you have any suggestion?

Children
Related