<?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>GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96781/gdb-zephyr-elf----asserts-before-main</link><description>I&amp;#39;m trying to use gdb to debug, I&amp;#39;m launching successfully and loading zephyr.elf. However, as I step through starting from reset.S the jump to &amp;quot;z_arm_prep_c&amp;quot; just asserts. The app works fine if I just flash it (.hex) fwiw. Has anyone encountered this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Mar 2023 06:36:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96781/gdb-zephyr-elf----asserts-before-main" /><item><title>RE: GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/thread/412893?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 06:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:52476ecb-9efc-4036-ae59-3c28aeb2eb42</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Glad to hear that it works&amp;nbsp; &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;-Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/thread/412819?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 17:08:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d95303d1-507e-4207-b09d-338182727d1e</guid><dc:creator>mjatmv</dc:creator><description>&lt;p&gt;I have this working now by manually doing the gdb init process. I launch jlinkserver, then attach. First I load merged build, then change the file to zephyr elf file.Unfortunately the included commands to launch gdb are definitely not sufficient to work alone. Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/thread/412464?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 10:53:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:28a37a09-3ee1-44cd-9240-076c571c80f6</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi Mitch,&lt;/p&gt;
&lt;p&gt;I was a bit doubtful regarding this and had a discussion with an expert. So what might be happening is that, in the case that there are 3 images, say, the mcuboot, TFM and non-secure application, and when you do an incremental build, all 3 are updated, but when you launch the debug session, only the non-secure app is being replaced and this might cause the matching error. What is your sequence for entering the debug mode? i.e. the gdbinit section that yo run.&lt;/p&gt;
&lt;p&gt;If you just flash the merged.hex and recompile your fw and then load only the non-secure app (which is what happens when you start the debug), this problem might occur. Did you only try attaching to the debug session, i.e. &amp;quot;&lt;span&gt;&lt;span dir="ltr"&gt;cd build-folder &amp;amp;&amp;amp; ninja attach&lt;/span&gt;&lt;/span&gt;&amp;quot;?&lt;/p&gt;
&lt;p&gt;Have you tried an incremental compile? i.e.&amp;nbsp;&lt;span&gt;&lt;span dir="ltr"&gt;do you change the application compared to the initial merged.hex which was flashed onto the nRF9160?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;-Priyanka&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/thread/411797?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 23:21:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fb33064e-d3e3-431b-945f-420fd6afb7ee</guid><dc:creator>mjatmv</dc:creator><description>&lt;p&gt;Hi thanks, Linux,&amp;nbsp;GNU gdb (GNU Tools for Arm Embedded Processors 9-2019-q4-major) 8.3.0.20190709-git&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GDB zephyr.elf -- Asserts before main</title><link>https://devzone.nordicsemi.com/thread/411049?ContentTypeID=1</link><pubDate>Tue, 21 Feb 2023 09:17:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5fc03df-6739-42e1-9a85-645d4d948b62</guid><dc:creator>Priyanka</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What is your gdb version? Are you working on a Windows or Linux platform?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Priyanka&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>