微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 硬件电路设计 > TI模拟硬件电路设计 > memory 的错误报告

memory 的错误报告

时间:10-02 整理:3721RD 点击:
Error: Memory Map Error: WRITE access by CPU to address 0xfffff5a0, which is RESERVED in Hardware.
不知道怎么修改啊

被这个问题卡了很久了

MEMORY
{
ISRAM : origin = 0x0, len = 0x100000
}

SECTIONS
{
.vectors > ISRAM
.text > ISRAM

.bss > ISRAM
.cinit > ISRAM
.const > ISRAM
.far > ISRAM
.stack > ISRAM
.cio > ISRAM
.sysmem > ISRAM
}
我的cmd文件在这里啊,
是在不知道怎么回事,我刚刚改变了以下那个地址,结果现在就出现这样的错误
Loader: One or more sections of your program falls into a memory region that is not writable. These regions will not actually be written to the target. Check your linker configuration and/or memory map.
我gel文件
StartUp()
{
/* C64xx sim specific memory mapping */
GEL_MapOn();
GEL_MapReset();

GEL_MapAdd(0x000F0000,0,0x10000000,1,1); /* flat memory */

/* uncomment the following line to initialize the
EMIF registers on the C6x when Code Composer starts up */

emif_init();
}

/* OnReset callback function called after the target processor has been reset */
OnReset(int nErrorCode)
{
if (nErrorCode)
{
GEL_TextOut(\"An error occured while resetting -%d-\\n\",nErrorCode);
}
else
{
emif_init();
}
}

/*
* Menuitem creates a selection available beneath the GEL
* menu selection in Code Composer Studio.
*/
menuitem \"Resets\";

hotmenu Reset_and_EMIF_Setup()
{
GEL_Reset();
emif_init();
}

hotmenu ClearBreakPts_Reset_EMIFset()
{
GEL_BreakPtReset();
GEL_Reset();
emif_init();
}

/*********************************************/

emif_init()
{
#define EMIFA_GCTL 0x01800000
#define EMIFA_CE1 0x01800004
#define EMIFA_CE0 0x01800008
#define EMIFA_CE2 0x01800010
#define EMIFA_CE3 0x01800014
#define EMIFA_SDRAMCTL 0x01800018
#define EMIFA_SDRAMTIM 0x0180001c
#define EMIFA_SDRAMEXT 0x01800020
#define EMIFA_CE1SECCTL 0x01800044
#define EMIFA_CE0SECCTL 0x01800048
#define EMIFA_CE2SECCTL 0x01800050
#define EMIFA_CE3SECCTL 0x01800054

#define EMIFB_GCTL 0x01A80000
#define EMIFB_CE1 0x01A80004
#define EMIFB_CE0 0x01A80008
#define EMIFB_CE2 0x01A80010
#define EMIFB_CE3 0x01A80014
#define EMIFB_SDRAMCTL 0x01A80018
#define EMIFB_SDRAMTIM 0x01A8001c
#define EMIFB_SDRAMEXT 0x01A80020
#define EMIFB_CE1SECCTL 0x01A80044
#define EMIFB_CE0SECCTL 0x01A80048
#define EMIFB_CE2SECCTL 0x01A80050
#define EMIFB_CE3SECCTL 0x01A80054

/* EMIFA */
*(int *)EMIFA_GCTL = 0x00012070;
*(int *)EMIFA_CE0 = 0xffffffd3; /* CE0 SDRAM */
*(int *)EMIFA_CE2 = 0x22a28a22; /* CE2 Daughtercard 32-bit async */
*(int *)EMIFA_CE3 = 0x22a28a22; /* CE3 Daughtercard 32-bit async */
*(int *)EMIFA_SDRAMCTL = 0x47115000; /* SDRAM control */
*(int *)EMIFA_SDRAMTIM = 0x00000618; /* SDRAM timing (refresh) */
*(int *)EMIFA_SDRAMEXT = 0x000a8529; /* SDRAM extended control */

/* EMIFB */
*(int *)EMIFB_GCTL = 0x00002070;
*(int *)EMIFB_CE0 = 0x22008800; /* CE0 CPLD 8-bit */
*(int *)EMIFB_CE1 = 0x22008800; /* CE1 Flash 8-bit */
}

如果是cmd文件错误,为什么运行别的程序的时候没有问题,一但我们运行下面这一段随机数产生程序时候就有问题了呢

#include<stdio.h>
#include\"stdlib.h\"
#include\"volume.h\"
#include \"math.h\"
#include <time.h>

float gaussian_random(void);
float uniform_random(void);

void main()
{
int N=0;
float number[10000];
srand( (unsigned)time( NULL ) );
for(N=0;N<10000;N++)
{
number[N]=gaussian_random();
printf(\"%f \",number[N]);

}
}

float gaussian_random(void)
{
static int next_gaussian=0;
static float saved_gaussian_value;
float fac,rsq,v1,v2;
if(next_gaussian==0)
{
do {
v1 = 2.0*uniform_random()-1.0;
v2 = 2.0*uniform_random()-1.0;
rsq = v1*v1+v2*v2;
}
while(rsq>= 1.0||rsq==0.0);
fac=sqrt(-2.0*log(rsq)/rsq);
saved_gaussian_value=v1*fac;
next_gaussian=1;
return v2*fac;
}
else
{
next_gaussian=0;
return (saved_gaussian_value);
}
}

float uniform_random(void)
{

return((float)rand()/(float)RAND_MAX);
}
网上下载的程序

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top