annotate src/cs/system/main/create_RVtasks.c @ 532:5c780d080afc

armio.c GPIO directions for classic targets: more explicit conditionals for FC additions on FC and Openmoko targets
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 05 Nov 2018 06:59:57 +0000
parents 838eeafb0051
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
139
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
1 /*******************************************************************************
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
2 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
3 * Name create_RVtasks.c *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
4 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
5 * Function this file contains functions allowing tasks creation in *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
6 * the Riviera environment *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
7 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
8 * Version 0.1 *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
9 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
10 * Date Modification *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
11 * ------------------------------------ *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
12 * 03 August 2000 Create *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
13 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
14 * Author Pascal Puel *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
15 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
16 * (C) Copyright 2000 by Texas Instruments Incorporated, All Rights Reserved *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
17 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
18 * --------------------------------------------------------------------------- *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
19 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
20 * History: *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
21 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
22 * 10/18/2001 - Updated for R2D by Christophe Favergeon *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
23 * 08/28/2002 - Clean-Up by Gerard Cauvy *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
24 * *
3e16c8832c0e src/cs/system/Main/create_RVtasks.c: header comment line length fix
Mychaela Falconia <falcon@freecalypso.org>
parents: 98
diff changeset
25 ******************************************************************************/
98
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 #ifndef _WINDOWS
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 #include "rv.cfg"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 #include "rv/rv_general.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 #include "rvf/rvf_api.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
33 #include "rvm/rvm_api.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
34 #include "rvm/rvm_use_id_list.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
35 #include "rvt/rvt_gen.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
36 //sys_types.h is necessary for function prototypes in buzzer.h
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
37 #include "sys_types.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
38 #include "buzzer/buzzer.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
39 #include "rv/rv_defined_swe.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
40 #include "chipset.cfg"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
41
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
42 #ifndef _WINDOWS
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
43 # include "power/power.h"
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
44 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
45
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
46 #include <stdio.h>
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
47 #include <string.h>
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
48
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
49
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
50 #define START_TASK_ID (MAX_RVF_TASKS-1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
51 #define RV_START_TASK_PRIO (249)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
52
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
53 T_RVT_USER_ID rv_trace_user_id = 0xff;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
54 T_RVT_USER_ID etm_trace_user_id;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
55
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
56 extern void etm_receive(unsigned char *inbuf, unsigned short size);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
57
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
58 #ifdef MIXED_TRACE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
59 T_RVT_USER_ID l23_trace_user_id;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
60 extern void ext_processExtInput (T_RVT_BUFFER, UINT16);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
61 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
62
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
63 #ifdef RVM_RNET_BR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
64 T_RVT_USER_ID rnet_trace_user_id;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
65 extern void rnet_receive (UINT8 *inbuf, UINT16 size);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
66 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
67
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
68 #if (TEST==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
69
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
70 // The name that uniquely identifies the Memory Bank MUST be
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
71 // 'TEST1', whereas it might be used by some other software
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
72 // entity for testing purpose.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
73 #define RVTEST_MENU_MB_NAME ("TEST1")
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
74
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
75 // Memory requirements.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
76 #define RVTEST_MENU_MB_SIZE (5000)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
77 #define RVTEST_MENU_MB_WATERMARK (4000)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
78
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
79 extern void rv_test (UINT32 p);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
80 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
81
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
82
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
83 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
84 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
85 ** Function rvt_init_trace
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
86 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
87 ** Description This function is called by the RV_START task to register
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
88 ** the Riviera Frame in the trace module
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
89 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
90 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
91 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
92 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
93 void rvt_init_trace (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
94 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
95 rvt_register_id ("RV", &rv_trace_user_id, rvt_set_trace_level);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
96 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
97
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
98 #ifdef RVM_ETM_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
99 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
100 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
101 ** Function etm_init_trace
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
102 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
103 ** Description This function is called by the RV_START task to register
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
104 ** the ETM in the trace module
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
105 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
106 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
107 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
108 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
109 void etm_init_trace (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
110 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
111 extern T_RVT_USER_ID tm_trace_user_id;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
112
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
113 rvt_register_id("TM", &etm_trace_user_id, etm_receive);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
114
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
115 #if (PSP_STANDALONE != 1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
116 tm_trace_user_id = etm_trace_user_id; // TML1 use the tm_trace_user_id
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
117 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
118 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
119 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
120
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
121 #ifdef MIXED_TRACE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
122 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
123 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
124 ** Function l23_init_trace
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
125 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
126 ** Description This function is called by the RV_START task to register
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
127 ** the Protocol Stack (Layers 2 & 3) in the trace module
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
128 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
129 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
130 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
131 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
132 void l23_init_trace (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
133 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
134 rvt_register_id ("L23", &l23_trace_user_id, ext_processExtInput);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
135 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
136 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
137
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
138 #ifdef RVM_RNET_BR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
139 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
140 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
141 ** Function rnet_init_trace
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
142 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
143 ** Description This function is called by the RV_START task to register
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
144 ** RNET in the trace module
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
145 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
146 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
147 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
148 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
149 void rnet_init_trace (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
150 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
151 rvt_register_id ("RNET", &rnet_trace_user_id, rnet_receive);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
152 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
153 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
154
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
155
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
156 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
157 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
158 ** Function rv_start_swe_and_check
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
159 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
160 ** Description This internal function is called by the stater task to
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
161 ** start the basic SWEs in the system and to check if
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
162 ** they started successfully or not.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
163 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
164 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
165 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
166 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
167 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
168 BOOLEAN rv_start_swe_and_check (T_RVM_USE_ID swe_use_id, T_RVM_NAME swe_name)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
169 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
170 T_RV_RETURN return_path = {0};
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
171 T_RV_HDR *msg_ptr = NULL;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
172 UINT16 rec_evt = 0;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
173 char error_msg[150] = "";
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
174
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
175 /* temporary initialization of addr_id */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
176 return_path.addr_id = START_TASK_ID;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
177 return_path.callback_func = NULL;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
178
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
179 /* attempt to initialize the required SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
180 if (rvm_start_swe (swe_use_id, return_path) != RVM_OK)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
181 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
182 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
183 "create_RVtasks: Unable to start %s (0x%.8x). Error in rvm_start_swe",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
184 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
185 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
186 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
187 strlen((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
188 NULL_PARAM,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
189 RV_TRACE_LEVEL_WARNING, RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
190 return FALSE;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
191 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
192
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
193 /*
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
194 * wait for the SWE to be actually started.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
195 * note that the 'RVM_EVT_TO_APPLI' notification is sent back
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
196 * once xxx_start () is invoked.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
197 */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
198 while (rec_evt = rvf_evt_wait (START_TASK_ID, \
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
199 0xFFFF, \
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
200 0xFFFFFFFFL))
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
201 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
202 if (rec_evt & ~RVF_TASK_MBOX_0_EVT_MASK)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
203 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
204 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
205 "create_RVtasks: Starting %s (0x%.8x). Event ",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
206 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
207 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
208 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
209 strlen((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
210 (UINT32)rec_evt,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
211 RV_TRACE_LEVEL_WARNING,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
212 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
213 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
214 if (rec_evt & RVF_TASK_MBOX_0_EVT_MASK)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
215 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
216 if ((msg_ptr = (T_RV_HDR *) rvf_read_addr_mbox (START_TASK_ID, \
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
217 RVF_TASK_MBOX_0)) == NULL)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
218 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
219 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
220 "create_RVtasks: Starting %s (0x%.8x). Message NULL",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
221 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
222 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
223 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
224 strlen((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
225 NULL_PARAM,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
226 RV_TRACE_LEVEL_WARNING,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
227 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
228 continue;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
229 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
230 if (msg_ptr->msg_id != RVM_EVT_TO_APPLI)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
231 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
232 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
233 "create_RVtasks: Starting %s (0x%.8x). Message ID ",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
234 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
235 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
236 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
237 strlen((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
238 msg_ptr->msg_id,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
239 RV_TRACE_LEVEL_WARNING,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
240 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
241 rvf_free_buf (msg_ptr);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
242 continue;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
243 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
244 break;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
245 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
246 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
247 switch (((T_RVM_APPLI_RESULT *)msg_ptr)->result)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
248 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
249 case RVM_OK:
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
250 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
251 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
252 "create_RVtasks: %s (0x%.8x) started",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
253 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
254 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
255 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
256 strlen ((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
257 NULL_PARAM,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
258 RV_TRACE_LEVEL_DEBUG_HIGH,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
259 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
260 rvf_free_buf (msg_ptr);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
261 return TRUE;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
262 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
263 case RVM_NOT_READY:
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
264 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
265 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
266 "create_RVtasks: %s (0x%.8x) already started",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
267 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
268 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
269 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
270 strlen ((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
271 NULL_PARAM,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
272 RV_TRACE_LEVEL_DEBUG_MEDIUM,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
273 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
274 rvf_free_buf (msg_ptr);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
275 return TRUE;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
276 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
277 default:
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
278 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
279 break;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
280 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
281 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
282 sprintf (error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
283 "create_RVtasks: Unable to start %s (0x%.8x). Error ",
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
284 (char *)swe_name,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
285 swe_use_id);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
286 rvf_send_trace ((char *)error_msg,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
287 strlen ((char *)error_msg),
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
288 ((T_RVM_APPLI_RESULT *)msg_ptr)->result,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
289 RV_TRACE_LEVEL_WARNING,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
290 RVM_USE_ID);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
291 rvf_free_buf (msg_ptr);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
292 return FALSE;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
293 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
294
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
295 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
296 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
297 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
298 ** Function rv_start
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
299 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
300 ** Description This function is called by the RV_START task. It starts the
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
301 ** Riviera environment and the TRACE task. This start must be
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
302 ** done after Application_initialize().
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
303 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
304 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
305 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
306 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
307 void rv_start (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
308 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
309 #if (TEST==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
310 T_RVF_MB_ID mb_id = RVF_INVALID_MB_ID;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
311 T_RVF_MB_PARAM mb_requirements = {0};
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
312 volatile UINT16 result = 0;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
313 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
314
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
315 /* initialize the RVM and the RVF at the same time */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
316 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
317 rvm_start_environment ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
318 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
319 /*
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
320 ** Init trace module
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
321 */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
322 rvt_init_trace ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
323 #ifdef RVM_ETM_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
324 etm_init_trace ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
325 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
326
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
327 #if (_GSM==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
328 #ifdef MIXED_TRACE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
329 l23_init_trace ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
330 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
331 #endif // if (_GSM==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
332
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
333 #ifdef RVM_RNET_BR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
334 rnet_init_trace ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
335 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
336
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
337 #if (REMU==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
338 #ifdef RVM_LLS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
339 /* initialize LLS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
340 lls_init();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
341 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
342
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
343 #ifdef RVM_RNG_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
344 /* initialize RNG SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
345 rng_init ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
346 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
347 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
348
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
349 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
350 #ifdef RVM_RVT_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
351 /* initialize TRACE SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
352 rv_start_swe_and_check (RVT_USE_ID, "RVT");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
353 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
354
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
355 #ifdef RVM_I2C_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
356 rv_start_swe_and_check (I2C_USE_ID, "I2C");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
357 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
358
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
359 #ifdef RVM_DMA_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
360 rv_start_swe_and_check (DMA_USE_ID, "DMA");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
361 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
362
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
363 #ifdef RVM_DMG_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
364 rv_start_swe_and_check (DMG_USE_ID, "DMG");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
365 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
366
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
367 #ifdef RVM_NAN_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
368 rv_start_swe_and_check (NAN_USE_ID, "NAN");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
369 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
370
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
371 #ifdef RVM_MC_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
372 rv_start_swe_and_check (MC_USE_ID, "MC");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
373 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
374
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
375 #ifdef RVM_FFS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
376 /* initialize FFS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
377 rv_start_swe_and_check (FFS_USE_ID, "FFS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
378 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
379
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
380 #ifdef RVM_SPI_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
381 /* initialize SPI SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
382 rv_start_swe_and_check (SPI_USE_ID, "SPI");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
383 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
384
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
385 #ifdef RVM_PWR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
386 /* initialize PWR SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
387 rv_start_swe_and_check (PWR_USE_ID, "PWR");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
388 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
389
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
390 #ifdef RVM_LCC_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
391 /* initialize LCC(PWR) SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
392 rv_start_swe_and_check (LCC_USE_ID, "LCC");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
393 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
394
342
a9743c1dbe58 create_RVtasks.c: start FCHG SWE when it is included
Mychaela Falconia <falcon@freecalypso.org>
parents: 139
diff changeset
395 #ifdef RVM_FCHG_SWE
a9743c1dbe58 create_RVtasks.c: start FCHG SWE when it is included
Mychaela Falconia <falcon@freecalypso.org>
parents: 139
diff changeset
396 /* initialize FCHG (new PWR) SWE */
a9743c1dbe58 create_RVtasks.c: start FCHG SWE when it is included
Mychaela Falconia <falcon@freecalypso.org>
parents: 139
diff changeset
397 rv_start_swe_and_check (FCHG_USE_ID, "FCHG");
a9743c1dbe58 create_RVtasks.c: start FCHG SWE when it is included
Mychaela Falconia <falcon@freecalypso.org>
parents: 139
diff changeset
398 #endif
a9743c1dbe58 create_RVtasks.c: start FCHG SWE when it is included
Mychaela Falconia <falcon@freecalypso.org>
parents: 139
diff changeset
399
98
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
400 #ifdef RVM_KPD_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
401 /* initialize KPD SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
402 rv_start_swe_and_check (KPD_USE_ID, "KPD");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
403 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
404
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
405 #ifdef RVM_DAR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
406 /* initialize DAR SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
407 rv_start_swe_and_check (DAR_USE_ID, "DAR");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
408 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
409
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
410 #ifdef RVM_R2D_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
411 /* initialize R2D SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
412 rv_start_swe_and_check (R2D_USE_ID, "R2D");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
413 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
414
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
415 #ifdef RVM_LCD_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
416 /* initialize LCD SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
417 rv_start_swe_and_check (LCD_USE_ID, "LCD");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
418 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
419
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
420
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
421 #ifdef RVM_ETM_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
422 /* initialize ETM SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
423 rv_start_swe_and_check (ETM_USE_ID, "ETM");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
424 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
425
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
426 #ifdef RVM_TTY_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
427 /* initialize TTY SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
428 rv_start_swe_and_check (TTY_USE_ID, "TTY");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
429 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
430
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
431
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
432 #ifdef RVM_AUDIO_MAIN_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
433 /* initialize AUDIO SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
434 rv_start_swe_and_check (AUDIO_USE_ID, "AUDIO");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
435 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
436
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
437 #if (PSP_STANDALONE==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
438 #ifdef RVM_AUDIO_BGD_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
439 /* initialize AUDIO BACKGROUND SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
440 rv_start_swe_and_check (AUDIO_BGD_USE_ID, "AUDIO_BGD");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
441 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
442 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
443
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
444 #if (PSP_STANDALONE==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
445 #ifdef RVM_BAE_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
446 /* initialize BAE SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
447 rv_start_swe_and_check (BAE_USE_ID, "BAE");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
448 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
449 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
450
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
451 #ifdef RVM_AS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
452 /* initialize AS (Audio Services) SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
453 rv_start_swe_and_check (AS_USE_ID, "AS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
454 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
455
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
456 #if (PSP_STANDALONE==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
457 #ifdef RVM_BPR_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
458 /* initialize sample BPR SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
459 rv_start_swe_and_check (BPR_USE_ID, "BPR");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
460 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
461
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
462 #endif /* PSP_STANDALONE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
463
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
464 #ifdef RVM_RTC_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
465 /* initialize RTC SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
466 rv_start_swe_and_check (RTC_USE_ID, "RTC");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
467 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
468
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
469 #ifdef RVM_LLS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
470 /* initialize LLS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
471 rv_start_swe_and_check (LLS_USE_ID, "LLS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
472 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
473
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
474 #ifdef RVM_TUT_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
475 /* initialize TUT SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
476 // rv_start_swe_and_check (TUT_USE_ID, "TUT");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
477 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
478
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
479 #ifdef RVM_RGUI_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
480 /* initialize RGUI SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
481 rv_start_swe_and_check (RGUI_USE_ID, "RGUI");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
482 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
483
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
484 #ifdef RVM_ATP_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
485 /* initialize ATP SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
486 rv_start_swe_and_check (ATP_USE_ID, "ATP");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
487 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
488
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
489 /*
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
490 * FreeCalypso: the main.lib:Create_RVtasks.obj binary blob we got with our
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
491 * TCS211 semi-src does not start MKS, even though the SWE itself is enabled
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
492 * in the build system and pulled into the link.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
493 */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
494 #if 0
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
495 #ifdef RVM_MKS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
496 rv_start_swe_and_check (MKS_USE_ID, "MKS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
497 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
498 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
499
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
500 #ifdef RVM_IMG_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
501 rv_start_swe_and_check (IMG_USE_ID, "IMG");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
502 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
503
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
504 #ifdef RVM_GBI_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
505 rv_start_swe_and_check (GBI_USE_ID, "GBI");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
506 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
507
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
508 #ifdef RVM_CAMD_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
509 rv_start_swe_and_check (CAMD_USE_ID, "CAMD");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
510 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
511
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
512 #ifdef RVM_USB_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
513 /* initialize USB SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
514 rv_start_swe_and_check (USB_USE_ID, "USB");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
515 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
516
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
517 #ifdef RVM_CAMA_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
518 rv_start_swe_and_check (CAMA_USE_ID, "CAMA");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
519 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
520
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
521 #ifdef RVM_MFW_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
522 /* initialize MFW SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
523 rv_start_swe_and_check (MFW_USE_ID, "MFW");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
524 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
525
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
526 #ifdef RVM_SMBS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
527 /* initialize SMBS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
528 rv_start_swe_and_check (SMBS_USE_ID, "SMBS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
529 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
530
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
531 #ifdef RVM_USBFAX_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
532 /* initialize USB SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
533 rv_start_swe_and_check (USBFAX_USE_ID, "USBFAX");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
534 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
535
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
536 #ifdef RVM_USBTRC_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
537 /* initialize USBTRC SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
538 rv_start_swe_and_check (USBTRC_USE_ID, "USBTRC");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
539 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
540
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
541 #ifdef RVM_USBMS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
542 /* initialize USBMS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
543 rv_start_swe_and_check (USBMS_USE_ID, "USBMS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
544 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
545
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
546 #ifdef RVM_RFS_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
547 /* initialize RFS SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
548 rv_start_swe_and_check (RFS_USE_ID, "RFS");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
549 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
550
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
551
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
552 #ifdef RVM_CCI_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
553 /* initialize CCI SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
554 rv_start_swe_and_check (CCI_USE_ID, "CCI");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
555 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
556
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
557 #ifdef RVM_BTUI_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
558 /* initialize sample BTUI SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
559 rv_start_swe_and_check (BTUI_USE_ID, "BTUI");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
560 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
561 #ifdef RVM_JPEG_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
562 /* initialize sample JPEG SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
563 rv_start_swe_and_check (JPEG_USE_ID, "JPEG");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
564 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
565 #ifdef RVM_JPEG_SWE
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
566 /* initialize sample JPEG SWE */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
567 rv_start_swe_and_check (JPEG_USE_ID, "JPEG");
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
568 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
569 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
570 // WARNING WARNING ----------------------------------------------------
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
571 // Do not perform any SWE initialization after this line !
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
572 // WARNING WARNING ----------------------------------------------------
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
573
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
574 #if (REMU==0) /* moved this to kpd start function. rv_start function for REMU. rv_start is called from Application Initialize
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
575 context. Since this is a blocking call, we cannot afford to block in Application_Initialization. */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
576 #ifndef _WINDOWS
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
577 // Perform switch ON processing.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
578 Switch_ON();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
579 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
580
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
581 #if (_GSM==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
582 BZ_KeyBeep_ON (); // Audio feedback if ON/OFF pushed
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
583 #endif // if (_GSM==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
584
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
585 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
586 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
587 /* dump the Riviera memory state */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
588 rvf_delay (RVF_MS_TO_TICKS (300)) ;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
589 rvf_dump_mem ();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
590 rvf_dump_pool();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
591 rvf_dump_tasks();
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
592 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
593 #if (TEST==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
594 #if (PSP_STANDALONE == 1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
595 /* Just For Testing Reset of UICC */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
596 // bspUicc_reset(1,0);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
597
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
598 /* Just For Testing GEA */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
599 // bspTest_Gea3_ciph_req(1);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
600
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
601 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
602 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
603 // create a Memory Bank for the 'Test Selection Menu'.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
604 mb_requirements.size = RVTEST_MENU_MB_SIZE;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
605 mb_requirements.watermark = RVTEST_MENU_MB_WATERMARK;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
606 mb_requirements.pool_id = RVF_POOL_EXTERNAL_MEM;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
607 if (rvf_create_mb (RVTEST_MENU_MB_NAME,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
608 mb_requirements,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
609 &mb_id) != RVF_OK)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
610 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
611 // error case.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
612 result++;
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
613 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
614
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
615 #if (PSP_STANDALONE == 1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
616 /* Just For Testing Reset of UICC */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
617 bspUicc_reset(1,0); /* Just For Testing GEA */
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
618 bspTest_Gea3_ciph_req(1);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
619 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
620
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
621 // Go to the 'Test Selection Menu' (using rv_test ()).
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
622 rv_test (0);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
623 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
624 #endif // (TEST==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
625
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
626 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
627 // infinite wait
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
628 rvf_evt_wait (START_TASK_ID,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
629 0xFFFF,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
630 0xFFFFFFFFL);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
631 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
632 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
633
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
634 #if (TEST==1)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
635 #define RV_START_TASK_STACK (4096)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
636 #else
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
637 #define RV_START_TASK_STACK (1024)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
638 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
639 #if (CHIPSET!=15) || (REMU==0)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
640 UINT8 stack_start[RV_START_TASK_STACK];
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
641
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
642
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
643 /*******************************************************************************
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
644 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
645 ** Function create_tasks
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
646 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
647 ** Description This function is called once at startup to allow task
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
648 ** creation thanks to Riviera environment.
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
649 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
650 ** Returns void
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
651 **
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
652 *******************************************************************************/
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
653 void create_tasks (void)
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
654 {
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
655
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
656 // Tasks creation
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
657 rvf_create_legacy_task ((TASKPTR) rv_start, START_TASK_ID,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
658 "RV_START", stack_start,
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
659 RV_START_TASK_STACK, RV_START_TASK_PRIO, 0, RUNNING);
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
660
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
661 }
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
662 #endif
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
663
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
664
134c5fe13e44 src/cs/system/Main: recompilable C sources added from leo2moko-debug
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
665