您好,我现在用DM8148开发DSP算法,现在DSP利用硬件仿真器,跟踪代码。现在遇到一个问题,DSP代码加载后,程序不能 跑到main函数,但是我用相同的.cmd文件,创建一个仅含有main函数的新工程,DSP端代码是可以跑到main()函数,我比较了 一下编译后的map文件,发现主要原因可能是.stack中 rts6740.lib : boot.obj (.stack)分配地址问题,在只有main()函数的空工程中,
rts6740.lib : boot.obj (.stack)指到了0x0080 0000地址(正好是DSP的启动地址),但是有代码的工程中,rts6740.lib : boot.obj (.stack)指到了0x0080 5f60地址,而这个地址不是DSP内核的启动地址。
如何设置使rts6740.lib : boot.obj (.stack)指定到0x0080 0000地址?
或者有其他的解决方法?请高手指点。急用。非常感谢!
下面是有两个工程的map文件:
有代码的map文件:
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.init_array
* 0 00800000 00000000 UNINITIALIZED
.text 0 00800000 00005f60
00800000 000015c0 DspProcLib.lib : LTELIB_DFT.obj (.text)
008015c0 00001580 : LTELIB_IDFT.obj (.text)
00802b40 00000de0 : Hog.obj (.text)
00803920 00000860 : Func.obj (.text)
00804180 00000700 : GaussianCor.obj (.text)
00804880 000004a0 : MainProc.obj (.text)
00804d20 00000260 rts6740_elf.lib : imath64.obj (.text:__c6xabi_divull)
00804f80 00000180 DspProcLib.lib : DftIdft2.obj (.text)
00805100 00000180 rts6740_elf.lib : copy_decompress_rle.obj (.text:__TI_decompress_rle_core)
00805280 00000120 Test.obj (.text)
008053a0 00000120 rts6740_elf.lib : imath64.obj (.text:__c6xabi_divlli)
008054c0 00000100 : autoinit.obj (.text:_auto_init_elf)
008055c0 00000100 : cpy_tbl.obj (.text:copy_in)
008056c0 000000e0 : divi.obj (.text:__divi)
008057a0 000000e0 : copy_zero_init.obj (.text:decompress:ZI:__TI_zero_init)
00805880 000000e0 : memset.obj (.text:memset)
00805960 000000c0 : exit.obj (.text:exit)
00805a20 000000c0 : tls.obj (.text:tls:init:__TI_tls_init)
00805ae0 000000a0 DspProcLib.lib : Com.obj (.text)
00805b80 000000a0 rts6740_elf.lib : memcpy64.obj (.text:memcpy)
00805c20 00000080 : llshift.obj (.text:__c6xabi_llshl)
00805ca0 00000080 : boot.obj (.text:_c_int00)
00805d20 00000060 : cpp_init.obj (.text:__TI_cpp_init)
00805d80 00000060 : imath64.obj (.text:_subcull)
00805de0 00000040 : llshift.obj (.text:__c6xabi_llshru)
00805e20 00000040 : args_main.obj (.text:_args_main)
00805e60 00000040 : abs.obj (.text:llabs)
00805ea0 00000020 : negll.obj (.text:__c6xabi_negll)
00805ec0 00000020 : push.obj (.text:__pop_rts)
00805ee0 00000020 : push.obj (.text:__push_rts)
00805f00 00000020 : exit.obj (.text:abort)
00805f20 00000020 : copy_decompress_none.obj (.text:decompress:none:__TI_decompress_none)
00805f40 00000020 : copy_decompress_rle.obj (.text:decompress:rle24:__TI_decompress_rle24)
.stack 0 00805f60 00000800 UNINITIALIZED
00805f60 00000008 rts6740_elf.lib : boot.obj (.stack)
00805f68 000007f8 --HOLE--
仅有主函数的工程map文件:
SECTION ALLOCATION MAP
output attributes/
section page origin length input sections
-------- ---- ---------- ---------- ----------------
.pinit 0 00800000 00000000 UNINITIALIZED
.stack 0 00800000 00000800 UNINITIALIZED
00800000 00000008 rts6740.lib : boot.obj (.stack)
00800008 000007f8 --HOLE--
.bss 0 00800000 00000000 UNINITIALIZED
.data 0 00800000 00000000 UNINITIALIZED
.text 0 00800800 00000420
00800800 000000c0 rts6740.lib : autoinit.obj (.text:__auto_init)
008008c0 000000c0 : exit.obj (.text:_exit)
00800980 000000a0 : cpy_tbl.obj (.text:_copy_in)
00800a20 000000a0 : memcpy64.obj (.text:_memcpy)
00800ac0 00000080 : boot.obj (.text:_c_int00)
00800b40 00000060 : cpp_init.obj (.text:___TI_cpp_init)
00800ba0 00000040 : args_main.obj (.text:__args_main)
00800be0 00000020 : exit.obj (.text:_abort)
00800c00 00000020 main.obj (.text)