February 19, 2020 at 20:00 #27447
I’ve started working with nrf52 projects, and I don’t know what the process is for enabling specific SDK features in VisualGDB. Part of the problem is that the UI has changed quite a bit since the Tutorials were written.
For example, I wanted to write code to interface with an ST7789 SPI-connected LCD.
So, I created a project using the “LEDBlink (BSP)” Sample, then made the following changes in the Project Properties’ “Embedded Frameworks” tab:
1. In the Legacy Drivers section, I changed “SPI” from None to Master
2. In the nRF5x Libraries section, I enabled “gfx”
I then added my code that uses the SPI and GFX APIs. When I built it, there were various errors that were caused by #defines that weren’t set correctly. I changed these in sdk_config.h, and the project built. For example, I had to change NRF_GFX_ENABLED from 0 to 1. It seems odd that this isn’t done automatically when I enabled gfx in the Embedded Frameworks tab, but if that’s how it’s designed to work then I’m OK with it. (I really like the fact that I didn’t have to manually add the SDK’s include folders and .c files to the build – that saves a lot of trial-and-error.)
Did I follow the correct process: use the Embedded Frameworks tab to include files from the SDK in the build, then modify sdk_config.h to enable features?February 19, 2020 at 20:37 #27448
The Nordic SDK is indeed one of the hardest ones to configure compared to other SDKs. Generally, it is configured by enabling features in the sdk_config.h file, including the related headers (and adding the corresponding include paths) and source files to the project.
To make configuration easier, VisualGDB maps most of the SDK’s features to the frameworks and configuration options on the Embedded Frameworks page. Enabling those features would add include directories and source files to the project. Also if you update to VisualGDB 5.5 Preview 4 and use the latest Nordic SDK, it will automatically suggest configuration changes for missing symbols and header files that could be discovered during our automated SDK releasing process.
Beyond that, please plan sufficient time to get accustomed to the new SDK. Although VisualGDB can automate most of the troubleshooting, getting the right configuration for a specific project type might still require some iterations. If you are new to the Nordic SDK, please consider selecting “Nordic SDK examples” on the Sample Selection page of the wizard, cloning a few samples similar to your setup and understanding the sources and headers that are involved in that functionality.
You must be logged in to reply to this topic.