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.

TMS570LS3137: How can I change the version of freeRTOS version in HALCOGEN

Part Number: TMS570LS3137
Other Parts Discussed in Thread: HALCOGEN

Hello Everyone,

I am using HALCOGEN to generate the code by selecting TMS570LS3137ZWT_FREERTOS configuration. I was succesfull in blinking the LED but the version of freeRTOS is V8.2.0 and now I would like to use the newer version of FreeRTOS V9.0.0
How can I change the version of FreeRTOS after generating HALCOGEN file?

or

How can I upgrade the FreeRTOS version that is already comeup with the HALCOGEN installation setup?

I am bit new to TMS570 HDK kits and freeRTOS.

Best Regards,
Sai

  • Hi Sai,

    I have forwarded your question to our HalCogen developer. He will answer your question soon. Thanks

    Regards,

    QJ 

  • Dear QJ Wang,

    Do you have some information for me???

    Best regards,
    Sai
  • Hi Sai,

    Main challenge with Free RTOS port is writing the Wrapper function, since API's change / gets added in major version update of FreeRTOS.

    Under Include Folder ---  File "mpu_wrappers.h" has updated mapping , but under portable\CCS\Cortex-R4 -- file "mpu_wrappers.c". must be updated to add the wrapper function for the API's in freertos 9, mainly from prototypes queue.h, task.h, event_group.h and timer.h.

    Attached is the very initial version of freeRTOS V9.0 Port I did for HALCoGen, just unzip and replace ( take a copy to be safe) the FreeRTOS folder under HALCoGen\<version>\drivers.

    Please update the mpu_wrappers.c" to implement the wrapper function to support latest API's.

    If needed I can do it end of Next week and send it. I believe you can figure it out, it's straight forward. You can let me know.

    /cfs-file/__key/communityserver-discussions-components-files/312/3124.FreeRTOS_5F00_under_5F00_drivers.zip 

  • Hi Prathap,

    Thank you very much for the reply.
    I am very new to FreeRTOS and I tried updating the mpu_wrappers.c file but not successfull :( and messed it up.
    Can you explain a bit more regarding how to update wrapper.c ? or Can you send me the updated mpu_wrappers.c after you did it !!

    Best Regards,
    Sai

  • Hi Sai,

    Please use the current version of FreeRTOS 8.2.0 supported in HALCoGen and get used to FreeRTOS and Hercules devices. Please don't be held up with port, once latest version is available your application developed with 8.2.0 will seamlessly run on 9.0.  

    It is going to take some time to do a decent job for porting the latest FreeRTOS. I will look in to it and update you as soon as possible. 

  • Hi Prathap,

    Sorry for the late reply.
    I started working with the current version of FreeRTOS 8.2.0 supported in HALCoGen. Seems hardware drives working well as of now.
    I would like to use CLI application from FreeRTOS+CLI in my project. Unfortunetly, The version of CLI Implemenatin from the freeRTOS website was mainly written for freeRTOS 9.0 version.

    Anyway please update me when the port is available :) Thank you.

    Best regards,
    Sai.
  • Hi Sai,
    FreeRTOS 9.0 is not needed for using CLI. Actually, you need to write a serial port driver for FreeRTOS+IO package.
    Regards: Szilárd 

  • Hi Szilárd,

    Thank you very much for your suggestion.
    I understood after going through some CLI documentations yesterday.
    But still I have one more problem(static memory allocation), mainly for making easy platform to upgrade to SafeRTOS in later stages of my project.


    Best Regards,
    Sai
  • Hi Sai,
    I have no experience with SafeRTOS, but as I know it is API compatible with FreeRTOS.

    Regards: Szilárd

  • Hi Szilárd,

    Yes, the CLI API's are compatible and they are working fine in current version of freeRTOS(8.2).
    SafeRTOS is similar to freeRTOS but with more safety terms. For upgrading from freeRTOS to safeRTOS it is recommended to create Tasks and other RTOS Objects using Statically Allocated RAM. Which is a new release available in freeRTOS v9.0.

    Please correct me if my assumptions are wrong. I am bit new to this RTOS stuff.
    Thank you very much for your above reply regarding CLI API's. It was very usefull :)

    Best regards,
    Sai
  • Hi Prathap,

    HALCoGen's mpu_wrappers.c still have a problem (there is no return pointer):

    #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
        void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore )
        {
            BaseType_t xRunningPrivileged = prvRaisePrivilege();

            xQueueGetMutexHolder( xSemaphore );
            portRESET_PRIVILEGE( xRunningPrivileged );
        }
    #endif

    The fixed version:

    #if ( ( configUSE_MUTEXES == 1 ) && ( INCLUDE_xSemaphoreGetMutexHolder == 1 ) )
        void* MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore )
        {
            void *pvReturn;
            BaseType_t xRunningPrivileged = prvRaisePrivilege();

            pvReturn = xQueueGetMutexHolder( xSemaphore );
            portRESET_PRIVILEGE( xRunningPrivileged );
            return pvReturn;
        }
    #endif

    Regards: Szilárd

  • Hi Sai,
    Unfortunately I have no experience with SafeRTOS - as I mentioned , but for everyday usage FreeRTOS itself seems to be very dependable, stable and robust - you can relay on it. I would start using it, later the switch to SafeRTOS will be not as painful as it seems to be now - regardless of the version.
    Regards, Szilárd