<?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>Jlink gdb debugger</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/22611/jlink-gdb-debugger</link><description>Hi all,
I am working on nrf51822 and I need to debug my code through gdb.
Please give me suggestion how can I use gdb server and how can connect it to JLink.
thanks in advance.</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 08 Jun 2017 08:17:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/22611/jlink-gdb-debugger" /><item><title>RE: Jlink gdb debugger</title><link>https://devzone.nordicsemi.com/thread/88937?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 08:17:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:969b3437-0a7e-45a9-992e-33e89d761991</guid><dc:creator>Vidar Berg</dc:creator><description>&lt;p&gt;You can start the GDB server with the command @Nabil posted, but you need to change the device from cortex-m4 to nrf51822.&lt;/p&gt;
&lt;p&gt;Here are the commands I typically use to start a new debug session:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;jlinkgdbservercl  -select USB -device nRF51 -if SWD -speed 4000 // starts server
arm-none-eabi-gdb *.out/*.elf // starts GDB session and loads debug symbols from input

//in GDB (may be added to .gdbinit)
target remote localhost:2331 // connects to server
mon reset 0 // reset target
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;That said, I would recommend to consider &lt;a href="https://www.segger.com/ozone.html"&gt;Segger Ozone&lt;/a&gt; as an alternative to GDB.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jlink gdb debugger</title><link>https://devzone.nordicsemi.com/thread/88936?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 07:33:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ce91dcf-5a6e-4119-80ed-44a40ac1e55c</guid><dc:creator>Nabil</dc:creator><description>&lt;p&gt;This command can active your remote server and allow you to debug with DDD  :&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; JLinkGDBServer -If SWD -Speed 4000 -Device Cortex-M4
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jlink gdb debugger</title><link>https://devzone.nordicsemi.com/thread/88935?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 06:57:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f89dad38-1394-4810-98ed-0a94a46e98d4</guid><dc:creator>arvind</dc:creator><description>&lt;p&gt;I am still confused how to start gdb server in my system.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Jlink gdb debugger</title><link>https://devzone.nordicsemi.com/thread/88934?ContentTypeID=1</link><pubDate>Thu, 08 Jun 2017 06:48:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5188ab34-5500-4975-ac1f-22b6a074a891</guid><dc:creator>Nabil</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;You can use JLinkGDBServer to make a link with your debug software ( like DDD on linux )&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>