Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.
Porting DM648 DVSDK demo app from CCSv3.3 to CCSv4
- 1 Introduction
- 2 Assumptions
- 3 Component Versions Used
- 4 Quick Notice about RTSC Projects in CCSv4
- 5 Finishing touches
- 6 Troubleshooting
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.
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.
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
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
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.
- To create a new project inside CCSv4 select File->New CCS Project
- Specify a project name and a location for the project directory. This example will assume the name dm648_demo_ccs4 (click Next)
- Select Project Type: C6000 (click Next)
- Because the Referenced project does not yet exist click Next again
- 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)
- Select 'Create a new RTSC Configuration project' in the 'Referenced RTSC Configuration' page
- 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)
- The RTSC Configuration Settings screen requires a number of changes
- Uncheck the boxes next to DSP/BIOS, Inter-processor Communication, and XDAIS
- Click Add..., then the add following repositories (this must be done one-by-one)
- Specify the RTSC Platform as ti.platforms.evmDM648 and the RTSC Build-Profile as whole_program_debug (click Next)
- Click Finish
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.
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.
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:
- From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\hal\evmdm648 folder add
- From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\c64plus folder add
- From the <dvsdk_install_dir>\ndk_1_92_00_22_eval\packages\ti\ndk\lib\c64plus\hal folder add
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 WarningsThese 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
- 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
- app_main.c must be modified with #include <ti/sdo/ce/CERuntime.h> to eliminate the warning for the function call
- app_ndk.c and app_rpcs.c must be modified with #include "app_i2c.h" to eliminate the warning for the calls to
- app_rpcs.c must be modified with extern int c_int00(); to eliminate the warning pertaining to that call.
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.
- 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