<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/23695/openocd-configuration-file-nrf51-cfg-not-working</link><description>Hi,
I am using st-link debugger with NRF51822 module.
I was trying to connect it openocd, but it failed. st-link is working with STM32 processor and able to flash through STM32 ST-LINK Utility. 
I was got error as follows. 
 [code]&amp;gt;openocd -f nrf51</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 25 Jul 2017 16:17:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/23695/openocd-configuration-file-nrf51-cfg-not-working" /><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93171?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 16:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c39a8b8-9d53-41bc-8cef-7094a04a54d7</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Problem is solved. It was related to RAM area assignment.
Changed from&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;\MEMORY
{
  RAM (rwx) :  ORIGIN = 0x200013c8, LENGTH = 0x6c38
}
I changed to
\MEMORY
{
  RAM (rwx) :  ORIGIN = 0x20001fe8, LENGTH = 0x2018
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I got soln in other thread.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93161?ContentTypeID=1</link><pubDate>Tue, 25 Jul 2017 15:40:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:56fa2418-4848-4127-ac8c-7b544036c6d9</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Are you referring to the code in your comment on July 23rd? Or are you referring to a SDK example?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93168?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 18:56:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9ffe2e6-9c99-4add-ac30-544e88b25afa</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;I checked on mbed compiler and voila !!! it is working.
I flashed local with/Without Softdevice but is not working after compiling code from SDK.
But if i compile the code on mbed compiler and flashed then it starts working.
What went wrong from SDK and compling?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93167?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 18:17:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4448bfb6-cd09-4549-b300-53b05526cbb4</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Hi,
I program the chip with verify option and it gave me &amp;quot;Verify OK&amp;quot;  result. So, i think program might have flashed correctly. here are registers status i got from chip.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; reg
===== arm v7m registers
(0) r0 (/32): 0x00000000
(1) r1 (/32): 0x00000000
(2) r2 (/32): 0x200000E0
(3) r3 (/32): 0x20000064
(4) r4 (/32): 0x00000000
(5) r5 (/32): 0x00000000
(6) r6 (/32): 0xFFFFFFFF
(7) r7 (/32): 0x00000000
(8) r8 (/32): 0xFFFFFFFF
(9) r9 (/32): 0xFFFFFFFF
(10) r10 (/32): 0x1FFF8000
(11) r11 (/32): 0x00000000
(12) r12 (/32): 0xFFFFFFFF
(13) sp (/32): 0x20007FE0
(14) lr (/32): 0xFFFFFFF9
(15) pc (/32): 0x00000B02
(16) xPSR (/32): 0x61000003
(17) msp (/32): 0x20007FE0
(18) psp (/32): 0xFFFFFFFC
(19) primask (/1): 0x00
(20) basepri (/8): 0x00
(21) faultmask (/1): 0x00
(22) control (/2): 0x00
===== Cortex-M DWT registers
(23) dwt_ctrl (/32)
(24) dwt_cyccnt (/32)
(25) dwt_0_comp (/32)
(26) dwt_0_mask (/4)
(27) dwt_0_function (/32)
(28) dwt_1_comp (/32)
(29) dwt_1_mask (/4)
(30) dwt_1_function (/32)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;PC is not all changing. means chip is not running.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93169?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 14:50:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dfce7ef3-9528-4d8a-bf97-b316ee076609</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Could you read back the flash of the chip and verify that the hex was written to the correct location and diff the readout with the original hex?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93170?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 14:28:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:480ea349-a6ac-46e3-8507-c2b31f9a5e7f</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Hi,
I am using SDK v12.2.
I tried Blinky example. Even that one is also not working.
I have posted my code in above post.
When i was trying peripharal code that time i was flashed SD as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93166?ContentTypeID=1</link><pubDate>Mon, 24 Jul 2017 11:35:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ef340d4-7071-4a0a-8b89-20fbb310ec9b</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Which SDK version are you using and did you flash the SoftDevice when you tested witht eh ble_app_uart example?&lt;/p&gt;
&lt;p&gt;I recommend that you start testing with a simple peripheral example like the blinkey example found in nRF5_SDK_12.2.0_f012efa\examples\peripheral\blinky\pca10028\blank&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93165?ContentTypeID=1</link><pubDate>Sun, 23 Jul 2017 10:03:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c7a429f5-6f43-4512-9d3a-39e375006b98</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Here are few logs of openocd.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&amp;gt; halt
target state: halted
target halted due to debug-request, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0xfffffffe msp: 0x20007fe0
&amp;gt; flash write_image erase peripheral_uart.hex
auto erase enabled
Unknown device (HWID 0x0000008f)
Padding image section 0 with 2112 bytes
Padding image section 1 with 32 bytes
using fast async flash loader. This is currently supported
only with ST-Link and CMSIS-DAP. If you have issues, add
&amp;quot;set WORKAREASIZE 0&amp;quot; before sourcing nrf51.cfg to disable it
target state: halted
target halted due to breakpoint, current mode: Handler HardFault
xPSR: 0x61000003 pc: 0x2000001e msp: 0x20007fe0
wrote 134144 bytes from file peripheral_uart.hex in 6.647914s (19.705 KiB/s)
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93164?ContentTypeID=1</link><pubDate>Sun, 23 Jul 2017 09:43:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94bd9dec-28c1-48f9-948e-35a8e5a194e3</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Hi, Now I am able to flash the hex file to NRF51822. But code is not working on chip. Is there any parameters need to define?
I tried Led Blinking and ble_peripheral/uart example. But not working, Any clues?
Hete is my code.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;boards.h&amp;quot;

#define LED1    6

/**
 * @brief Function for application main entry.
 */
int main(void)
{
    /* Configure board. */
        NRF_GPIO-&amp;gt;PIN_CNF[LED1] |= GPIO_PIN_CNF_PULL_Pullup &amp;lt;&amp;lt; GPIO_PIN_CNF_PULL_Pos; // Set pullup
        NRF_GPIO-&amp;gt;DIRSET = 1&amp;lt;&amp;lt;LED1;
    /* Toggle LEDs. */
    while (true)
    {
        NRF_GPIO-&amp;gt;OUTSET = 1&amp;lt;&amp;lt;LED1;
        nrf_delay_ms(1000);
        NRF_GPIO-&amp;gt;OUTCLR = 1&amp;lt;&amp;lt;LED1;
        nrf_delay_ms(1000);

    }
}
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93162?ContentTypeID=1</link><pubDate>Sat, 22 Jul 2017 18:28:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4933aa2c-2770-4565-b4b8-07848576fa3f</guid><dc:creator>phob</dc:creator><description>&lt;p&gt;Thanks. Problem is solved.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: openocd configuration file nrf51.cfg not working</title><link>https://devzone.nordicsemi.com/thread/93163?ContentTypeID=1</link><pubDate>Sat, 22 Jul 2017 17:01:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14d7dc89-afb8-4a7e-b6c6-8711bba22a9b</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;Current OpenOCD  version is &lt;code&gt;0.10.0&lt;/code&gt;. You should update.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>