IDE版本 CCS6.1.3
芯片:TMS320C5535
问题描述:
1、程序是使用vau模块来检测i2s总线上的音频数据。
2、程序可以正常编译,并使用可以使用debug功能在片上调试运行。
3、将.out文件拷贝到hex55.exe所在目录下;
4、在hex55软件中运行demo.cmd文件,即命令行窗口输入:hex55 demo.cmd(demo.cmd文件内容如下)
-boot-v5505-serial8-b-o .\mixertest.bin.\mixer.out
5、使用附件中的工程将bin文件写到flash中。
使用附件的工程可以正常烧写csl库中的gpio demo程序,在flash上运行正常。但是在烧写自己的程序时无法正常运行。
程序的cmd文件内容如下:
-c /* ROM autoinitialization module */
-a /* LINK USING C CONVENTIONS */
-l /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/sdk/lib/sdk_c.a55L
-l /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_c.a55L
-l /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_a.a55L
-l /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/vau/lib/vau_c.a55L
-stack 0x1000
-heap 0x4000
-sysstack 0x1000
MEMORY
{
DARAM : origin = 0x01000, length = 0x03000
SARAM1 : origin = 0x4000, length = 0x10000
SARAM2 : origin = 0x14000, length = 0x10000
EXTMEM : origin = 0x24000, length = 0x20000
}
/* SPECIFY THE SECTIONS ALLOCATION INTO MEMORY */
SECTIONS
{
.vau > EXTMEM
{
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/vau/lib/vau_c.a55L (.text)
}
.util > EXTMEM
{
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_c.a55L (.text)
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_a.a55L (.text)
}
.text > EXTMEM
.cinit > SARAM2
.bss > EXTMEM
.switch > SARAM1
.const > SARAM1
.sysmem > SARAM1
.volatileMemBufs > DARAM
.nonVolatileMemBufs > SARAM2
.stack > SARAM2
.sysstack > SARAM2
.data > SARAM2
.cio > SARAM2
.far > SARAM2
}
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/sdk/lib/sdk_c.a55L
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_c.a55L
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_a.a55L
/home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/vau/lib/vau_c.a55L
Shine:
如果能boot demo例程,说明你的boot流程是正确的。
ROM bootloader会先让所有的接口进入idle状态All peripherals are idled (the bootloader un-idles peripherals as it uses them).有些port bootloader没用的话不会去使能它,如果你的代码中用到这些port的话,需要先使能。请参考下面wiki网站的例子。http://processors.wiki.ti.com/index.php/C5515_Boot-Image_Programmer#Ports_idled_by_bootloader
yong lin4:
回复 Shine:
我在ubuntu下使用hex55命令时出现以下提示。
./hex55 ./mixer.out -boot -v5505 -serial8 -b -o ./mixer.binTranslating to Binary format… "./mixer.out" ==> .vau (BOOT LOAD) "./mixer.out" ==> .util (BOOT LOAD)error: Starting address of section ./mixer.out(.util) is not aligned to an even byte boundary as required for a boot loader of the requested type "./mixer.out" ==> .text (BOOT LOAD) "./mixer.out" ==> .cinit (BOOT LOAD) "./mixer.out" ==> .switch (BOOT LOAD) "./mixer.out" ==> .const (BOOT LOAD) "./mixer.out" ==> vectors (BOOT LOAD)
.map文件中看到util的地址确实是奇数
.util 0 000311e1 [ 000188f0+] 00000130 * 000311e1 [ 000188f0+] 00000099 * util_c.a55L : ecoXdaisXlat.o55L (.text) 0003127a [ 0001893d ] 00000055 * util_a.a55L : utillin2db.o55L (.text) 000312cf [ 00018967+] 00000041 * : utildb2lin.o55L (.text) 00031310 [ 00018988 ] 00000001 * –HOLE– [fill = 20]
然后我将cmd文件中util注释掉就可以正常生成bin文件了
/*
.util > EXTMEM { /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_c.a55L (.text) /home/ly/ti/volib_C55_CPU3_2_1_0_1/packages/ti/mas/util/lib/util_a.a55L (.text) }
*/
请问这是为什么呢?为什么util加载的地址会是奇数?其他的地址都是偶数起始啊。
附件是.map文件