- remove build warnings from mips_m4k.c and arm11.c
[openocd.git] / contrib / libdcc / example.c
index 42a9bd58daf155c7e8f99abb39d22a89430c5c6a..d456f3955125197db28300c7f5911c7d94883e94 100644 (file)
@@ -1,6 +1,8 @@
 /***************************************************************************
  *   Copyright (C) 2008 by Spencer Oliver                                  *
  *   spen@spen-soft.co.uk                                                  *
+ *   Copyright (C) 2008 by Frederik Kriewtz                                *
+ *   frederik@kriewitz.eu                                                  *
  *                                                                         *
  *   This program is free software; you can redistribute it and/or modify  *
  *   it under the terms of the GNU General Public License as published by  *
 
 #include "dcc_stdio.h"
 
+/* enable openocd debugmsg at the gdb prompt:
+ * monitor target_request debugmsgs enable 
+ * 
+ * create a trace point:
+ * monitor trace point 1
+ * 
+ * to show how often the trace point was hit:
+ * monitor trace point
+*/
+
 int main(void)
 {
-       /* enable openocd debugmsg at the gdb prompt
-        * monitor target_request debugmsgs enable */
-
        dbg_write_str("hello world");
-       dbg_write_char('a');
-       
-       while(1) {}
+
+       dbg_write_char('t');
+       dbg_write_char('e');
+       dbg_write_char('s');
+       dbg_write_char('t');
+       dbg_write_char('\n');
+
+       unsigned long test_u32 = 0x01234567;
+       dbg_write_u32(&test_u32, 1);
+
+       static const unsigned short test_u16[] = {0x0123, 0x4567, 0x89AB, 0xCDEF, 0x0123, 0x4567, 0x89AB, 0xCDEF};
+       dbg_write_u16(test_u16, 8);
+
+       static const unsigned char test_u8[] = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, 0x88, 0x99, 0xAA, 0xBB, 0xCC, 0XDD, 0xEE, 0xFF};
+       dbg_write_u8(test_u8, 16);
+
+       while(1)
+       {
+               dbg_trace_point(0);
+       }
 }

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)