This is an automated email from Gerrit.

Paul Fertser ([email protected]) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/2331

-- gerrit

commit 527fc0470aa0c7fbfb3603d5403371c3b06f52cb
Author: Paul Fertser <[email protected]>
Date:   Sat Oct 4 08:08:21 2014 +0400

    jtag/drivers/jlink: add a temporary HACK for nrf51 usb dongle
    
    Not for merging.
    
    My account on Segger's "forum" is pending manual confirmation so I
    can't yet ask anybody what those commands are for. Having this temp
    hack on Gerrit will allow us to not forget about the issue.
    
    Change-Id: Iabd76c743eca86e2c817a97cb93c969fec3f7ac6
    Signed-off-by: Paul Fertser <[email protected]>

diff --git a/src/jtag/drivers/jlink.c b/src/jtag/drivers/jlink.c
index 6461656..c22b156 100644
--- a/src/jtag/drivers/jlink.c
+++ b/src/jtag/drivers/jlink.c
@@ -509,6 +509,39 @@ static int jlink_init(void)
        jlink_hw_jtag_version = 2;
 
        if (jlink_get_version_info() == ERROR_OK) {
+               /*
+                * What follows are undocumented commands issued by
+                * Segger's server when connecting to JLink OB on an
+                * nRF51 USB dongle from the nRF51 eval kit. Testing
+                * shows that without these the target CPU doesn't
+                * communicate via SWD for a reason yet to be
+                * discovered. Capture data from Segger's tool:
+
+-> 09:64:48:0c:9a:38:00:00:00:00:00:00:00:00 ???
+<- 
01:00:06:00:10:00:04:00:48:0c:9a:38:00:00:00:00:00:00:01:00:e1:53:0d:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:e4:0c:00:00
+
+-> 09:64:48:0c:9a:38:00:00:00:00:00:00:01:00 ???
+<- 
01:00:06:00:10:00:04:00:48:0c:9a:38:00:00:00:00:00:00:01:00:e2:53:0d:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:e4:0c:00:00
+
+-> 09:64:48:0c:9a:38:00:00:00:00:00:00:01:00 ???
+<- 
01:00:06:00:10:00:04:00:48:0c:9a:38:00:00:00:00:00:00:01:00:fe:54:0d:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:e4:0c:00:00
+
+                */
+               uint8_t c1[] = { 0x09, 0x64, 0x48, 0x0c, 0x9a, 0x38,
+                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+                                0x00 };
+               uint8_t c2[] = { 0x09, 0x64, 0x48, 0x0c, 0x9a, 0x38,
+                                0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
+                                0x00 };
+               memcpy(usb_out_buffer, c1, 14);
+               jlink_usb_write(jlink_handle, 14);
+               jlink_usb_read(jlink_handle, 108);
+               memcpy(usb_out_buffer, c2, 14);
+               jlink_usb_write(jlink_handle, 14);
+               jlink_usb_read(jlink_handle, 108);
+               jlink_usb_write(jlink_handle, 14);
+               jlink_usb_read(jlink_handle, 108);
+
                /* attempt to get status */
                jlink_get_status();
        }

-- 

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to