*
* Copyright 2004, 2005, 2006, 2007, 2008 Develer S.r.l. (http://www.develer.com/)
* Copyright 2004 Giovanni Bajo
- *
* -->
*
* \brief CPU-specific attributes.
#elif CPU_X86
- #define NOP asm volatile ("nop")
-
#define CPU_REGS_CNT 7
#define CPU_BYTE_ORDER CPU_LITTLE_ENDIAN
#define CPU_HARVARD 0
#endif
/// Valid pointers should be >= than this value (used for debug)
- #define CPU_RAM_START 0x1000
+ #define CPU_RAM_START 0x1000
+
+ #ifdef __GNUC__
+ #define NOP asm volatile ("nop")
+ #define BREAKPOINT asm volatile ("int 3" ::)
+ #endif
#elif CPU_ARM
#endif
#define NOP asm volatile ("mov r0,r0" ::)
+ #define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */
#if CONFIG_FAST_MEM
/**
#elif CPU_PPC
- #define NOP asm volatile ("nop" ::)
-
#define CPU_REG_BITS (CPU_PPC32 ? 32 : 64)
#define CPU_REGS_CNT FIXME
#define CPU_BYTE_ORDER (__BIG_ENDIAN__ ? CPU_BIG_ENDIAN : CPU_LITTLE_ENDIAN)
#define CPU_HARVARD 0
/// Valid pointers should be >= than this value (used for debug)
- #define CPU_RAM_START 0x1000
+ #define CPU_RAM_START 0x1000
-#elif CPU_DSP56K
+ #ifdef __GNUC__
+ #define NOP asm volatile ("nop" ::)
+ #define BREAKPOINT asm volatile ("twge 2,2" ::)
+ #endif
- #define NOP asm(nop)
+#elif CPU_DSP56K
#define CPU_REG_BITS 16
#define CPU_REGS_CNT FIXME
#define SIZEOF_PTR 1
/// Valid pointers should be >= than this value (used for debug)
- #define CPU_RAM_START 0x200
+ #define CPU_RAM_START 0x200
+
+ #define NOP asm(nop)
+ #define BREAKPOINT asm(debug)
#elif CPU_AVR
#define CPU_HARVARD 1
/// Valid pointers should be >= than this value (used for debug)
- #define CPU_RAM_START 0x100
+ #define CPU_RAM_START 0x100
#else
#error No CPU_... defined.
#endif
+#ifndef BREAKPOINT
+#define BREAKPOINT /* nop */
+#endif
+
#ifndef FAST_FUNC
/// Function attribute for use with performance critical code.
#define FAST_FUNC /* */
#define IRQ_RESTORE(x) FIXME
#endif /* OS_EMBEDDED */
- #ifdef __GNUC__
- #define BREAKPOINT asm volatile ("int 3" ::)
- #endif
#elif CPU_ARM
#define IRQ_ENABLED() \
((bool)(get_CPSR() & 0xb0))
- #define BREAKPOINT /* asm("bkpt 0") DOES NOT WORK */
-
#else /* !__IAR_SYSTEMS_ICC__ */
#define IRQ_DISABLE \
#define IRQ_ENABLED() FIXME
#endif /* OS_EMBEDDED */
- #ifdef __GNUC__
- #define BREAKPOINT asm volatile ("twge 2,2" ::)
- #endif
-
#elif CPU_DSP56K
- #define BREAKPOINT asm(debug)
#define IRQ_DISABLE do { asm(bfset #0x0200,SR); asm(nop); } while (0)
#define IRQ_ENABLE do { asm(bfclr #0x0200,SR); asm(nop); } while (0)
} while (0)
-#ifndef BREAKPOINT
-#define BREAKPOINT /* nop */
-#endif
-
#endif /* CPU_IRQ_H */
*
* Copyright 2003, 2004, 2005, 2006, 2007 Develer S.r.l. (http://www.develer.com/)
* Copyright 2000, 2001, 2002 Bernie Innocenti <bernie@codewiz.org>
- *
* -->
*
* \brief General pourpose debug support for embedded systems (implementation).
#include <cfg/debug.h>
#include <cfg/os.h>
-#include <cpu/irq.h>
#include <cpu/attr.h>
#include <cpu/types.h>