1.1k views
in System Integration by
Good day,

When EwPanic is raised, is it possible to query the EW stack for a specific error code associated with EwPanic?

1 Answer

0 votes
by
Hi,

typically you get an error message - therefore it is always helpful to have a serial connection running on the target and a terminal on PC to show the messages.

What error do you have?

Best regards,

Manfred.
by

Hi Manfred,

This the the implementation Is copied:

/*******************************************************************************
* FUNCTION:
*   EwPanic
*
* DESCRIPTION:
*   The function EwPanic() will be called by the Run Time Environment if a fatal
*   system failure is detected.
*
*   This function can be adapted to decide what to do when a system failure
*   is occured. Generally EwPanic() should log the system failure and restart
*   the system.
*
*   For debugging purpose EwPanic() can run into a for-ever-loop or it can
*   cause a monitor breakpoint, etc.
*
* ARGUMENTS:
*   None
*
* RETURN VALUE:
*   EwPanic() will never return.
*
*******************************************************************************/
void EwPanic( void )
{
  /* Print out the message ... */
  EwPrint( "\nPANIC: System halted\n" );
    
  ASSERT(FALSE);

}

So in my particular case, I called Add(..., 0); on the same object twice. I'm hoping there is a text string which gives the reason, Eg. Double Allocation.

PANIC: System Halted is vague, and a specific error string would reduce my debug time, because EwPanic can happen for all sorts of reasons.

 

Kind Regards,

Rob

 

by
Hi Rob,

yes, the EwPanic() function does not report the error. But before EwPanic() is called, the error message is printed via EwPrint(), reporting the location where the error happend and the reason that causes the error. EwPanic() is just the final state.

Best regards,

Manfred.
by
Ah, thank you Manfred :-)

Kind Regards,

Rob

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...