This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/PROCESSOR-SDK-AM335X: Task does not start

Part Number: PROCESSOR-SDK-AM335X
Other Parts Discussed in Thread: SYSBIOS

Tool/software: TI-RTOS

Hello

every expecter

This is Tomiyama from Tokyo.

I creat a task just as bellow. but it not jump to task function.

who can tell me how to jump to task function.need your help as soon as possible.

best regards

Tomiyama


/*
 *  ======== taskFxn ========
 */
static void taskFxn(UArg a0, UArg a1)
{
    int Cnt=0;

    if( sys_init_cache() == FALSE ) while( 1 );

    /* Initial usb part which we need */
    usb_init();

    while(1)
    {
        usb_main();
        Cnt++;
        System_printf("USB_TASK Count:%d\n",Cnt);

        System_flush(); /* force SysMin output to console */

    }
}

/*
 *  ======== main ========
 */
Int main()
{
    Task_Params taskParams1,taskParams2;
    Task_Handle task;
    Error_Block eb;

    System_printf("enter main()\n");

 
    Task_Params_init(&taskParams2);
    taskParams2.instance->name = "task2";
    taskParams2.stackSize = 2048;
    taskParams2.arg0 = 2;
    taskParams2.priority = 15;
    Error_init(&eb);
    task = Task_create(taskFxn, &taskParams2, &eb);
    if (task == NULL) {
        System_printf("Task_create() failed!\n");
        BIOS_exit(0);
    }

    BIOS_start();    /* does not return */
    return(0);
}

and .cfg file is bellow. compiler was run ok.

var Defaults = xdc.useModule('xdc.runtime.Defaults');
var Diags = xdc.useModule('xdc.runtime.Diags');
var Error = xdc.useModule('xdc.runtime.Error');
var Log = xdc.useModule('xdc.runtime.Log');
var LoggerBuf = xdc.useModule('xdc.runtime.LoggerBuf');
var Main = xdc.useModule('xdc.runtime.Main');
var Memory = xdc.useModule('xdc.runtime.Memory')
var SysMin = xdc.useModule('xdc.runtime.SysMin');
var System = xdc.useModule('xdc.runtime.System');
var Text = xdc.useModule('xdc.runtime.Text');

var BIOS = xdc.useModule('ti.sysbios.BIOS');
var Clock = xdc.useModule('ti.sysbios.knl.Clock');
var Swi = xdc.useModule('ti.sysbios.knl.Swi');
var Task = xdc.useModule('ti.sysbios.knl.Task');
var Semaphore = xdc.useModule('ti.sysbios.knl.Semaphore');
var Hwi = xdc.useModule('ti.sysbios.hal.Hwi');

/*
 * Uncomment this line to globally disable Asserts.
 * All modules inherit the default from the 'Defaults' module.  You
 * can override these defaults on a per-module basis using Module.common$.
 * Disabling Asserts will save code space and improve runtime performance.
Defaults.common$.diags_ASSERT = Diags.ALWAYS_OFF;
 */

/*
 * Uncomment this line to keep module names from being loaded on the target.
 * The module name strings are placed in the .const section. Setting this
 * parameter to false will save space in the .const section.  Error and
 * Assert messages will contain an "unknown module" prefix instead
 * of the actual module name.
Defaults.common$.namedModule = false;
 */

/*
 * Minimize exit handler array in System.  The System module includes
 * an array of functions that are registered with System_atexit() to be
 * called by System_exit().
 */
System.maxAtexitHandlers = 4;      

/*
 * Uncomment this line to disable the Error print function. 
 * We lose error information when this is disabled since the errors are
 * not printed.  Disabling the raiseHook will save some code space if
 * your app is not using System_printf() since the Error_print() function
 * calls System_printf().
Error.raiseHook = null;
 */

/*
 * Uncomment this line to keep Error, Assert, and Log strings from being
 * loaded on the target.  These strings are placed in the .const section.
 * Setting this parameter to false will save space in the .const section.
 * Error, Assert and Log message will print raw ids and args instead of
 * a formatted message.
Text.isLoaded = false;
 */

/*
 * Uncomment this line to disable the output of characters by SysMin
 * when the program exits.  SysMin writes characters to a circular buffer.
 * This buffer can be viewed using the SysMin Output view in ROV.
SysMin.flushAtExit = false;
 */

/*
 * The BIOS module will create the default heap for the system.
 * Specify the size of this default heap.
 */
BIOS.heapSize = 0x1000;

/*
 * Build a custom SYS/BIOS library from sources.
 */
BIOS.libType = BIOS.LibType_Custom;

/* System stack size (used by ISRs and Swis) */
Program.stack = 0x2000;

/* Circular buffer size for System_printf() */
SysMin.bufSize = 0x200;

/*
 * Create and install logger for the whole system
 */
var loggerBufParams = new LoggerBuf.Params();
loggerBufParams.numEntries = 16;
var logger0 = LoggerBuf.create(loggerBufParams);
Defaults.common$.logger = logger0;
Main.common$.diags_INFO = Diags.ALWAYS_ON;

System.SupportProxy = SysMin;

compiler:


**** Build of configuration Debug for project Rtos_Usb_Jsl_API_PPA_02_29 ****

"C:\\ti\\ccsv7\\utils\\bin\\gmake" -k -j 4 all -O
gmake[1]: Entering directory 'C:/workspace_v7_02_26_Usb/Rtos_Usb_Jsl_API_PPA_02_29/Debug'
'Building file: ../app.cfg'
'Invoking: XDCtools'
"C:/ti/xdctools_3_32_02_25_core/xs" --xdcpath="C:/ti/bios_6_46_05_55/packages;C:/ti/ccsv7/ccs_base;" xdc.tools.configuro -o configPkg -t ti.targets.arm.elf.A8Fnv -p ti.platforms.evmAM3359 -r debug -c "C:/ti/ccsv7/tools/compiler/ti-cgt-arm_16.9.4.LTS" --compileOptions "-g --optimize_with_debug" "../app.cfg"
making package.mak (because of package.bld) ...
generating interfaces for package configPkg (because package/package.xdc.inc is older than package.xdc) ...
configuring app.xea8fnv from package/cfg/app_pea8fnv.cfg ...
generating custom ti.sysbios library makefile ...
Starting build of library sources ...
making C:/workspace_v7_02_26_Usb/Rtos_Usb_Jsl_API_PPA_02_29/src/sysbios/sysbios.aea8fnv ...
gmake[1]: Entering directory `C:/workspace_v7_02_26_Usb/Rtos_Usb_Jsl_API_PPA_02_29/src/sysbios'
clea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/BIOS.c ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/IntrinsicsSupport_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/TaskSupport_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/a8/intcps/Hwi_asm.s470 ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/a8/intcps/Hwi_asm_switch.s470 ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/exc/Exception_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/a8/Cache_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/a8/Mmu_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/family/arm/a8/TimestampProvider_asm.asm ...
asmea8fnv C:/ti/bios_6_46_05_55/packages/ti/sysbios/timers/dmtimer/Timer_asm.s470 ...
area8fnv BIOS.obj arm_IntrinsicsSupport_asm.obj arm_TaskSupport_asm.obj intcps_Hwi_asm.obj intcps_Hwi_asm_switch.obj exc_Exception_asm.obj a8_Cache_asm.obj a8_Mmu_asm.obj a8_TimestampProvider_asm.obj dmtimer_Timer_asm.obj ...
gmake[1]: Leaving directory `C:/workspace_v7_02_26_Usb/Rtos_Usb_Jsl_API_PPA_02_29/src/sysbios'
Build of libraries done.
clea8fnv package/cfg/app_pea8fnv.c ...
'Finished building: ../app.cfg'
' '
gmake[1]: Leaving directory 'C:/workspace_v7_02_26_Usb/Rtos_Usb_Jsl_API_PPA_02_29/Debug'
        1 個のファイルをコピーしました。
making ../src/sysbios/sysbios.aea8fnv ...
gmake[1]: Nothing to be done for 'all'.
'Building file: ../init.asm'
'Invoking: ARM Compiler'
""../usb_lib/platform.lib" "../usb_lib/system.lib" "../usb_lib/usblib.lib" "../usb_lib/utils.lib" -l"configPkg/linker.cmd" -llibc.a
<Linking>
'Finished building target: Rtos_Usb_Jsl_API_PPA_02_29.out'
' '

**** Build Finished ****