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

nRF52 and gcc makefile

Hi,

I am trying to develop firmware for the nRF52 platform using Visual Studio, as I prefer VS over Keil. I came across the VisualGDB plugin, but it seems their BSP is currently not compatible with current nRF52 examples, and I haven't found a way to get VisualGDB to use the Nordic SDK instead of the SDK files it downloads automatically.

In order to gain more control of the toolchain I configured VisualGDB to use the Makefile provided in your examples (i.e. \pca10040\s132\armgcc\Makefile) instead of letting it generate its own Makefile. This works fine; compiling and flashing works perfectly. The problem is, however, that this Makefile does not generate an ELF file, which makes JLink debugging impossible. Is there any way I can alter the Makefile so that it generates the files needed to use the JLink debugger with VisualGDB? Do I need to use the Keil compiler instead?

Any help is much appreciated.

Update (a few hours later) I just stumbled across the fact that files with the *.out extension actually are ELF files. It seems that this tutorial has the solution, then. I will try updating the CFLAGS variable as shown under "Setting up a project for debugging in Eclipse" and pointing the JLink to the project .out file (in the _build folder) tomorrow.

Related