TI中文支持网
TI专业的中文技术问题搜集分享网站

TMS320F28335: 难受:CCS6.1生成的F28335的bin文件比hex文件还大

Part Number:TMS320F28335

请教个颠覆我认知的问题。

众所周知,hex文件中包含地址、校验等信息,而bin文件中只有单纯的数据,所以,理论上分析,同一个工程生成的hex文件应该比bin文件大很多,而我却遇到了hex文件比bin文件小的现象。

我用的是CCS6.1.1  ,对应的DSP芯片是F28335.cmd文件28335_RAM_lnk.cmd

MEMORY
{
PAGE 0 :

BEGIN : origin = 0x000000, length = 0x000002 /* Boot to M0 will go here */
RAMM0 : origin = 0x000050, length = 0x0003B0
RAML0 : origin = 0x008000, length = 0x001000
RAML1 : origin = 0x009000, length = 0x004000

ZONE7A : origin = 0x200000, length = 0x00FC00 /* XINTF zone 7 – program space */
CSM_RSVD : origin = 0x33FF80, length = 0x000076 /* Part of FLASHA. Program with all 0x0000 when CSM is in use. */
CSM_PWL : origin = 0x33FFF8, length = 0x000008 /* Part of FLASHA. CSM password locations in FLASHA */
ADC_CAL : origin = 0x380080, length = 0x000009
RESET : origin = 0x3FFFC0, length = 0x000002
IQTABLES : origin = 0x3FE000, length = 0x000b50
IQTABLES2 : origin = 0x3FEB50, length = 0x00008c
FPUTABLES : origin = 0x3FEBDC, length = 0x0006A0
BOOTROM : origin = 0x3FF27C, length = 0x000D44

PAGE 1 :

BOOT_RSVD : origin = 0x000002, length = 0x00004E /* Part of M0, BOOT rom will use this for stack */
RAMM1 : origin = 0x000400, length = 0x000400 /* on-chip RAM block M1 */
RAML5 : origin = 0x00D000, length = 0x001000
RAML6 : origin = 0x00E000, length = 0x001000
RAML7 : origin = 0x00F000, length = 0x001000
ZONE7B : origin = 0x20FC00, length = 0x000400 /* XINTF zone 7 – data space */
}

SECTIONS
{
codestart : > BEGIN, PAGE = 0
ramfuncs : > RAML0, PAGE = 0
.text : > RAML1, PAGE = 0
.cinit : > RAML0, PAGE = 0
.pinit : > RAML0, PAGE = 0
.switch : > RAML0, PAGE = 0

.stack : > RAMM1, PAGE = 1
.ebss : > RAML6, PAGE = 1
.econst : > RAML5, PAGE = 1
.esysmem : > RAMM1, PAGE = 1

FPUmathTables : > FPUTABLES, PAGE = 0, TYPE = NOLOAD

/*DMARAML4 : > RAML4, PAGE = 1
DMARAML5 : > RAML5, PAGE = 1
DMARAML6 : > RAML6, PAGE = 1
DMARAML7 : > RAML7, PAGE = 1*/

ZONE7DATA : > ZONE7B, PAGE = 1

.reset : > RESET, PAGE = 0, TYPE = DSECT /* not used */
csm_rsvd : > CSM_RSVD PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
csmpasswds : > CSM_PWL PAGE = 0, TYPE = DSECT /* not used for SARAM examples */
.adc_cal : load = ADC_CAL, PAGE = 0, TYPE = NOLOAD

}

1、HEX文件的生成方式是:在c2000  Hex  Utility中勾选:Enable c2000  Utility

2、bin文件的生成方式是在post-build-steps写入指令:"${CCS_INSTALL_ROOT}/utils/tiobj2bin/tiobj2bin" "${BuildArtifactFileName}" "${BuildArtifactFileBaseName}.bin" "${CG_TOOL_ROOT}/bin/ofd2000" "${CG_TOOL_ROOT}/bin/hex2000" "${CCS_INSTALL_ROOT}/utils/tiobj2bin/mkhex4bin"

最后生成的.out文件302kb,hex文件36kb,bin文件105kb

请教大神,这是什么情况?

Green Deng:

你好,看了你的生成方法应该都是OK的,那可能的原因就是工程本身或者CCS的问题。

可以用官方例程测试一下生成的hex文件和bin文件大小。如果官方例程测试没问题,那么可能就是CCS的问题了,可以更换CCS版本试一下:processors.wiki.ti.com/…/Download_CCS

赞(0)
未经允许不得转载:TI中文支持网 » TMS320F28335: 难受:CCS6.1生成的F28335的bin文件比hex文件还大
分享到: 更多 (0)