<?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>Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/98005/flashing-custom-nrf52811-board-with-softdevice-using-openocd</link><description>We are trying to flash our custom board with a modified version of the ble_app_template example (project based on nRF5_SDK_17.1.0_ddde560/examples/ble_peripheral/ble_app_template/pca10056e/s112/armgcc ). The code has been validated on the PCA10056 DK</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 31 Mar 2023 21:09:48 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/98005/flashing-custom-nrf52811-board-with-softdevice-using-openocd" /><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418686?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 21:09:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bbac1fa9-e955-4edd-aa10-6ca80730f748</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;So after a few more hours of debugging, I finally found a solution. It all came down to not decreasing the&amp;nbsp;RAM&amp;nbsp;segment length in the linker script despite increasing the segment start address.&lt;/p&gt;
&lt;p&gt;After incrementally adding back custom features to the ble_app_template, at one point I saw the project was working&amp;nbsp;when building with SEGGER, but not when building with make - despite me only increasing the RAM segment start address and not decreasing the segment length in both SEGGER and linker script used in make. After some digging, I found that SEGGER was configured to calculate the segment length on-the-fly and appeared to completely ignore the configured segment length. This lead me to decreasing the segment length in the linker script, and now the make build works as well.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418679?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 18:41:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:33d1f49b-beba-4ece-9fa8-871f31c9c955</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Great news.&amp;nbsp;I attempted the same exercise with the ble_app_template example and got it working. Now it&amp;#39;s just a matter of going through the process of elimination by incrementally adding custom features until it breaks again. Hopefully it&amp;#39;ll be more clear&amp;nbsp;what&amp;#39;s going wrong after that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418666?ContentTypeID=1</link><pubDate>Fri, 31 Mar 2023 16:01:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:765c6d53-8c1f-4f5f-b893-f1e1f5e6104f</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;&lt;span&gt;So I&amp;nbsp;tried flashing the unmodified ble_app_beacon (pca10056e) using SEGGER embedded studio and got the same result - firmware starts, but fails when initializing BLE. This time&amp;nbsp;I used hardware without the&amp;nbsp;32.768 kHz crystal, so I followed the instructions to use LFRC instead, found &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67478/nrf52840-examples-with-lfrc-and-calibration/276416"&gt;here&lt;/a&gt;.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;This is where I end up when running the firmware.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;nbsp;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/gscreenshot_5F00_2023_2D00_03_2D00_31_2D00_165030.png" /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;Using breakpoints, I was able to determine&amp;nbsp;the abort happens at this point during ble initialization.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/gscreenshot_5F00_2023_2D00_03_2D00_31_2D00_175443.png" /&gt;&lt;/p&gt;
&lt;p&gt;Setting a breakpoint at any point after this one (e.g. line 231) is never reached. However,&amp;nbsp;nrf_sdh_enable_request() returns NRF_SUCCESS.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/gscreenshot_5F00_2023_2D00_03_2D00_31_2D00_175920.png" /&gt;&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll verify the same happens on hardware with the&amp;nbsp;&lt;span&gt;32.768 kHz crystal and update this post.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;EDIT:&lt;/strong&gt; So I just made an interesting discovery. For some reason,&amp;nbsp;NRF_SDH_CLOCK_LF_SRC option change wasn&amp;#39;t saved to sdk_config.h, which caused the abort. After fixing the configuration, firmware seems to run just fine (both on device with crystal and device with LFRC). However,&amp;nbsp;I still can&amp;#39;t see the BLE device. So at this point I&amp;#39;m investigating&amp;nbsp;potential hardware issues. Would love to know, if there are still any potential software causes for this issue.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;EDIT 2:&lt;/strong&gt; Guess the option did save, but it appears there are three versions of the same option? Why is that?&lt;/span&gt;&lt;/p&gt;
&lt;pre class="c-mrkdwn__pre" data-stringify-type="pre"&gt;NRF_SDH_CLOCK_LF_SRC
NRFX_CLOCK_CONFIG_LF_SRC&lt;br /&gt;CLOCK_CONFIG_LF_SRC&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418216?ContentTypeID=1</link><pubDate>Thu, 30 Mar 2023 07:19:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79c5b542-08cd-4f51-8a54-6c61db4e942f</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Yes,&amp;nbsp;&lt;span&gt;0xdeadbeee clearly indicate an error, but I am not sure what. Regarding debugger, any GUI debugger usually works well for me :D You can for instance use Segger Ozone which works with any elf file. I don&amp;#39;t have strong opinion about which debugger you use as long as you understand it, it is just that I am not able to help you with explaining why you see&amp;nbsp;0xdeadbeee.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Regarding the comment about stepping with a SoftDevice, that is because it seemed to me like you were stepping in the code, and that will not work with the SoftDevice most of the time. It will use RTC0 and TIMER0 to keep track of time, and if it detects that it has lost a event of some sort (because the timer elapsed while the CPU was halted), it will assert. So stepping (or continuing from a breakpoint for that matter) while using a SoftDevice will cause problems.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418112?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 13:06:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a6616f-e116-4cdb-904f-44236f5c7735</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;To me&amp;nbsp;&lt;span&gt;0xdeadbeee is one off&amp;nbsp;0xdeadbeef which is often used to indicate some sort of failure. I&amp;#39;m not sure however, if that&amp;#39;s read off the device or if it&amp;#39;s just a way for the GDB server to&amp;nbsp;report an error&amp;nbsp;communicating with the device or something of that sort.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which debugger are you more familiar with? I&amp;#39;ll see if I can get that setup instead.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Not sure I understand what you mean by the following:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt;The SoftDevice will assert when stepping in most cases, so instead when using a SoftDevice, you can mimmic it by using a breakpoint, and move the&amp;nbsp;breakpoint a bit further and reset to let it run to the next breakpoint, and so on.&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418109?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 13:00:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4d9a7f54-515e-4347-9df6-1818f49c97f6</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;I hust admit I am more used to GUI debuggers and not GDB so I am not sure what it means when you the address is&amp;nbsp;0xdeadbeee, but that said, it seems like you are stepping? The SoftDevice will assert when stepping in most cases, so instead when using a SoftDevice, you can mimmic it by using a breakpoint, and move the&amp;nbsp;breakpoint a bit further and reset to let it run to the next breakpoint, and so on.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418093?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 11:56:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6b317a4-bfbc-4cf1-9b5a-222b34414f71</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Yes,&amp;nbsp;app was built with&amp;nbsp;correct headers.&amp;nbsp;I started with&amp;nbsp;the emulated version of ble_app_template example as a starting point which already uses S112, so I would assume everything is already correctly configured (except for the two defines which are mentioned&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_nrf5_v17.1.0%2Fnrf52811_user_guide.html&amp;amp;anchor=ug_52811_project"&gt;here&lt;/a&gt;&amp;nbsp;under &amp;quot;Transferring emulated project&amp;quot;).&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680090730289v2.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;By &amp;quot;stuck&amp;quot; I mean that GDB hangs at that command and never returns,&amp;nbsp;preventing me from entering any further commands. As mentioned in my previous post above, I let it run for a while and after a few minutes I ended up at address&amp;nbsp;&lt;span&gt;0xdeadbeee.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;During all tests I was also monitoring for the expected BLE device to show up on my phone, but it never appeared.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418092?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 11:50:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:498dfc24-239e-4130-b9c3-3f892965b535</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Did you build your application with the correct SoftDevice header files (for S112 7.2.0), or do you still have the headers for S140 in your include path instead?&lt;/p&gt;
&lt;p&gt;When you write &amp;quot;get stuck&amp;quot;, what does that mean?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418070?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 10:54:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f790b8b-aed4-464c-943b-9315f337fe71</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Jumping to `main`&amp;nbsp;got me stuck after asking for the current frame.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680087265474v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT: After restarting the device through nrfconnect and&amp;nbsp;restarting GDB and GDB server, I get stuck after the following:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680087562501v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT 2: After a few minutes, I ended up at address&amp;nbsp;0xdeadbeee.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680088333890v1.png" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;EDIT 3: Here are logs from GDB bridge&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/gscreenshot_5F00_2023_2D00_03_2D00_29_2D00_131922.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418066?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 10:48:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1358049b-10fb-459a-bb45-120a73ab3422</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Here&amp;#39;s some more info I was able to get from my BLE app. I&amp;nbsp;set the&amp;nbsp;PC to the&amp;nbsp;application start address and after a few steps, I again end up at&amp;nbsp;0x000189cc.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680086909236v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/418062?ContentTypeID=1</link><pubDate>Wed, 29 Mar 2023 10:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6413190b-3b49-466e-ae10-355e7ffd8b2f</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;So&amp;nbsp;today, the DK works again. Odd. I&amp;#39;m starting to suspect this USB hub I got recently.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417978?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 20:51:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:09d44929-4e50-42cf-995d-337c8ce5a0f3</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Also, in case this helps, here&amp;#39;s the MEMORY section from my linker script. Looks like start address is correct and if I understand .hex files&amp;nbsp;right, they should already contain the location in flash where&amp;nbsp;the contents&amp;nbsp;need to be placed. I think the only change I had to make here was increase the RAM origin by 0x10 (or something like that) to&amp;nbsp;give softdevice more ram to handle a custom BLE service. Again, worked fine on DK, so I would assume it should be the same with nRF52811.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680036554901v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417976?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 20:14:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4aaa3279-dd0f-4e5e-80f8-4bad8f14ff80</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;A few more interesting observations. I tried debugging both my BLE app as well as blinky and wasn&amp;#39;t able to get far with either one.&lt;/p&gt;
&lt;p&gt;I used&amp;nbsp;&lt;code&gt;JLinkGDBServer -USB -device cortex-m4&lt;/code&gt;&amp;nbsp;to start a GDB server and &lt;code&gt;arm-none-eabi-gdb&lt;/code&gt; to try and debug the firmware.&lt;/p&gt;
&lt;p&gt;In GDB I ran into the first issue, not knowing which file to load. I first tried &lt;code&gt;file nRF5_SDK_17.1.0_ddde560/examples/peripheral/blinky/pca10056e/blank/armgcc/_build/nrf52811_xxaa.hex&lt;/code&gt;, but always got the response that this file doesn&amp;#39;t contain any debug symbols. I could only step between two&amp;nbsp;instructions for the blinky app and one&amp;nbsp;instruction for the BLE app.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;# Blikly app&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;(gdb) target remote localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Remote debugging using localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000710 in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000710 in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in ?? ()&amp;nbsp;&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;code&gt;# BLE app&lt;/code&gt;&lt;/strong&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x000189cc in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I&amp;nbsp;later found, through trial and error, that the `.out` file contains debug symbols, so I decided to load that one instead. When loading the blinky example, here&amp;#39;s what I got:&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;1st try:&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;(gdb) target remote localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Remote debugging using localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Single stepping until exit from function delay_machine_code.0,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;which has no line number information.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Cannot find bounds of current function&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Cannot find bounds of current function&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;&lt;strong&gt;2nd try:&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;(gdb) target remote localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Remote debugging using localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) ni&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000710 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000710 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000712 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0x00000710 in delay_machine_code ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Single stepping until exit from function delay_machine_code.0,&lt;/code&gt;&lt;br /&gt;&lt;code&gt;which has no line number information.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrf_delay_ms (ms_time=&amp;lt;optimized out&amp;gt;) at ../../../../../../components/libraries/delay/nrf_delay.h:73&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) n&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;/p&gt;
&lt;h3&gt;&lt;code&gt;&lt;/code&gt;&lt;strong&gt;This seemed to go into infinity&lt;/strong&gt;&lt;/h3&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(gdb) frame&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#0 nrf_delay_ms (ms_time=&amp;lt;optimized out&amp;gt;) at ../../../../../../components/libraries/delay/nrf_delay.h:73&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) s&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrfx_coredep_delay_us (time_us=1000) at ../../../../../../modules/nrfx/soc/nrfx_coredep.h:173&lt;/code&gt;&lt;br /&gt;&lt;code&gt;173 delay_cycles(cycles);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrf_delay_ms (ms_time=&amp;lt;optimized out&amp;gt;) at ../../../../../../components/libraries/delay/nrf_delay.h:73&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrfx_coredep_delay_us (time_us=1000) at ../../../../../../modules/nrfx/soc/nrfx_coredep.h:173&lt;/code&gt;&lt;br /&gt;&lt;code&gt;173 delay_cycles(cycles);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;nrf_delay_ms (ms_time=&amp;lt;optimized out&amp;gt;) at ../../../../../../components/libraries/delay/nrf_delay.h:73&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I was curious if this would ever end, so I&amp;nbsp;let it run until&amp;nbsp;it&amp;#39;s past the current line. This however, turned out to be a bad idea, because after maybe a minute or two of it running through the loop, the target stopped responding. Even trying to power cycle the entire setup had no effect.&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;nrf_delay_ms (ms_time=&amp;lt;optimized out&amp;gt;) at ../../../../../../components/libraries/delay/nrf_delay.h:73&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;72 nrf_delay_us(1000);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) u&lt;/code&gt;&lt;br /&gt;&lt;code&gt;73 } while (--ms_time);&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) u&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Program received signal SIGTRAP, Trace/breakpoint trap.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) frame&lt;/code&gt;&lt;br /&gt;&lt;code&gt;#0 0xdeadbeee in ?? ()&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) target remote localhost:2331&lt;/code&gt;&lt;br /&gt;&lt;code&gt;A program is being debugged already. Kill it? (y or n) y&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Remote debugging using localhost:2331&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Program received signal SIGTRAP, Trace/breakpoint trap.&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;lt;signal handler called&amp;gt;&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) k&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Kill the program being debugged? (y or n) y&lt;/code&gt;&lt;br /&gt;&lt;code&gt;Remote connection closed&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) target remote localhost:2331Quit&lt;/code&gt;&lt;br /&gt;&lt;code&gt;(gdb) q&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Now&amp;nbsp;the JLink on the DK&amp;nbsp;appears to be in some weird state - when I try running&amp;nbsp;&lt;span&gt;&lt;code&gt;JLinkGDBServer -USB -device cortex-m4&lt;/code&gt;, I get a popup, asking for the remote IP address,&amp;nbsp;because it can&amp;#39;t find a USB device. &lt;code&gt;nrfconnect&lt;/code&gt; also doesn&amp;#39;t&amp;nbsp;detect any devices. Very weird. It&amp;#39;s as if the DK is completely bricked. I also tried disconnecting the custom board completely to see, if I can flash the onboard nRF52840, but no luck. In all cases the LED next to JLink starts blinking really fast.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417968?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 18:38:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dc2d6c1-7c03-4ef5-b6ee-9bee269b6bd2</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;I think the VTG connection was the issue. Or at least &amp;quot;SWD SEL&amp;quot; as it&amp;#39;s marked on my DK. Now&amp;nbsp;reading/writing&amp;nbsp;flash shows the correct total size. However, when I flash both softdevice and application, the application gets merged&amp;nbsp;into the softdevice for some reason. Not sure if this is just a visual glitch or could have something to do with the issue I&amp;#39;m experiencing. See flash layout below as shown in nRFConnect software.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1680028713988v2.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417901?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 13:08:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3cebf73b-23c1-444e-9f68-a8b76e63ad63</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It does not matter much if you are using the ST-Link or a J-link like the DK, but it is important that you are able to debug (not just program). Are you? If so, you can continue with the ST-Link. If not, I would work a bit more on getting debugging working. If it does not work, perhaps you did not connect VTG (see &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/51179/debug-out-port-p20-on-nrf52840-dk-debugging-custom-board/204972"&gt;this post&lt;/a&gt;). Also, the supply voltage of your board must be about 3V in order to use the DK as a debugger.&lt;/p&gt;
&lt;p&gt;As you get blinky to work the basics are there, so I would make sure you can debug blinky. When you do, you can move on to try to debug a SoftDevice application. You should at least be able to see that you enter main(). If that does not happen, I would double check that you have programmed the SoftDevice, and that the application start address is correct. That needs to be the same as the size of the SoftDevice given in the release notes for the SoftDevice you are using. So when using S112 7.2.0, the application start address must be 0x19000.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417863?ContentTypeID=1</link><pubDate>Tue, 28 Mar 2023 11:24:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:11114368-6087-4ecb-bd2c-7d996956f166</guid><dc:creator>Tadej</dc:creator><description>&lt;p&gt;Our board does have a&amp;nbsp;&lt;span&gt;32.768 kHz crystal. However, I still tried to use LFRC, in case that would change anything, but had no luck. I also followed the instructions on how to transfer the project to nRF52811 - I started with an emulated project (&lt;code&gt;examples/ble_peripheral/ble_app_template/pca10056e/s112/armgcc&lt;/code&gt;), so I only had to remove&amp;nbsp;DEVELOP_IN_NRF52840 and&amp;nbsp;NRFX_COREDEP_DELAY_US_LOOP_CYCLES.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m now trying to debug using the&amp;nbsp;DK, but am also having issues. I shorted SB47 and connected our custom board to P20 (I&amp;#39;m powering our board from VDD nRF), but when I try to&amp;nbsp;write/read flash, I end up writing/reading the nRF52840 that&amp;#39;s on the DK. I know this, because I can still read/write the flash even when our custom board is disconnected and because the firmware works as expected (despite the two compiler defines being removed - DEVELOP_IN_NRF52840, NRFX_COREDEP_DELAY_US_LOOP_CYCLES).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I&amp;#39;m pretty suck at this point - not sure how to get the DK to flash our custom board. I saw SB19 next to SB47, so I&amp;#39;m wondering if I should short&amp;nbsp;it as well? But SB19&amp;nbsp;appears to be undocumented, so I&amp;#39;m not even sure what it&amp;#39;s for.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I can also add that the basic&amp;nbsp;blinky example (&lt;code&gt;examples/peripheral/blinky&lt;/code&gt;) flashed using ST-LINK works fine.&amp;nbsp;It&amp;#39;s only when I try to use BLE which requires the softdevice I&amp;nbsp;start running into issues. I&amp;#39;ve also made sure to always flash the softdevice (S112), so that&amp;#39;s definitely&amp;nbsp;not missing.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flashing custom nRF52811 board with softdevice using OpenOCD</title><link>https://devzone.nordicsemi.com/thread/417107?ContentTypeID=1</link><pubDate>Thu, 23 Mar 2023 13:39:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a07c007-92a3-4ca5-8333-2025bf5dc7ec</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The first thing that comes to mind as your application worked on a DK but not on your custom board is if your custom board has a 32.768 kHz crystal? If not, you need to configure the SoftDevice to use the LFRC instead, as explained in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/67478/nrf52840-examples-with-lfrc-and-calibration/276416"&gt;this post&lt;/a&gt;. And you need to make sure that you have followed the instructions under &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/nrf52811_user_guide.html#ug_52811_project"&gt;Transferring the project to nRF52811 hardware&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If that does not help, the next step is to start debugging to see what happens on the device.&lt;/p&gt;
&lt;p&gt;As you have a DK, I would recommend that you use that as a debugger instead of the ST-Link, as that way you will be able to use all the tools we provide which works with J-Link out of the box. See &lt;a href="https://infocenter.nordicsemi.com/topic/ug_nrf52840_dk/UG/dk/hw_debug_out.html"&gt;Debug output in the DK documentation&lt;/a&gt; for details on how to use the DK as a debugger for an external device.&lt;/p&gt;
&lt;p&gt;Regarding NRF_LOG_ output, you can get that either via UART or Segger RTT. If you have routed out pins for UART you can hook that up, and configure the logger module for use with UART. Or you can use RTT. In that case, you just need to use a Segger debugger (like a DK). See &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_nrf_log.html"&gt;Logger module&lt;/a&gt;&amp;nbsp;for details.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>