Hello, I created a program with two tasks. The source code is as follow: #include <std.h> void main() Void Task_1(Arg id_arg) } Void Task_2(Arg id_arg) int i; and the tcf is as follow: utils.loadPlatform("ti.platforms.sim62xx"); /* The following DSP/BIOS Features are enabled. */ bios.MEM.instance("SDRAM0").createHeap = 1; bios.TSK.create("Task2"); bios.TSK.instance("TSK_idle").order = 1; // !GRAPHICAL_CONFIG_TOOL_SCRIPT_INSERT_POINT! prog.gen(); and the output is as follow: 5 In Task 1- 4 6 In Task 1- 5 7 In Task 1- 6 8 In Task 1- 7 9 In Task 1- 8 10 In Task 1- 9 11 In Task 2- 0 12 In Task 2- 1 13 In Task 2- 2 14 In Task 2- 3 15 In Task 2- 4 16 In Task 2- 5 17 In Task 2- 6 18 In Task 2- 7 19 In Task 2- 8 20 In Task 2- 9 here are my questions: 1- Why the two tasks are not scheduled correctly? My understanding is that since they are time sliced, there should be some output from task 1 and then some output from task 2, but it seems that, task 1 prints all outputs and then task 2 does it. How can I see the time slice effect? 2- How can I change the trace window so I can see all of the outputs, It seems that I can only see some part of the output ( the last 20 line or so). Best regards
#include <log.h>
#include "TestTaskcfg.h"
{
LOG_printf(&trace,"Program started\n");
}
{
int i;
for(i=0;i<10;i++)
{
LOG_printf(&trace,"In Task 1- %d\n",i);
TSK_disable();
IDL_run();
TSK_enable();
}
{
for(i=0;i<10;i++)
{
LOG_printf(&trace,"In Task 2- %d\n",i);
TSK_disable();
IDL_run();
TSK_enable();
}
}
bios.enableMemoryHeaps(prog);
bios.enableRealTimeAnalysis(prog);
bios.enableRtdx(prog);
bios.enableTskManager(prog);
bios.MEM.BIOSOBJSEG = prog.get("SDRAM0");
bios.MEM.MALLOCSEG = prog.get("SDRAM0");
bios.LOG.create("trace");
bios.TSK.create("Task1");
bios.TSK.instance("Task1").order = 1;
bios.TSK.instance("Task1").allocateTaskName = 1;
bios.TSK.instance("Task1").fxn = prog.extern("Task_1");
bios.TSK.instance("Task2").order = 1;
bios.TSK.instance("Task2").allocateTaskName = 1;
bios.TSK.instance("Task2").fxn = prog.extern("Task_2");