<?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>Can&amp;#39;t get bootloader to log</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/19579/can-t-get-bootloader-to-log</link><description>Using SDK 12.2, I have compiled the secure bootloader successfully, tweaking the sdk_config and Makefile to use RTT for logging and turning on logging, and using the &amp;quot;_debug&amp;quot; linker script to place it at 0x75000. I used nrfutil to make a bootconfig.hex</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 12 Mar 2017 05:57:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/19579/can-t-get-bootloader-to-log" /><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76177?ContentTypeID=1</link><pubDate>Sun, 12 Mar 2017 05:57:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:572fd993-484f-44da-ac66-5fd8dfb02c24</guid><dc:creator>Thomas</dc:creator><description>&lt;p&gt;Hey Lee Daniel,
After demining our way through (we use the pca10040_debug version so that we don&amp;#39;t have to bother with most other issues) we ended up a similar situation. We checked that the app is really at the address it should be at (0x0001f000) and we get the same cryptic messages. Is it hang? is it locked in? is something else that&amp;#39;s supposed to be there or not there? We successfully uploaded our app but as the bootloader then tries to switch to that app (instead of starting a BLE service waiting for a firmware update) we find ourselves in this deadend.
Lee Daniel, if you were able to figure this out, could you share your workaround/solution? that would be tremendously helpful.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76173?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2017 18:40:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a18ae73a-1513-4467-956c-b13e0479afee</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Yep, nRFConnect worked beautifully. Guess I know which code to use/steal/be inspired by now. Thanks for the help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76170?ContentTypeID=1</link><pubDate>Mon, 13 Feb 2017 08:45:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bc0b6b2-c827-41ff-ac7a-4cd09543cbe8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Segger RTT use SWD interface to send logging data out, so you need to connect to Jlink to be able to get RTT debugging.&lt;/p&gt;
&lt;p&gt;&amp;quot;DFU SERVICE NOT FOUND&amp;quot; usually happens when the phone caches the attribute table and fails to do service discovery to update the new table (when we switch to DFU bootloader), you can try to turn off and on Bluetooth on the phone, and &lt;strong&gt;try to use nRFConnect to connect and do DFU&lt;/strong&gt;, instead of nRFToolbox (in nRFConnect we erase the cached att table)&lt;/p&gt;
&lt;p&gt;Make sure you set IS_SRVC_CHANGED_CHARACT_PRESENT = 1 in your normal application, so the phone would know that you may change the ATT table.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76175?ContentTypeID=1</link><pubDate>Sat, 11 Feb 2017 00:05:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00fc69e0-a29b-4f8d-aadb-bda986ff0e8f</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Odd results now. To go back to basics I burned the pre-compiled secure_dfu_secure_dfu_ble_s132_pca10040_debug.hex from the SDK. I was able to upload the sample ZIP from a Nexus tablet and a Samsung tablet. But it failed trying from a Motorola phone and an iPad. So maybe it&amp;#39;s the mobile app side that&amp;#39;s my problem.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76174?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 23:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05a42a05-b381-4638-8fee-920fe582e42d</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Getting closer. It occurred to me that RTT only exists when I&amp;#39;m plugged into JLink, so I reverted back to UART logging, which works from powerup. Now when the bootloader is in two-leds-lit mode, it shows up as &amp;quot;DfuTarg&amp;quot; to the toolkit app. Unfortunately, when I try to upload one of the sample ZIPs like dfu_test_app_hrm_s132.zip, the app stops with &amp;quot;DFU SERVICE NOT FOUND&amp;quot;. The bootloader&amp;#39;s log ends with:&lt;/p&gt;
&lt;p&gt;:INFO:Waiting for events&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76172?ContentTypeID=1</link><pubDate>Fri, 10 Feb 2017 09:59:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ccfa0d9e-e920-49c4-bc18-de4c71e107e8</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Lee,
When I mean &amp;quot;move&amp;quot; meanting instead of 0x78000, it is flashed at 0x75000 and the PC start from there (The MBR check 0x10001014 in UICR and forward the PC there).&lt;/p&gt;
&lt;p&gt;My suggestion is:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Test the stock bootloader example, make sure it works at address 0x78000 (don&amp;#39;t enable RTT or anything). Try to DFU update an application.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Change the address to 0x75000 and check if it still work.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Don&amp;#39;t change to O0, keep it as Os first, and enable RTT and check if it works. Don&amp;#39;t copy the whole sdk_config.h from other project, only modify it to enable what you want.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If you want to remove optimization, use O0 and &amp;quot;move&amp;quot; the bootloader to something lower to get more space, for example 0x73000.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;About your last question, the log showed that the application started, the bootloader is finished, that&amp;#39;s why you see nothing after that.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76176?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 18:05:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8405d91e-5e60-4283-92b4-a64d996e9e8b</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Update: though I never got -O0 to work, fixing the Makefile to add -fomit-frame_pointer to the compilation of nrf_bootloader_app_start.c seems to have done something. I now get stuff on the RTT console when I enter an &amp;quot;r&amp;quot; command to JLink, but not when I power the board on by itself.&lt;/p&gt;
&lt;p&gt;It prints:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:INFO:Inside main
:INFO:In nrf_bootloader_init
:INFO:In real nrf_dfu_init
:INFO:running nrf_dfu_settings_init
:INFO:Enter nrf_dfu_continue
:INFO:Valid App
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return true. App was valid
:INFO:Enter nrf_dfu_app_is_valid
:INFO:Return true. App was valid
:INFO:Jumping to: 0x0001f000
:INFO:Running nrf_bootloader_app_start with address: 0x0001f000
:INFO:Disabling interrupts
:INFO:Setting SD vector table base: 0x0001f000
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Not sure what&amp;#39;s supposed to happen after that. Holding down button 4 while doing an r/g does nothing (two LEDs on, no RTT).&lt;/p&gt;
&lt;p&gt;So now the question is, how did it ever compile with the SDK&amp;#39;s included Makefile?  And why is not running on power cycle?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76171?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 18:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:682254c8-fc71-4518-aa59-5052c02a8c42</guid><dc:creator>Lee Daniel Crocker</dc:creator><description>&lt;p&gt;Not sure what you mean by &amp;quot;move&amp;quot; the bootloader. It&amp;#39;s compiled for 0x75000 and loaded there, and UICR has that address at 0x10001014, and &amp;quot;0x7E000&amp;quot; at 0x10001018. As I aid in the question, I&amp;#39;ve verified that the code is indeed there.&lt;/p&gt;
&lt;p&gt;I had those sdk_config settings as well as the ones for things like buffer size, all copied from other example projects using RTT.&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t have -O0 because the Makefile supplied with the SDK uses -Os, which compiles fine. When I change it to -O0, the first thing that happens is that it complains about nrf_bootloader_app_start.c having an assembly function that uses R7. Tweaking the Makefile to add -fomit-frame-pointer to the compile line for that file fixes that, but causes the program to grow too large even to fit at 0x75000, as well as causing a link error with &amp;quot;nrf_drv_rng_block_rand&amp;quot;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Can't get bootloader to log</title><link>https://devzone.nordicsemi.com/thread/76169?ContentTypeID=1</link><pubDate>Thu, 09 Feb 2017 12:05:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18af1171-1f81-4669-a5ae-d232929b76a9</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You need to test and check if you can actually move the bootloader to 0x75000 before testing with RTT.&lt;/p&gt;
&lt;p&gt;To enable RTT logging, you need to update the sdk_config.h to set NRF_LOG_ENABLED = 1 and set NRF_LOG_BACKEND_SERIAL_USES_RTT = 1.
You can try to disable optimization to O0 and can debug as normal application.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>