[bajos] r930 committed - noch mehr debug macros

1 view
Skip to first unread message

ba...@googlecode.com

unread,
Oct 11, 2011, 2:56:09 AM10/11/11
to bajo...@googlegroups.com
Revision: 930
Author: burkhart.holznagel
Date: Mon Oct 10 23:48:06 2011
Log: noch mehr debug macros
http://code.google.com/p/bajos/source/detail?r=930

Modified:
/trunk/bajos/JVM/definitions.h

=======================================
--- /trunk/bajos/JVM/definitions.h Sun Aug 7 04:13:08 2011
+++ /trunk/bajos/JVM/definitions.h Mon Oct 10 23:48:06 2011
@@ -50,11 +50,51 @@
#define GARBAGEFUSIONTRIALS 20

#ifdef AVR8 // change all avr8
string to flash strings gives more data ram space for java!!
-#define avr8Printf( format, ...) printf_P (PSTR((format)), ## __VA_ARGS__)
+ #ifdef TINYBAJOS
+ #ifndef TINYBAJOS_PRINTF
+ #define PRINTF(format, ...)
+ #else
+ #define PRINTF(format, ...) printf_P(PSTR(format), ## __VA_ARGS__)
+ #endif
+ #else
+ #define PRINTF(format, ...) printf_P(PSTR(format), ## __VA_ARGS__)
+ #endif
#else
-#define avr8Printf( format, ...) printf ((format), ## __VA_ARGS__)
+ #define PRINTF(format, ...) printf(format, ## __VA_ARGS__)
#endif

+#ifdef DEBUG
+ #define DEBUGPRINTF(format, ...) PRINTF(format, ## __VA_ARGS__)
+#else
+ #define DEBUGPRINTF(format, ...)
+#endif
+
+#ifdef TINYBAJOS_ERROREXIT
+ #define ERROREXIT(nr, format, ...) exit((nr))
+#else
+ #ifdef AVR8 // change all avr8
string to flash strings gives more data ram space for java!!
+ #define ERROREXIT(nr, format, ...) errorExitFunction ((nr),
PSTR((format)), ## __VA_ARGS__)
+ #else
+ #define ERROREXIT(nr, format, ...) errorExitFunction ((nr), (format), ##
__VA_ARGS__)
+ #endif
+#endif
+
+#ifdef AVR8
+ #define STRNCMPRAMFLASH strncmpRamFlash
+ #define STRNCMPFLASHFLASH strncmpFlashFlash
+#else
+ #define STRNCMPRAMFLASH strncmp
+ #define STRNCMPFLASHFLASH strncmp
+#endif
+
+
+
+#ifdef AVR8 // change all avr8
string to flash strings gives more data ram space for java!!
+ #define avr8Printf( format, ...) printf_P (PSTR((format)), ##
__VA_ARGS__)
+#else
+ #define avr8Printf( format, ...) printf ((format), ## __VA_ARGS__)
+#endif
+
#ifndef TINYBAJOS_ERROREXIT
#ifdef AVR8 // change all avr8
string to flash strings gives more data ram space for java!!
#define errorExit(nr, format, ...) errorExitFunction ((nr),
PSTR((format)), ## __VA_ARGS__)
@@ -165,12 +205,11 @@
#ifdef DEBUG
#define OUTSTREAM stdout

-#define DEBUGPRINT(format, ...)avr8Printf((format), ## __VA_ARGS__)
+#define DEBUGPRINT(format, ...) avr8Printf((format), ## __VA_ARGS__)
#define DEBUGPRINTLN(format, ...) avr8Printf((format), ## __VA_ARGS__);
avr8Printf("\n");

#define DEBUGPRINTE(x,f) avr8Printf(#x ": " "%"#f" ",x)
#define PRINTE(x,f) avr8Printf(#x ": " "%"#f" ",x)
-#define DEBUGPRINTF(a,b,c) avr8Printf(a,b,c)
#define DEBUGPRINTSTACK {\
int i;\
for (i= opStackGetSpPos() > 8 ? -8 : -opStackGetSpPos() ; i < 0 ; i++)
\
@@ -214,7 +253,6 @@
#define DEBUGPRINT(format, ...)
#define DEBUGPRINTLN(format, ...)
#define DEBUGPRINTE(x,f)
-#define DEBUGPRINTF(a,b)
#define DEBUGPRINTSTACK
#define DEBUGPRINTHEAP
#define DEBUGPRINTLOCALS

Reply all
Reply to author
Forward
0 new messages