Most guides out there are unclear and made for machines. Here is a full guide how to setup Segger for mac OS X with some example project from the SDK ( or even a PC but not tested), and also how to debug like a human not using terminal. ( or using it if you feel more clever)
All steps here most be done for every project(except step 10), thats because the hardware industry is still stuck in the 90's, and UI/UX are new terms for them. While Eclipse is slightly more into 2000's , setting it up is a real, real nightmare .
Daniel Wang, and Jan Tore Guggedal , 2 great guys that helped me in this nightmare.
You need :
Nordic dev kit NRF52832 / any other board with a JTAG Segger SWD programmer .
SDK13 (and up)
LETS START THIS
In Segger: project->build configuration , remove flash_s132 file by clicking the minus. We don't need it.
On the left there is the project inspector, open the folder "internal files", remove all files(right click)
FLASH_START=0x1F000 SRAM_START=0x20002000 //**pay attention
PAY ATTENTION: This tells the chip where the application start in memory. First we make place for soft device then to the app. to find out the exact address to put here in your project go to: PCA10040/s132/armgcc/ and open the file that ends with .ld in text editor. look there into RAM (rwx) : ORIGIN to get the right address. If its not right he will NOT ADVERTISE. Soft device is the software for the Bluetooth stack. ( protocols, etc).
Basically you can now go to Build->build and run, it should flash the device.
IT'S NOT WORKING FOR ME :
According to the great Jan Tore Guggedal , you have to do some other stuff if its not working yet on your mac :
right click on project->edit options->general->property group files-> add this : $(PackagesDir)/nRF/XML/property_groups.xml click OK
right click on project->edit options->general->target processor change to nRF52832_xxAA.
You used to printf which is great but in real time it affects the program , so you can use this to print: NRF_LOG_INFO("I AM HUMAN!\r\n"); , its called RTT . To see what you print go to: Debug ->go , then hit the little green play button on the top. You will see your program prints on the bottom.
I FEEL MORE COOL AND CLEVER TO WORL WITH TERMINAL :
This are the files that you need, they are already modified according to the guides here. Except from the .xml file that is generic, you need them for every project. First 3 should be saved in a place you can always open, the last should be placed according to number 10.
You can use this guide to modify the files in your own SDK instead of downloading these files.(already modified)