NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

This article is intended to help port the dm648_demo from DVSDK 1.11.00.00, which was based on CCSv3.3, to CCSv4 (specifically v4.1.2). This article does not cover upgrading ALL RTSC components such as Codec Engine, etc., but only the necessary components XDC and XDAIS.

Assumptions[edit]

This article assumes that a user has already installed the DVSDK v1.11.00.00, CCSv4 and the DM648 DVDP Board Support Package. To obtain the DVSDK please visit here. If you do not already own CCSv4 you can download an evaluation version here. The DM648 BSP is included in the CD provided with the DM648 DVDP.

The dm648_demo project was built for use on the DM648DVDP evaluation board developed by Lyrtech. As such, this project will require significant rework to be used on a custom platform.

Further below the actual paths in the Windows file system will be replaced with something like <dvsdk_install_dir>. These should be substituted with the actual path in which that particular component is installed. The defaults for the three replacement paths used in this example are:

  • <dvsdk_install_dir> = C:\dvsdk_1_11_00_00_DM648\
  • <ccsv4_install_dir> = C:\Program Files\Texas Instruments
  • <dm648_demo_ccsv4_dir> = C:\dvsdk_1_11_00_00_DM648\dm648_demo_ccsv4

Component Versions Used[edit]

To build this project the below component versions are required. There is no guarantee that using a different platform version will create a functioning project.

  • DSP/BIOS 5.41.02.14 (installed w/ CCS v4.1.2)
  • Code Generation Tools v6.1.16 (installed w/ CCS v4.1.2)
  • XDC Tools v3.16.02.32 (installed w/ CCS v4.1.2)
  • XDAIS v6.25.01.08 (installed w/ CCS v4.1.2)
  • BIOS Utils v1.00.02 (installed w/ DM648 DVSDK v1.11.00.00)
  • Codec Engine v1.20.02 (installed w/ DM648 DVSDK v1.11.00.00)
  • DM648 Codecs v1.10 (installed w/ DM648 DVSDK v1.11.00.00)
  • EDMA3 Low-Level Driver v1.05.00 (installed w/ DM648 DVSDK v1.11.00.00)
  • Framework Components v1.20.03 (installed w/ DM648 DVSDK v1.11.00.00)
  • Network Developer's Kit v1.92.00.22 eval (installed w/ DM648 DVSDK v1.11.00.00)
  • Platform Support Package v1.10.00 (installed w/ DM648 DVSDK v1.11.00.00)

Quick Notice about RTSC Projects in CCSv4[edit]

CCSv4 treats RTSC projects differently than CCSv3.3. CCSv3.3 included all RTSC information inside of the application project whereas CCSv4 creates a separate dependency project for RTSC configuration. This is to allow for a common RTSC configuration to be easily transported to multiple projects without having to reconfigure repository directories, etc. As a result creating a new project is necessary.

Creating a new RTSC-based Project[edit]

Unless otherwise specified in the steps below the default choices can be left as-is.

  1. To create a new project inside CCSv4 select File->New CCS Project
  2. Specify a project name and a location for the project directory. This example will assume the name dm648_demo_ccs4 (click Next)
    CCS Application Project Settings
  3. Select Project Type: C6000 (click Next)
  4. Because the Referenced project does not yet exist click Next again
  5. The defaults inside the 'CCS Project Settings' page can change per machine so make sure they are as follows
    Output type: Executable
    Device Variant: TMS320DM648
    Device Endianness: little
    Code Generation tools: TI v6.1.16
    Linker Command File: leave blank
    Runtime Support Library: <automatic>
    Make certain to check the button next to Enable RTSC support (click Next)
  6. Select 'Create a new RTSC Configuration project' in the 'Referenced RTSC Configuration' page
  7. Specify a different name and location of the RTSC Configuration Project if desired. This example assumes the default name dm648_demo_ccsv4_configuration (click Next)
  8. The RTSC Configuration Settings screen requires a number of changes
    RTSC Configuration Project Settings
  9. Uncheck the boxes next to DSP/BIOS, Inter-processor Communication, and XDAIS
  10. Click Add..., then the add following repositories (this must be done one-by-one)
    <ccsv4_install_dir>\bios_5_41_02_14\packages
    <ccsv4_install_dir>\xdais_6_25_01_08\packages
    <dvsdk_install_dir>\codec_engine_1_20_02\packages
    <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages
    <dvsdk_install_dir>\biosutils_1_00_02\packages
    <dvsdk_install_dir>\examples\common\evmDM648
    <dvsdk_install_dir>\codec_engine_1_20_02\examples
    <dvsdk_install_dir>\codecs_1_10_evmDM648\packages-evaluation
    <dvsdk_install_dir>\edma3_lld_1_05_00\packages
    <dvsdk_install_dir>\framework_components_1_20_03\packages
    <dvsdk_install_dir>\pspdrivers_1_10_00\packages
  1. Specify the RTSC Platform as ti.platforms.evmDM648 and the RTSC Build-Profile as whole_program_debug (click Next)
  2. Click Finish

Finishing touches[edit]

At this point the Project Wizard will create two new projects called dm648_demo_ccsv4 and dm648_demo_ccsv4_configuration. The first is the application project which will contain all source, header and library files for the actual application code while the second contains RTSC component and BIOS configuration information. At this point a few more changes to each project are necessary in order to build properly.

Modifying dm648_demo_ccsv4_configuration[edit]

Right click on the project dm648_demo_ccsv4_configuration and select Add files to project.... Search for the original dm648_demo project folder in the <dvsdk_install_dir> and add the files dm648_demo.cfg and dm648_demo.tcf.

Next, right click on the dm648_demo_ccsv4_configuration project in the file listing and select Build Properties. Under XDCtools->Advanced Options check the box next to Read infile.tcf in addition to infile.cfg (--tcf). This tells the RTSC builder to include the dm648_demo.tcf file in the build process.

Because the DVSDK uses older versions of some of the RTSC products add the line ti.rtdx in the field Exclude packages from compatibility checking (-x). This is because the BIOSUtils included with the DVSDK was built with an older version of DSP/BIOS. Click OK.

Modifying dm648_demo_ccsv4[edit]

Copy the \source and \include folders from the original dm648_demo_0_92_04 folder over to the dm648_demo_ccsv4 project folder. The files app_block_compositor.c, app_block_template.c and app_template.c should be either excluded from the build or deleted from the source folder as they are not used.

Next, right click on the dm648_demo_ccsv4 project and select Build Properties. Under C6000 Compiler->Include Options add the following paths:

  • <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\inc
  • <dm648_demo_ccsv4_dir>\include

Under C6000 Compiler->Predefined Symbols add CHIP_DM648 under Pre-Define NAME.(click OK)

Right click the project and select Add Files to Project... and add the following files:

  1. From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\hal\evmdm648 folder add
    hal_eth_dm648.lib
  2. From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\c64plus folder add
    netctrl.lib
    nettool.lib
    os.lib
    stack.lib
    miniPrintf.lib
  3. From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\c64plus\hal folder add
    hal_ser_stub.lib
    hal_timer_bios.lib
    hal_userled_stub.lib

At this point the project should build successfully with a number of build warnings. This is because the project was built in CCSv3.3 where the --diag_warning=225 compiler switch was not used by default. This switch tells the compiler to turn the remarks for this specific number (function declared implicitly) into warnings.

Cleaning up the Build Warnings[edit]

These implicitly declared function warnings should be cleared up as they could cause issues with run-time functionality. A number of them should be related to the function CLK_getltime().

Finished project!
  • app_block_speech_decode.c, app_block_speech_encode.c, app_block_video_compositor.c and app_block_video_decode.c must be modified with #include <clk.h> to eliminate the warnings pertaining to CLK_getltime().
  • app_main.c must be modified with #include <ti/sdo/ce/CERuntime.h> to eliminate the warning for the function call CERuntime_init().
  • app_ndk.c and app_rpcs.c must be modified with #include "app_i2c.h" to eliminate the warning for the calls to APP_I2C_writeLeds().
  • app_rpcs.c must be modified with extern int c_int00(); to eliminate the warning pertaining to that call.

Troubleshooting[edit]

If the project fails to run due to an issue with I2C make sure the .ccxml file is including the DM648 DVDP GEL file (found in C:\Lyrtech\EVMDM648\gel by default). Otherwise the LOCAL_mainTskFxn() inside app_main.c will fail in the APP_I2C_readSwitches() call on line 307. Inside that function is a call into the BIOS GIO layer which will return a -12 (IOM_EINUSE). Allowing the GEL script to initialize the board will prevent this issue from occurring.

Additional Information[edit]

  • Some older versions of the DVSDK required a predefined symbol CPSW3G_OSC_FREQUENCY_62_5MHZ or CPSW3G_OSC_FREQUENCY_125MHZ to specify which crystal was used for the 3PSW peripheral. The earliest DM648 boards used a 125MHz crystal where as current and several older board revisions used a 62.5MHz crystal. If using an older DVSDK and/or board double check the crystal value and add the proper define to the Project Build Properties->C6000 Compiler->Predefined Symbols under Pre-Define NAME.
  • Some older versions of the DVSDK may have additional build warnings pertaining to implicitly defined functions.
    • The app_block_audio_decode.c and app_block_audio_encode.c files may also require the statement #include <clk.h>
    • The app_block_control.c and app_main.c files may also require the statement #include "app_i2c.h"
    • The file app_block_video_input.h may have a couple of typos related to functions where INPUT is spelled INPUPT
E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4 here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity