这是我的.CMD文件:
-stack 40
MEMORY { PAGE 0: /* PROGRAM MEMORY */ PM: ORIGIN=0h, LENGTH=08000h /* 32k on-chip flash memory */ SARAM_P:ORIGIN=08000h, LENGTH=0800h /* 2k saram in program space */ EX1_PM: ORIGIN=08800h, LENGTH=07600h /* extern ram*/ B0_PM: ORIGIN=0FF00h, LENGTH=0100h /* on-chip daram if cnf = 1,else extern B0 =FF00h TO FFFFh*/ PAGE 1: /* DATA MEMORY */ REGS: ORIGIN=0h, LENGTH=60h /* memory mapped registers */ BLK_B2: ORIGIN=60h, LENGTH=20h /* block b2 */ BLK_B0: ORIGIN=200h, LENGTH=100h /* block b0,if cnf=0 */ BLK_B1: ORIGIN=300h, LENGTH=100h /* block b1 */ SARAM_D:ORIGIN=0800h, LENGTH=0800h /* 2K SARAM in data space */ PERIPH: ORIGIN=7000h, LENGTH=1000h /* peripheral registers space */ EX2_DM: ORIGIN=8000h, LENGTH=8000h /* external data ram */ PAGE 2: IO_EX: ORIGIN=0000h, LENGTH=0FFF0h /* external io mapped peripherals */ IO_IN: ORIGIN=0FFF0h, LENGTH=0Fh /* on-chip io mapped peripheral */ }
SECTIONS { .vectors:{}> PM PAGE 0 .text: {}> PM PAGE 0 .data: {}> BLK_B1 PAGE 1 .data_PRM: {}> BLK_B2 PAGE 1 .STACKS: {}> BLK_B0 PAGE 1 }
这是我在程序中定义的变量: STACK .usect "STACKS",40h FLAGL .usect "data_PRM",1 FLAGH .usect "data_PRM",1 INCL .usect "data_PRM",1 INCH .usect "data_PRM",1
编译程序时,编译出错了: STACK .usect "STACKS",40h "PWM.asm", line 9: INVALID OPCODE
FLAGL .usect "data_PRM",1 "PWM.asm", line 10: INVALID OPCODE
FLAGH .usect "data_PRM",1 "PWM.asm", line 11: INVALID OPCODE
INCL .usect "data_PRM",1 "PWM.asm", line 12: INVALID OPCODE
INCH .usect "data_PRM",1 "PWM.asm", line 13: INVALID OPCODE
不知道为什么编译通不过,请知道的帮忙解决.
|