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.

SK-AM62P-LP: Issue with FreeRTOS vTaskDelayUntil

Part Number: SK-AM62P-LP


Tool/software:

Hi experts,

I want a task to run periodically every 1 ms, so I have used the code below.

TickType_t xLastWakeTime;
    const TickType_t xFrequency = pdMS_TO_TICKS(1);
    // Initialise the xLastWakeTime variable with the current time.
    xLastWakeTime = xTaskGetTickCount();
    while(1)
    {
        if (gbShutdown == 1u)
        {
            break;
        }

        /*User code as per application*/

        vTaskDelayUntil( &xLastWakeTime, xFrequency );


    }


I don't know why this error is coming can you help me to resolve this.
When I searched for the task.c file, I found a macro-guarded(#if ( INCLUDE_xTaskDelayUntil == 1)), but unfortunately, I didn't find that in the included header files.


error that I received while compiling is more likely in the make file.





Regards,
Debashis

  • Hello Debashis,

    I am looking at your queries and you may expect reply in one or two days .

    Regards,

    Anil.

  • Hi Anil,
    We are waiting for your reply.

    Regards,
    Debashis

  • Hi Debashis,

    The subject matter expert is out of office this & next week. So responses to this thread will be delayed. Thanks for your patience.

    Meanwhile, Can you please send us the complete error logs that come up while building the project?

    Regards,

    Tushar

  • Hi Tushar,

    Can you please send us the complete error logs that come up while building the project?


    Yes, I think you mean the console.

    **** Build of configuration Release for project ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang ****
    
    /home/debashis/ti/ccs1281/ccs/utils/bin/gmake -k -j 28 all -O 
     
    Building file: "../ipc_rpmsg_echo.c"
    Invoking: Arm Compiler
    "/home/debashis/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang" -c -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -Os -I"/home/debashis/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/include/c" -I"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source" -I"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/kernel/freertos/FreeRTOS-Kernel/include" -I"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/kernel/freertos/portable/TI_ARM_CLANG/ARM_CR5F" -I"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/kernel/freertos/config/am62px/r5f" -I"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/examples/drivers/ipc/ipc_rpmsg_echo_linux" -DSOC_AM62PX -DENABLE_MCU_ONLY_LPM -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -MMD -MP -MF"ipc_rpmsg_echo.d_raw" -MT"ipc_rpmsg_echo.o" -I"/home/debashis/workspace_trail/ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang/Release/syscfg"   -o"ipc_rpmsg_echo.o" "../ipc_rpmsg_echo.c"
    ../ipc_rpmsg_echo.c:519:66: warning: passing 'volatile MCSPI_Transaction *' to parameter of type 'MCSPI_Transaction *' discards qualifiers [-Wincompatible-pointer-types-discards-qualifiers]
            transferOK = MCSPI_transfer(gMcspiHandle[CONFIG_MCSPI0], &spiTransaction);
                                                                     ^~~~~~~~~~~~~~~
    /home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/drivers/mcspi/v0/mcspi.h:760:64: note: passing argument to parameter 'transaction' here
    int32_t MCSPI_transfer(MCSPI_Handle handle, MCSPI_Transaction *transaction);
                                                                   ^
    1 warning generated.
    Finished building: "../ipc_rpmsg_echo.c"
     
    Building target: "ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.out"
    Invoking: Arm Linker
    "/home/debashis/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/bin/tiarmclang" -mcpu=cortex-r5 -mfloat-abi=hard -mfpu=vfpv3-d16 -mlittle-endian -mthumb -Os -DSOC_AM62PX -DENABLE_MCU_ONLY_LPM -g -Wall -Wno-gnu-variable-sized-type-not-at-end -Wno-unused-function -Wl,-m"ipc_rpmsg_echo_linux.Release.map" -Wl,-i"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/kernel/freertos/lib" -Wl,-i"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/drivers/lib" -Wl,-i"/home/debashis/ti/mcu_plus_sdk_am62px_10_00_00_14/source/board/lib" -Wl,-i"/home/debashis/ti/ccs1281/ccs/tools/compiler/ti-cgt-armllvm_3.2.2.LTS/lib" -Wl,--priority -Wl,--reread_libs -Wl,--diag_suppress=10063 -Wl,--diag_wrap=off -Wl,--display_error_number -Wl,--warn_sections -Wl,--xml_link_info="ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang_linkInfo.xml" -Wl,--ram_model -o "ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.out" "./syscfg/ti_dpl_config.o" "./syscfg/ti_drivers_config.o" "./syscfg/ti_drivers_open_close.o" "./syscfg/ti_pinmux_config.o" "./syscfg/ti_power_clock_config.o" "./syscfg/ti_board_config.o" "./syscfg/ti_board_open_close.o" "./syscfg/ti_enet_config.o" "./syscfg/ti_enet_open_close.o" "./syscfg/ti_enet_soc.o" "./syscfg/ti_enet_lwipif.o" "./ipc_rpmsg_echo.o" "./main.o" "../linker.cmd"  -Wl,-lfreertos.am62px.r5f.ti-arm-clang.release.lib -Wl,-ldrivers.am62px.mcu-r5f.ti-arm-clang.release.lib -Wl,-lboard.am62px.r5f.ti-arm-clang.release.lib -Wl,-llibc.a -Wl,-llibsysbm.a 
    makefile:149: recipe for target 'ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.out' failed
     
     undefined       first referenced  
      symbol             in file       
     ---------       ----------------  
     xTaskDelayUntil ./ipc_rpmsg_echo.o
     
    error #10234-D: unresolved symbols remain
    error #10010: errors encountered during linking; "ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.out" not built
    tiarmclang: error: tiarmlnk command failed with exit code 1 (use -v to see invocation)
    gmake[1]: *** [ipc_rpmsg_echo_linux_am62px-sk_mcu-r5fss0-0_freertos_ti-arm-clang.out] Error 1
    gmake: *** [all] Error 2
    makefile:145: recipe for target 'all' failed
    
    **** Build Finished ****


    Regards,
    Debashis

  • Hi Debashis,

    Thanks for sharing the above details.

    Please add the below macro definition to FreeRTOSConfig.h file located at ${MCU+SDK}/source/kernel/freertos/config/am62px/r5f.

    Please refer below image.

    Once the macro definition has been added, please rebuild the libraries. Run the below command from root directory of MCU+SDK.

    cd source/kernel/freertos/
    
    gmake -s -f makefile.am62px.r5f.ti-arm-clang PROFILE=debug clean
    gmake -s -f makefile.am62px.r5f.ti-arm-clang PROFILE=release clean
    
    gmake -s -f makefile.am62px.r5f.ti-arm-clang PROFILE=debug 
    gmake -s -f makefile.am62px.r5f.ti-arm-clang PROFILE=release 

    After building the libraries, rebuild the example project. You will now be able to build it without errors.

    Please let us know if the above solution works.

    Regards,

    Tushar

  • Hi Tushar,

    Thanks for your support. It's working fine now. I have tried this, but as you said, I wasn't aware of the build.
    When I saw the tasks.c file, I could see that it's guarded with this macro, but I wasn't aware that we have to build this. Can you share any documents so I can read if any more info is there regarding RTOS? It's helping me out.

    Regards,
    Debashis

  • Hi Debashis,

    Thanks for the above confirmation.

    Please refer /KERNEL_FREERTOS_IMPORTANT_GUIDELINES for details. If you change anything in the source of MCU+SDK it is necessary to build the libraries for the changes to take place.

    Please refer Using SDK with makefiles for details.

    Regards,

    Tushar

    Please refer