请教:load program时出错 显示data verification failed at address 0x3fffc0,应该怎么解决?
说明:我的是2812的板子,仿真器是XDS510PLUS(连接没问题),正在做一个正弦波来着,库文件用的是rts2800_ml.lib。
下面是我的CMD文件内容:
MEMORY
{
PAGE 0 : PROG(R) : origin = 0x3E8000, length = 0x10000
PAGE 0 : BOOT(R) : origin = 0x3FF000, length = 0xFC0
PAGE 0 : RESET(R) : origin = 0x3FFFC0, length = 0x2
PAGE 0 : VECTORS(R) : origin = 0x3FFFC2, length = 0x3E
PAGE 1 : M0RAM(RW) : origin = 0x000000, length = 0x400
PAGE 1 : M1RAM(RW) : origin = 0x000400, length = 0x400
PAGE 1 : L0L1RAM(RW) : origin = 0x008000, length = 0x2000
PAGE 1 : H0RAM(RW) : origin = 0x3F8000, length = 0x2000
}
SECTIONS
{
/* 22-bit program sections */
.reset : > RESET, PAGE = 0
vectors : > VECTORS, PAGE = 0
.pinit : > PROG, PAGE = 0
.cinit : > PROG, PAGE = 0
.text : > PROG, PAGE = 0
.cio : > PROG, PAGE = 0
/* 16-Bit data sections */
.const : > L0L1RAM, PAGE = 1
.bss : > L0L1RAM, PAGE = 1
.stack : > M1RAM, PAGE = 1
.sysmem : > M0RAM, PAGE = 1
/* 32-bit data sections */
.ebss : > H0RAM, PAGE = 1
.econst : > H0RAM, PAGE = 1
.esysmem : > H0RAM, PAGE = 1
}
C文件如下:
#include <stdio.h>
#include "Sine.h"
// gain control variable
int gain = INITIALGAIN; // 5
// declare and initalize a IO buffer //声明并初始化一个IO缓冲器
BufferContents currentBuffer;
// Define some functions
static void processing(); // process the input and generate output
static void dataIO(); // dummy function to be used with ProbePoint
void main()
{
puts("SineWave example started.\n");
while(TRUE) // loop forever
{
dataIO();
processing();
}
}
static void processing()
{
int size = BUFFSIZE;
while(size--){
currentBuffer.output[size] = currentBuffer.input[size] * gain; // apply gain to input
}
}
static void dataIO()
{
/* do data I/O */
return;
}
其中头文件Sine.h如下:
#ifndef TRUE
#define TRUE 1
#endif
// buffer constants
#define BUFFSIZE 0x64
#define INITIALGAIN 5
// IO buffer structure
typedef struct IOBuffer {
int input[BUFFSIZE];
int output[BUFFSIZE];
} BufferContents;