<div dir="ltr">Thanks.<div>I will recheck the code carefully.</div><div><div class="gmail_extra"><br>Regards,</div><div class="gmail_extra"><span class="" style="font-family:arial,sans-serif;font-size:14px">Peng.</span><br>
<div class="gmail_quote">2013/4/17 Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span><br><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div class="im">On 4/17/2013 9:42 AM, Sebastian Huber wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
On 04/17/2013 02:54 PM, Peng Fan wrote:<br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
diff --git a/c/src/lib/libbsp/arm/<u></u>tiny6410/debug/debug.c b/c/src/lib/libbsp/arm/<u></u>tiny6410/debug/debug.c<br>
new file mode 100644<br>
index 0000000..a57e4c9<br>
--- /dev/null<br>
+++ b/c/src/lib/libbsp/arm/<u></u>tiny6410/debug/debug.c<br>
@@ -0,0 +1,57 @@<br>
+/*<br>
+ *  Low level debug function<br>
+ *<br>
+ *  Copyright (c) 2013 by PengFan<<a href="mailto:van.freenix@gmail.com" target="_blank">van.freenix@gmail.com</a>><br>
+ *<br>
+ *  The license and distribution terms for this file may be<br>
+ *  found in the file LICENSE in this distribution or at<br>
+ *<a href="http://www.rtems.com/license/LICENSE" target="_blank">http://www.rtems.com/license/<u></u>LICENSE</a>.<br>
</blockquote></blockquote></div>
Unless a mailer broke this, the third line needs spacing before http.<br>
<br>
Check all.<div><div class="h5"><br>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

+ *<br>
+ */<br>
+<br>
+#include <bsp.h><br>
+#include <s3c64xx.h><br>
+void debug_led(uint32_t val)<br>
+{<br>
+       uint32_t *addr = (uint32_t *)0x7f008800;<br>
+       *addr = val;<br>
+}<br>
+<br>
+<br>
+static void Delay(void)<br>
+{<br>
+    volatile int i;<br>
+<br>
+    for(i=0 ; i < 1000 ; i++)<br>
+    {<br>
+    }<br>
+}<br>
+<br>
+void Uart_SendByte(int data)<br>
+{<br>
+    while(!(rUTRSTAT0 & 0x2));   //Wait until THR is empty.<br>
+    Delay();<br>
+    rUTXH0 = (unsigned char)data;<br>
+}<br>
+<br>
+void Uart_SendString(char *pt)<br>
+{<br>
+    while(*pt)<br>
+        Uart_SendByte(*pt++);<br>
+    Uart_SendByte('\r');<br>
+    Uart_SendByte('\n');<br>
+}<br>
+<br>
+void printhex(unsigned int data)<br>
+{<br>
+       int i = 0,a = 0;<br>
+       for (i = 0; i < 8; i++) {<br>
+               a = (data>>(32-(i+1)*4))&0xf;<br>
+               if (((a<=9)&&(a>=0)))<br>
+                       Uart_SendByte(a + 0x30);<br>
+               else if ((a <= 0xf) && (a >= 0xa))<br>
+                       Uart_SendByte(a-0xa+0x61);<br>
+       }<br>
+       Uart_SendByte('\r');<br>
+       Uart_SendByte('\n');<br>
+}<br>
</blockquote>
Can't you use printk() for this?<br>
<br>
</blockquote>
<br>
<br>
-- <br></div></div>
Joel Sherrill, Ph.D.             Director of Research & Development<br>
joel.sherrill@OARcorp.com        On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS  Huntsville AL 35805<br>
Support Available                (256) 722-9985<div class=""><div class="h5"><br>
<br>
______________________________<u></u>_________________<br>
rtems-devel mailing list<br>
<a href="mailto:rtems-devel@rtems.org" target="_blank">rtems-devel@rtems.org</a><br>
<a href="http://www.rtems.org/mailman/listinfo/rtems-devel" target="_blank">http://www.rtems.org/mailman/<u></u>listinfo/rtems-devel</a><br>
</div></div></blockquote></div><br></div></div></div>