I'm pretty new to embedded systems development, but I've started to find my way around. I am trying to strip the SDK example programs down to minimal examples, in order to better understand them. However, before I throw away something I might need later, I thought that I should ask.
I have the nRF52 development board (the PCA10036). This is the only device I plan to use. I have SDK version 0.9.1. I've managed to get a few of the examples to compile, flash, and execute. I started with a Windows development environment and the free version of Keil MicroVision. My permanent development environment is pure Linux, running Ubuntu 15.04. I'm compiling with GCC ARM Embedded from the terminal prompt, using Nordic's GCC-compatible source code and makefiles. I flash the board using Segger's JLinkExe for Linux. And while I haven't gotten a UART listener working on my machine, I did manage to get Segger's JLinkRTTClient running (which is supposedly better anyway?). I may attempt to add Eclipse into this mix at some point -- but for now, I am getting some work done.
I am now contemplating how to set things up for my own code development. I have managed to modify a makefile, so that I can build programs outside of the SDK directory structure. However, for now, I have preserved the deeply-nested directory structures that are inside the SDK source directories themselves. But do I really need all of this structure to hold my main.c, my makefile, and my linker?
./
main.c
config/
xxx_pca10036/
nrf_drv_config.h
pca10036/
blank/
arm5_no_packs/
xxx_pca10036.uvprojx
xxx_pca10036.uvoptx
armgcc/
makefile
xxx_gcc_nrf52.ld
Clearly, I can remove the arm5_no_packs folder, since I'm not using Keil MicroVision any more. What exactly would I lose if I move the makefile and the linker into the base folder? The blank and pca10036 folders, as far as I can tell, do nothing for me. And once I eliminate those two nested folders, I might as well go all the way and remove armgcc as well, placing its files in the base folder.
Also: the makefiles I have examined so far did not include the config/xxx_pca10036 folder, which contains the file nrf_drv_config.h. While the contents of the file appear to define several critical SoC-specific constants, I have deleted this file (and its enclosing folders) in my own copies of the examples, with no apparent consequences. So, what is the purpose of nrf_drv_config.h, and why is it in that subfolder?
I know that my posts are long, but I try to be complete. If you read this far -- thanks!