FreeCalypso > hg > freecalypso-sw
comparison gsm-fw/serial/debug.c @ 143:afceeeb2cba1
Our nuc-fw is destined to become gsm-fw, so I went ahead and did the big hg mv
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Tue, 12 Nov 2013 05:35:48 +0000 |
parents | nuc-fw/serial/debug.c@3b5c3f3646fb |
children | a2194416fd7c |
comparison
equal
deleted
inserted
replaced
142:15d5977390c2 | 143:afceeeb2cba1 |
---|---|
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 freecalypso_lldbg_intinfo() | |
32 { | |
33 char strbuf[128]; | |
34 extern unsigned IQ_TimerCount2; | |
35 extern unsigned TMD_System_Clock; | |
36 extern unsigned INT_Check_IRQ_Mask(); | |
37 | |
38 sprintf(strbuf, "*CPSR=%08x, IQ_TimerCount2=%u, TMD_System_Clock=%u", | |
39 INT_Check_IRQ_Mask(), IQ_TimerCount2, TMD_System_Clock); | |
40 freecalypso_raw_dbgout(strbuf); | |
41 } | |
42 | |
43 freecalypso_nucidle_dbghook() | |
44 { | |
45 freecalypso_raw_dbgout("*In Nucleus idle loop"); | |
46 freecalypso_lldbg_intinfo(); | |
47 } |