debug.h 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. #ifndef _DEV_DEBUG_H_
  2. #define _DEV_DEBUG_H_
  3. /*
  4. * Copyright (C) 2001-2005 by egnite Software GmbH. All rights reserved.
  5. *
  6. * Redistribution and use in source and binary forms, with or without
  7. * modification, are permitted provided that the following conditions
  8. * are met:
  9. *
  10. * 1. Redistributions of source code must retain the above copyright
  11. * notice, this list of conditions and the following disclaimer.
  12. * 2. Redistributions in binary form must reproduce the above copyright
  13. * notice, this list of conditions and the following disclaimer in the
  14. * documentation and/or other materials provided with the distribution.
  15. * 3. Neither the name of the copyright holders nor the names of
  16. * contributors may be used to endorse or promote products derived
  17. * from this software without specific prior written permission.
  18. *
  19. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  20. * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  21. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
  22. * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
  23. * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
  24. * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
  25. * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
  26. * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
  27. * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  28. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
  29. * THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. * SUCH DAMAGE.
  31. *
  32. * For additional information see http://www.ethernut.de/
  33. */
  34. /*
  35. * $Log$
  36. * Revision 1.16 2009/03/05 22:16:57 freckle
  37. * use __NUT_EMULATION instead of __APPLE__, __linux__, or __CYGWIN__
  38. *
  39. * Revision 1.15 2008/08/11 06:59:59 haraldkipp
  40. * BSD types replaced by stdint types (feature request #1282721).
  41. *
  42. * Revision 1.14 2008/08/06 12:51:12 haraldkipp
  43. * Added support for Ethernut 5 (AT91SAM9XE reference design).
  44. *
  45. * Revision 1.13 2008/02/15 17:00:24 haraldkipp
  46. * Spport for AT91SAM7SE512 added.
  47. *
  48. * Revision 1.12 2007/10/04 20:33:55 olereinhardt
  49. * Support for SAM7S256 added
  50. *
  51. * Revision 1.11 2006/08/31 19:01:08 haraldkipp
  52. * Using devDebug2 for the DBGU output was a bad idea. Some AT91 chips
  53. * provide more than two UARTs. We now use devDebug to specify the DBGU
  54. * device. Baudrate calculations failed on CPUs running on a processor
  55. * clock, which differs from a futher divided main clock. This had been
  56. * fixed.
  57. *
  58. * Revision 1.10 2006/07/05 07:45:29 haraldkipp
  59. * Split on-chip interface definitions.
  60. *
  61. * Revision 1.9 2006/02/23 15:34:00 haraldkipp
  62. * Support for Philips LPC2xxx Family and LPC-E2294 Board from Olimex added.
  63. * Many thanks to Michael Fischer for this port.
  64. *
  65. * Revision 1.8 2005/07/26 15:49:59 haraldkipp
  66. * Cygwin support added.
  67. *
  68. * Revision 1.7 2005/04/05 17:49:06 haraldkipp
  69. * Make it work on Wolf, but breaks AT91EB40A.
  70. *
  71. * Revision 1.6 2005/02/10 07:06:50 hwmaier
  72. * Changes to incorporate support for AT90CAN128 CPU
  73. *
  74. * Revision 1.5 2004/10/03 18:39:12 haraldkipp
  75. * GBA debug output on screen
  76. *
  77. * Revision 1.4 2004/09/08 10:53:14 haraldkipp
  78. * Our first device for the EB40A
  79. *
  80. * Revision 1.3 2004/04/07 12:13:57 haraldkipp
  81. * Matthias Ringwald's *nix emulation added
  82. *
  83. * Revision 1.2 2004/03/16 16:48:28 haraldkipp
  84. * Added Jan Dubiec's H8/300 port.
  85. *
  86. * Revision 1.1.1.1 2003/05/09 14:41:05 haraldkipp
  87. * Initial using 3.2.1
  88. *
  89. * Revision 1.1 2003/04/21 16:57:05 harald
  90. * First check in
  91. *
  92. */
  93. #include <cfg/arch.h>
  94. #include <sys/device.h>
  95. #include <dev/uart.h>
  96. #include <stdint.h>
  97. /*!
  98. * \file dev/debug.h
  99. * \brief Debug device definitions.
  100. */
  101. /*
  102. * Available devices.
  103. */
  104. #if defined(__AVR__)
  105. #if defined(__AVR_AT90USB1287__)
  106. #else
  107. extern NUTDEVICE devDebug0;
  108. #endif
  109. #ifdef __AVR_ENHANCED__
  110. extern NUTDEVICE devDebug1;
  111. #endif
  112. #elif defined(__H8300H__) || defined(__H8300S__)
  113. /* SCIs (USARTs) in the H8/3068F; it should be adjusted for other H8 devices */
  114. extern NUTDEVICE devDebug0;
  115. extern NUTDEVICE devDebug1;
  116. extern NUTDEVICE devDebug2;
  117. #elif defined(__arm__) && !defined(__CORTEX__)
  118. #ifdef MCU_AT91R40008
  119. extern NUTDEVICE devDebug0;
  120. extern NUTDEVICE devDebug1;
  121. #elif defined(MCU_AT91SAM7X) || defined (MCU_AT91SAM7S256) || defined(MCU_AT91SAM9260) || defined (MCU_AT91SAM7SE512) || defined(MCU_AT91SAM9XE512) || defined(MCU_AT91SAM9G45)
  122. extern NUTDEVICE devDebug;
  123. #elif defined(MCU_GBA)
  124. extern NUTDEVICE devDebug0;
  125. #elif defined(MCU_LPC2XXX)
  126. extern NUTDEVICE devDebug0;
  127. extern NUTDEVICE devDebug1;
  128. #elif defined(MCU_ZERO)
  129. extern NUTDEVICE devDebug0;
  130. #endif
  131. #elif defined(__arm__) && defined(__CORTEX__)
  132. #if defined(MCU_STM32F10X)
  133. extern NUTDEVICE *devDebug0;
  134. #elif defined(MCU_LPC17xx)
  135. extern NUTDEVICE devDebug0;
  136. extern NUTDEVICE devDebug1;
  137. extern NUTDEVICE devDebug2;
  138. extern NUTDEVICE devDebug3;
  139. #endif
  140. #elif defined(MCU_MCF5225X)
  141. extern NUTDEVICE devDebug0;
  142. extern NUTDEVICE devDebug1;
  143. extern NUTDEVICE devDebug2;
  144. #elif defined(__AVR32__)
  145. extern NUTDEVICE devDebug0;
  146. extern NUTDEVICE devDebug1;
  147. extern NUTDEVICE devDebug2;
  148. extern NUTDEVICE devDebug3;
  149. #endif
  150. #ifdef __NUT_EMULATION__
  151. extern NUTDEVICE devDebug0;
  152. extern NUTDEVICE devDebug1;
  153. #endif
  154. #endif /* #ifndef _DEV_DEBUG_H_ */