Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4

From Texas Instruments Embedded Processors Wiki

Jump to: navigation, search
Translate this page to   

Contents

Introduction

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

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:

Component Versions Used

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.

Quick Notice about RTSC Projects in CCSv4

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

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

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

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

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:

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

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!

Troubleshooting

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

E2e.jpg 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
ARM Microcontroller MCU ARM Processor Digital Media Processor Digital Signal Processing Microcontroller MCU Multi Core Processor
Ultra Low Power DSP 8 bit Microcontroller MCU 16 bit Microcontroller MCU 32 bit Microcontroller MCU

Leave a Comment

Comments

Comments on Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4


Benjsec said ...

This is good as far as it goes, but having made these modifications how do you then get the program onto the board?

--Benjsec 05:12, 4 October 2011 (CDT)

Dimitar said ...

it is ok until the process of resolving the warnings. After adding the includes it gives errors. I have a question could you tell me the procedure for porting the examples from dvsdk to ccsv4

--Dimitar 06:45, 11 May 2012 (CDT)

Personal tools
Namespaces
Variants
Actions
Navigation
Print/export
Toolbox