Debugging after reset automatically using lauterbach debugger

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

Debugging after reset automatically using lauterbach debugger

4,238 Views
Ahmed_BEN_LAKHEL1234
Contributor II

I made a project configuration using CMM script to test my software on MPC5777. In the software there is a component that make a reset so it make the debug failed. In this case, I need your support through an example of script CMM that include this commands SYStem.Option.ResetDetection ; SYStem.Option.RESetBehavior to reconnect the debugger automatically to the selected Core ( in my case Core 2 IOP )

0 Kudos
Reply
10 Replies

4,151 Views
rweiss
Contributor V

Usually it is sufficient to set an onchip breakpoint to the reset address. A functional reset will not reset the debug logic and breakpoints remain set.

If you have a destructive reset to deal with, or if the BIST is involved, the debug logic is reset. In this case, you need to set SYStem.Option.ResetDetection so that the debugger is able to see the reset on the reset pin. This requires that your target hardware is built in way that the reswet pulse is visible on the debug connector. Please refer to debugger_mpc5500.pdf to find out which SYStem.Option.ResetDetection is suitable for your target.

Regarding SYStem.Option.RESetBehavior, you can use ResetHalt or AsyncHalt. Again see debugger_mpc5500.pdf for a description if the available options and their respective behavior.

0 Kudos
Reply

4,135 Views
Ahmed_BEN_LAKHEL1234
Contributor II

Hello,
Thank you so much for your replying on this issue.

But can you please provide an example of implementation of this 2 commands into a cmm script 

0 Kudos
Reply

4,060 Views
Ahmed_BEN_LAKHEL1234
Contributor II

Info : A destructive reset is occurred, at the moment of the Start the BIST 

0 Kudos
Reply

4,042 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

nah. that is not true.

The reset is triggered at the end of the BIST.

The reason is that your registers and RAM are full of ECC errors from test patterns as the BIST is not using standard buss and therefore not updating the ECCs.

So you need a destructive reset at end of the BIST to get default values loaded in registers and also RAM init function to clear ECC errors.

Best regards,

Peter

0 Kudos
Reply

4,027 Views
Ahmed_BEN_LAKHEL1234
Contributor II

Hello Peter, 

Thank you for your response, so how can I continue debugging after reset completed with saving BIST report. 

because when I made the SYSTEM.UP after reset. all BIST and STCU2 configurations are deleted

Best regards 

Ahmed

0 Kudos
Reply

3,833 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

System.up is external reset which will clear the BIST results.

You better use

sys.attach

break

Or even better you will use SW to analyze the BIST results after BIST reset, and if there is any fault you can take action.

Best regards,

Peter

 

For test purposes I simply implement while(1) right before BIST and manually skip this endless loop to start BIST. Once done after reset I will only attach and break to make sure new BIST wasnt executed.

0 Kudos
Reply

3,819 Views
Ahmed_BEN_LAKHEL1234
Contributor II

Hello peter, 

I will try this solution.

Thank you so much for your support and for the clarification. 

Best Regards 

Ahmed

 

 

 

0 Kudos
Reply

4,197 Views
petervlna
NXP TechSupport
NXP TechSupport

@rweiss Reinhard could you comment here?

best regards,

Peter

0 Kudos
Reply

4,214 Views
petervlna
NXP TechSupport
NXP TechSupport

Hello,

So you want to reconnect debugger after reset is called from script.
After the reset you will execute following script. Not sure how you can do it automatically when reset is detected.

; CPU setup

SYStem.CPU MPC5777M ; set Matterhorn
SYStem.CONFIG.CORE 3. 1. ; Connect to Core2
SYStem.Option.WATCHDOG OFF
SYStem.Up

 
But this is more question fro Lauterbach support then for NXP as this is not our product.
Best regards,
Peter

4,208 Views
Ahmed_BEN_LAKHEL1234
Contributor II
Thank you Peter for your response,
The reset is not called in the script. The reset is caused by the software executed from the flash .elf
Means after loading symbols,
List.auto
Go
0 Kudos
Reply