FreeCalypso > hg > freecalypso-sw
comparison nuc-fw/serial/debug.c @ 136:3b5c3f3646fb
RV bring-up: lack of timer ticks fixed,
still investigating the lack of "system time" messages from the RVT task
author | Michael Spacefalcon <msokolov@ivan.Harhan.ORG> |
---|---|
date | Mon, 04 Nov 2013 23:35:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
135:e4257294102b | 136:3b5c3f3646fb |
---|---|
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 } |