X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=bertos%2Fdrv%2Fkdebug.c;h=1f8725502a9a3d4f601085ab8a0f1dbf992afc02;hb=46cacdd7cf98dd977225deceb6ec3f08ef11a81f;hp=c461b7281cbf2b496ef374119748fbdd082318d4;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/drv/kdebug.c b/bertos/drv/kdebug.c index c461b728..1f872550 100644 --- a/bertos/drv/kdebug.c +++ b/bertos/drv/kdebug.c @@ -27,31 +27,28 @@ * 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 + * Copyright 2000, 2001, 2002 Bernie Innocenti * * --> * * \brief General pourpose debug support for embedded systems (implementation). * * \version $Id$ - * \author Bernardo Innocenti + * \author Bernie Innocenti * \author Stefano Fedrigo */ -#include -#include -#include - +#include "cfg/cfg_debug.h" #include /* for BV() */ #include +#include -#include -#warning what about these? -//#include /* for CLOCK_FREQ */ -//#include /* Required for bus macros overrides */ +#include +#include +#include #include /* for _formatted_write() */ -#include +#include #ifdef _DEBUG @@ -63,7 +60,7 @@ #if OS_HOSTED #include #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 */ @@ -193,7 +190,7 @@ static void klocation(const char * PGM_ATTR file, int line) 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: "));