Visual Studio corrupts project when switching between projects

I am using the nRF52832 in several projects for several different clients. I have created a "project" under Visual Studio using VisualGDB for each one, using the automated build process. Every time I switch from one project to another, I get a VisualGDB warning "Could not locate BSP with ID.....". Choices presented are "Download BSP", "Use version x.xx", or "Locate BSP". I have tried all three at various times; I inevitably end up in another nightmare, killing a couple hours, trying to get the project back together and all the mysterious include files pulled from the right places. Surely the tools can't be THAT amateurish as to preclude multiple parallel projects, so I must be missing something.

1) Why does the message pop up, and why is it not resolved when I load the latest version to all projects?

2) Where do I set the various include paths (which in true Microsoft style, is at least a dozen directories deep)?

3) Is there a better way to do real world development?

Steve Hendrix

  • Is there a better way to do real world development

    Use one of the supported IDE/Toolchains?

    Segger, Keil, ...

    At least then you have a larger pool of support

  • I am using Visual Studio 2019 and a self-created BSP for 15.3 and besides the learning curve of using VisualGDB instead of the supported IDEs, have had no issues.

    • Have you updated to VisualGDB 5.4?
    • If you go to Tools > VisualGDB > Manage VisualGDB Packages, you can see where the BSP for Nordic devices is installed. Are you sure you have the correct permissions to this directory? I presume you do but something is not right.
    • Are your projects using different versions of the BSP? The only time I have run across the screen you refer to is when I have installed a new BSP and the project needs to be updated.
    • The include paths are a tricky issue that I have brought up in the VisualGDB forums before. As annoying as it is, in order for the build file to be generated we have to add each header and source file to solution explorer. Visual Studio/VisualGDB should ask you if you include a header if you want to add it to the list of includes but you will still need to manually add the files to Solution Explorer. I have not used SES much but from what little I have used it, I believe you also have to add each source file to the project manually though I may be wrong on this.

    As annoying as VisualGDB can be, I have stuck with it and cannot imagine switching to Segger (Or Keil or whatever). Also, this question will probably be better answered on the VisualGDB forum. From what I can tell there are only a handful of us using VisualGDB for development here.

  • I have not used SES much but from what little I have used it, I believe you also have to add each source file to the project manually

    Because Nordic provide base projects, that saves you a lot of grunt work with the "standard" stuff.

    Of course, anything you want to add to that, you have to do yourself.

    You only have to add .c files - not the headers - although you do have to manually add include paths as necessary.

    this question will probably be better answered on the VisualGDB forum

    +1

    From what I can tell there are only a handful of us using VisualGDB for development here

    Apparently so.

  • Hi Steve

    As Andrew and Patrick is saying, I think that the first two questions are better to ask on the VisualGDB support page, as we don't have much experience with it here at Nordic.

    As for question three, Andrew is right. Using SES or keil uvision are the two IDEs that are best supported by Nordic, and easiest to use with Nordic products.

    Best regards,

    Simon

  • After beating on this for a couple days over at VisualGDB support, I have reinstalled VisualGDB and the Nordic BSP, with some tweaks to the directories, and now I can compile a new project and can switch between projects smoothly. However, with v15.3 of the Nordic support, new projects don't get NRF_LOG_INFO etc. displaying to the serial port. The project that I was previously using works fine in that regard, so I know the hardware is okay. Is there something special needed in the switches when creating a new project?