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.

TMS320F28379D: FreeRTOS Example loading on LaunchPad

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE, SYSCONFIG

Hi,

I imported one of the examples into my workspace ex2 - Shared LED Blink

It adds 2 projects namely - freertos_ex2_shared_led_blink_cm AND freertos_ex2_shared_led_blink_cpu1

The CM project as per my understanding is the COMMUNICATION MANAGER.

Questions:

`. Is there a particular way in which these projects need to be loaded on the board? (For example when using dual core one project is loaded on CPU1 and other on CPU2, how does the loading with FreeRTOS work?)

2. Is there a guide to getting started with these FreeRTOS examples?

3. When I try to build the CM project FreeRTOS.h file is missing, from where can I download this file?

Thanks & Regards,

Rashmitha

  • Hi,

    Please refer to readme available inside the package for usage specific details. I have added these below as well. The support package needs to extracted inside the official FreeRTOS package which needs to be downloaded separately from the freertos site.

    USAGE DETAILS:

    This package provides FreeRTOS specific content only and should be used along with latest C2000Ware(v3.1.00.00.00 or newer) package. Install the latest version of C2000Ware if not already done.
    Extract this package inside the root FreeRTOS folder directory.
    Post extraction, import reference examples available at location: FreeRTOS\Demo\C2000_F2838x_xx_CCS\ where xx is C28x/CM after updating the ${C2000WARE_ROOT} path variable in the .projectspec file of the example to the installed location.

    Thanks
    Vasudha

  • Is there a particular way in which these projects need to be loaded on the board? (For example when using dual core one project is loaded on CPU1 and other on CPU2, how does the loading with FreeRTOS work?)

    The code on CPU1 should be run first and then the CM specific code should be run. For CM examples,  FreeRTOS is getting used on CM side and CPU1 specific code is bare metal which configures basic settings like LEDs etc.

    Thanks
    Vasudha

  • For example when using dual core one project is loaded on CPU1 and other on CPU2, how does the loading with FreeRTOS work?)

    These examples are for F2838x where one of the core is cortex M4 referred to as CM. For F2837xd, C28x based example can be ported to F2837xd.

  • Could you please confirm if this is where the support package needs to be placed? Within the FreeRTOSv202112.00 folder:

    Even with this folder structure, I still get the error for FreeRTOS.h file missing as below:

  • Hi,

    The contents of C2000_FreeRTOS_Support folder should be copied inside the FreeRTOS folder shown in the above post. Basically this package contains the port and demo for C2000 devices which should be copied to FreeRTOS kernel folder.

    Thanks
    Vasudha

  • Thanks Vasudha, I am able to build the project now without any errors.

    However, when I load and run the code, I get stuck in a while loop shown below

    I see in properties that the device this project is configured for is different from mine:

    But even if I change my .ccxml file to my device F28379D, variant and core in project properties doesnt change. 

    Question:

    What all are the changes to be made to run this DEMO on LaunchPad F28379D?

    Regards,

    Rashmitha

  • I understand that SysConfig options need to be changed, could you help me with the appropriate settings from below

    Thanks,

    Rashmitha

  • Hi,

    The project needs to be ported to F2837xd and the Launchpad specific LEDs/ GPIOs needs to be configured for the project to work on Launchpad. You can start by updating the .projectspec file. Refer to f2837xd specifc projectspec files avl in C2000Ware for reference.

    Thanks
    Vasudha

  • Hi Vasudha,

    I can only find a driverlib.projectspec file inside my workspace folder where I have imported led_ex1_blinky_rtos. Is this the file that needs to be edited?

    If no, then could you please help me with the file location? and specific parameters that needs to be changed?

  • I found this file too, I created another folder for my board

    I edited the file, PFA the file contents 

    <projectSpec>
      <project
            name="led_ex1_blinky_rtos"
            device="TMS320F28377D"
            cgtVersion="20.2.1.LTS"
            outputFormat="ELF"
            launchWizard="False"
            linkerCommandFile=""
            enableSysConfigTool="true"
            sysConfigBuildOptions="--product ${C2000WARE_ROOT}/.metadata/sdk.json --device F2837xD"
            >
        <configuration name="CPU1_RAM" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -I${Free_RTOS}/portable/CCS/C2000_C28x -I${Free_RTOS}/include -v28 -ml -mt --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --define=DEBUG  --define=CPU1  --diag_warning=225  --diag_suppress=10063" --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  --heap_size=0x200 --define RAM" />
        <configuration name="CPU1_FLASH" compilerBuildOptions="--opt_level=off -I${PROJECT_ROOT}/device -I${C2000WARE_DLIB_ROOT} -I${Free_RTOS}/portable/CCS/C2000_C28x -I${Free_RTOS}/include -v28 -ml -mt --define=_FLASH --cla_support=cla1 --float_support=fpu32 --tmu_support=tmu0 --vcu_support=vcu2 --define=DEBUG  --define=CPU1  --diag_warning=225  --diag_suppress=10063" --display_error_number" linkerBuildOptions="--entry_point code_start --stack_size=0x100  --heap_size=0x200 " />
        <pathVariable name="C2000WARE_ROOT" path="C:/ti/c2000/C2000Ware_3_02_00_00" scope="project" />
        <pathVariable name="C2000WARE_DLIB_ROOT" path="${C2000WARE_ROOT}/driverlib/f2837xd/driverlib" scope="project" />
        <pathVariable name="Free_RTOS" path="../../../Source/" scope="project" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/include/driverlib.h" targetDirectory="device" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/include/device.h" targetDirectory="device" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/source/device.c" targetDirectory="device" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/targetConfigs/TMS320F28377D.ccxml" targetDirectory="targetConfigs" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/cmd/2837xD_RAM_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_RAM" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/cmd/2837xD_FLASH_lnk_cpu1.cmd" targetDirectory="" applicableConfigurations="CPU1_FLASH" />
        <file action="copy" path="${C2000WARE_DLIB_ROOT}/" targetDirectory="device" excludeFromBuild="True" />
        <file action="copy" path="${C2000WARE_ROOT}/device_support/f2837xd/common/source/F2837xD_CodeStartBranch.asm" targetDirectory="device" />
        <file action="link" path="${C2000WARE_DLIB_ROOT}/ccs/Debug/driverlib.lib" targetDirectory="" />
        <file action="copy" path="../led_ex1_blinky_rtos.c" targetDirectory="" />
    	<file action="copy" path="../FreeRTOSConfig.h" targetDirectory="" />
    	<file action="link" path="${Free_RTOS}/tasks.c" targetDirectory="FreeRTOS" />
    	<file action="link" path="${Free_RTOS}/queue.c" targetDirectory="FreeRTOS" />
    	<file action="link" path="${Free_RTOS}/list.c" targetDirectory="FreeRTOS" />
    	<file action="link" path="${Free_RTOS}/portable/CCS/C2000_C28x/port.c" targetDirectory="FreeRTOS/port" />
    	<file action="link" path="${Free_RTOS}/portable/CCS/C2000_C28x/portasm.asm" targetDirectory="FreeRTOS/port" />
    	<file action="link" path="${Free_RTOS}/portable/CCS/C2000_C28x/portmacro.h" targetDirectory="FreeRTOS/port" />
      </project>
    </projectSpec>

    But when I try to import from this folder, CCS does not detect the project for F2837xD

    Could you please check if there is something missing in the file because of which CCS doesn't detect? I tried restarting CCS, that doesn't help.

    Regards,

    Rashmitha

  • Hi,

    Could you please check what is wrong in the .projectspec file because of which CCS is unable to detect it?

    Regards,

    Rashmitha

  • Hi Rashmitha,

    Can you double check the syntax on the projectspec file? I'm wondering if there's some error in the file that's causing CCS to ignore it. The quotation marks in the compiler options look a little odd to me--I don't think you need the " after '--diag_suppress=10063'

    Whitney

  • Hi Whitney,

    The quotes are present in a spec file at C:\ti\c2000\C2000Ware_3_04_00_00\driverlib\f2837xd\examples\cpu1\led\CCS too. This is where I took it from

    However, I have got it imported now when I used configuration lines from another working file.

    My new issue is regarding cmd file (+) TMS320F28379D: RAM/FLASH cmd file changes to load FreeRTOS on TM320F28379D - C2000 microcontrollers forum - C2000Tm︎ microcontrollers - TI E2E support forums