调试时出现错误:Error connecting to the target:Connect to PRSC failed。求解?
首先程序没有问题,仿真器也能连上, test connection没有问题,这个PRSC是什么?
主芯片用的是OMAPL138BZWTA3,板子是根据TMDSLCDK138开发板改的自己做的板子......
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
调试时出现错误:Error connecting to the target:Connect to PRSC failed。求解?
首先程序没有问题,仿真器也能连上, test connection没有问题,这个PRSC是什么?
主芯片用的是OMAPL138BZWTA3,板子是根据TMDSLCDK138开发板改的自己做的板子......
你好,板子的电源模块是使用的电源芯片是TPS65070。电路设计这一块跟TPS65070提供的参考电路基本一致,输出3V3,1V8,1V2。在用万用表测量电压的时候显示的是3.29V 1.80V 1.29V。然后我运行了一个小程序结果能跑通。但是有的程序就出现第一楼说的PRSC问题。
能跑通的程序如下:
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <stdio.h>
#define INITIAL 0
#define STEP 100
#define TURN 40
int max(float d[4])
{
int i,c=0,num;
float max;
max=d[0];
for(i=1;i<4;i++){
if(d[i]>max)
{
max=d[i];
c=i;
}
else
if(d[i]==max)
{
num=rand()%2;
if(num==0)
{
max=d[i];
c=i;
}
}
}
return(c);
}
float q_max(float d[4])
{
int i;
float max;
max=d[0];
for(i=1;i<4;i++)
if(d[i]>max)
max=d[i];
return(max);
}
int main()
{
int max(float d[4]);
float q_max(float d[4]);
int i,j,a,r,s,sn,x,y;
float qn,gama=0.5;
srand((unsigned) time(NULL));
int reward[12][4]={
{-20,-10,-20,-10},
{-20,-10,-20,-10},
{-20,-20,-20,-10},
{-20,-10,-20,-20},
{-20,-10,-20,-10},
{-20,-10,-20,-20},
{-20,-10,-20,-10},
{-20,-10,-20,-20},
{-20,-20,-20,-10},
{-20,-20,-20,-10},
{-20,-20,-20,-10},
{0,0,0,0}};
int s_next[12][4]={
{0,4,0,1},
{1,5,0,2},
{2,6,1,3},
{3,7,2,3},
{0,8,4,5},
{1,9,4,6},
{2,10,5,7},
{3,11,6,7},
{4,8,8,9},
{5,9,8,10},
{6,10,9,11},
{7,11,10,11}};
float q[12][4]={
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0},
{0,0,0,0}};
for(j=1;j<=TURN;j++){
s=INITIAL;
for(i=1;i<=STEP;i++)
{
printf("s(%d)(%d)=%d ",j,i,s);
if(s==11) {
printf("\n\n");break;}
a=max(q[s]);
r=reward[s][a];
sn=s_next[s][a];
qn=q_max(q[sn]);
q[s][a]=r+gama*qn;
s=sn;
}
}
for(x=0;x<12;x++){
for(y=0;y<4;y++)
printf("%f ",q[x][y]);
printf("\n");}
return 0;
}