Problems with using the nRF Connect SDK v2.1.2 after upgrading from nRF Connect SDK v.2.0.0 and after having deleted (on my PC) the directory that was created for nRF Connect v2.0.0

I successfully completed all exercises from DevAcademy using nRF Connect SDK v2.0.0 and nRF Connect SDK v2.1.1.

However, when I tried to experiment with DevAcademy Lesson 8: Simple Tracker - I run into difficulties.

Suspecting that I might need to use the latest nRF Connect SDK v2.1.2 , I did install this nRF Connect SDK v2.1.2 and I did delete (on my PC) the folder that was created for nRF Connect SDK v2.0.0., namely C:\Nordic-20\.

But since that time, while I am able to open the VS Code from nRF Connect SDK v2.1.1 and from nRF Connect SDK v2.1.2  - I can see the following error messages (copy attached):

OUTPUT:

2022/11/10, [20:29:29] Unable to resolve configuration with compiler Path: "C:\Nordic-20\toolchain\v2.0.0\Zephyr-SDK\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe"

As I mentioned above, I did delete (on my PC) the folder "C:\Nordic-20\" after installing on my PC the nRF Connect SDK v2.1.2 in the folder c:\Nordic-212\.

And when I try to: "Add Build Configuration", to one of the applications already listed under Applications, I see the following message below the "Board" field:

"No board found" - as can be seen from the attached screenshot.

How can this problem be overcome, so that I could use the nRF Connect SDK v2.1.1 or v2.1.2 to: "Add Build Configuration" to the existing apps without being told that: "No Board found".

Screenshot 10-November-2022.docx

Parents
  • Hello

    It seems like VS Code is looking for your old NCS installation, so you will have to configure it to use your new installation.

    In the NCS tab in VS Code, if you click "Open welcome page", what are your SDK and Toolchain paths under the Quick Setup settings?

    Best regards,

    Einar

  • Hello,

    As per the attached screenshot of the opening page of VS Code, I can not see a TAB: NCS.

    However, under "NRF Connect" I can see "Open welcome page" and when I click on it I can see the "Quick Setup" option.

    I can see the following SDK and Toolchain paths under the "Quick Setup" settings:

    NRF Connect SDK: undefined(c:\Nordic-211)

    nRF Connect Toolchain: Select a value...

    When I choose for the nRF Connect Toolchain the value of 2.1.1 (c:\Nordic-211\toolchains\v2.1.1) , I see the message: "Changes saved".

    However, when I try to "Add Build Configuration" to one of the applications listed under "Applications" in VS Code, I see the message:"No boards found".

    And the message:

    OUTPUT:

    [2022/11/11 18:07:45] Unable to resolve configuration with compilerPath: "C;\Nordic-20\toolchains\v.2.0.0\opt\Zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe"still comes up.

    What should I do to be able to see the various boards under the "Board" and why the above message, highlighted in yellow, keeps coming up?

    Regards,

    JM

    Screenshot 11-11-2022.docx

  • Hi

    Please see lesson 1 in the nRF Connect SDK Fundamentals DevAcademy course for in-depth info on how to create an application.

    "Application Location" is not the location of the source code but where to build your application.

    "Application template" is the location of the sample source code.

    "Application name" is the name of your application, and can be anything you want

    -Einar

  • Hi

    I did see Lesson1 in the nRF Connect SDK Fundamentals DevAcademy course for in-depth info on how to create an application.

    However, when I tried to re-do the Exercise 2 from Lesson 1 from the nRF Connect SDK Fundamentals DevAcademy course - I was unable to even create  a build of the sample "blinky".

    I followed the required exercise steps, namely:

    1. I did create a folder that would hold this exercise, namely: c:\Nordic-nRF5340-dk\Myapps

    2. In VS Code, I clicked on the nRF Connect Extension. In the "Welcome View" I clicked on "Create a new application"

    3. In the "New Application" wiew, I selected:

    3.1  Application type: Freestanding

    3.2  nRF Connect SDK:  2.1.1 ;  nRF Toolchain:  2.1.2

    3.3  Application location: c:\Nordic-nRF5340-dk\Myapps

    3.4  Application template:  zephyr/samples/basic/blinky

    3.5  Application name:  my_blinky

    And I cliked on "Create Application".

    However, when I tried to create a build of this sample, I saw the following error messages:

    "error: Aborting due to Kconfig warnings" ; "FATAL ERROR: command exited with status 1".                    I attach a screenshot of these eror messages.

    I noticed that I was getting a message : "Invalid Python executive", as soon as I opened the VS Code, and I wonder if this is not a part of the problem that I am experiencing. I attach a screenshot of this message: "Invalid Python executive".

    I used to see this message in the past but I used to just click on "continue..." button located at the bottom of the message and then the message: "Last synced" used to change to "Last synced: now".

    But now, when I click on this "configure..." button, I see at the top of the screen that:

    1. Kconfig: Python (Not synced)

    2. Kconfig: Python - 1 setting found.

    3. Location of Python executable. Python 3 is required to use nRF Kconfig. If no location is specified, then the PATH of the current workspace is used.

    I attach a screenshot with the message: " Kconfig Python Not Synced".

    I then clicked on the "gear" icon and I selected "Sync This Setting" option.

    However, the message displayed at the top of the page still showed:

    "Kconfig: Python (Not synced). Last synced:1 wk ago".

    What shall I do to be able to create a build of a sample like: "blinky" ?

    JM

    Error Message 15-Nov-2022.docx

    Invalid Python Executive - message 15-Nov-2022.docx

    Kconfif Python Not Synced.docx

  • Hi

    In my setup, this Python Kconfig setting is empty, so it manages to use the workspace PATH.

    Your error messages state that the build was aborted du to Kconfig warnings. Are there any more errors above the ones in your first screenshot?

    Have you made any changes to the sample at all?

    -Einar

  • Hi

    After experiencing numerous problems with trying to use VS Code with nRF Connect SDK v2.1.2 and v2.1.1 ,  I have removed these two installations from my PC and I have installed a new: nRF Connect SDK v2.1.0 in the new folder: c:\Nordic-210\...

    I then opened the VS Code from nRF Connect SDK v2.1.0 in the Toolbox Manager v1.2.1 and as usual, I saw the message: "Invalid Python executable" that I already showed in my previous email.  I clicked on the "Configure..." button at the bottom of this message but at the top of the screen, I still saw the message: "Last sync: 1 wk ago".

    I attach a screenshot od that message.

    I then clicked  on "Create a new application" on the "New Application" page. I then selected:

    1. Application Type: Freestanding

    2. nRF Connect Toolchain: 2.1.0 (c:\Nordic-210\toolchains\v2.1.0)

    3. Application Location:  c:\Nordic-210\my_blinky_3

    4. Application Template: zephyr\samples\basic\blinky

    5. Application Name:  blinky_3

    6. nRF Conect SDK: 

    I wanted to ensure that under the nRF Connect SDK, I  would enter: "version 2.1.0" that I just installed, but I was unable to do so, as per the message shown below that setting, that stated that :

    " An SDK is inferred from the workspace, so another cannot be selected".

    So, despite me removing the installation of the nRF Connect SDK v2.1.1 from my PC and replacing it with the nRF Connect SDK v2.1.0 - I could not select this newly installed version of nRF Connect SDK v2.1.0 , but I was forced instead to retain (for this selection) the old version of the nRF Connect SDK v2.1.1 that I just removed/uninstalled from my PC.

    Why???

    Could this be a part of the problem that I am experiencing?

    If this SDK v2.1.1 is inferred  from the workspace , then what can I do to ensure that my latest choice of the nRF Connect SDK , namely version V2.1.0 will be inferred from the workspace ?

    I attach a screenshot of the "New Application" page, with the message: " An SDK is inferred from the workspace, so another cannot be selected".

    And then, when I tried to build this application, the usual Error messages appeared again as per the attched screenshot: "Error messages after an attempt to build the application":

    "error: Aborting due to Kconfig warnings",  "FATAL ERROR: command exited with status 1".

    What shall I do to be able to start using the VSCode for building my applications again?

    JM

    Error messages - 16-Nov-2022.docx

    Message - Last sync 1 wk ago - 16-Nov-2022.docx

    New Application - page - 16-Nov-2022.docx

    Error messages aftetr attempt to build the application- 16-Nov-2022.docx

  • Hi

    Jacek Majda said:
    An SDK is inferred from the workspace, so another cannot be selected

    Your old settings are still retained in VS Code after you uninstall NCS.

    Please go to File>Preferences>Settings>Workspace>Extensions>nRF Connect and update your settings.

    Here's mine for reference:

    There's a Kconfig Python setting here you should probably also consider setting to something reasonable. Mine is empty (Sync ignored).

    -Einar

Reply
  • Hi

    Jacek Majda said:
    An SDK is inferred from the workspace, so another cannot be selected

    Your old settings are still retained in VS Code after you uninstall NCS.

    Please go to File>Preferences>Settings>Workspace>Extensions>nRF Connect and update your settings.

    Here's mine for reference:

    There's a Kconfig Python setting here you should probably also consider setting to something reasonable. Mine is empty (Sync ignored).

    -Einar

Children
  • Hi,

    I followed the steps that you recommended by:

    1. Going to File>Preferences>Settings>Workspace>Extensions>nRF Connect

    2. Updating my settings for Topdir to: ${nrf-connect.sdk:2.1.0}

    3. Veryfying that the existing setting for Toolchain Path is: ${nrf-connect.toolchain:2.2.0} , as required.

    I attach screenshots of these two settings.

    I then tried again to create a new application from the template: "zephyr/samples/basic/blinky"  and I noticed that on the "New Application" screen, under the nRF Connect SDK, I could still see the previous selection: "2.1.1 c\Nordic-211\v2.1.1" of the nRF Connect SDK v2.1.1 that I have already uninstalled from my PC two days ago, with the following message below that selection: "An SDK is inferred from the workspace, so another cannot be selected".

    I attach a screenshot of the "New Aplication" page that shows this message.

    So it seems that the change of theTopdir setting under Settings>Workspace>Extensions>nRF Connect from sdk2.1.1 to sdk2.1.0 that I tried to implemment, as mentioned under item 2 above - has not been accepted.

    Why?

    JM

    workspace-nrf Connect-Topdir -18-Nov-2022.docx

    workspace-nrf Connect-Toolchain Path - 18-Nov-2022.docx

    New Application - page - 18-Nov-2022.docx

  • Ok I figured out what is causing the "SDK is inferred" message.

    You have a workspace opened in the file explorer tab in VS Code.

    You can only use one SDK per workspace.

    So if you want to use another SDK, you must make a new folder to build applications in (Application location), which you must open in VS Code (File > Open Folder) to make it the active workspace.

    You will then be able to choose another SDK in the New Application window.

    Hope this helps.

    -Einar

  • Hi,

    I did follow your advice and I did create a new folder to build applications in, which I opened in VS Code (File>Open Folder) to make it the active workspace - and it worked ! 

    Problem solved. Thanks for your assistance.

    JM

  • Hi,

    It's me again. After having successfully created a build of the sample "blinky" and then successfully created a build of the sample: "Bluetooth: Peripheral UART" , I tried to create and build another application/sample, namely: "Bluetooth: Multiple advertising sets" that can be found under Samples/Bluetooth/multiple_adv_sets  in the nRF SDK folder structure.

    But the build process was interrupred/terminated with the following error messages, highlighted in yellow:                             

    "fatal error:zephyr/dt-bindings/adc/adc.h: no such file or directory".

    7: #include<zephyr/dt-bindings/adc/adc.h>                                                                                                   Compilation terminated.

    CMake Error at: c:/Nordic-212_SDK/v2.1.2/zephyr/cmake/modules/dts.cmake: 189 (message)             "Command failed with return code:1"

    Since that time, I am unable to complete a build process of any sample, even of simple samples like: "blinky" or "at_client", as these error messages keep coming up and the build process gets interrupted.

    I attach a screenshot of these error messages, which came up when I tried to create a build for the sample "at_client".

    I also attach a screenshot of the "Quick Setup" page of nRF Connect for VS Code that shows the correct settings for the nRF Connect SDK and nRF Connect Tolchain.

    How can the problem of the error messages, highlighted in yellow, above, be resolved?

    Shall I open a new ticked for this problem or shall I keep discussing it with you?

    Regards,

    JM

    Error Messages 20-November-2022.docx

    Quick Setup Screen - 20-November-2022.docx

  • Hi

    I believe the sample you are building here isn't natively supported on the nRF9160 DK.

    From the error messages you are seeing, it looks like the build fails because the sample is trying to use a devicetree node that isn't present in the 9160 devicetree by default.

    But yes, I would say this is a new issue, so please open a new ticket.

    Einar.

Related