|
刚刚开始学习DSP哈,我看了《DSP C2000程序员高手进阶》里第二章中一个简单的工程实例,我是原原本本写下里面的程序,但是在调试的时候就会有这个错误,[E0002] Invalid mnemonic specification 谢谢大家指点哦!!!
我的程序如下:
(1)everctors.asm
.ref _c_int0
.sect "vectors"
rset : B _c_int0 : 00h reset
int1 : B int1 : 02h INT1
int2 : B int2 : 04h INT2
int3 : B int3 : 06h INT3
int4 : B int4 : 08h INT4
int5 : B int5 : 0Ah INT5
int6 : B int6 : 0Ch INT6
(2)roam.cmd
-stack512
-m hello.map
MENMORY
{
PAGE0:
VECS : origin = 0x0000, length = 0x0040
flash : origin = 0x1044, length = 0x6f00
SARAM_P : origin = 0x8000, length = 0x0800
PAGE1:
B0B1 : origin = 0x0200, length = 0x0200
B2 : origin = 0x0060, length = 0x0020
SARAM_D : origin = 0x0800, length = 0x0800
RAM : origin = 0xa000, length = 0x7ff0
}
SECTIONS
{
vectors : load = VECS PAGE0
.text : load = flash PAGE0
.cinit : load = flash PAGE0
.switch : load = flash PAGE0
.const : load = RAM PAGE1
.bss : load = RAM PAGE1
.stack : load = B0B1 PAGE1
}
(3)hello.c
#define WDCR (*((volatile unsigned int *)0x7029)) //WD Control reg
#define WDKEY (*((volatile unsigned int *)0x7025)) //WD Key reg
#include<stdio.h>
void main(void)
{
WDCR = 0x0068;
WDKEY= 0x0055;
WDKEY= 0x00aa;
printf("hello,DSP world\n");
for(;;);
} |
阿莫论坛20周年了!感谢大家的支持与爱护!!
曾经有一段真挚的爱情摆在我的面前,我没有珍惜,现在想起来,还好我没有珍惜……
|