<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/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/"><channel><title>What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/47558/what-will-happen-if-we-remove-the-for-from-the-main-in-the-freertos-kernel</link><description> 
 Actually I read from the Mastering in the FreeRTOS documentation that, 
 /* If all is well then main() will never reach here as the scheduler will now be running the tasks. If main() does reach here then it is likely that there was insufficient heap</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167330?ContentTypeID=1</link><pubDate>Mon, 07 Sep 2020 05:19:59 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:a049ac88-3439-48b6-b41e-d18a05be4c04</guid><dc:creator>omkardixi</dc:creator><description>&lt;p&gt;I got the answer on the FreeRTOS forum&lt;/p&gt;
&lt;p&gt;What happens when you exit an embedded program is only defined by a particular implementation. Some may restart the program, but many just loop to stall. In any case, your program had a major failure where the system didn&amp;rsquo;t start up, and retrying is unlikely to change that. Ideally you want it easy to see what happened when debugging, so having the loop right there is helpfull.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167315?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 22:40:36 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:944a4306-8ba3-433d-b621-eb2a3708e50a</guid><dc:creator>Broeker</dc:creator><description>[quote userid="68234" url="~/developer/tools-software/tools/f/keil-forum/47558/what-will-happen-if-we-remove-the-for-from-the-main-in-the-freertos-kernel/167298"]When main returns the CPU executes the next instruction which is simply a GOTO to go back to the beginning of the code. [/quote]
&lt;p&gt;Do you just assume that happens, or did you look it up in some documentation about this tool chain?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167298?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 06:05:27 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:94ac4d8a-4e29-45e8-929f-3d2aafb233ad</guid><dc:creator>omkardixi</dc:creator><description>&lt;p&gt;lets say if we have code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void main(void)
{

}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;at the end contains a return statement although we didn&amp;#39;t explicitly put it there ourselves. When main returns the CPU executes the next instruction which is simply a GOTO to go back to the beginning of the code. main() is simply called over and over again. So why we preffer to stuck in while loop (at the end of the main) rather than calling main function again and again.&lt;/p&gt;
&lt;p&gt;Sir please can you elaborate what you are saying. I really want to clear this concept in my mind.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167296?ContentTypeID=1</link><pubDate>Fri, 04 Sep 2020 05:21:42 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:2c73bbbc-dc17-40a2-98fa-c283a105f034</guid><dc:creator>omkardixi</dc:creator><description>&lt;p&gt;Okay Thank you sir.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167259?ContentTypeID=1</link><pubDate>Tue, 01 Sep 2020 21:21:23 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:44a14109-e954-4dd2-80d2-9eaaf814412e</guid><dc:creator>Broeker</dc:creator><description>&lt;p&gt;That&amp;#39;s actually the wrong question.&amp;nbsp; Where exactly do you expect your program to go after it fell off the end of main()?&amp;nbsp; And how do you expect that result to be in any way, shape or form better than to be stuck in a well-defined endless loop?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: What will happen if we remove the for(;;); from the main in the freeRTOS kernel??</title><link>https://community.arm.com/thread/167251?ContentTypeID=1</link><pubDate>Tue, 01 Sep 2020 12:38:04 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:de66bd8a-700e-4759-af4d-5ab10aa7f29f</guid><dc:creator>R.Kopsch</dc:creator><description>&lt;p&gt;missing the required endless loop I expect that your program terminates within a sys_exit() (or similar) call&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>