<?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>Segger Embedded Studio: adding thread awareness for FreeRTOS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/33637/segger-embedded-studio-adding-thread-awareness-for-freertos</link><description>Has anyone succeeded in setting up the SES thread awareness for FreeRTOS with the nRF5 SDK? That would enable showing the state of the FreeRTOS tasks (threads) in the debugger, with amount of free stack, running status, resource waited etc. I think I</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 07 Mar 2019 15:25:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/33637/segger-embedded-studio-adding-thread-awareness-for-freertos" /><item><title>RE: Segger Embedded Studio: adding thread awareness for FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/174853?ContentTypeID=1</link><pubDate>Thu, 07 Mar 2019 15:25:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2362a43f-7678-44e7-ac8e-cf288dc007db</guid><dc:creator>RobJansen</dc:creator><description>&lt;p&gt;This post is a bit old, but since there do not seem to be any new scripts, I&amp;#39;ll add my findings.&lt;/p&gt;
&lt;p&gt;After poking around a bit in the add_task function I got the task names working.&lt;br /&gt;in add_task, there is a (char *) cast in the Debug.evaluate which should not be there.&lt;/p&gt;
&lt;p&gt;With the following code I now have task names :-)&lt;/p&gt;
&lt;p style="padding-left:30px;"&gt;function add_task(task, state)&lt;br /&gt;{&lt;br /&gt;&amp;nbsp; var tcb, task_name, current_task, regs;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; current_task = Debug.evaluate(&amp;quot;pxCurrentTCB&amp;quot;);&lt;br /&gt;&amp;nbsp; tcb = Debug.evaluate(&amp;quot;*(TCB_t *)&amp;quot; + task);&lt;br /&gt;&lt;br /&gt;&amp;nbsp; task_name =&lt;strong&gt; Debug.evaluate(&amp;quot;&amp;amp;((tskTCB *)&amp;quot; + task + &amp;quot;).pcTaskName[0]&amp;quot;);&lt;/strong&gt;&lt;br /&gt;&amp;nbsp; task_name = &amp;quot;#&amp;quot; + tcb.uxTCBNumber + &amp;quot; \&amp;quot;&amp;quot; + task_name + &amp;quot;\&amp;quot;&amp;quot;;&lt;/p&gt;
&lt;p&gt;Rob&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio: adding thread awareness for FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/129597?ContentTypeID=1</link><pubDate>Tue, 24 Apr 2018 13:52:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4a953c89-d27a-49b1-a9f9-d9cd5b086d41</guid><dc:creator>Christian Waldmann</dc:creator><description>&lt;p&gt;I have my script from here:&amp;nbsp;&lt;a href="https://forum.segger.com/index.php?page=Thread&amp;amp;postID=17324"&gt;https://forum.segger.com/index.php?page=Thread&amp;amp;postID=17324&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;With this script I have at least the task names.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio: adding thread awareness for FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/129402?ContentTypeID=1</link><pubDate>Mon, 23 Apr 2018 16:04:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12e1b8fb-d359-4a63-9243-5474291bc43c</guid><dc:creator>Pertti Kasanen</dc:creator><description>&lt;p&gt;Thanks, Christian! I now use the&amp;nbsp;&lt;span&gt;#define&amp;nbsp;portREMOVE_STATIC_QUALIFIER as well.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I got hints of a working solution: maybe&amp;nbsp;20% of the time, when stopping&amp;nbsp;the program in&lt;span&gt;&amp;nbsp;&lt;/span&gt;debugger, the execution/stack/.. is in a place where the Threads window shows about the right information (task numbers, priorities and status). It seems to have something to do with how SES finds out memory maps etc. Did not really figure out the logic yet.&lt;br /&gt;&lt;br /&gt;Never have seen a name of a&amp;nbsp;task, the name has always been &amp;quot;undefined&amp;quot;, even though the names are set when looking at the FreeRTOS lists. The .js file is over 5 years old and could be outdated - we could improve the JS part someday&amp;nbsp;when we have time. Most important would be figuring out how the memory maps etc. need to be set up so that the SES Debug.evaluate() calls would always succeed.&lt;/p&gt;
&lt;p&gt;We run an externally build (makefile) project.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Segger Embedded Studio: adding thread awareness for FreeRTOS</title><link>https://devzone.nordicsemi.com/thread/129183?ContentTypeID=1</link><pubDate>Fri, 20 Apr 2018 15:49:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e692ac5-71fe-4453-b543-b61ed21faf95</guid><dc:creator>Christian Waldmann</dc:creator><description>&lt;p&gt;I have added the preprocessor #define&amp;nbsp;portREMOVE_STATIC_QUALIFIER and now I have a list of blocked, ready and Suspended tasks when I stop the debugger. But there is undefined in the list, showing that there is an error in the&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>