<?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>peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/110908/peripheral_hids_keyboard-sample-different-flashing-behaviour-in-vscode-vs-ozone</link><description>Hello, 
 I am using nRF Connect 2.5.2 with a Xiao Seeed BLE Sense nRF52840 and Jlink EDU mini 
 I am trying to flash the peripheral_hids_keyboard sample with Ozone, and I immediately hit a hard fault (escalation of a fault with configurable priority that</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sat, 01 Jun 2024 01:31:25 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/110908/peripheral_hids_keyboard-sample-different-flashing-behaviour-in-vscode-vs-ozone" /><item><title>RE: peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/thread/486967?ContentTypeID=1</link><pubDate>Sat, 01 Jun 2024 01:31:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:51493c30-d454-4901-9380-41828ff74bd6</guid><dc:creator>Benjii519</dc:creator><description>&lt;p&gt;Ok! I had some time to dig further into this over the last few days and I&amp;#39;ve figured it ou.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;There were two issues.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The first issue: vscode was not flashing correctly over jlink (and Ozone was). This was due to the default board settings. Updating the config with these settings resolved that:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_BUILD_OUTPUT_UF2&lt;/span&gt;&lt;span&gt;=n&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_USE_DT_CODE_PARTITION&lt;/span&gt;&lt;span&gt;=n&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The second issue: Ozone hard fault after resuming a breakpoint. This was the issue that you pointed out. It doesn&amp;#39;t happen in VCS because monitor mode debugging is used. If I enable that in Ozone, I get the same behavior (no hard fault)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Exec.Command (&amp;quot;SetMonModeDebug = 1&amp;quot;);&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/thread/486700?ContentTypeID=1</link><pubDate>Thu, 30 May 2024 13:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:62e2b9f3-20a7-47b0-8b93-94e5dddeeb7d</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Hi Benjii,&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;[quote user="Benjii519"]But then why do breakpoints in vscode work? How are the two setups different?[/quote]
&lt;p&gt;This depends on where you set the breakpoint. If you set it into time sensitive tasks, for example&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;err&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bt_le_adv_start&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;adv_param&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ad&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ARRAY_SIZE&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;ad&lt;/span&gt;&lt;span&gt;), &lt;/span&gt;&lt;span&gt;sd&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;ARRAY_SIZE&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;sd&lt;/span&gt;&lt;span&gt;));&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;you will get hard fault.&lt;/p&gt;
[quote user="Benjii519"]Where working state is:&amp;nbsp;I can see the LED flashing, attach VScode debugger + verify),[/quote]
&lt;p&gt;Do you define working as&amp;nbsp;programming firmware into a device? LED means LED5 here?&lt;/p&gt;
&lt;p&gt;For VS Code debugger, when you start the debugger, it will start download immediately. Make sure there is no another debugger already running.&lt;/p&gt;
&lt;p&gt;For debug with Ozone, it supports download a firmware to do debugging(Debug-&amp;gt;Start Debug Session-&amp;gt;Download &amp;amp; Reset Program) or you can &amp;quot;Attach to running program&amp;quot; already start by VS Code debugger.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Just let me know if I have any misunderstanding. I can try to repeat the issue on my side.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Charlie&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/thread/486129?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 09:54:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7c1ea16-28fd-4074-97c0-a36a1b42b53a</guid><dc:creator>Benjii519</dc:creator><description>&lt;p&gt;The other odd thing here (and I can open another ticket if thats helpful) is that flashing the sample isn&amp;#39;t quite working.&lt;/p&gt;
&lt;p&gt;It seems like Ozone and VsCode are each doing something slightly different, but both are required to get the sample in a working state.&lt;/p&gt;
&lt;p&gt;eg:&lt;/p&gt;
&lt;p&gt;- if I flash with Ozone alone -&amp;gt; not working&lt;/p&gt;
&lt;p&gt;- if I flash with vscode alone -&amp;gt; not working&lt;/p&gt;
&lt;p&gt;- if I flash with Ozone and then vscode -&amp;gt; working (as long as I don&amp;#39;t do a full erase)&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Where working state is:&amp;nbsp;I can see the LED flashing, attach VScode debugger + verify),&lt;/p&gt;
&lt;p&gt;I&amp;#39;m guessing Ozone is flashing some piece than VScode is missing and vice-versa&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/thread/486068?ContentTypeID=1</link><pubDate>Tue, 28 May 2024 02:14:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:605def0b-7d31-4dd9-92e9-30ca7b51248f</guid><dc:creator>Benjii519</dc:creator><description>&lt;p&gt;But then why do breakpoints in vscode work? How are the two setups different?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: peripheral_hids_keyboard sample: Different flashing behaviour in Vscode vs Ozone</title><link>https://devzone.nordicsemi.com/thread/482265?ContentTypeID=1</link><pubDate>Tue, 07 May 2024 11:54:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d7d1abbf-c609-48dd-934a-e29c9185ebfc</guid><dc:creator>Charlie</dc:creator><description>&lt;p&gt;Please see this discussion:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/103904/ozone-debugger-causes-hardfault"&gt;(+) Ozone debugger causes hardfault - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone (nordicsemi.com)&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>