[ECOS] Can't figure out how to use CYG_ASSERT()
Gary Thomas
gary@mlbassoc.com
Sun Dec 24 13:03:00 GMT 2006
Grant Edwards wrote:
> I've searched docs and can't find anything on how to use
> CYG_ASSERT(). According to the usage note in cyg_ass.h, the
> usage is:
>
> // Usage: #include <cyg/infra/cyg_ass.h>
> // ...
> // CYG_ASSERT( pcount > 0, "Number of probes should be > 0!" );
> //
> // which can result, for example, in a message of the form:
> // ASSERT FAILED: probemgr.cxx:1340, scan_probes() :
> // number of probes should be > 0!
> // if the boolean "pcount > 0" is false.
>
> But that doesn't work for me. Anytime get to a failed
> CYG_ASSERT(), there is no message, the board just resets.
>
> Do I have to define some sort of handlers for CYG_ASSERT to
> call? Isn't there a normal assert macro that just "prints a
> message and halts" when the condition is false?
>
> I guess I'll define one, but I thought there already was
> something like that.
Try enabling 'CYGDBG_INFRA_DEBUG_TRACE_ASSERT_FANCY'
--
------------------------------------------------------------
Gary Thomas | Consulting for the
MLB Associates | Embedded world
------------------------------------------------------------
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
More information about the Ecos-discuss
mailing list