共2条
1/1 1 跳转至页
TMS5000 初次学TMS5000的编译问题请教!!
问
刚开始学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下编译通不过!请高手指点下吧。
就一个汇编文件和一个连接命令文件
========================
汇编文件如下:
.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 跳转至页
回复
有奖活动 | |
---|---|
【有奖活动】分享技术经验,兑换京东卡 | |
话不多说,快进群! | |
请大声喊出:我要开发板! | |
【有奖活动】EEPW网站征稿正在进行时,欢迎踊跃投稿啦 | |
奖!发布技术笔记,技术评测贴换取您心仪的礼品 | |
打赏了!打赏了!打赏了! |
打赏帖 | |
---|---|
与电子爱好者谈读图二被打赏50分 | |
【FRDM-MCXN947评测】Core1适配运行FreeRtos被打赏50分 | |
【FRDM-MCXN947评测】双核调试被打赏50分 | |
【CPKCORRA8D1B评测】---移植CoreMark被打赏50分 | |
【CPKCORRA8D1B评测】---打开硬件定时器被打赏50分 | |
【FRDM-MCXA156评测】4、CAN loopback模式测试被打赏50分 | |
【CPKcorRA8D1评测】--搭建初始环境被打赏50分 | |
【FRDM-MCXA156评测】3、使用FlexIO模拟UART被打赏50分 | |
【FRDM-MCXA156评测】2、rt-thread MCXA156 BSP制作被打赏50分 | |
【FRDM-MCXN947评测】核间通信MUTEX被打赏50分 |