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.

[FAQ] MCU-PLUS-SDK-AM26X: [FAQ] AM26x: CCS project for ASM MCAL

Part Number: MCU-PLUS-SDK-AM263XMCU-PLUS-SDK-AM263PX

How to enable and import CCS project in ASM MCAL?

  • 1. Dependencies:

    2. Things to NOTE: 

    • To import mcal project in CCS download this example.projectspec file: 
    • Am263X Projectspec Am263PX Projectspec
      1488.example.projectspec dio.projectspec
        
    • This projectspec is created for dio_example of MCAL, you can add/update example files in this project using CCS. 
    • The projectspec is also human readable, i.e you can open it in a text editor to see all the different options for that project.

    3. Projectspec Location:

    Create a folder 'ti-arm-clang' in 'mcal_dir/mcal/examples/Dio/soc/<am263 or am263px>/r5f0_0' directory.

     Copy example.project_spec and paste it into Dio example's ti-arm-clang folder.

    4. How to import example.projectspec?

    • Open CCS.
    • Open project explorer: Go to 'View' → 'Project Explorer' .
    • Right click in 'Project Explorer' → 'Import→ 'CCS Projects'. 

                                                                     

    • Choose 'Browse' and go to 'mcal_dir/mcal/examples/Dio/soc/am263/r5f0_0'.
    • Select 'ti-arm-clang' folder.
    • Select 'dio_app' and click 'Finish'. 

                                                                                                                                                                    

    5. What CCS project of ASM MCAL contains?

    Folder/File
    Description
    Destination (CCS workspace/ MCAL)
    Drivers Contains source of all MCAL drivers  Linked to MCAL files
    examples_config Contains configuration files for all examples in MCAL Copied into CCS workspace
    Include Some headerfiles required for building examples and drivers Linked to MCAL files
    Utils Utils code required in examples Copied into CCS workspace
    DioApp.c Dio example Copied into CCS workspace
    DioApp_Startup.h Startup headerfile for Dio example Copied into CCS workspace
    DioApp_Startup.c Startup code for Dio example Copied into CCS workspace
    lnk_r5_am263_CLANG.cmd Linker file Copied into CCS workspace
    sys_intvecs.asm assembly file Copied into CCS workspace
    sys_startup.asm assembly file Copied into CCS workspace

    All source files of driver are linked to MCAL source code. And users are not allowed to update code of MCAL drivers.

    By default, CCS import of MCAL SDK example projects performs a copy of example, example configuration, utils files to CCS workspace. User is free to modify the example files without affecting the files in the MCAL SDK installed location. Deleting the CCS project, deletes the project files from CCS workspace. User should be careful especially when the copied example files are modified by user.

    All drivers and example configuration files are already added in this projectspec, and user can use any module in this CCS project.

    compilerBuildOptions_asm="-x ti-asm" is used for building MCAL assembly files in CCS.

    6. How to build imported ASM MCAL project in CCS?

    • Open Project explorer.
    • Right Click on project name.
    • Select Active configurations (Release/Debug).

                                                                                 

    • Select "Build Project" to build it.

    • Now output file with extension '.xer5f' will be generated in Release/Debug folder according to active build configuration.

    7. Run and Debug ASM MCAL CCS project

    • Go to 'View' → 'Target Configurations'

    • Launch Target configuration for am263x.

    • Connect Target core.

    • Right Click on project name.
    • 'Debug As' → '1 Code Composer Debug Session'.

    • It will load built dio_app.xer5f image to run.
    • Click on Resume button.

    8. How to add new file in CCS project?

    • Open Project explorer. Go to 'View' → 'Project Explorer' .
    • Right Click on project name.
    • Click on 'New'→ 'File'.                                                                                                                                                                                                             

    •  Choose 'parent folder' in which you want to add file and type 'File name'.

    •  Click on 'Finish'.
    • Write required code in this file.
    • Re-Build project. It will also build newly added file from now on.

    9. Changes required in Projectspec for other Examples

    • All paths in projectspec are relative to projectspec's location and uses MCAL_MCAL path-variable for deciding path values. You need to update one path-variable MCAL_MCAL's path if there is any change in relative path of MCAL w.r.t. projectspec.
      • for mcspi_app<pathVariable name="MCAL_MCAL" path="../../../../../../../../mcal" scope="project"/>
      • for dio_app<pathVariable name="MCAL_MCAL" path="../../../../../../../mcal" scope="project"/>
    • User can update example files in two ways:
      • They can update example and example_startup files name and path in example.projectspec file before importing project in CCS.
      • Or they can update example files by adding files using CCS GUI after importing project using example.projectspec

    Regards,
    Gunjan

  • Hi Gunjan,

    We want to import the mcal project into CCS and need the example.projectspec file, but the file link you provided does not seem to work.

    Best Regarts,

    Ricky

  • Hi Ricky,

    Thanks for informing, updated link for example.projectspec. 
    Please check if it works for you now.

    Best Regards,
    Gunjan

  • Hi ,

    Sorry for taking so long to reply to you, because I originally hoped to get the latest am263x MCAL package first and try it out before confirming with you.

    But unfortunately, I haven't been approved to download until now.

    Therefore, I would like to ask for your help.

    Best Regarts,

    Ricky

  • Hello Ricky,

    I am able to download 1680.example.projectspec attached in this FAQ.
    Are you not able to download projectspec or MCAL package? If MCAL package then creating a new E2E will help.

    Best Regards,
    Gunjan

  • Hi ,

    Okay, I understand. Thank you for help.

    Best Regarts,

    Ricky