#include <cfg/debug.h>
-#include <cpu/cpu.h>
+#include <cpu/irq.h>
+#include <cpu/attr.h>
+#include <cpu/types.h>
#include <cfg/macros.h> /* for BV() */
#include <appconfig.h>
-#include <hw_cpu.h> /* for CLOCK_FREQ */
-#include <hw_ser.h> /* Required for bus macros overrides */
+#warning what about these?
+//#include <hw_cpu.h> /* for CLOCK_FREQ */
+//#include <hw_ser.h> /* Required for bus macros overrides */
#include <mware/formatwr.h> /* for _formatted_write() */
+#include <mware/pgm.h>
#ifdef _DEBUG
#endif
-#if defined(_EMUL)
+#if OS_HOSTED
#include <stdio.h>
#define KDBG_WAIT_READY() do { /*nop*/ } while(0)
- #define KDBG_WRITE_CHAR(c) putchar((c))
+ #define KDBG_WRITE_CHAR(c) putc((c), stderr)
#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 */
{
/* Init debug hw */
kdbg_hw_init();
- kputs("\n\n*** DBG START ***\n");
+ kputs("\n\n*** BeRTOS DBG START ***\n");
}
PGM_FUNC(kputs)(PGM_STR("Invalid ptr: "));
PGM_FUNC(kputs)(name);
#if CONFIG_PRINTF
- PGM_FUNC(kprintf)(PGM_STR(" = 0x%x\n"), (unsigned int)value);
+ PGM_FUNC(kprintf)(PGM_STR(" = 0x%p\n"), value);
#else
(void)value;
kputchar('\n');