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

  • Great, thank you, Michal. Just to be accurate, the warning count for me showed as 9+, but hovering shows that 9+ means 20 (rather than 20+).

    Burt

  • 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

    For me that actually did make all the warnings disappear on Windows 10.

    I have followed through with the rest of your instructions, but that did not make any warnings reappear.

    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.

    I have just commented out that line, is that how you wanted me to do it?

    I have also tried to introduce some new warnings and even though they appear in the compiler output, they don't appear in the editor.

    Thank you for being patient with the explanations, I am going to report the issue with missing/dissapearing warnings to the nRF Connect for VS Code team with your steps to reproduce it.

    Best regards,

    Michal

  • Hi Michal, you did the correct thing for line 37, actually smarter than what I had done, which was to simply remove the characters "-Wno-pointer-sign". But with what I had done, it leaves a meaningless line, although it did the job.

    By the way, at this moment in time, that line 278 warning, where I fixed the code like I mentioned above to make the warning go away, the warning HAS disappeared. What did I do--I don't think I have done anything but put the computer in standby and waited a day or two, maybe run other programs, but I cannot swear to not having touched my VS Code at all, although I am pretty certain that is the case. I just now tried to recreate that, but I cannot. One thing I did not do in the last 2 days is to reload the window using Ctrl-Shift-P Developer:Reload Window, because that causes all the warnings to disappear (another problem). And my past experience is that not even a pristine build will make the warnings reappear--instead, I probably have to re-edit the build configuration, where I make no changes but click the Build Configuration button. Yes, I just verified that that is what I have to do to make the editor show the warnings again. Call it a super-pristine build. Regardless, that is way too slow to be practical. See if you get the same results, and you may want to report it to the team. Finally, I am glad you noticed the warnings show in the compiler output--this gets to the heart of the issue--the warnings are not transferred to the editor window.

    Burt

  • Hello Burt,

    I got pointed to this release note that links here.

    You may want to take a look at it and see if it helps with anything.

    Best regards,

    Michal

  • Hi Michal,

    Yes, that is very helpful. And it brings us to the next problem--what really needs focus. This problem is the one that happens to me on Windows and NOT Linux or Mac. All you have to do to try to replicate it is to open cloud_module.c in an editor window, right click in the window and choose Run Code Analysis on Active File. Instead of seeing the warnings we want, you should expect to see a red carat at the very start of the file, and if you hover, you should see a window that starts off with

    I probably will get messed up if I try typing below what I pasted so I'll type here instead. I think it is the first error, the redefinition with different types, that screws up everything, but that's a question for the experts. I do not know where "unsigned long long" is coming from--it is probably something internal to the C/C++ extension. Anyway, like I said above, the interesting warnings are blocked and all I see is this set of Errors (that show as one clang-diagnostic-error). Thanks Michal, Burt.

    Error while processingC/C++(clang-diagnostic-error)

    stddef.h(209, 23): typedef redefinition with different types ('unsigned int' vs 'unsigned long long')
    cmsis_compiler.h(278, 4): Unknown compiler.
    mpu_armv8.h(130, 1): unknown type name '__STATIC_INLINE'
    mpu_armv8.h(143, 1): unknown type name '__STATIC_INLINE'
    mpu_armv8.h(188, 1): unknown type name '__STATIC_INLINE'
    mpu_armv8.h(205, 1): unknown type name '__STATIC_INLINE'
    mpu_armv8.h(225, 1): unknown type name '__STATIC_INLINE'
    mpu_armv8.h(234, 1): unknown type name '__STATIC_INLINE'
Related