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.

CCS/TMS320F28335: CCS by adding a line in each line of the program automatically, disrupting the debugging process

Part Number: TMS320F28335

Tool/software: Code Composer Studio

At The editor, when opening the source file, it adds a blank line in each line of the program automatically, but this occurs only a part of the source code. When debugging, the debug cursor does not match the line of the code. I notice that this happens from the moment when appears  "{"  ending this error after  "}". I will plaxe here that part of the code and the lost debugging process cursor.

A part of the code that has this error:

fZOH22 = fTI_ADC1_1;

fP13 = fZOH22 * kc;
{     // <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<APARTIR DA AQUI, ACONTECE ISSO: LINHAS em branco adicionadas automaticamente
//==========PLL triffásico, Q-PLL TODO

static float Val, Vbe,ql,theta, uk, ek, e1k, sincmag, resul; //

static unsigned int pin; static unsigned int ok; static unsigned int mag2;

static float senoang;

static float theta1k = 0; static float u1k = 0;

static unsigned int freq = 0; static unsigned int contp = 0; static unsigned int contn = 0;

static unsigned int semiciclo = 0;

//=======Transformada de Clark=========

Val=fP14*0.8164-0.408*(fkb+fP13);//componente alfa

Vbe=0.7071*(fkb-fP13); //componente beta

//==========q-PLL========

ql=(Vbe*sin(theta) + Val*(cos(theta)));//calcula q ficticio

ek=-ql; // erro = 0 - ql;

uk=u1k+5.14*ek-5.109*e1k; //controlador PI

e1k=ek; u1k=uk; //shift all data

//uk=uk+377; //feedforward, nao vi vantagem

theta = theta1k+(0.01*uk); // Integrador

if(theta>3.1416) theta=theta-6.2832; //limitador para o ângulo, formato de dente de serra

else if(theta<-3.1416) theta =theta+6.2832;

theta1k=theta;

//o sinal de uk é a sequencia das fases, se positivo (fP14,fkb,fP13 , ABC) ou negativo (fP14,fP13,fkb , ACB)

////Algoritmo de proteção contra falta de fase, e confirmação da fr e de fsw

senoang = sin(theta);

//no fim das contas, está subtraindo, dando uma senoidizinha E verifica se as três fases //estão presentes

// talvez usar sinal de erro do PLL ao inves de abs(fP14 + senoang)

sincmag = (fP14 + senoang); resul= (fP14+fkb+fP13); // MAGNITUDE

if ( ( (sincmag < 0.2) && (sincmag > -0.2) ) && ( (resul < 0.4) && (resul > -0.4)) ) //

mag2=1; //mudei aqui

else mag2=0;

//Frequencia do PWM mais a rede e mostra por um divisor de clock a frequencia da rede

if (senoang > 0 ) { //FREQUENCIA

contp = contp+1;

if (contn != 0)

if ( (contn > 198) && (contn < 218) )

{ freq =1; semiciclo = semiciclo +1; } else freq = 0;

contn = 0;

}

else

{

contn = contn+1;

if (contp != 0)

if ( (contp > 198) && (contp < 218) )

{ freq =1; semiciclo= semiciclo +1; } else freq = 0;

contp = 0;

}

//

//piscar

if ( semiciclo > 60 ) {

semiciclo=0;

if (mag2 && freq ) //toga se tudo ok! mag e frequencia ok

{ ok =1; if (pin) pin =0; else pin =1; } ///1 Hz para rede de 60 Hz

else ok = 0;

} //toggle apenas se ta tudo ok.

///Fim do algoritmo

//Externar

fD=(theta + 3.1416); // (theta + 3.1415) é sempre em fase com a senoide X1 não importando a sequencia das fases // theta está em rad.

fD_1=mag2;

fD_2= ek; // sin(theta+ 3.1416);

fD_3 = pin;
}
#ifdef _DEBUG
fGbltheta_real = fD;
#endif

Lost debugging process cursor, the cursor starts incorrectly at the line 571

  • Hello,

    Francisco Reis said:
    At The editor, when opening the source file, it adds a blank line in each line of the program automatically, but this occurs only a part of the source code.

    I've never heard of such an issue. How is the source file opened? Do you manually open it by selecting it in the Project Explorer?

    Francisco Reis said:
    When debugging, the debug cursor does not match the line of the code. I notice that this happens from the moment when appears  "{"  ending this error after  "}"

    Yes since the source file has changed after you built it, the debug symbols will not match - which will impact source debugging. This is expected due to the first issue reported.

    Can you try using CCS with a brend new workspace folder and see if the issue continues?

    Thanks

    ki

  • Hi ki, how are you? I open it by selecting it in the Project Explorer and the problem continues. But, the file itself contains those spaces between the lines. If I open the file PLL1.c in Wordpad, I didn't see those spaces. I tried open it In notepad, however, I can see them. I tried everything that I could to solve it.

  • Did you try using a new clean workspace folder?
  • Hello,
    I haven’t heard back from you, hence this issue is being closed. If you wish to continue the discussion, please post a reply with an update below (or create a new thread).

    Thanks,
    ki

  • Yes, I did. The problem continued. Now, I have another issues to solve too. Thanks a lot for your attention.