nRF Connect for VSCode unlimited number of issues

Hi, I have several issues just to start off with. One is when I generate support information, it does its thing, and then stops, and I have no idea where the support information was put. Based on instructions to another customer, that is not supposed to happen. It did not happen for them apparently, but it happened to me.

The next problem is when I start VS Code from the toolchain manager on Linux, v2.0.0, west is not found.

The next problem is when I start VS Code from the command line on Linux, cmake  --version gives an error in VS Code, although it is perfectly fine on the command line.

Basically I can do almost anything in a Linux terminal with regards to building and debugging nRF9160 projects, but on Linux I cannot build or debug, and on Windows I can build but not debug, when VS Code is involved.

I have never ever seen an IDE in many, many years that is quite so indecipherable. This is really crazy. Perhaps you can fix that or switch to another recommended IDE?

Thanks.

Burt

Parents
  • Hello Burt,

    I really have trouble with reproducing anything. It feels like there's is something else that may have gotten wrong with the installation or configuration and now we are trying to repair the symptoms without touching on the underlying issue.

    I would also appreciate getting screenshots of any issues you are facing, since it is very hard to follow on the descriptions when I cannot reproduce most of the issues you are facing. It also makes it much easier to possibly escalate it and/or ask for a second opinion.

    Best regards,

    Michal

  • Okay, here are steps. Start with everything clean, but make one change to ncs/v2.1.0/zephyr/cmake/compiler/gcc/compiler_flags.cmake: remove the -Wno-pointer-sign flag from line 37.

    Also, this all must be done on Windows: Linux and Mac do not have the problem.

    Do nRF Connect for VS Code quick setup with 2.1.0 SDK and 2.1.0 toolchain.

    Then Add an Existing Application, it should be .../nrf/applications/asset_tracker_v2.

    Now Add Build Configuration, accept all defaults, and click Build Configuration.

    After the build completes, on the left under ASSET_TRACKER_V2 open up Source files>Application>modules>cloud_module.c so cloud_module.c shows in an editor window.

    You should see yellow markers on the right-side indicating warnings. In fact, if you mouse hover over the window title, cloud_module.c 9+, you will see that there are 20 problems in the file. For example, on line 278, you will see a yellow squiggle underneath "buf" and a message indicating a -Wpointer-sign warning when you hover over the squiggle. (The warning is due to having -Wall set.)

    Now open a Git Bash terminal in VS Code and issue the command

    $ touch src/modules/cloud_module.c

    Now on the left, under ACTIONS, click Build.

    Okay, this did not cause the problem I was looking for--I thought the yellow squiggles might disappear, so we will go one step more sophisticated: modify that line 278 to use a (const char*) cast before buf so the line reads

    err = nrf_cloud_agps_process((const char*)buf, len);

    and save the file. This should make that one warning go away, because if you mouse hover over the function call nrf_cloud_agps_process on that line, you will see it is looking for the first argument to be of type "const char*".

    So once again, perform the Build action (not pristine, that would take forever). The warning does not go away. That is a very, very bad thing.

    I wanted to double check that Linux does not show this problem, but some other problem occurred there so I will just say that Linux and Mac in general seem to work more reliably than Windows. If you can replicate my results on Windows, you may want to see whether Linux behaves differently. I will try that again later, but for now I suggest we focus on Windows.

    Let me know if you need more information. Thanks for sticking with this, Michal. Oh,yeah, there are some other problems with "Run Code Analysis on Active File" but let's look at one problem at a time. Do not select that function for/during this test procedure. It uses a different mechanism of analyzing the file.

    Burt

  • Michal, I got my Linux system running. It turns out that this particular problem does show up on Linux, too (and I am guessing it will occur on Mac). There are some other problems (or at least one) where I have good results on Linux and Mac, but this problem is platform independent.

    Burt

  • Hello Burt,

    Thank you for the steps, I have started to go through them.
    For now I have built the application and I can see the 20+ warnings you've mentioned.

    I have to leave now unfortunately, but I will continue on the case tomorrow.

    Best regards,

    Michal

Reply Children
Related