* the GNU General Public License.
*
* Copyright 2003, 2004, 2005, 2006, 2007 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000, 2001, 2002 Bernardo Innocenti <bernie@codewiz.org>
+ * Copyright 2000, 2001, 2002 Bernie Innocenti <bernie@codewiz.org>
*
* -->
*
* \brief General pourpose debug support for embedded systems (implementation).
*
* \version $Id$
- * \author Bernardo Innocenti <bernie@develer.com>
+ * \author Bernie Innocenti <bernie@codewiz.org>
* \author Stefano Fedrigo <aleph@develer.com>
*/
-#include <cfg/cfg_debug.h>
+#include "cfg/cfg_debug.h"
#include <cfg/macros.h> /* for BV() */
#include <cfg/debug.h>
#include <cfg/os.h>
#include <cpu/types.h>
#include <mware/formatwr.h> /* for _formatted_write() */
-#include <mware/pgm.h>
+#include <cpu/pgm.h>
#ifdef _DEBUG
#if OS_HOSTED
#include <stdio.h>
#define KDBG_WAIT_READY() do { /*nop*/ } while(0)
- #define KDBG_WRITE_CHAR(c) putc((c), stderr)
+ #define KDBG_WRITE_CHAR(c) do { char __c = (c); write(2, &__c, sizeof(__c)); } while(0)
#define KDBG_MASK_IRQ(old) do { (void)(old); } while(0)
#define KDBG_RESTORE_IRQ(old) do { /*nop*/ } while(0)
typedef char kdbg_irqsave_t; /* unused */
PGM_FUNC(kputs)(PGM_STR(": "));
}
-int PGM_FUNC(__assert)(const char * PGM_ATTR cond, const char * PGM_ATTR file, int line)
+int PGM_FUNC(__bassert)(const char * PGM_ATTR cond, const char * PGM_ATTR file, int line)
{
klocation(file, line);
PGM_FUNC(kputs)(PGM_STR("Assertion failed: "));