Table of Contents
Introduction
Because of the sheer complexity of the F2837xD devices, it is not uncommon for new users to have trouble bringing up the device their first time. This guide aims to give you, the user, a step by step guide for how to create and debug projects from scratch. This guide will focus on the user of a F2837xD controlCARD, but these same ideas should apply to other boards with minimal translation.
Project Creation
A typical F2837xD application consists of two separate CCS projects: one for CPU 1 and one for CPU2. The two projects are completely independent and have no real linking between them as far as CCS is concerned.
Typical F2837xD application consists of two separate CCS projects: one for CPU 1
and one for CPU2. The two projects are completely independent and have no real
linking between them as far as CCS is concerned.
CPU 1 Subsystem Project Creation
From the main CCS window select File -> New -> CCS Project. Select your Target as “2837xD Delfino”, and Select your respected control number TMS320F28379D Name your project and choose a location for it to reside. Click Finish and your project will be created.
Step 1 Creating a new C28 project
Generated Files
Note : In this test project targetConfigs file is not generated
How to create Target Configuration
Target Configuration A Target Configuration defines how CCS connects to the device. It describes the device using GEL files and device configuration files. The configuration files are XML files and have a *.ccxml file extension.
Step 2 Create main.c file
Right click on project -> Select New -> Source file
Step 3 Project configuration dialog box
Before we can successfully build a project we need to setup some build specific settings. Right click on your project and select Properties. Look at the Processor Options and ensure they match the below image:
In the C2000 Compiler entry look for and select the Include Options. Click on the add directory icon to add a directory to the search path. Click the File System button to browse to the common\include folder of your C2000Ware installation (typically C:\ti\c2000\C2000Ware_X_XX_XX_XX\device_support\f2837xd\common\include). Replace the ’X’s with your current C2000Ware version installation. Click ok to add this path, and repeat this same process to add the headers\include directory.
Step 4 Project configuration dialog box
In my system project location located below path
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\include
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\headers\include
Step 5 Predefined Symbol
Expand the Advanced Options and look for the Predefined Symbol entry. Add a Pre-define AME called “CPU1”. This ensures that the header files build correct for this CPU. If using a Launchpad, also add a pre-define NAME called “_LAUNCHXL_F28379D”. This is required to setup the proper device clocking.
- CPU1
- _FLASH
- _LAUNCHXL_F28379D
Step 6 Project configuration dialog box
Click on the Linker File Search Path. Add these directories to the search path:
common\cmd and headers\cmd.
Then you’ll also want to add the following files:
F2837xD_Headers_nonBIOS_cpu1.cmd.
In my system project location located below path
C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\headers\cmd\F283
7xD_Headers_nonBIOS_cpu1.cmd
Finally, delete libc.a, we will use rts2800_fpu32.lib as our run time support library
instead. Add dir to library search path.
In my system project location located below path
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\cmd
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\headers\cmd
Step 7 linker command text box
In the project explorer, check that no linker command file got added during project setup. If so, remove the linker command file that got added. Additionally, check in the project properties under the General tab and verify that the linker command text box is blank.
Note: If it is empty we need to add this path location in below figure other wise
don’t need to add.
Click on the Linker File Search Path. Add these directories to the search path:
common\cmd and headers\cmd.
Then you’ll also want to add the following files: 2837xD_RAM_lnk_cpu1.cmd,
Finally, delete libc.a.
Next we need to link in a few files which are used by the header files. To do this right click on your roject in the workspace and select Add Files… Navigate to the headers\source directory, and select F2837xD_GlobalVariableDefs.c . After you select the file you’ll have the option to copy the file into the project or link it. We recommend you link files like this to the project as you will probably not modify these files. In addition, link in the following files as well:
- common\source\F2837xD_CodeStartBranch.asm
- common\source\F2837xD_usDelay.asm
- common\source\F2837xD_SysCtrl.c
- common\source\F2837xD_Gpio.c
- common\source\F2837xD_Ipc.c
In my system project location located below path
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\source\F2837xD_CodeStartBranch.asm
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\headers\source\F2837xD_GlobalVariableDefs.c
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\source\F2837xD_Gpio.c
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\source\F2837xD_Ipc.c
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\source\F2837xD_SysCtrl.
- C:\ti\C2000Ware_3_04_00_00_Software\device_support\f2837xd\common\source\F2837xD_usDelay.asm
Final led blink code
/*
* main.c
**
Created on: 30-Jul-2021
* Author: Admin
*/
#include "F28x_Project.h"
#define BLINKY_LED_GPIO 31
void main(void)
{
InitSysCtrl();
InitGpio();
GPIO_SetupPinMux(BLINKY_LED_GPIO, GPIO_MUX_CPU1, 0);
GPIO_SetupPinOptions(BLINKY_LED_GPIO, GPIO_OUTPUT, GPIO_PUSHPULL);
while(1)
{G
PIO_WritePin(BLINKY_LED_GPIO, 0);
DELAY_US(1000*500);
// Turn off LED
//
GPIO_WritePin(BLINKY_LED_GPIO, 1);
//
DELAY_US(1000*500);
}
}
i have an problem to create my new CCS Project
Description Resource Path Location Type
#10010 errors encountered during linking; “Example_1.out” not built Example_1 C/C++ Problem