<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.2" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>LeafLabs Garden &#187; Topic: FreeRTOS: run out of RAM in 64k RET6 version??</title>
		<link>http://forums.leaflabs.com/topic.php?id=1827</link>
		<description>A place to share, learn, and grow...</description>
		<language>en-US</language>
		<pubDate>Fri, 22 Jan 2016 00:06:52 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.2</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://forums.leaflabs.com/search.php</link>
		</textInput>
		<atom:link href="http://forums.leaflabs.com/rss.php?topic=1827" rel="self" type="application/rss+xml" />

		<item>
			<title>x893 on "FreeRTOS: run out of RAM in 64k RET6 version??"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1827#post-10965</link>
			<pubDate>Tue, 29 May 2012 12:00:46 +0000</pubDate>
			<dc:creator>x893</dc:creator>
			<guid isPermaLink="false">10965@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;You need check your FreeRTOSConfig.h (in FreeRTOS\unitility folder)&#60;br /&#62;
Default heap size = 8K byte, configMINIMAL_STACK_SIZE = 120 * 4 = ~ 500 bytes (so 500*16 &#38;gt; 8K)&#60;br /&#62;
You can set configUSE_MALLOC_FAILED_HOOK = 1 and vApplicationMallocFailedHook() to control memory allocation error.&#60;br /&#62;
But better read FreeRTOS documentation.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Abo on "FreeRTOS: run out of RAM in 64k RET6 version??"</title>
			<link>http://forums.leaflabs.com/topic.php?id=1827#post-10964</link>
			<pubDate>Tue, 29 May 2012 10:49:48 +0000</pubDate>
			<dc:creator>Abo</dc:creator>
			<guid isPermaLink="false">10964@http://forums.leaflabs.com/</guid>
			<description>&#60;p&#62;Hello all,&#60;/p&#62;
&#60;p&#62;I got a problem with running FreeRTOS with RET6 Maple. I have a FreeRTOS program that requires more than 20K RAM. So I simply compile my code with RET6 flash option and upload. My program just wouldn't run even though I know I'm below the 64K limit of RET6. I then make a test case on FreeRTOS task to see the memory limitation:&#60;/p&#62;
&#60;p&#62;#include &#38;lt;MapleFreeRTOS.h&#38;gt;&#60;br /&#62;
void setup()&#60;br /&#62;
{&#60;br /&#62;
	xTaskCreate(vTask,&#60;br /&#62;
              (signed portCHAR *)&#34;Task1&#34;,&#60;br /&#62;
              configMINIMAL_STACK_SIZE*15,&#60;br /&#62;
              NULL,&#60;br /&#62;
              tskIDLE_PRIORITY + 1,&#60;br /&#62;
              NULL);&#60;/p&#62;
&#60;p&#62;	vTaskStartScheduler();&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void loop()&#60;br /&#62;
{&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;void vTask(void *pvParameters)&#60;br /&#62;
{&#60;br /&#62;
    int i = 0;&#60;br /&#62;
    while(true)&#60;br /&#62;
    {&#60;br /&#62;
        i = i+1;&#60;br /&#62;
		if (i&#38;gt;10)&#60;br /&#62;
			i = 0;&#60;br /&#62;
        SerialUSB.println(i);&#60;br /&#62;
        vTaskDelay(1000/portTICK_RATE_MS);&#60;br /&#62;
    }&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;I try to control the memory demand by configMINIMAL_STACK_SIZE*X, where X is the memory size of the Task used. When X = 15, the total RAM demand is less than 20K, and the program run smoothly. When I change X to 16, the program stopped running in both normal Maple and RET6.&#60;/p&#62;
&#60;p&#62;Q1) Is there FreeRTOS porting difference between normal Maple and RET6 Maple that can cause RAM limitations? Any parameters I need to change for RET6?&#60;/p&#62;
&#60;p&#62;Q2) Does the RET6 option in MapleIDE matters?&#60;/p&#62;
&#60;p&#62;I'm very pleased and excited about having a Maple port for FreeRTOS. Work nicely with all the cool features of RTOS~ so I really hope I can find out what went wrong with the 64K RAM...
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
