comparison serial/debug.c @ 0:75a11d740a02

initial import of gsm-fw from freecalypso-sw rev 1033:5ab737ac3ad7
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 09 Jun 2016 00:02:41 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:75a11d740a02
1 /*
2 * This module is a FreeCalypso addition for very low-level debugging.
3 * The functions implemented in this module produce "forced" serial output
4 * on the RVTMUX UART without going through the normal RV trace mechanism.
5 * Calls to these FC debug functions should be added during difficult
6 * debug sessions, but should never remain in stable checked-in code:
7 * these functions are too disruptive to be used in "production" fw images.
8 */
9
10 #include "../include/config.h"
11 #include "../include/sys_types.h"
12
13 #include "serialswitch.h"
14
15 #include <string.h>
16
17 freecalypso_raw_dbgout(char *string)
18 {
19 char *p;
20 int l, cc;
21
22 p = string;
23 l = strlen(p);
24 while (l) {
25 cc = SER_tr_WriteNBytes(SER_LAYER_1, p, l);
26 p += cc;
27 l -= cc;
28 }
29 }
30
31 #if 0
32 freecalypso_lldbg_intinfo()
33 {
34 char strbuf[128];
35 extern unsigned IQ_TimerCount2;
36 extern unsigned TMD_System_Clock;
37 extern unsigned INT_Check_IRQ_Mask();
38
39 sprintf(strbuf, "*CPSR=%08x, IQ_TimerCount2=%u, TMD_System_Clock=%u",
40 INT_Check_IRQ_Mask(), IQ_TimerCount2, TMD_System_Clock);
41 freecalypso_raw_dbgout(strbuf);
42 }
43
44 freecalypso_nucidle_dbghook()
45 {
46 freecalypso_raw_dbgout("*In Nucleus idle loop");
47 freecalypso_lldbg_intinfo();
48 }
49 #endif