Install Homebrew: http://brew.sh Homebrew is a package manager for OS X. It is recommended you installed it anyway.
Download Segger J-Link software, and install the pack.
Connect your J-Link to computer, and the target board/chip.Find your installation path ~/Seggar/JLink/, and run ./JLinkExe
After JLink> command prompts appear, you can start to use JLink commands.
Popular JLink commands:
device - select a device
if - select interface, SWD or JTAG
speed - interface comm rate, 4000Hz default
loadfile - flash the bin/hex file into target
r - reset target
q - quit JLink command line

For a full reference of JLink commands, please check :
https://www.segger.com/admin/uploads/productDocs/UM08001_JLink.pdf

    Erase flash
    halt
    exec device = nRF51422_xxAA
    w4 4001E504, 2
    w4 4001e50C, 1

      6 months later

      JLink command in one single line:

      JLinkExe -if swd -speed 4000 -device NRF52832_XXAA -autoconnect 1

        Write a Reply...