MPC5674F – Breakpoints in VS Code cause PC to jump to RCHW with SIGINT/IVOR6 trap

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5674F – Breakpoints in VS Code cause PC to jump to RCHW with SIGINT/IVOR6 trap

1,330 Views
CNarendra
Contributor III

Hello,

I am debugging an MPC5674F (e200z7, VLE) application.

  • Toolchain: GCC powerpc-eabivle-gcc, GDB powerpc-eabivle-gdb

  • In S32 Design Studio IDE, debugging works perfectly: breakpoints hit and resume continues as expected.

  • In VS Code with the same ELF, breakpoints hit, but when I continue, the PC jumps to 0x00000004 (RCHW) instead of resuming at the correct address. This immediately triggers a Program Exception (IVOR6) and I also see a SIGINT trap reported in the debugger.

Checks done:

  • ELF entry point is correct (0x400, Reset_Handler).

  • Symbols load fine.

  • Compiler flags: -mcpu=e200z7 -mvle -g3 -O0.

  • After failure, GDB shows:

     
      $pc = 0x4 <RCHW+4>
    Program received signal SIGTRAP, Trace/breakpoint trap.
    Program received signal SIGINT, Interrupt.
    0x00000650 in IVOR6_Vector ()

  • Question:
  • Why does PC reset to RCHW (0x00000004) and cause SIGINT/IVOR6 after breakpoints only in VS Code?

  • What reset/init or breakpoint handling sequence does S32 Design Studio use that I should replicate in VS Code to avoid this? 

  • Anybody has tried MPC56xx series with VSCODE debugging?

     
  • Let me know if you need launch.json configuration

    Thanks
    Narendra.C

    MPC5674F 
Tags (2)
0 Kudos
Reply
1 Reply

1,315 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

 

  • Why does PC reset to RCHW (0x00000004) and cause SIGINT/IVOR6 after breakpoints only in VS Code?

There can be 2 reasons:

1. reset has occurred.

2. branch to that address was executed.

  • What reset/init or breakpoint handling sequence does S32 Design Studio use that I should replicate in VS Code to avoid this? 

S32DS support mulitple debugger interfaces. Breakpoints are managed via GDB and the debugger interface.

  • Anybody has tried MPC56xx series with VSCODE debugging?

Not here in NXP.

Best regards,

Peter

 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2165089%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EMPC5674F%20%E2%80%93%20Breakpoints%20in%20VS%20Code%20cause%20PC%20to%20jump%20to%20RCHW%20with%20SIGINT%2FIVOR6%20trap%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2165089%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3EI%20am%20debugging%20an%20MPC5674F%20(e200z7%2C%20VLE)%20application.%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EToolchain%3A%20GCC%20powerpc-eabivle-gcc%2C%20GDB%20powerpc-eabivle-gdb%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIn%20%3CSTRONG%3ES32%20Design%20Studio%20IDE%3C%2FSTRONG%3E%2C%20debugging%20works%20perfectly%3A%20breakpoints%20hit%20and%20resume%20continues%20as%20expected.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EIn%20%3CSTRONG%3EVS%20Code%3C%2FSTRONG%3E%20with%20the%20same%20ELF%2C%20breakpoints%20hit%2C%20but%20when%20I%20continue%2C%20the%20%3CSTRONG%3EPC%20jumps%20to%200x00000004%20(RCHW)%3C%2FSTRONG%3E%20instead%20of%20resuming%20at%20the%20correct%20address.%20This%20immediately%20triggers%20a%20%3CSTRONG%3EProgram%20Exception%20(IVOR6)%3C%2FSTRONG%3E%20and%20I%20also%20see%20a%20%3CSTRONG%3ESIGINT%20trap%3C%2FSTRONG%3E%20reported%20in%20the%20debugger.%3C%2FP%3E%3C%2FLI%3E%3C%2FUL%3E%3CP%3E%3CSTRONG%3EChecks%20done%3A%3C%2FSTRONG%3E%3C%2FP%3E%3CUL%3E%3CLI%3E%3CP%3EELF%20entry%20point%20is%20correct%20(0x400%2C%20Reset_Handler).%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ESymbols%20load%20fine.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3ECompiler%20flags%3A%20-mcpu%3De200z7%20-mvle%20-g3%20-O0.%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EAfter%20failure%2C%20GDB%20shows%3A%3C%2FP%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FDIV%3E%26nbsp%3B%26nbsp%3B%24pc%20%3D%200x4%20%3CRCHW%3E%3CBR%20%2F%3EProgram%20received%20signal%20SIGTRAP%2C%20Trace%2Fbreakpoint%20trap.%3CBR%20%2F%3EProgram%20received%20signal%20SIGINT%2C%20Interrupt.%3CBR%20%2F%3E0x00000650%20in%20IVOR6_Vector%20()%3CBR%20%2F%3E%3CSTRONG%3E%3CBR%20%2F%3E%3C%2FSTRONG%3E%3C%2FRCHW%3E%3C%2FLI%3E%3CLI%3E%3CSTRONG%3EQuestion%3A%3C%2FSTRONG%3E%3C%2FLI%3E%3CLI%3E%3CP%3EWhy%20does%20PC%20reset%20to%20RCHW%20(0x00000004)%20and%20cause%20SIGINT%2FIVOR6%20after%20breakpoints%20only%20in%20VS%20Code%3F%3C%2FP%3E%3C%2FLI%3E%3CLI%3E%3CP%3EWhat%20reset%2Finit%20or%20breakpoint%20handling%20sequence%20does%20%3CSTRONG%3ES32%20Design%20Studio%3C%2FSTRONG%3E%20use%20that%20I%20should%20replicate%20in%20VS%20Code%20to%20avoid%20this%3F%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLI%3E%3CLI%3EAnybody%20has%20tried%20MPC56xx%20series%20with%20VSCODE%20debugging%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3CDIV%20class%3D%22%22%3E%3CDIV%20class%3D%22%22%3E%26nbsp%3B%3C%2FDIV%3E%3C%2FDIV%3E%3C%2FLI%3E%3CLI%3ELet%20me%20know%20if%20you%20need%20launch.json%20configuration%3CBR%20%2F%3E%3CBR%20%2F%3EThanks%3CBR%20%2F%3ENarendra.C%3CBR%20%2F%3E%3CBR%20%2F%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fc-pwmxy87654%2FMPC5674F%2Fpd-p%2FMPC5674F%22%20class%3D%22lia-product-mention%22%20data-product%3D%221071-1%22%20target%3D%22_blank%22%3EMPC5674F%3C%2FA%3E%26nbsp%3B%3C%2FLI%3E%3C%2FUL%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2165151%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20MPC5674F%20%E2%80%93%20Breakpoints%20in%20VS%20Code%20cause%20PC%20to%20jump%20to%20RCHW%20with%20SIGINT%2FIVOR6%20trap%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2165151%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBLOCKQUOTE%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EWhy%20does%20PC%20reset%20to%20RCHW%20(0x00000004)%20and%20cause%20SIGINT%2FIVOR6%20after%20breakpoints%20only%20in%20VS%20Code%3F%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3EThere%20can%20be%202%20reasons%3A%3C%2FP%3E%0A%3CP%3E1.%20reset%20has%20occurred.%3C%2FP%3E%0A%3CP%3E2.%20branch%20to%20that%20address%20was%20executed.%3C%2FP%3E%0A%3CBLOCKQUOTE%3E%0A%3CUL%3E%0A%3CLI%3E%0A%3CP%3EWhat%20reset%2Finit%20or%20breakpoint%20handling%20sequence%20does%20%3CSTRONG%3ES32%20Design%20Studio%3C%2FSTRONG%3E%20use%20that%20I%20should%20replicate%20in%20VS%20Code%20to%20avoid%20this%3F%3CSPAN%3E%26nbsp%3B%3C%2FSPAN%3E%3C%2FP%3E%0A%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3C%2FBLOCKQUOTE%3E%0A%3CP%3E%3CSPAN%3ES32DS%20support%20mulitple%20debugger%20interfaces.%26nbsp%3BBreakpoints%20are%20managed%20via%20GDB%20and%20the%20debugger%20interface.%3C%2FSPAN%3E%3C%2FP%3E%0A%3CUL%3E%0A%3CLI%3EAnybody%20has%20tried%20MPC56xx%20series%20with%20VSCODE%20debugging%3F%3C%2FLI%3E%0A%3C%2FUL%3E%0A%3CP%3ENot%20here%20in%20NXP.%3C%2FP%3E%0A%3CP%3EBest%20regards%2C%3C%2FP%3E%0A%3CP%3EPeter%3C%2FP%3E%0A%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E