Part Number:TMS320C6455
工程师ccs3.3的,现在移植到ccs5.2修改了一些报错能成功编译。
1 在main函数开头加入断点。
2 连接仿真器,加载编译出来的6455.out文件后自动运行了。
3 这时候并没有跑到main函数断点出。
4 点击暂停按钮,单步执行,一直在汇编里跑进不了main函数断点。
请问下这个有人遇到过没?是ccs5.2配置问题还是代码问题呢?感激不尽!
Nancy Wang:
在ccs3.3中运行是可以的吗?
ccs->run->debug configuration是否设置为main函数处停下,具体参考以下链接:
software-dl.ti.com/…/ccs_debug-main.html
,
wang yanping:
debug configuration是否设置为main的,请知悉!
,
wang yanping:
debug configuration是设置为main,请知悉!还有其它原因吗?
,
Nancy Wang:
能跑到程序的入口点c_int00吗?
,
wang yanping:
跑不到啊;暂停后,单步执行,一直在汇编B0C1D6FC地址跑,但是我们的norflash是接到EMIFA CE3地址是B000 0000 – B07F FFFF,像是程序跑飞了。
,
wang yanping:
加载.out的时候,提示earlier errors prevent reading of target memory at memory B0000000等,加载后运行,暂停,单步执行现在又跑到e0001840了
,
Nancy Wang:
cmd文件贴出来看一下,加大堆栈试一下。
调试界面的截图请贴出来。
,
wang yanping:
,
wang yanping:
,
wang yanping:
dsk6455cfg.txt
/*Do *not* directly modify this file.It was*/ /*generated by the Configuration Tool; any*/ /*changes risk being overwritten.*//* INPUT dsk6455.cdb *//* MODULE PARAMETERS */ -u _c6455_init GBL_USERINITFXN = _c6455_init;-u IRAM MEM_SEGZERO = IRAM; -u IRAM MEM_MALLOCSEG = IRAM;-u _CLK_gethtime CLK_TIMEFXN = _CLK_gethtime; -u HWI_F_dispatch CLK_HOOKFXN = HWI_F_dispatch;-u _KNL_tick PRD_THOOKFXN = _KNL_tick;-u IRAM RTDX_DATAMEMSEG = IRAM;-u IRAM HST_DSMBUFSEG = IRAM;-u GBL_NULL SWI_EHOOKFXN = GBL_NULL; -u GBL_NULL SWI_IHOOKFXN = GBL_NULL; -u SWI_F_exec SWI_EXECFXN = SWI_F_exec; -u SWI_F_run SWI_RUNFXN = SWI_F_run;-u IRAM TSK_STACKSEG = IRAM; -u __HOOK_doCreate TSK_VCREATEFXN = __HOOK_doCreate; -u __HOOK_doDelete TSK_VDELETEFXN = __HOOK_doDelete; -u __HOOK_doExit TSK_VEXITFXN = __HOOK_doExit;-u IDL_F_stub IDL_CALIBRFXN = IDL_F_stub;-u _UTL_doAbort SYS_ABORTFXN = _UTL_doAbort; -u _UTL_doError SYS_ERRORFXN = _UTL_doError; -u _UTL_halt SYS_EXITFXN = _UTL_halt; -u _UTL_doPutc SYS_PUTCFXN = _UTL_doPutc;-u _FXN_F_nop GIO_CREATEFXN = _FXN_F_nop; -u _FXN_F_nop GIO_DELETEFXN = _FXN_F_nop; -u _FXN_F_nop GIO_PENDFXN = _FXN_F_nop; -u _FXN_F_nop GIO_POSTFXN = _FXN_F_nop;/* OBJECT ALIASES */ _CACHE_L1P = CACHE_L1P; _CACHE_L1D = CACHE_L1D; _IRAM = IRAM; _FLASHBOOT = FLASHBOOT; _FLASHREST = FLASHREST; _PRD_clock = PRD_clock; _prdNdk = prdNdk; _prdtimerTick = prdtimerTick; _prdGetRadStatus = prdGetRadStatus; _RTA_fromHost = RTA_fromHost; _RTA_toHost = RTA_toHost; _HWI_RESET = HWI_RESET; _HWI_NMI = HWI_NMI; _HWI_RESERVED0 = HWI_RESERVED0; _HWI_RESERVED1 = HWI_RESERVED1; _HWI_INT4 = HWI_INT4; _HWI_INT5 = HWI_INT5; _HWI_INT6 = HWI_INT6; _HWI_INT7 = HWI_INT7; _HWI_INT8 = HWI_INT8; _HWI_INT9 = HWI_INT9; _HWI_INT10 = HWI_INT10; _HWI_INT11 = HWI_INT11; _HWI_INT12 = HWI_INT12; _HWI_INT13 = HWI_INT13; _HWI_INT14 = HWI_INT14; _HWI_INT15 = HWI_INT15; _EVENT4 = EVENT4; _EVENT5 = EVENT5; _EVENT6 = EVENT6; _EVENT7 = EVENT7; _EVENT8 = EVENT8; _EVENT9 = EVENT9; _EVENT10 = EVENT10; _EVENT11 = EVENT11; _EVENT12 = EVENT12; _EVENT13 = EVENT13; _EVENT14 = EVENT14; _EVENT15 = EVENT15; _EVENT16 = EVENT16; _EVENT17 = EVENT17; _EVENT18 = EVENT18; _EVENT19 = EVENT19; _EVENT20 = EVENT20; _EVENT21 = EVENT21; _EVENT22 = EVENT22; _EVENT23 = EVENT23; _EVENT24 = EVENT24; _EVENT25 = EVENT25; _EVENT26 = EVENT26; _EVENT27 = EVENT27; _EVENT28 = EVENT28; _EVENT29 = EVENT29; _EVENT30 = EVENT30; _EVENT31 = EVENT31; _EVENT32 = EVENT32; _EVENT33 = EVENT33; _EVENT34 = EVENT34; _EVENT35 = EVENT35; _EVENT36 = EVENT36; _EVENT37 = EVENT37; _EVENT38 = EVENT38; _EVENT39 = EVENT39; _EVENT40 = EVENT40; _EVENT41 = EVENT41; _EVENT42 = EVENT42; _EVENT43 = EVENT43; _EVENT44 = EVENT44; _EVENT45 = EVENT45; _EVENT46 = EVENT46; _EVENT47 = EVENT47; _EVENT48 = EVENT48; _EVENT49 = EVENT49; _EVENT50 = EVENT50; _EVENT51 = EVENT51; _EVENT52 = EVENT52; _EVENT53 = EVENT53; _EVENT54 = EVENT54; _EVENT55 = EVENT55; _EVENT56 = EVENT56; _EVENT57 = EVENT57; _EVENT58 = EVENT58; _EVENT59 = EVENT59; _EVENT60 = EVENT60; _EVENT61 = EVENT61; _EVENT62 = EVENT62; _EVENT63 = EVENT63; _EVENT64 = EVENT64; _EVENT65 = EVENT65; _EVENT66 = EVENT66; _EVENT67 = EVENT67; _EVENT68 = EVENT68; _EVENT69 = EVENT69; _EVENT70 = EVENT70; _EVENT71 = EVENT71; _EVENT72 = EVENT72; _EVENT73 = EVENT73; _EVENT74 = EVENT74; _EVENT75 = EVENT75; _EVENT76 = EVENT76; _EVENT77 = EVENT77; _EVENT78 = EVENT78; _EVENT79 = EVENT79; _EVENT80 = EVENT80; _EVENT81 = EVENT81; _EVENT82 = EVENT82; _EVENT83 = EVENT83; _EVENT84 = EVENT84; _EVENT85 = EVENT85; _EVENT86 = EVENT86; _EVENT87 = EVENT87; _EVENT88 = EVENT88; _EVENT89 = EVENT89; _EVENT90 = EVENT90; _EVENT91 = EVENT91; _EVENT92 = EVENT92; _EVENT93 = EVENT93; _EVENT94 = EVENT94; _EVENT95 = EVENT95; _EVENT96 = EVENT96; _EVENT97 = EVENT97; _EVENT98 = EVENT98; _EVENT99 = EVENT99; _EVENT100 = EVENT100; _EVENT101 = EVENT101; _EVENT102 = EVENT102; _EVENT103 = EVENT103; _EVENT104 = EVENT104; _EVENT105 = EVENT105; _EVENT106 = EVENT106; _EVENT107 = EVENT107; _EVENT108 = EVENT108; _EVENT109 = EVENT109; _EVENT110 = EVENT110; _EVENT111 = EVENT111; _EVENT112 = EVENT112; _EVENT113 = EVENT113; _EVENT114 = EVENT114; _EVENT115 = EVENT115; _EVENT116 = EVENT116; _EVENT117 = EVENT117; _EVENT118 = EVENT118; _EVENT119 = EVENT119; _EVENT120 = EVENT120; _EVENT121 = EVENT121; _EVENT122 = EVENT122; _EVENT123 = EVENT123; _EVENT124 = EVENT124; _EVENT125 = EVENT125; _EVENT126 = EVENT126; _EVENT127 = EVENT127; _KNL_swi = KNL_swi; _PRD_swi = PRD_swi; _TSK_idle = TSK_idle; _TSK_Exec_NetCmd = TSK_Exec_NetCmd; _TSK_Exec_RADCMD = TSK_Exec_RADCMD; _IDL_cpuLoad = IDL_cpuLoad; _LNK_dataPump = LNK_dataPump; _RTA_dispatcher = RTA_dispatcher; _LOG_system = LOG_system; _IDL_busyObj = IDL_busyObj; _HOOK_KNL = HOOK_KNL; _hookNdk = hookNdk;/* MODULE GBL */SECTIONS {.vers (COPY): {} /* version information */ }-priority --trampolines -llnkrtdx.a64P -ldrivers.a64P/* device drivers support */ -lsioboth.a64P/* supports both SIO models */ -lbiosTCI6482.a64P/* BIOS clock specific library */ -lbios.a64P/* DSP/BIOS support */ -lrtdx64xplus.lib/* RTDX support */ -lrts64plus.lib/* C and C++ run-time library support */_GBL_CACHE = GBL_CACHE; _BCACHE_bootInit=_FXN_F_nop;/* MODULE MEM */ -stack 0x2800 MEMORY {CACHE_L1P: origin = 0xe00000,len = 0x8000CACHE_L1D: origin = 0xf00000,len = 0x8000IRAM: origin = 0x800000,len = 0x200000FLASHBOOT: origin = 0xb0020000,len = 0x400FLASHREST: origin = 0xb0020400,len = 0x2dfc00 } /* MODULE CLK */ SECTIONS {.clk: {*(.clk)} > IRAM, RUN_START(CLK_A_TABBEG)} _CLK_PRD = CLK_PRD; _CLK_COUNTSPMS = CLK_COUNTSPMS; _CLK_REGS = CLK_REGS; _CLK_USETIMER = CLK_USETIMER; _CLK_TIMERNUM = CLK_TIMERNUM; _CLK_TDDR = CLK_TDDR;/* MODULE PRD */ SECTIONS {.prd: RUN_START(PRD_A_TABBEG), RUN_END(PRD_A_TABEND) {} > IRAM } PRD_A_TABLEN = 3;/* MODULE RTDX */ _RTDX_interrupt_mask = 0x0;/* MODULE HST */ _LNK_dspFrameReadyMask = LNK_dspFrameReadyMask;_LNK_dspFrameRequestMask = LNK_dspFrameRequestMask;_LNK_readDone = LNK_readDone;_LNK_readFail = LNK_readFail;_LNK_readPend = LNK_readPend;_LNK_writeFail = LNK_writeFail; _HWI_CFGDISPATCHED = HWI_CFGDISPATCHED;/* MODULE SWI */ SECTIONS {.swi: RUN_START(SWI_A_TABBEG), RUN_END(SWI_A_TABEND) {} > IRAM } SWI_A_TABLEN = 2;/* MODULE TSK */ SECTIONS {.tsk: {*(.tsk)} > IRAM }/* MODULE IDL */ SECTIONS {.idl: {*(.idl)} > IRAM, RUN_START(IDL_A_TABBEG).idlcal: {*(.idlcal)} > IRAM, RUN_START(IDL_A_CALBEG)}LOG_A_TABLEN = 1; _LOG_A_TABLEN = 1;PIP_A_TABLEN = 2;SECTIONS {.hwi_vec: {*(.hwi_vec)} run > IRAM align = 0x400, RUN_START(HWI_A_VECS), load> FLASHREST.gblinit:{} > FLASHREST.sysinit:{} > FLASHREST.sysdata: {} > IRAM.dsm: {} > IRAM.mem:{} > IRAM.gio:{} > IRAM.sys:{} > IRAM.sysregs: {} > IRAM.hwi: {}> IRAM.TSK_idle$stk: {*(.TSK_idle$stk)} > IRAM.TSK_Exec_NetCmd$stk: {*(.TSK_Exec_NetCmd$stk)} > IRAM.TSK_Exec_RADCMD$stk: {*(.TSK_Exec_RADCMD$stk)} > IRAM.bios:{} load > FLASHREST, run > IRAM.trcdata:{} load > FLASHREST, run > IRAM.rtdx_text: {} load > FLASHREST, run> IRAM/* LOG_system buffer */.LOG_system$buf: align = 0x100 {} > IRAM.rtdx_data: align = 0x40 { . += 0x80; *(.rtdx_data) }> IRAM/* RTA_fromHost buffer */.hst1: align = 0x4 {} > IRAM/* RTA_toHost buffer */.hst0: align = 0x4 {} > IRAM.args: align=4 fill=0 {*(.args). += 0x4;} > IRAM.trace: fill = 0x0align = 0x4 {_SYS_PUTCBEG = .;. += 0x200;_SYS_PUTCEND = . - 1;} > IRAM.hst: RUN_START(HST_A_TABBEG), RUN_START(_HST_A_TABBEG), RUN_END(HST_A_TABEND), RUN_END(_HST_A_TABEND) {} > IRAM.log: RUN_START(LOG_A_TABBEG), RUN_START(_LOG_A_TABBEG), RUN_END(LOG_A_TABEND), RUN_END(_LOG_A_TABEND) {} > IRAM.pip: RUN_START(PIP_A_TABBEG), RUN_START(_PIP_A_TABBEG), RUN_END(PIP_A_TABEND), RUN_END(_PIP_A_TABEND) {} > IRAM.sts: RUN_START(STS_A_TABBEG), RUN_START(_STS_A_TABBEG), RUN_END(STS_A_TABEND), RUN_END(_STS_A_TABEND) {} > IRAM.stack: align = 0x8 {GBL_stackbeg = .;*(.stack)GBL_stackend = GBL_stackbeg + 0x2800 - 1;_HWI_STKBOTTOM = GBL_stackbeg + 0x2800 - 8;_HWI_STKTOP = GBL_stackbeg;} > IRAM.IRAM$heap: {. += 0x40000;} RUN_START(IRAM$B), RUN_START(_IRAM_base), RUN_SIZE(IRAM$L), RUN_SIZE(_IRAM_length) > IRAM}myC6455.txt
/**Copyright 2007 by Texas Instruments Incorporated.*All rights reserved. Property of Texas Instruments Incorporated.*Restricted rights to use, duplicate or disclose this code are*granted through contract.**@(#) TCP/IP_Network_Developers_Kit 1.92.00.22 01-10-2007 (ndk-b22)*/ //-ldsk6455cfg.cmd/* // Specify below whether you want these NDK special memory sections to be // placed in a specific memory section. By default they are placed in the .far space. // //.far:NDK_PACKETMEM - Packet buffer memory (defined in HAL/OS libs) //.far:NDK_MMBUFFER- Scatchpad memory used by mmAlloc() //.far:NDK_OBJMEM- Large arrays (defined by example code only) */ SECTIONS {.boot_load : >FLASHBOOT.text: load = FLASHREST, run = IRAM.const: load = FLASHREST, run = IRAM.printf: load = FLASHREST, run = IRAM.cinit>FLASHREST.pinit>FLASHREST.switch>FLASHREST.binit>FLASHREST.bss>IRAM.far>IRAM.data>IRAM.cio>IRAM }
,
wang yanping:
请问下如何增加堆栈呢?谢谢
,
Nancy Wang:
您是直接将代码load到flash中的吗?在GEL文件中配置的读写时序?能否直接将代码放到内部ram或者DDR上跑了试一下。
堆栈可以直接在cmd中配heap和stack。
,
wang yanping:
我不太清楚是不是直接load到flash了,哪儿看出直接load到flash了。
,
wang yanping:
GEL用的系统自带的DSK6455.gel
,
wang yanping:
如何配置成load到RAM运行。具体在CMD怎么加堆栈呢,没改过,谢谢
,
Nancy Wang:
section部分指向IRAM。例如修改 .text > IRAM。
SECTIONS{ .boot_load : > FLASHBOOT
.text : load = FLASHREST, run = IRAM .const : load = FLASHREST, run = IRAM .printf : load = FLASHREST, run = IRAM .cinit > FLASHREST .pinit > FLASHREST .switch > FLASHREST .binit > FLASHREST
.bss > IRAM .far > IRAM .data > IRAM .cio > IRAM}
,
wang yanping:
我已经按照你说的把myc6455.cmd的全部改成IRAM了但是load的时候还是跑到B0000000 emifa ce3的地址去了
,
wang yanping:
4478.myC6455.txt
/**Copyright 2007 by Texas Instruments Incorporated.*All rights reserved. Property of Texas Instruments Incorporated.*Restricted rights to use, duplicate or disclose this code are*granted through contract.**@(#) TCP/IP_Network_Developers_Kit 1.92.00.22 01-10-2007 (ndk-b22)*/ //-ldsk6455cfg.cmd/* // Specify below whether you want these NDK special memory sections to be // placed in a specific memory section. By default they are placed in the .far space. // //.far:NDK_PACKETMEM - Packet buffer memory (defined in HAL/OS libs) //.far:NDK_MMBUFFER- Scatchpad memory used by mmAlloc() //.far:NDK_OBJMEM- Large arrays (defined by example code only) */ SECTIONS {.boot_load >IRAM.text> IRAM.const> IRAM.printf> IRAM.cinit>IRAM.pinit>IRAM.switch>IRAM.binit>IRAM.bss>IRAM.far>IRAM.data>IRAM.cio>IRAM }这是我修改成IRAM的cmd文件
,
wang yanping:
dsk6455cdb.txt这是cdb文件,由于后缀cdb不能上传,只能改成txt
,
wang yanping:
global STACKSIZE :: 10240 {
inst iHeapSize :: 0x8000 {
修改堆栈大小是不是cdb文件的以上2个地方?
,
Nancy Wang:
cbd文件早期ccs上的文件吗?现在已经不用了。都是在cmd文件中配置。
例如:
-stack 0x1000-heap 0x2000
,
wang yanping:
cdb文件是CCS3.3工程上面的;cmd文件是cdb生成的,所以只能在cdb改堆栈大小。
,
wang yanping:
从dsk6455cfg.cmd文件最后面内容看stack=0x2800 heap=0x4000,这个还要改大吗?
,
wang yanping:
现在load到emifa的nor flash,运行进不了main函数,昨天改了load到IRAM不起作用是哪儿的问题呢?
,
Nancy Wang:
在ccs3.3中是可以正常运行的是吗?导入例程试一下是否可以正常load。
以下链接有一个从ccs3.3移植到新版ccs的文档也仔细阅读看一下。
https://www.ti.com.cn/cn/lit/an/zhcaa58a/zhcaa58a.pdf
堆栈可以尝试加大看一下有没有帮助。
,
wang yanping:
CCS3.3是好的;例程在哪下载呢?;堆栈已经分别加大到0x100000 0x8000了是一样的效果;移植应该没问题都编译过了
,
Nancy Wang:
参考附件中的例子。
6888.dsk6455_v2.zip
,
wang yanping:
问题已经解决,配置成IRAM运行就可以了。