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.

TMS570LS1114移植在CCS上freeRTOS,创建任务失败,停在svcEntry

resetEntry
        b   _c_int00
undefEntry
        b   undefEntry
svcEntry
        b   svcEntry
prefetchEntry
        b   prefetchEntry
        b   _dabort
        b   phantomInterrupt
        ldr pc,[pc,#-0x1b0]
        ldr pc,[pc,#-0x1b0]

停在了b  svcEntry这一句,在pvPortMalloc里跳进去的, 堆定义了configTOTAL_HEAP_SIZE                    ( ( size_t ) 32*1024 ),任务申请的只有512,有人能帮忙解答一下吗?谢谢。

  • xTaskCreate((TaskFunction_t )pvTaskGio,
    (const char* )"vTaskGio",
    512,
    (void* )NULL,
    (UBaseType_t )1,
    (TaskHandle_t* )&xTask1Handle);

    vTaskStartScheduler(); 这是创建任务函数。
  • SWI中断向量指向引导加载程序中的代码。您可以在bootloader中使用下面的代码。此代码检查SWI中断源并跳转到引导加载程序或应用程序实现。您必须使用cmd链接描述文件将.app_intvecs与应用程序启动地址对齐(如·0x18000)

     .arm
    
        .sect ".app_intvecs"
    ;-------------------------------------------------------------------------------
    ; Application interrupt vectors layout
            .word 0 ;Reset
            .word 0 ;Undefined
    app_vPortSWI
            .word 0 ;SWI
            .word 0 ;prefetch
            .word 0 ;dabort
            .word 0 ;reserved
            .word 0 ;IRQ
            .word 0 ;FIQ
    
    
    ;-------------------------------------------------------------------------------
    
        .text
        .ref vPortSWI
        .def    bl_vPortSWI
    bl_vPortSWI
        cmp lr, #0x18000
        blo vPortSWI
        b app_vPortSWI

  • 首先谢谢您的细心解答,现在创建任务成功了,启动任务调度时卡在了prvTimerTask这个函数上,我在网上查资料这一部分全都略过去没讲,可以请教一下您吗?

    static void prvTimerTask( void *pvParameters )

    {

    TickType_t xNextExpireTime;

    BaseType_t xListWasEmpty;

    ( void ) pvParameters;

    #if( configUSE_DAEMON_TASK_STARTUP_HOOK == 1 )

    {

    extern void vApplicationDaemonTaskStartupHook( void );

    vApplicationDaemonTaskStartupHook();

    }

    #endif

    for( ;; )

    {

    /* Query the timers list to see if it contains any timers, and if so,

    obtain the time at which the next timer will expire. */

    xNextExpireTime = prvGetNextExpireTime( &xListWasEmpty );

    /* If a timer has expired, process it.  Otherwise, block this task

    until either a timer does expire, or a command is received. */

    prvProcessTimerOrBlockTask( xNextExpireTime, xListWasEmpty );

    /* Empty the command queue. */

    prvProcessReceivedCommands();

    }

    }

    卡在了函数的for循环里,麻烦您了。谢谢

  • for循环里可疑处设置一个可变的变量打印出来,看看是在具体什么位置卡住的。