这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 综合技术 » 基础知识 » TMS5000 初次学TMS5000的编译问题请教!!

共2条 1/1 1 跳转至

TMS5000 初次学TMS5000的编译问题请教!!

院士
2006-09-17 18:14:16     打赏
TMS5000 初次学TMS5000的编译问题请教!!



关键词: TMS5000     初次     编译     问题     请教    

院士
2006-12-22 22:43:00     打赏
2楼
问 刚开始学DSP,程序是照书上抄写的,但是编译不通过。请指点。
就一个汇编文件和一个连接命令文件
========================
汇编文件如下:

  .title "mac.asm"
  .mmregs
  .def start
  SIZE   .set 100
  stack  .usect "STK",SIZE
  SEGSEL .set 0001b
  SEGSELPORT .set 0h
  SEGPORT .set 1h
         .bss SEG_DATA,10
         .bss x,5
         .bss z,1
         .data
     table0: .word 1,2,3,4,5
  SEG_VALUE .word 077h,014h,0b3h,0b6h,0d4h,0e6h,0e7h,034h,0f7h,0f6h
         .text

  start:stm #stack+SIZE,sp
         stm #2b40h,ST1
         stm #1e00h,ST0
         stm #02024h,PMST
         stm #0h,SWWSR
         stm #04007h,CLKMD
       
       stm #SEG_DATA,AR3
       rpt #9
       mvpd SEG_VALUE,*AR3+
       stm #x,AR1
       rpt #4
       mvpd table0,*AR1+
       call sum
       ld #SEGSEL,B
       portw *(0bH),SEGSELPORT
       stlm A,AR0
       stm #SEG_DATA,AR7
       nop
       mar *AR7+0
       nop
       portw *AR7,SEGPORT
end:   b end

sum:   stm #x,AR3
       rptz A,#4
       add *AR3,A
       stm #z,AR4
       stl A,*AR4
       ret
       .end
       
============================
连接命令文件如下:
mac.obj
-o mac.out
-m mac.map
-e start
MEMORY
{
PAGE 0:
       EPROM :org=02000h,len=200h
PAGE 1:
       SPRAM :org=0060h,len=001fh
       DARAM :org=0080h,len=100h       
}
SECTIONS
{
.text :>EPROM PAGE 0
.data :>EPROM PAGE 0
.bss  :>SPRAM PAGE 1
.stack:>DARAM PAGE 1
}


============================           
但是编译就是不通过。是不是项目文件里还要加别的库文件,还是头文件。
出错信息如下:

------------------  test1.pjt - Debug  -----------------------------
"c:\ti\c5400\cgtools\bin\cl500" -g -q -fr"D:/DSP/test1/Debug" -d"_DEBUG" -@"De
bug.lkf" "mac.asm"
<mac.asm>
"mac.asm", ERROR!   at line 3: [E0300] start is not defined in this source fil
e
      .def start

"mac.asm", ERROR!   at line 4: [E0002] Invalid mnemonic specification
      SIZE   .set 100

"mac.asm", ERROR!   at line 5: [E0002] Invalid mnemonic specification
      stack  .usect "STK",SIZE

"mac.asm", ERROR!   at line 6: [E0002] Invalid mnemonic specification
      SEGSEL .set 0001b

"mac.asm", ERROR!   at line 7: [E0002] Invalid mnemonic specification
      SEGSELPORT .set 0h

"mac.asm", ERROR!   at line 8: [E0002] Invalid mnemonic specification
      SEGPORT .set 1h

"mac.asm", ERROR!   at line 13: [E0002] Invalid mnemonic specification
         table0: .word 1,2,3,4,5

"mac.asm", ERROR!   at line 14: [E0002] Invalid mnemonic specification
      SEG_VALUE .word 077h,014h,0b3h,0b6h,0d4h,0e6h,0e7h,034h,0f7h,0f6h

"mac.asm", ERROR!   at line 17: [E0002] Invalid mnemonic specification
      start:stm #stack+SIZE,sp

"mac.asm", ERROR!   at EOF: [E0300] The following symbols are undefined:
  SEGPORT
  table0
  SEGSELPORT
  SEGSEL
  SEG_VALUE

Errors in Source - Assembler Aborted

Build Complete,
  11 Errors, 0 Warnings, 0 Remarks.
  
     

--
1: 谁帮我解释下吧,程序应该没有问题,但是在CCS下编译通不过!请高手指点下吧。

共2条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]