Debugging difficult with KDS and breakpoint

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

Debugging difficult with KDS and breakpoint

5,335 次查看
holyhope
Contributor III

Hi to all,

I'm developing on KDS 2.0.0 on K20 with P&EMicro Multilink-Universal

When I try to put a breakpoint when my code is running:

- sometime (very rarely) the code stop on the correct code and I debug 1 or 2 or 3 instruction, after that my code stuck and it is impossible to debug (debug console return me PE-error: code execution)

- other time, the code stuck and it is impossible to debug never 1 code line!

in all case, it is impossible to restart code (with F8) but I must to stop debug session and restart debugging.

I try to delete "debug" folder and perform a "clean" (that not work because theren't file anymore, deleting debug folder)

But still not working!

 

I find this description on debug console:

 

Initializing.

Target has been RESET and is active.

Interrupt command received. Halting execution.

Preset breakpoint encountered.

 

Unable to go into background mode.

 

Error communicating to target processor - try a RESET.

 

PE-ERROR: TARGET IS RUNNING

 

when I get this error I tryied to place a breakpoint in running code.

Now the code stop in this point but when I press F6 (step over) my code stuck... and I give this error!

 

I have a timer and I try to disable the "run on debug" .

 

I'm using FreRtos but if I acrtive only  1 task I still have the some problem.

 

Another information: sometime, after I found this problem KDS open me the "_isr_vector.c" and NOT find it and give me on principal page "No source available for __Isr_vector".

Other time KDS open me the window called "0x530" instead "isr_vector".

 

what I can do?

 

Another Info: I'm developing on K20 vith KSDK so I have set K60 on KSDK but my uP is K20 and in debug config I set K20 (as suggest from FreeScale )

 

Many thanks,

Massimiliano

 

EDIT:

 

i have an update.

i try this code (without SDK):

 

/* Including needed modules to compile this module/procedure */

#include "Cpu.h"

#include "Events.h"

#include "FRTOS1.h"

#include "UTIL1.h"

/* Including shared modules, which are used for whole project */

#include "PE_Types.h"

#include "PE_Error.h"

#include "PE_Const.h"

#include "IO_Map.h"

/* User includes (#include below this line is not maintained by Processor Expert) */

 

 

static void vSHELLProcess ( void *pvParameters );

static void vMBPollingProcess ( void *pvParameters );

static void vSENSORSProcess ( void *pvParameters );

#define SHELLPROCESS_PROC_NAME "ShellProcess"

#define SENSORSPROCESS_PROC_NAME "SensorsProcess"

#define MB_PROC_NAME "MBPollingProcess"

#define ADCPROCESS_PROC_NAME "ADCProcess"

#define PRIORITY_WANTED(Wanted_priority)  configMAX_PRIORITIES - (Wanted_priority) -2

#define SHELL_PROCESS_PRIORITY PRIORITY_WANTED( 2 )

#define SENSORS_PROCESS_PRIORITY PRIORITY_WANTED( 3 )

#define MODBUS_PROCESS_PRIORITY PRIORITY_WANTED( 4 )

#define ADC_PROCESS_PRIORITY PRIORITY_WANTED( 5 )

/*lint -save  -e970 Disable MISRA rule (6.3) checking. */

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

 

 

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

 

 

  /* Write your code here */

  /* For example: for(;;) { } */

 

 

  TaskHandle_t xTaskSHELLProcess;

  TaskHandle_t xTaskMBSProcess;

  TaskHandle_t xTaskSENSORSProcess;

 

 

  xTaskCreate(vSHELLProcess, (uint8_t*)SHELLPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, SHELL_PROCESS_PRIORITY, &xTaskSHELLProcess );

  xTaskCreate(vMBPollingProcess, (uint8_t*)MB_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, MODBUS_PROCESS_PRIORITY, &xTaskMBSProcess );

  xTaskCreate(vSENSORSProcess, (uint8_t*)SENSORSPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, SENSORS_PROCESS_PRIORITY, &xTaskSENSORSProcess);

 

 

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/

  #ifdef PEX_RTOS_START

    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */

  #endif

  /*** End of RTOS startup code.  ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

 

 

/* END main */

 

 

 

 

int s,k,v,l,m,n = 0;

 

 

static void vSHELLProcess ( void *pvParameters ){

  while(1){

  s++;

  vTaskDelay(20);

  }

}

static void vMBPollingProcess ( void *pvParameters ){

  while(1){

  s=k;

  k--;

  vTaskDelay(10);

  }

}

static void vSENSORSProcess ( void *pvParameters ){

  while(1){

  m++;

  n=s+k;

  vTaskDelay(100);

  }

}

 

 

/*!

** @}

*/

/*

** ###################################################################

**

**    This file was created by Processor Expert 10.4 [05.11]

**    for the Freescale Kinetis series of microcontrollers.

**

** ###################################################################

*/

 

and this other code wih KSDK

 

/* ###################################################################

**     Filename    : main.c

**     Project     : UTe-Q

**     Processor   : MK64FN1M0VLL12

**     Version     : Driver 01.01

**     Compiler    : GNU C Compiler

**     Date/Time   : 2015-04-22, 15:52, # CodeGen: 0

**     Abstract    :

**         Main module.

**         This module contains user's application code.

**     Settings    :

**     Contents    :

**         No public methods

**

** ###################################################################*/

/*!

** @file main.c

** @version 01.01

** @brief

**         Main module.

**         This module contains user's application code.

*/       

/*!

**  @addtogroup main_module main module documentation

**  @{

*/       

/* MODULE main */

 

 

 

 

/* Including needed modules to compile this module/procedure */

#include "Cpu.h"

#include "Events.h"

#include "pin_init.h"

#include "osa1.h"

#include "FreeRTOS1.h"

#include "UTIL1.h"

#include "KSDK1.h"

#include "fsl_os_abstraction.h"

#if CPU_INIT_CONFIG

  #include "Init_Config.h"

#endif

/* User includes (#include below this line is not maintained by Processor Expert) */

 

 

static void vSHELLProcess ( void *pvParameters );

static void vMBPollingProcess ( void *pvParameters );

static void vSENSORSProcess ( void *pvParameters );

#define SHELLPROCESS_PROC_NAME "ShellProcess"

#define SENSORSPROCESS_PROC_NAME "SensorsProcess"

#define MB_PROC_NAME "MBPollingProcess"

#define ADCPROCESS_PROC_NAME "ADCProcess"

#define PRIORITY_WANTED(Wanted_priority)  configMAX_PRIORITIES - (Wanted_priority) -2

#define SHELL_PROCESS_PRIORITY PRIORITY_WANTED( 2 )

#define SENSORS_PROCESS_PRIORITY PRIORITY_WANTED( 3 )

#define MODBUS_PROCESS_PRIORITY PRIORITY_WANTED( 4 )

#define ADC_PROCESS_PRIORITY PRIORITY_WANTED( 5 )

/*lint -save  -e970 Disable MISRA rule (6.3) checking. */

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

 

 

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

 

 

  task_handler_t xTaskSHELLProcess;

  task_handler_t xTaskMBSProcess;

  task_handler_t xTaskSENSORSProcess;

 

 

  OSA_TaskCreate(vSHELLProcess, (uint8_t*)SHELLPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, SHELL_PROCESS_PRIORITY,   NULL, (bool)NULL, &xTaskSHELLProcess);

  OSA_TaskCreate(vMBPollingProcess, (uint8_t*)MB_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, MODBUS_PROCESS_PRIORITY, NULL, (bool)NULL, &xTaskMBSProcess);

  OSA_TaskCreate(vSENSORSProcess, (uint8_t*)SENSORSPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, SENSORS_PROCESS_PRIORITY , NULL, (bool)NULL, &xTaskSENSORSProcess);

 

 

  /* Write your code here */

  /* For example: for(;;) { } */

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/

  #ifdef PEX_RTOS_START

    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */

  #endif

  /*** End of RTOS startup code.  ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

 

 

/* END main */

 

 

int s,k,v,l,m,n = 0;

 

 

static void vSHELLProcess ( void *pvParameters ){

  while(1){

  s++;

  OSA_TimeDelay(20);

  }

}

static void vMBPollingProcess ( void *pvParameters ){

  while(1){

  s=k;

  k--;

  OSA_TimeDelay(10);

  }

}

static void vSENSORSProcess ( void *pvParameters ){

  while(1){

  m++;

  n=s+k;

  OSA_TimeDelay(100);

  }

}

 

I try with my custom HW (K20) and my demo board (FRDM-K64).

With KSDK I simulate K20 with K60

without KSDK I use K20. With setting of PEMicro I set K20DN512 and, other test, K20DN512M10 (without different on results)

 

What I found is that: ALWAYS I ENABLE FREERTOS on my custom HW MY PROBLEM IS PRESENT. Same code on K64 do not have problem (never).

With my custom HW, if I  not use FreeRTOS I not have problem... ALWAYS I enable FreeRTOS my debug crash (sometime after few instruction, sometime after many times) with K20.

 

So, is this important?

thanks,

Massimliano

标签 (1)
标记 (2)
0 项奖励
回复
8 回复数

2,872 次查看
holyhope
Contributor III

No one can give me other support?

thanks

0 项奖励
回复

2,873 次查看
Carlos_Mendoza
NXP Employee
NXP Employee

Hi Massimiliano,

I would recommend you to try the latest Kinetis SDK 1.2 which was released this week and comes with support for the MK20D10 device family, that way you don't have to simulate the K20.

Here is the link to download it:

Software Development Kit for Kinetis MCUs|Freescale

The KInetis Design Studio V3.0.0 was also released this week, here is the link to download it:

Kinetis Design Studio Integrated Development |Freescale

Please try using this version of the KSDK and let us know if you are still having problems when enabling FreeRTOS on your application and if yes please let us know if the error happens on an specific function.

Best Regards,

Carlos Mendoza

Technical Support Engineer

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复

2,873 次查看
holyhope
Contributor III

i have an update.

i try this code (without SDK):

/* Including needed modules to compile this module/procedure */

#include "Cpu.h"

#include "Events.h"

#include "FRTOS1.h"

#include "UTIL1.h"

/* Including shared modules, which are used for whole project */

#include "PE_Types.h"

#include "PE_Error.h"

#include "PE_Const.h"

#include "IO_Map.h"

/* User includes (#include below this line is not maintained by Processor Expert) */

static void vSHELLProcess ( void *pvParameters );

static void vMBPollingProcess ( void *pvParameters );

static void vSENSORSProcess ( void *pvParameters );

#define SHELLPROCESS_PROC_NAME "ShellProcess"

#define SENSORSPROCESS_PROC_NAME "SensorsProcess"

#define MB_PROC_NAME "MBPollingProcess"

#define ADCPROCESS_PROC_NAME "ADCProcess"

#define PRIORITY_WANTED(Wanted_priority)  configMAX_PRIORITIES - (Wanted_priority) -2

#define SHELL_PROCESS_PRIORITY PRIORITY_WANTED( 2 )

#define SENSORS_PROCESS_PRIORITY PRIORITY_WANTED( 3 )

#define MODBUS_PROCESS_PRIORITY PRIORITY_WANTED( 4 )

#define ADC_PROCESS_PRIORITY PRIORITY_WANTED( 5 )

/*lint -save  -e970 Disable MISRA rule (6.3) checking. */

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

  /* Write your code here */

  /* For example: for(;;) { } */

  TaskHandle_t xTaskSHELLProcess;

  TaskHandle_t xTaskMBSProcess;

  TaskHandle_t xTaskSENSORSProcess;

  xTaskCreate(vSHELLProcess, (uint8_t*)SHELLPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, SHELL_PROCESS_PRIORITY, &xTaskSHELLProcess );

  xTaskCreate(vMBPollingProcess, (uint8_t*)MB_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, MODBUS_PROCESS_PRIORITY, &xTaskMBSProcess );

  xTaskCreate(vSENSORSProcess, (uint8_t*)SENSORSPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE), NULL, SENSORS_PROCESS_PRIORITY, &xTaskSENSORSProcess);

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/

  #ifdef PEX_RTOS_START

    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */

  #endif

  /*** End of RTOS startup code.  ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

/* END main */

int s,k,v,l,m,n = 0;

static void vSHELLProcess ( void *pvParameters ){

  while(1){

  s++;

  vTaskDelay(20);

  }

}

static void vMBPollingProcess ( void *pvParameters ){

  while(1){

  s=k;

  k--;

  vTaskDelay(10);

  }

}

static void vSENSORSProcess ( void *pvParameters ){

  while(1){

  m++;

  n=s+k;

  vTaskDelay(100);

  }

}

/*!

** @}

*/

/*

** ###################################################################

**

**    This file was created by Processor Expert 10.4 [05.11]

**    for the Freescale Kinetis series of microcontrollers.

**

** ###################################################################

*/

and this other code wih KSDK

/* ###################################################################

**     Filename    : main.c

**     Project     : UTe-Q

**     Processor   : MK64FN1M0VLL12

**     Version     : Driver 01.01

**     Compiler    : GNU C Compiler

**     Date/Time   : 2015-04-22, 15:52, # CodeGen: 0

**     Abstract    :

**         Main module.

**         This module contains user's application code.

**     Settings    :

**     Contents    :

**         No public methods

**

** ###################################################################*/

/*!

** @file main.c

** @version 01.01

** @brief

**         Main module.

**         This module contains user's application code.

*/        

/*!

**  @addtogroup main_module main module documentation

**  @{

*/        

/* MODULE main */

/* Including needed modules to compile this module/procedure */

#include "Cpu.h"

#include "Events.h"

#include "pin_init.h"

#include "osa1.h"

#include "FreeRTOS1.h"

#include "UTIL1.h"

#include "KSDK1.h"

#include "fsl_os_abstraction.h"

#if CPU_INIT_CONFIG

  #include "Init_Config.h"

#endif

/* User includes (#include below this line is not maintained by Processor Expert) */

static void vSHELLProcess ( void *pvParameters );

static void vMBPollingProcess ( void *pvParameters );

static void vSENSORSProcess ( void *pvParameters );

#define SHELLPROCESS_PROC_NAME "ShellProcess"

#define SENSORSPROCESS_PROC_NAME "SensorsProcess"

#define MB_PROC_NAME "MBPollingProcess"

#define ADCPROCESS_PROC_NAME "ADCProcess"

#define PRIORITY_WANTED(Wanted_priority)  configMAX_PRIORITIES - (Wanted_priority) -2

#define SHELL_PROCESS_PRIORITY PRIORITY_WANTED( 2 )

#define SENSORS_PROCESS_PRIORITY PRIORITY_WANTED( 3 )

#define MODBUS_PROCESS_PRIORITY PRIORITY_WANTED( 4 )

#define ADC_PROCESS_PRIORITY PRIORITY_WANTED( 5 )

/*lint -save  -e970 Disable MISRA rule (6.3) checking. */

int main(void)

/*lint -restore Enable MISRA rule (6.3) checking. */

{

  /* Write your local variable definition here */

  /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/

  PE_low_level_init();

  /*** End of Processor Expert internal initialization.                    ***/

  task_handler_t xTaskSHELLProcess;

  task_handler_t xTaskMBSProcess;

  task_handler_t xTaskSENSORSProcess;

  OSA_TaskCreate(vSHELLProcess, (uint8_t*)SHELLPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, SHELL_PROCESS_PRIORITY,   NULL, (bool)NULL, &xTaskSHELLProcess);

  OSA_TaskCreate(vMBPollingProcess, (uint8_t*)MB_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, MODBUS_PROCESS_PRIORITY, NULL, (bool)NULL, &xTaskMBSProcess);

  OSA_TaskCreate(vSENSORSProcess, (uint8_t*)SENSORSPROCESS_PROC_NAME, (configMINIMAL_STACK_SIZE)*sizeof(portSTACK_TYPE), (task_stack_t*)NULL, SENSORS_PROCESS_PRIORITY , NULL, (bool)NULL, &xTaskSENSORSProcess);

  /* Write your code here */

  /* For example: for(;;) { } */

  /*** Don't write any code pass this line, or it will be deleted during code generation. ***/

  /*** RTOS startup code. Macro PEX_RTOS_START is defined by the RTOS component. DON'T MODIFY THIS CODE!!! ***/

  #ifdef PEX_RTOS_START

    PEX_RTOS_START();                  /* Startup of the selected RTOS. Macro is defined by the RTOS component. */

  #endif

  /*** End of RTOS startup code.  ***/

  /*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/

  for(;;){}

  /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/

} /*** End of main routine. DO NOT MODIFY THIS TEXT!!! ***/

/* END main */

int s,k,v,l,m,n = 0;

static void vSHELLProcess ( void *pvParameters ){

  while(1){

  s++;

  OSA_TimeDelay(20);

  }

}

static void vMBPollingProcess ( void *pvParameters ){

  while(1){

  s=k;

  k--;

  OSA_TimeDelay(10);

  }

}

static void vSENSORSProcess ( void *pvParameters ){

  while(1){

  m++;

  n=s+k;

  OSA_TimeDelay(100);

  }

}

I try with my custom HW (K20) and my demo board (FRDM-K64).

With KSDK I simulate K20 with K60

without KSDK I use K20. With setting of PEMicro I set K20DN512 and, other test, K20DN512M10 (without different on results)

What I found is that: ALWAYS I ENABLE FREERTOS on my custom HW MY PROBLEM IS PRESENT. Same code on K64 do not have problem (never).

With my custom HW, if I  not use FreeRTOS I not have problem... ALWAYS I enable FreeRTOS my debug crash (sometime after few instruction, sometime after many times) with K20.

So, is this important?

thanks,

Massimliano

0 项奖励
回复

2,873 次查看
holyhope
Contributor III

I did several test but no one give me an answer...

There can be problem using FreeRTOS?

Maybe scheduler?

Or there are some special setting while debugging with PEMicro?

Or special setting for processor expert for generating debugging code? (like stop interrupt on debugging)

Or there are some code line thai I must to add for debug (like stop interrupt, but that are not available in PEx and it must be setted manuality)?

Maybe can be the problem that do not found "_ISR_Vector" while debugging? (when return me error: No source available for "__isr_vector() at 0x0")

thanks

0 项奖励
回复

2,873 次查看
BlackNight
NXP Employee
NXP Employee

Is this with your own hardware or with an evaluation board?

I doubt it is a problem of FreeRTOS.

the 'no source available' you might get right after reset. Or do you have a watchdog timer enabled?

Erich

2,872 次查看
holyhope
Contributor III

Hi Erich

thanks a lot for your answer and your time.

I'm debugging on my custom HW. But this problem is not present from many days! in past, with this same HW, I debugged very well.

But, to avoid any problem linked to my HW, I will change my CPU from K20 (... K60 because I tell to PEx that is a K60!) to K64 and try to debug with FRDM-K64 demo board that I havere here on my desk!

For Watch dog: I have disabled it from PEx CPU setting, but... is not possible that K60 core is different from K20 core and do not correctly disable WatchDog?

Sometime my code stuck (WITH MY BUG! Developing FW is possible to make mistake and orrible bug!) in this code:

DefaultISR:

    b DefaultISR

    .size DefaultISR, . - DefaultISR

and when stuck here the debugger console tell me:

WDOG_EWM_IRQHandler() at startup_MK60D10.S:362 0x568

<signal handler called>() at 0xfffffffd
vPortStartFirstTask() at port.c:962 0xcd76
xPortStartScheduler() at port.c:809 0xccaa

so seems that the last instruction exected is for a watchdog error!

BUT! There are two important thing about this thesis that are opposite:

(THE FIRST)  Maybe K60 have a different interrupt vector from K20 and when stuck on 0x568 is for another problem that is mapped on WatchDog in K60 and mapped in xxxxxx (I don't know how to find the exception/problem name from the exception code. I know that 0x568 is watch dog in K60 because it was tell me from debugger) in K20 uP

(THE SECOND) but if I place an instruction like "while(1)" inside one of my task.... the code remain stuck here and there is not exception or WatchDog problem (I try to set a while(1) inside a process under an IF acrivated on shell. In this way I activate UNDER MY CONTROL the while(1) in a task that have the max priority; if I set while(1) under proc shell that isn't max priority task may be interrupted from sheduler, so it is imposible that the device reset via WatchDog and after reset re-stuck in the same code line).

so for this second "watchDog-enabled verify test" ... the watchdog seems to be disabled...

Now I try with K64 demo board. Meanwhile if you have some other test I will do them!

Many thanks,

Massimiliano

Edit:

I try the test on demo board.

I use the same code, I only change the PEx CPU and several pin (because are very different in K60 and K20)

the demo board with segger FW on emulator works very well.

the demo board with PEMicro debugger connected via JTAG port (micro pin) work very well.

so seems that the problem is located when I use PEMicro on my custom HW. Or the change that I do in my code (only PEx initialization and pin)  create a different contest so the debugger work well.

I do not change nothing setting from the debg config (unless K64 instead K20).

Many thanks,

Massimiliano

0 项奖励
回复

2,872 次查看
BlackNight
NXP Employee
NXP Employee

Hi Massimiliano,

I have not seen something like this, except when I tried to debug a binary with the wrong source files. Or if the source files are changed/newer, and I debug the old binary.

Can you make sure you have everything built correctly (maybe delete the 'Debug' folder, then do a build). And can you check that you are debugging the correct .elf/binary in the launch configuration?

Apart of that: make sure you have only the breakpoints set you want/need: there are issues in GDB if you try to debug a binary with breakpoints on non-existing code locations.

See http://mcuoneclipse.com/2014/10/11/failed-to-debug-with-gdb-breakpoints-or-expressions-on-non-existi...

I hope this helps,

Erich

2,871 次查看
holyhope
Contributor III

Hi Erich

many thanks for your answer.

I suppose that I use the correct .elf because it is all generated automatic when I press the "debug" button. I suppose KDS rebuild all and the .elf generated will be downloaded on my uP!

Now I try do delete my debug folder and perform a clean.

Breakpoint, something, I put them BEFORE start my code. Other time AFTER my code is executing. in both case I have this problem

Edit:

I try to delete "debug" folder and perform a "clean" (that not work because theren't file anymore, deleting debug folder)

But still not working!

I find this description on debug console:

Initializing.

Target has been RESET and is active.

Interrupt command received. Halting execution.

Preset breakpoint encountered.

Unable to go into background mode.

Error communicating to target processor - try a RESET.

PE-ERROR: TARGET IS RUNNING

when I get this error I tryied to place a breakpoint in running code.

Now the code stop in this point but when I press F6 (step over) my code stuck... and I give this error!

I have a timer and I try to disable the "run on debug" .

I'm using FreRtos but if I acrtive only  1 task I still have the some problem.

Another information: sometime, after I found this problem KDS open me the "_isr_vector.c" and NOT find it and give me on principal page "No source available for __Isr_vector".

Other time KDS open me the window called "0x530" instead "isr_vector".

Another Info: I'm developing on K20 vith KSDK so I have set K60 on KSDK but my uP is K20 and in debug config I set K20 (as suggest from FreeScale )


So, now, what I can do?

Many Thanks

Max

0 项奖励
回复