<?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>FreeRTOS debugging</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/13768/freertos-debugging</link><description>Hi, 
 I am trying to debug my code in Eclipse using J-Link.
Whenever the code executes vPortStartFirstTask() in vTaskStartScheduler() the debugger stops and I can&amp;#39;t debug my program. 
 It happens when this code is executed: 
 __asm volatile(
 &amp;quot; ldr</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 May 2016 10:27:12 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/13768/freertos-debugging" /><item><title>RE: FreeRTOS debugging</title><link>https://devzone.nordicsemi.com/thread/52617?ContentTypeID=1</link><pubDate>Wed, 18 May 2016 10:27:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce17ca6f-aa28-47f1-b85a-b665527caa6b</guid><dc:creator>mitchellw</dc:creator><description>&lt;p&gt;Thank you, you are totally right!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FreeRTOS debugging</title><link>https://devzone.nordicsemi.com/thread/52616?ContentTypeID=1</link><pubDate>Wed, 11 May 2016 16:03:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:19de69ba-c5ed-48f7-868a-07f4769a5575</guid><dc:creator>www.FreeRTOS.org</dc:creator><description>&lt;p&gt;The SVC handler (the function that executes when &amp;quot;svc 0&amp;quot; is executed) starts the scheduler, so it is not necessarily this function that is causing the problem, but maybe something after the scheduler has started.&lt;/p&gt;
&lt;p&gt;First, do you have the FreeRTOS SVC handler installed?  See &amp;quot;Special note to ARM Cortex-M users&amp;quot; in the first numbered bullet on this page: &lt;a href="http://www.freertos.org/FAQHelp.html"&gt;www.freertos.org/FAQHelp.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If you are sure the SVC handler is installed, then try setting a break point in the SVC handler.  It is called vPortSVCHandler() and is defined in whichever FreeRTOS/source/portable/[compiler]/ARM_CM[0,3,4,7]/port.c file you are building.  Is the break point hit?  If so, then it is not the code you show above that is the problem.&lt;/p&gt;
&lt;p&gt;If the break point is hit, step through the SVC handler until it returns.  It should return into the first task that is selected to run.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>