Flashing Issue KV10

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Flashing Issue KV10

跳至解决方案
1,724 次查看
robert2000
Contributor II
  • I Use KDS (Version3.2.0) with Processor Expert. The processor is MKV10Z32 and my emulator is PE Multilink Universal.For the first time, I get a flashing Issue :

    I was able to easily create a project, create and configure LDD Component, Generated software,built the project, and debug software. Then the project is running well on the emulator.

    But, if I flash, I get a File (No source available for "0xfffffffe") and when I reboot(with power on), I get get a programm running with value at zero.

    Nota : If I run the program under emulator, and then I disconnect the emulator without power off/on, the application continue to run well.

    Thanks for help

    Application is an IMU sending data to Teraterm terminal via SCI1.

    pastedImage_3.png

    Screenshot on emulator (or when I disconnect the emulator without power off/on: Values are OK

    pastedImage_4.png

    Screenshot on micro after flash and power on: Values are zeros everywhere

0 项奖励
回复
1 解答
1,535 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Bele,

- Please check whether there  is printf() to console function or other debug code in your project,

if yes, please delete .

- Have you try other simple project ? I just want to confirm whether it is the project problem.

 

Hope it helps

Alice

在原帖中查看解决方案

4 回复数
1,535 次查看
BlackNight
NXP Employee
NXP Employee

"No source available.." basically means that the debugger cannot find the source file for that given address. One reason could be that you have turned off debug information (see No Source Available… | MCU on Eclipse )?

I hope this helps,

Erich

1,535 次查看
robert2000
Contributor II

Hello Erich

Thanks a lot for your answer.

There is may be a sprint function Issue as mentionned by Alice

But the « No source available for "0xfffffffe" «  is may be be another real Issue. I read your note and try to go to eclipse menue. But KDS has a different presentation and I didn't find out the strip symbolic information.

I went through the preference menue and find the following.

pastedImage_1.png

Do you have any idea ?

Best Regards

Robert

0 项奖励
回复
1,536 次查看
Alice_Yang
NXP TechSupport
NXP TechSupport

Hello Bele,

- Please check whether there  is printf() to console function or other debug code in your project,

if yes, please delete .

- Have you try other simple project ? I just want to confirm whether it is the project problem.

 

Hope it helps

Alice

1,535 次查看
robert2000
Contributor II

Hello Alice, Thanks a lot for your answer.

There is something right in what you are investigating.

As, I mentionned in my note this an IMU application.

I do not use print but I use sprint to convert float to char for gyro and Acc Measurments. And I have the Issue.

But for the GPS application at this point, I doesn't use sprint. And the flashing is OK.

In fact,as sprintf is not working for float, I did 2 functions to convert float to char(using sprintf only for int) and send via SCI1 (Sorry it's french base):

///////////////////////////////////////////////////////////////////////////////////////////////////////////

// float_Ndeci_vers_char(float nombreFlottant, uint8_t Ndecis, char resultat[])

// -----------------------------------------------------------------------------

// convertir un nombre float vers une chaine de caracteres

// avec 9 chiffres entiers maximum et 3 chiffres decimaux due a la limitation de uint32_t <= 4 294 967 296

///////////////////////////////////////////////////////////////////////////////////////////////////////////

void float_3deci_vers_char(float nombreFlottant, char resultat[])

{

//float p1, p2;

uint32_t int1, int2, longueur_entier, longueur_decimal;

char virgule[1], zero[1], resultat_entier[10], resultat_decimal[10];

virgule[0] = ',';

zero[0] = '0';

//definir le signe

if (nombreFlottant>=0) {resultat[0]= '+';}

else {resultat[0]= '-'; nombreFlottant = - nombreFlottant;}

int1 = (int32_t)(nombreFlottant);

if(int1 >= 1000000000) {resultat[0]= 'F';} //limitation uint32_t indication F = Faux

sprintf(resultat_entier,"%d",int1); //calcul resultat_entier[] = chaine partie entiere

longueur_entier = strlen(resultat_entier);

strcat(resultat, resultat_entier); //calcul chaine resultat: on ajoute resultat_entier au signe

resultat[1+longueur_entier]= ',';//calcul chaine resultat: on ajoute virgule au resultat_entier et signe

int2 = (int32_t)(1000*(nombreFlottant-int1)) ;

sprintf(resultat_decimal,"%d",int2); //calcul resultat_decimal[] = chaine partie decimale

longueur_decimal = strlen(resultat_decimal);

if(longueur_decimal < 3) //si le nombre de chiffre decimaux est inferieur au nombre de fiche affiché,

{

uint8_t i = 0 ;

uint8_t imax ;

imax = 3 - longueur_decimal; //Nombre de zeros manquants aprés la virgule

for(i = 0; i < imax ; i++)

{

resultat[1+longueur_entier+1+i] = '0'; //Rajouter des zeros aprés la virgule

}

}

strcat(resultat, resultat_decimal); //calcul chaine resultat: on ajoute resultat_decimal au virgule, resultat_entier et signe

} //Fin float_Ndeci_vers_char(float nombreFlottant, uint8_t Ndecis, char resultat[])

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

* Fonction : void Envoi_Chaine_SCI1(char index_debut[], char chaine[], char index_fin[])

* Description : Envoi une chaine avec un index de debut et un index de fin

* Entrée : (char index_debut[], char chaine[], char index_fin[]

* Sortie : void

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

//void float_5deci_vers_char(char index_debut[], float nombreFlottant_5decis, char resultat[], char index_fin[]);

void Envoi_Chaine_SCI1(char index_debut[], char chaine[], char index_fin[])

{

uint16_t nombreDeCaracteres = 0;

nombreDeCaracteres= strlen(index_debut)+strlen(chaine)+strlen(index_fin)+1;

char message_envoi[nombreDeCaracteres];

strcpy(message_envoi, index_debut);

strcat(message_envoi, chaine); //Concatenation Entete Chaine de caracteres M_MIN_X

strcat(message_envoi, index_fin); //Concatenation Entete Chaine de caracteres M_MIN_X

DrapeauEnvoi_SCI1 = FALSE; //

Erreur = SCI1_SendBlock(Pointeur_SCI1, message_envoi, nombreDeCaracteres);

while (!DrapeauEnvoi_SCI1) {};

uint8_t i;

for ( i = 0 ; i < strlen(chaine) ; i ++)

{

chaine[i] = 0;

}

}

Best Regards

0 项奖励
回复