2219|0

6828

帖子

0

TA的资源

五彩晶圆(高级)

楼主
 

TMS320F28379D创建工程 [复制链接]

TI公司的Delfino tms320F28377D是双核32位浮点微控制器单元(MCU),支持新的双核C28x架构,大大地提升了系统性能.每核提供200MHz的信号处理性能,集成了512KB或1MB闪存,172KB或204KB RAM
一个典型的F2837xD应用工程包含两个独立的CCS工程:一个用于CPU1,一个用于CPU2.折两个工程师完全独立的工程,没有真正的连接。

CPU1 子系统的创建
1、从CCS主界面窗口,选择 File -> New -> CCS Project.选择你的目标器件”Generic 
C28xx Device”命名你的工程并且选择工程目录,点击完成,你的工程就创建好了

2、在你可以成功编译工程之前,你需要设置一些参数。点击你的project 选择properies。找到 Processor Options ,保证和下图一样 

 

3、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 commonninclude folder of your C2000Ware installation (typically C:ntinc2000nC2000Ware_X_XX_XX_XXndevice_supportnf2837xdncommonninclude). Replace the ’X’s with your current C2000Ware version installation. Click ok to add this path, and repeat this same process to add the headersninclude directory. 

4. Expand the Advanced Options and look for the Predefined Symbol entry. Add a Pre-define NAME 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 

7. 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.

  1. Next we need to link in a few files which are used by the header files. To do this right click on your project in the workspace and select Add Files… Navigate to the headersnsource 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. Link in the following files as well: 
    commonnsourcenF2837xD_CodeStartBranch.asm 
    commonnsourcenF2837xD_usDelay.asm 
    commonnsourcenF2837xD_SysCtrl.c 
    commonnsourcenF2837xD_Gpio.c 
    commonnsourcenF2837xD_Ipc.c 
    At this point your project workspace should look like the following: 
  1. Create a new file by right clicking on the project and selecting New -> File. Name this file
#include "F28x_Project.h"
void main(void)
{
uint32_t delay;
InitSysCtrl();
// Set pin direction
EALLOW;
GpioCtrlRegs.GPADIR.bit.GPIO10 = 1;
EDIS;
GPIO_SetupPinOptions(14, GPIO_OUTPUT, GPIO_PUSHPULL);
GPIO_SetupPinMux(14, GPIO_MUX_CPU2, 0);
// turn off LED
GpioDataRegs.GPADAT.bit.GPIO10 = 1;
while(1)
{
// Turn on LED
GpioDataRegs.GPADAT.bit.GPIO10 = 0;
// Delay for a bit.
for(delay = 0; delay < 2000000; delay++)
{ }
// Turn off LED
GpioDataRegs.GPADAT.bit.GPIO10 = 1;
// Delay for a bit.
for(delay = 0; delay < 2000000; delay++)
{ }
}
}
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  1. Save main.c and then attempt to build the project by right click on it and selecting Build Project. Assuming the project builds try debugging this project on a F2837xD device. When the code runs you should see GPIO 10 toggle.

下载附件  保存到相册

2019-12-7 18:35 上传

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 commonninclude folder of your C2000Ware installation(typicallyC:ntinc2000nC2000Ware_X_XX_XX_XXndevice_supportnf2837xdncommonninclude). Replace the ’X’s with your current C2000Ware version installation. Click ok to add this path,and repeat this same process to add the headersninclude directory. 
  • image.png (282.78 KB, 下载次数: 0)

    image.png
    点赞 关注
     

    回复
    举报
    您需要登录后才可以回帖 登录 | 注册

    随便看看
    查找数据手册?

    EEWorld Datasheet 技术支持

    相关文章 更多>>
    关闭
    站长推荐上一条 1/7 下一条

     
    EEWorld订阅号

     
    EEWorld服务号

     
    汽车开发圈

    About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

    站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

    北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

    电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved
    快速回复 返回顶部 返回列表