打印

转:CCS 使用小知识

[复制链接]
974|6
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
  烧写方法:

       1. Texas Instruments\CCSv5\ccs_base\emulation\specdig\sdconfigex\SdConfigEx.exe  ---复位仿真器
       2.Texas Instruments\ccsv5\ccs_base\emulation\specdig\sdflash\bin\SDFlash.exe --烧写.out文件
       DSP堆栈问题
       在CCS开发编程,出现一个函数返回值不时出现异常值0x00,后发现函数出来之前值都是对的,返回的值就错了。应该是堆栈溢出,但堆栈不能改大,只能通过全局变量来返回数据。

       DSP 数据长度问题
       定义unsigned char 变量,理论上最大值为255,再加1应该变成0,但在DSP的CCS编程不是。DSP没有8位的存储单元,都是16位的。即使定义char变量,也还是16位,要注意!

Driver: boot_temp\make_image\sd_proj_usb\sdgo28xusb.dvr
Algorithm  boot_temp\make_image\sd_proj_usb\28345_M25P16_Flash_Boot.out
Programming:
Flash Data
D:boot_temp\boot_temp\make_image\boot_20131025.out
为什么在CCS中,unsigned char占两字节空间?
       DSP没有8位的存储单元,都是16位的
a = sizeof(unsigned char);
b = sizeof(unsigned short);
c = sizeof(unsigned int);
d = sizeof(unsigned long);
a=1; b=1; c=1; d=2;  (sizeof是以字为单位)
  1.include 路径添加
       右键工程--build propertie--C2000 compile-- include options

相关帖子

沙发
拿起书本|  楼主 | 2014-10-9 13:58 | 只看该作者
   2.堆栈大小更改
       右键工程--build propertie--C2000 Linker-- Basic Options

     3.支持FPU
       右键工程--build propertie--C2000 compile -->RunTime Model Options -->Specify floating point support(--float_support)  fpu32


  需要加载头文件 math.h 库文件使用 rts2800_fpu32.lib,同时在ccs的编译选项中设置支持fpu32即可
       在计算除法的时候尽量把除法化为乘法计算,乘法比除法速度快的太多了

value=value*0.5;// 3 cpu cycles
value=value/2;//155 cpu cycles===1us

  (3)显示变量HEX格式

使用特权

评论回复
板凳
edishen| | 2014-10-9 20:36 | 只看该作者
坛子里需要ccs的人很多 太实用了

使用特权

评论回复
地板
lijiabaobei| | 2014-10-9 22:08 | 只看该作者
这个应该需要的人多

使用特权

评论回复
5
zhangmangui| | 2014-10-9 22:51 | 只看该作者
谢谢你的分享  

使用特权

评论回复
6
long009| | 2014-11-30 13:47 | 只看该作者
谢谢分享

使用特权

评论回复
发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

个人签名:好好学习,天天向上!

519

主题

4195

帖子

31

粉丝