* [ECOS] Can't figure out how to use CYG_ASSERT()
@ 2006-12-24 3:50 Grant Edwards
2006-12-24 13:03 ` Gary Thomas
0 siblings, 1 reply; 2+ messages in thread
From: Grant Edwards @ 2006-12-24 3:50 UTC (permalink / raw)
To: ecos-discuss
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.
--
Grant Edwards
grante@visi.com
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [ECOS] Can't figure out how to use CYG_ASSERT()
2006-12-24 3:50 [ECOS] Can't figure out how to use CYG_ASSERT() Grant Edwards
@ 2006-12-24 13:03 ` Gary Thomas
0 siblings, 0 replies; 2+ messages in thread
From: Gary Thomas @ 2006-12-24 13:03 UTC (permalink / raw)
To: Grant Edwards; +Cc: ecos-discuss
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-12-24 13:03 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-24 3:50 [ECOS] Can't figure out how to use CYG_ASSERT() Grant Edwards
2006-12-24 13:03 ` Gary Thomas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).