This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

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

  • Despite not appearing in the build tree, sdk_config.h is definitely present, and NRF_LOG_BACKEND_UART_ENABLED is set true. What is the apparent alternate interface, that's enabled by NRF_LOG_BACKEND_RTT_ENABLED (which is definitely false at present).

  • Your project creation process looks correct to me. I walked through your process choosing the same options except used the BLE UART example as the 15.3 BSP I have installed is not the BSP provided by Sysprogs and I do not have a list of Nordic examples to choose from.

    Having said that, the example I chose again has sdk_config.h included...

    If you look in your project's working directory you should have a local sdk_config in there? Have you verified this?

    As far as I am aware there are no compile-time defines that you need to add for logging to work.

  • I definitely have an sdk_config.h in my project directory, but it's not referenced in the project dependency tree, even though it's in fact being compiled into several separate .c files.

    Thanks for confirming that I don't need to define any compiler variables externally.

    You have turned up at least a clue. If I choose the BLE UART example I get the same as you, with the sdk_config.h file in the tree. Something's fish that it doesn't happen using the Nordic examples. I will explore this more in the morning.

    Thanks for the help.

  • Visual Studio will look in all of the directories listed in the Additional Include Directories in the Project Properties.

    There is most likely a sdk_config.h file within one of those folders.

    You can also find the location of sdk_config.h by right clicking any of the "#include <sdk_config.h>" directives, and selecting "Open document 'sdk_config.h'".  This will open the SDK file.  Hover the mouse over the open tab and it will give you the full file path.  In addition, you can right click the tab and select "Open containing folder" to open the folder where 'sdk_config.h' is located.

Related