Hello all,
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:
#include <MapleFreeRTOS.h>
void setup()
{
xTaskCreate(vTask,
(signed portCHAR *)"Task1",
configMINIMAL_STACK_SIZE*15,
NULL,
tskIDLE_PRIORITY + 1,
NULL);
vTaskStartScheduler();
}
void loop()
{
}
void vTask(void *pvParameters)
{
int i = 0;
while(true)
{
i = i+1;
if (i>10)
i = 0;
SerialUSB.println(i);
vTaskDelay(1000/portTICK_RATE_MS);
}
}
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.
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?
Q2) Does the RET6 option in MapleIDE matters?
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...