This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Can't figure out how to use CYG_ASSERT()
- From: Grant Edwards <grante at visi dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Sun, 24 Dec 2006 03:50:08 +0000 (UTC)
- Subject: [ECOS] Can't figure out how to use CYG_ASSERT()
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