Real Time Transfer (RTT),
 UM08001_JLink.pdf 

NRF52832_XXAA
NRF52_XXAA 

Remembers last used prarmeters

/Applications/SEGGER/JLink/JLinkExe # /Applications/SEGGER/JLink_V633a/JLinkExe #      and

/usr/local/bin/JLinkRTTClient #     /Applications/SEGGER/JLink_V633a/JLinkRTTClient   or

telnet localhost 19021

SEGGER J-Link V5.12g - Real time terminal output
J-Link OB-SAM3U128-V2-NordicSemi compiled Mar 15 2016 18:03:17 V1.0, SN=682852586
Process: JLinkExe
Connect via USB. connect [ usb [ 0 | 1 | 2 | 3 ] ]

Asks for DEVICE (suggests last used, ex NRF52832_XXAA)
target interface (like SWD)

Mode-Of-Entry, i.e.
Reason CPU halted
moe
CPU halted because DBGRQ was asserted.          CPU halted due to vector catch.  
halt | go h | g NumSteps   [|1]
Simulate NumSteps    Do not start if a BreakPoint is within NumSteps 1: Overstep BPs
halt
 
PC = 00000000, CycleCnt = 00000001
R0 = EFBFEB40, R1 = 00007FFE, R2 = 6D09E1BD, R3 = 00007FFF
R4 = 00000005, R5 = 00000000, R6 = 00000005, R7 = 00000000
R8 = 00446E80, R9 = 00000001, R10= 00446E80, R11= 00000001
R12= EFBFEB60
SP(R13)= 00007FFE, MSP= 6D09D4C7, PSP= 00007FFF, R14(LR) = 00000004
XPSR = 00000005: APSR = nzcvq, EPSR = EFBFEB90, IPSR = 01E (INTISR15)
CFBP = 6CF9E5B9, CONTROL = 00, FAULTMASK = 40, BASEPRI = 00, PRIMASK = 505AB0

FPS0 = EFBFEB40, FPS1 = 00007FFE, FPS2 = 6D09E1BD, FPS3 = 00007FFF
FPS4 = 00000005, FPS5 = 00000000, FPS6 = 00000005, FPS7 = 00000000
FPS8 = 00446E80, FPS9 = 00000001, FPS10= 00446E80, FPS11= 00000001
FPS12= EFBFEB60, FPS13= 00007FFE, FPS14= 6D09D4C7, FPS15= 00007FFF
FPS16= 00000004, FPS17= 00000000, FPS18= 00000005, FPS19= 00000000
FPS20= EFBFEB90, FPS21= 00007FFE, FPS22= 6CF9E5B9, FPS23= 00007FFF
FPS24= 00400CC0, FPS25= 00000001, FPS26= 00505AB0, FPS27= 00000001
FPS28= EFBFED40, FPS29= 00007FFE, FPS30= 00446E80, FPS31= 00000001
FPSCR= EFBFEBC0 

WARNING: CPU could not be halted
Perhaps device is not connected or powered.
Write register. wreg RegName, Value
Registers Regs
read memory
write memory layout
mem[8|16|32|64][Zone:]Addr[,ngroups(in hex)  
w1|w2|w4|w4 [Zone:]Addr[, ngroups(in hex) xData ] 
Zone Name of memory zone to access.
mem 2000,40 (64 bytes)
00002000 = BC BB A5 78 12 2D 03 D0 13 2D 04 D0 FF DF B8 E7 
00002010 = FF F7 6F FF 01 E0 FF F7 55 FF 00 28 B1 D1 06 F0 
00002020 = 7A F8 00 28 AD D0 01 78 21 F0 0F 01 89 1C 21 F0 
00002030 = F0 01 20 31 01 70 12 2D 07 D0 02 21 01 72 06 F0 


mem16 20000000,10 (64 int16s) 
20000000 = 1000 0000 F000 0001 0001 0008 0091 0059 
20000010 = 00FB 0003 0005 0007 0009 0000 0101 0000 
Get the address of a static global from the map.
 grep -A1 vbat ruuvitag_b/s132/armgcc/_build/ruuvi_firmware.map |\
         sed "s/0x00000000\(........\)/mem16 \1,1/; s/        0x2//"
 .bss.vbat      mem16 20004486,1 _build/ruuvi_firmware_main.c.o

mem16 20004486,1
20004486 = ADC  
Use:   echo 'ibase=16;ADC' |bc to see 2780 millivolts)
 mem32 2000,40
00002000 = 78A5BBBC D0032D12 D0042D13 E7B8DFFF 
00002010 = FF6FF7FF F7FFE001 2800FF55 F006D1B1 
00002020 = 2800F87A 7801D0AD 010FF021 F0211C89 
…
000020F0 = 70600008 60A06828 60E06868 82208928 

mem64 2000,4  (4 64bit quad(?)words) 
00002000 = D0032D1278A5BBBC E7B8DFFFD0042D13 
00002010 = F7FFE001FF6FF7FF F006D1B12800FF55 
w1 10001080 d6 60 0d
Writing D6 -> 10001080
Writing 60 -> 10001081
Writing 0D -> 10001082
J-Link>g
J-Link: Flash download: Bank 0 @ 0x00000000: 1 range affected (4096 bytes)
J-Link: Flash download: Total time needed: 0.129s (Prepare: 0.067s, Compare: 0.004s, Erase: 0.006s, Program: 0.010s, Verify: 0.000s, Restore: 0.038s)
J-Link>mem 10001080,10
10001080 = D6 60 0D FF FF FF FF FF FF FF FF FF FF FF FF FF 

Data RAM System Code RAM ICODE/DCODE
2000 F000 0080 F000
mem 20000000,800 0800 0000
 
    80..FC customer   
mem 10001080,80 UICR

10000000 FICR:
    14..7C Nordic Firmware NRFFW[0..11] 
   8 0000 .. 80 ffff, code ram 
     0000 ..  7 FFFF, flash 

FICR->DEVICEID
mem 10000060,8
10000060 = 1A 04 D7 6E 04 BA FA D1 


FICR->DEVICEADDRTYPE  FE public, FF random
mem 100000a0,4
FICR->DEVICEADDR
mem 100000a4,6
1A 1E 4A 74 FA 37 ; displayed as MAC F7:FA:74:4A:1E:1A 
03 AD 43 C6 C0 B2 ; displayed as MAC F2:C0:C6:43:AD:03
0E 23 6C 9C 8B 14 ; displayed as MAC D4:8B:9C:6C:23:0E


Set Program Counter SetPC Addr
Reset r[x DelayAfterReset ]
>r
Reset delay: 0 ms
Reset type NORMAL: Resets core & peripherals via SYSRESETREQ & VECTRESET bit.
Reset: Halt core after reset via DEMCR.VC_CORERESET.
Reset: Reset device via AIRCR.SYSRESETREQ.

Set the reset type. RSetType type Affects core & peripherals unless noted.
0NORMAL via SYSRESETREQ & VECTRESET bit.
1CORE core only
2RESETPIN using RESET pin.
3CONNECT UNDER RESET Halts RESET Pin low when connecting to core
4HALT AFTER BTL halts CPU after the bootloader.
5HALT BEFORE BTL halts CPU before the bootloader.
6KINETIS via strategy NORMAL. Watchdog disabled after reset
7ADI HALT AFTER KERNEL halts CPU after the ADI kernel.
8CORE AND PERIPHERALS via SYSRESETREQ bit only.
9LPC1200 via strategy normal. Watchdog disabled after reset
10S3FN60D via strategy normal. Watchdog disabled after reset
11LPC11A Performs some special handling which is needed by some LPC11A bootloaders.
Single step s      Instruction displayed has already been executed!

J-Link>s
00024AFC:  4F F6 FF 72        MOVW      R2, #0xFFFF
J-Link>regs
PC = 00024B00, CycleCnt = 014A8587
R0 = 00000000, R1 = 00000000, R2 = 0000FFFF, R3 = 00000000 …



0001F832:  01 38              SUBS      R0, #1
J-Link>s
0001F834:  C3 D1              BNE       #-0x7A
J-Link>s 000008E4: 06 4B LDR R3, [PC, #+0x18] 0000031C: 4F F0 10 24 MOV R4, #0x10001000 00000320: A0 69 LDR R0, [R4, #+0x18] 00000322: 40 1C ADDS R0, R0, #1 00000324: 05 D0 BEQ #+0x0A 00000326: A5 69 LDR R5, [R4, #+0x18] 00000328: A6 69 LDR R6, [R4, #+0x18] 0000032A: 80 35 ADDS R5, #128 0000032C: 30 79 LDRB R0, [R6, #+0x04] 0000032E: AA 28 CMP R0, #170 00000330: 08 D0 BEQ #+0x10 00000332: 60 69 LDR R0, [R4, #+0x14] 00000334: 40 1C ADDS R0, R0, #1 00000336: 2D D0 BEQ #+0x5A 00000338: 60 69 LDR R0, [R4, #+0x14] 0000033A: 00 68 LDR R0, [R0] 0000033C: 40 1C ADDS R0, R0, #1 0000033E: 29 D0 BEQ #+0x52 00000340: 60 69 LDR R0, [R4, #+0x14] 00000342: 2C E0 B #+0x58 0000039E: 00 F0 A3 FA BL #+0x546 000008E8: 06 4A LDR R2, [PC, #+0x18] 000008EA: 10 60 STR R0, [R2] 000008EC: 01 68 LDR R1, [R0] 000008EE: 81 F3 08 88 MSR MSP, R1 000008F2: 40 68 LDR R0, [R0, #+0x04] 000008F4: 00 47 BX R0 00009A9E: 20 BF WFE 00009AA0: D4 F8 04 01 LDR R0, [R4, #+0x104] 00009AA4: 00 28 CMP R0, #0 00009AA6: FA D0 BEQ #-0x0C 00009A9E: 20 BF WFE 00009AA0: D4 F8 04 01 LDR R0, [R4, #+0x104] 00009AA4: 00 28 CMP R0, #0 00079E18: 06 49 LDR R1, [PC, #+0x18] 00079E1A: 07 4A LDR R2, [PC, #+0x1C]
instruction BreakPoint SetBP aaaaa [A|T] [S|H]
ARM mode: 2xxxx | Thumb mode: 0xAB Soft|hard

ClrBP handleID

Example:
Use grep to find startup.main from the LoaD map

grep -A1 .text.startup.main   ruuvitag_b/s132/armgcc/_build/ruuvi_firmware.map 
 .text.startup.main
                0x0000000000024aec      0x518 _build/ruuvi_firmware_main.c.o
In j-link:
setBP 24aec 
Breakpoint set @ addr 0x00024AEC (Handle = 5)
When breakpoint is encountered a simple J-Link> prompt is presented.
Use moe to determine what happened.
CPU halted due to code breakpoint match.
s executes next instruction.
data WatchPoint SetWP|ClrWP Addr [R|W] [Data [D-Mask] [A-Mask]]

SetWP 20002da2
Watchpoint set @ addr 0x20002DA2 (Handle = 0x00000004)
When breakpoint is encountered a simple J-Link> prompt is presented.
Use moe to determine what happened.
moe
CPU halted due to data breakpoint unit 3 match
Load data file filename. bin | mot | hex | rec [,addr] for bin
Load *.bin file loadbin filename.bin, addr
Verfy binary is in memory verifybin filename, addr
Save memory savebin filename, addr, NumBytes
Wait until CPU halts or
timeout exceeded.
WaitHalt TimeoutMs Default 1000
Wait Sleep ms
hardware status st
VTref=3.300V
ITarget=0mA
TCK=0 TDI=1 TDO=1 TMS=1 TRES=1 TRST=1
Supported target interface speeds:
- 10 MHz/n, (n=10). = 1000kHz, 909kHz, 833kHz, ...  
hardware info hwinfo /
HWInfo[00] = Target power is disabled
HWInfo[02] = 0mA	(ITarget)
HWInfo[03] = 0mA	(ITargetPeak)
HWInfo[04] = 0mA	(ITargetPeakOperation)
HWInfo[10] = 0ms	(ITargetMaxTime0)
HWInfo[11] = 0ms	(ITargetMaxTime1)
HWInfo[12] = 0ms	(ITargetMaxTime2)
HWInfo[13] = 0000000
Write vector catch. VCatch Value
Unlock a device. unlock DeviceName

list of supported device names.

LM3Sxxx [Auto]
Kinetis
EFM32Gxxx
LPC5460x 
           nRESET has to be connected
Test command to visualize printf output from the target device, term using DCC (SEGGER DCC handler running on target)
CoreSight register ReadAP
ReadDP

First read returns the data of the previous read. An additional read of DP reg 3 is necessary to get the data. For SWD, data is returned immediately.
For JTAG the data of the previous read is returned. An additional read of DP reg 3 is necessary to get the data.

WriteAP
WriteDP

CoreSight register via SWD. SWDReadDP
J-Link>SWDReadDP 1
Read DP register 1 = 0xF0000040
J-Link>SWDReadDP 2
Read DP register 2 = 0xE000ED34
Read DP register 3 = 0xE000ED34
Read DP register 4 = 0xE000ED34
Read DP register 5 = 0x23000052
Read DP register 6 = 0xE000ED34
SWDReadAPM
First read returns the data of the previous read.
An additional read of DP reg 3 is necessary to get the data. Note: Correct data is returned immediately.
SWDWriteAP
SWDWriteDP
Export device names from the DLL internal device list ExpDevList[XML] Filename
power trace PowerTrace LogFile
        [ChannelMask RefCountSel]
        LogFile: File to store power trace data to
        ChannelMask: 32-bit mask to specify what channels shall be enabled
        SampleFreq: Sampling frequency in Hz (0 == max)
        RefCountSel:       0: No reference count
1: Number of bytes transmitted on SWO
Measure length of scan chain. ms Scan chain
Identify length of scan chain select register is
Measure RTCK react time. mr
Write test words. wm NumWords
CP15
Read |Write CP15 rce | wce Op1, CRn, CRm, Op2 [, data
ICE
state of the embedded ice macrocell (ICE breaker) Ice
Read | write Ice reg. ri | wi RegIndex [, Data(hex)]
Trace
TClear
TStart | TStop
TSetSize
TSetFormat
Regions (and analyze trace buffer) TSR
Periodic
PERConf
PERStart | PERStop
PERStat
PERRead
Read and analyze data PERShow
File I/O
Read|Write file to emulator fread|fwrite
Read and display file from emulator fshow FileName [Offset [NumBytes]]
Delete file on emulator fdelete FileName
Display size of file on emulator fsize FileName
List directory on emulator flist This File I/O command is not supported by the connected probe
SecureArea Creates/Removes secure area on probe
Test
Run go/halt 1000 timesTestHaltGo .................................
Completed. 8420ms required
Run step 1000 timesTestStep
Measure CPU speed. TestCSpeed [RAMAddr]
Measure download speed into target memory. TestWSpeed [Addr [Size]]
Measure upload speed from target memory. TestRSpeed : [Addr [Size] [NumBlocks]]
Measure network speed: download(write)/up(read) TestNWSpeed: [NumBytes [NumReps]]
TestNDWSpeed: [NumBytes [NumReps]]
JTAG
Set number of IR/DR bits before ARM device. Config IRpre, DRpre
Set interface speed. speed freq|auto|adaptive, e.g. speed 2000, speed a
Read JTAG Id (Host CPU)
Write JTAG command (IR). wjc xData
Write JTAG data (DR). wjd xData64, NumBits(dec)
Write Raw JTAG data. wjraw NumBits(dec), tms, tdi
RTAP Reset TAP Controller using state machine (111110)
Reset TA0P Controller (nTRST) rt
JTAG-Hardware
Create clock with
TDI = TMS = 0m
c00
c Clock ====== see 16.1.1
Clear | set TCK tck0 | 1 test clock input (TCK) provides the clock for the test logic.
Clear | set TDI 0 | 1 Serial test instructions and data are received by the test logic at test data input
Clear | set TMS t0 | 1 signal received at test mode select (TMS) is decoded by the TAP controller to control test operations.
Clear | set TRS Ttrst0 | 1 Test data output (TDO) is the serial output for test instructions and data from the test logic.
Clear | set RESET r0 |1 (sic?
Connection
Connect ARM Pro or J-Link TCP/IP Server via TCP/IP. ip ip_addr
 
Connecting to J-Link via IP...
FAILED: Can not connect to J-Link via TCP/IP (192.168.1.1, port 19020) 
Show/Assign IP address and subnetmask of/to the connected J-Link. ipaddr
Disconnecting from J-Link...O.K.
Disconnecting from J-Link...O.K.
Connecting to J-Link via IP...FAILED: Can not connect to J-Link via TCP/IP. No emulator found.
Show/Assign network gateway . gwaddr
Show/Assign network DNS server . dnsaddr
Configuration
Switch power supply for target. power on|off [perm]
Write configuration byte. r|wconf offset [, data]
rconf 0,80
Total size of config area: 0x100 bytes

00000000 = 00 01 FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000010 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000020 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000030 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000040 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000050 = 00 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000060 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF 
00000070 = FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF
Configuration of the connected J-Link. conf
USB-Address: 0
Enum. type:  Real-SN is used
KS-Power:    Off (Default)
SWO SoftWare Output
supported speeds SWOSpeed
Supported speeds:
 - 12000 kHz/n, (n>=1). => 12000kHz, 6000kHz, 4000kHz, ...
SWOStart| SWOStop
Display SWO status SWOStat
Read and display SWO data SWORead
Read and analyze SWO data SWOShow
Flush data SWOFlush
View terminal data SWOView
 Receiving SWO data @ 6000 kHz.
Data from stimulus port 0:
-----------------------------------------------
Calibrate the target current measurement.calibrate
Please disconnect emulator from target.
Press any key to start the calibration...

Calibrating...Emulator calibrated.
Min=-1mA Max=-1mA Avg=-1mA Offs=-1mA...DONE
Change to little | big endian mode le be
Select a emulator to communicate selemu [Interface0 Interface1 ...]
list all emulators which are connected to the host. ShowEmuList [Interface0 Interface1 ...]
J-Link[0]: Connection: USB, Serial number: 682930364, ProductName: J-Link OB-SAM3U128-V2-NordicSem
Set value for VTref VTREF ValuemV
15.4 Reference voltage (VTref)
VTref is the target reference voltage. used by the J-Link to check if the target has power, to create the logic-level reference for the input comparators and to control the output logic levels to the target. It is normally fed from Vdd of the target board and must not have a series resistor.
In cases where the VTref signal should not be wired to save one more pin / place on the target hardware interface connector (e.g. in production environments), SEGGER offers a special adapter called J-Link Supply Adapter which can be used for such purposes. Further information regarding this, can be found on the SEGGER website ( J-Link supply adapter )
To guarantee proper debug functionality, connect at least on of the GND pins to GND (Pin 4, 6, 8, 10, 12, 14*, 16*, 18*, 20*).
On some models like the J-Link ULTRA, these pins are reserved for firmware extension purposes. They can be left open or connected to GND in normal debug environ- ment. Please do not assume them to be connected to GND inside J-Link.
log actionslog filename (reformated somewhat) Shell commands to monitor log :
> taill -f |sed "s/FPS[12][0-9]=0x00,//g; s/FPS[1-9]=0x00,//g"

taill -f |sed "s/FPS[12][0-9]=0x00,//g; s/FPS[1-9]=0x00,//g; s/0x//g; s/JLINK_//; s/0000ms,//g; s/ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 17, 18, 14, 15, 16,/0..18/; s/33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,/33..63/"

 tail jl180603 


T9C4E9380 2450:057 Step() -- Read from C cache (2 bytes @ 1F81E) 
                    -- Simulated            returns 0 (0ms, 777ms total)
T9C4E9380 2450:269 IsHalted()         returns TRUE 
T9C4E9380 2450:269 GetDeviceFamily()  returns 14 
T9C4E9380 2450:269 ReadReg(R15 (PC))  returns 1F820 
T9C4E9380 2450:269 DisassembleInst(Addr = 1F820)

                ReadMemEx(01F820, 2 Bytes, ..., Flags = 0) 
                    -- Read from C cache (2 bytes @ 1F820) - Data: 0 BF  returns 2 (0ms, 0ms total)
                                            returns 2 
T9C4E9380 2450:269 GetDeviceFamily()  returns 14 
T9C4E9380 2450:269 ReadMemEx(1F820, 2 Bytes, ..., Flags = 0) 
                    -- Read from C cache (2 bytes @ 1F820) - Data: 0 BF  returns 2 
T9C4E9380 2450:269 Step() 
                    -- Read from C cache (2 bytes @ 1F820) -- Simulated  returns 0 (0ms, 777ms total)
//Read from C cache
 

halt LOG:

T9C4E9380 4257:596 JLINK_Halt()  returns 0 (0007ms, 0438ms total)
T9C4E9380 4257:603 JLINK_GetDeviceFamily()  returns 14 ( 0438ms total)
T9C4E9380 4257:603 JLINK_CORE_GetFound()  returns 0xE0000FF ( 0438ms total)
T9C4E9380 4257:603 JLINK_GetDeviceFamily()  returns 14 ( 0438ms total)
T9C4E9380 4257:603 JLINK_CORE_GetFound()  returns 0xE0000FF ( 0438ms total)
T9C4E9380 4257:603 JLINK_GetDebugInfo(0x01 = Unknown) 
                            -- Value=0000001  returns 0 ( 0438ms total)
T9C4E9380 4257:603 JLINK_GetDebugInfo(0x10F = JLINKARM_DEBUG_INFO_HAS_CORTEX_M_SECURITY_EXT_INDEX) 
                            -- Value=0000000  returns 0 ( 0438ms total)
T9C4E9380 4257:603 JLINK_ReadRegs(NumRegs = 28, 
    Indexes: 0.. 13, 17, 18, 14, 15, 16, 21, 22, 23, 20, 27, 26, 25, 24, 65)   not 19, notice order, see below
                            -- CPU_ReadMem(4 bytes @ 0xE0001004)
 -- R0=5027E, R1=7A120, R2=F42400, R3=50000000, R4=F42400, R5=3D09000, R6=80000, R7=20000, R8=0, 
    R9=0, R10=20000000, R11=0, R12=20007DF8, 
    R13 (SP)=2000FFF8, MSP=2000FFF8, PSP=0, R14=1F6A1, R15 (PC)=1F776,
    XPSR=21000000, APSR=20000000, EPSR=1000000, IPSR=0, CFBP=0, CONTROL=0, FAULTMASK=0, BASEPRI=0, PRIMASK=0,
     CycleCnt=9B714FAC  returns 0 (1ms, 439ms total)
T9C4E9380 4257:604 JLINK_ReadRegs(NumRegs = 33, 
    Indexes: 33, …, 64, 32)
 -- FPS0=0, …,  FPS31=0, FPSCR=0  returns 0 (10ms,449ms total)

g log:
T9C4E9380 4819:214 JLINK_GoEx(MaxEmulInsts = 0, Flags = 01) -- CPU_ReadMem(4 bytes @ E0001000) (3ms, 452ms total)
+=
list license commandslicense
license add   Store a custom license on J-Link. Syntax: LicAdd LicName
  license erase Erase all custom licenses on J-Link.
  license show  Show all licenses stored on J-Link.
J-Link>license show
Built-in licenses: 
No installable licenses.
Erase flash . erase
Erasing device (nRF52832_xxAA)...
Comparing flash   [100%] Done.
Erasing flash     [100%] Done.
Verifying flash   [100%] Done.
J-Link: Flash download: Total time needed: 0.312s 
    (Prepare: 0.042s, Compare: 0.000s, Erase: 0.263s, Program: 0.000s, Verify: 0.000s, Restore: 0.006s)
Erasing done.

mem64 0,10
00000000 = FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF 
mem64 7FFE0,10
0007FFE0 = FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF 
0007FFF0 = FFFFFFFFFFFFFFFF FFFFFFFFFFFFFFFF 
00080000 = 0000000000000000 0000000000000000 
00080010 = 0000000000000000 0000000000000000 
Firmware info f
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
Hardware: V1.00 
Select device Device
Allows use of the J-Link flash programming as well as using unlimited breakpoints in flash memory.
mandatory For some devices to allow the DLL to perform special handling.
Select target interface. si SWD | JTAG | ICSP | FINE |
Select SWD as interface and outputs the JTAG - SWD switching sequence. SWDSelect
current CPU state IsHalted
        CPU is not halted.
Close connection and quitqc

Wish it had

Memory search,
logger

NRF_LOG_LEVEL
NRF_LOG_DEFAULT_LEVEL
NRF_LOG_[HEXDUMP_] ERROR | WARNING | INFO | RAW_INFO | DEBUG

printf-like, formatted string with up to seven arguments.

With HEXDUMP arg.2 is length.

Compiled only if NRF_LOG_LEVEL includes xxx
GETCHGAR (waits),
FLOAT[_MARKER]

NRF_LOG_LEVEL

Add -M to LDFLAGS +=… to generate symbol map.


OverTheAir D FirmwareUpload
075B20

-> /Applications/SEGGER/JLink_V633a/JFlashLite.app
JFlashLite.app                      JFlashLite          
JFlashSPI          
JLinkExe          
JLinkGDBServer.app                  JLinkGDBServer   
JLinkGDBServerCL  
JLinkLicenseManager.app 
JLinkRegistration.app 
JLinkRemoteServer.app               JLinkRemoteServer   
JLinkRemoteServerCLExe 
JLinkRTTClient      
JLinkRTTLogger      
JLinkSTM32         
JLinkSWOViewer    
JTAGLoadExe      
nrfjprog            -> /usr/local/Caskroom/nordic-nrf5x-command-line-tools/53406.17.93573317/nrfjprog/nrfjprog
mergehex            -> /usr/local/Caskroom/nordic-nrf5x-command-line-tools/53406.17.93573317/mergehex/mergehex
gcc-arm-none-eabi-4_9-2015q3-20150921-mac.tar
gcc-arm-none-eabi-4_9-2015q3/


Sample startup

> /Applications/SEGGER/JLink_V633a/JLinkExe

SEGGER J-Link Commander V6.33a (Compiled May  9 2018 17:25:09)
DLL version V6.33a, compiled May  9 2018 17:24:59

Connecting to J-Link via USB...O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
Hardware version: V1.00
S/N: 682930364
VTref=3.300V 

Type "connect" to establish a target connection, '?' for help
J-Link>connect
Please specify device / core. : NRF52832_XXAA
Type '?' for selection dialog
Device>
Please specify target interface:
  J) JTAG (Default)
  S) SWD
TIF>s
Specify target interface speed [kHz]. : 4000 kHz
Speed> Device "NRF52832_XXAA" selected.


Connecting to target via SWD
Found SW-DP with ID 0x2BA01477
Found SW-DP with ID 0x2BA01477
Scanning AP map to find all available APs
AP[2]: Stopped AP scan as end of AP map has been reached
AP[0]: AHB-AP (IDR: 0x24770011)
AP[1]: JTAG-AP (IDR: 0x02880000)
Iterating through AP map to find AHB-AP to use
AP[0]: Core found
AP[0]: AHB-AP ROM base: 0xE00FF000
CPUID register: 0x410FC241. Implementer code: 0x41 (ARM)
Found Cortex-M4 r0p1, Little endian.
FPUnit: 6 code (BP) slots and 2 literal slots
CoreSight components:
ROMTbl[0] @ E00FF000
ROMTbl[0][0]: E000E000, CID: B105E00D, PID: 000BB00C SCS-M7
ROMTbl[0][1]: E0001000, CID: B105E00D, PID: 003BB002 DWT
ROMTbl[0][2]: E0002000, CID: B105E00D, PID: 002BB003 FPB
ROMTbl[0][3]: E0000000, CID: B105E00D, PID: 003BB001 ITM
ROMTbl[0][4]: E0040000, CID: B105900D, PID: 000BB9A1 TPIU
ROMTbl[0][5]: E0041000, CID: B105900D, PID: 000BB925 ETM
Cortex-M4 identified.
Original PDF

arm KEIL documentation.

Command line connection and script:
jlink -device nRF52832_xxAA -If SWD -Speed 4000 -autoconnect 1 -commanderscript nRF52.jls

Segger forum

When started on 2/05/19 on smacpro:

SEGGER J-Link Commander V6.40b (Compiled Jan 22 2019 11:31:00)
DLL version V6.40b, compiled Jan 22 2019 11:30:49

Connecting to J-Link via USB...Updating firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Replacing firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 12 2018 16:05:20
Waiting for new firmware to boot
New firmware booted successfully
O.K.
Firmware: J-Link OB-SAM3U128-V2-NordicSemi compiled Jan 7 2019 14:07:15
Hardware version: V1.00
S/N: 682394615
VTref=3.300V

Errors

Connecting to J-Link via USB...FAILED: Cannot connect to J-Link via USB.

Try another cable in case the USB is not a "power-only" (i.e. no-data) cable.

The connected J-Link (S/N xxxxxxxxx) is low on memory