@@ -1,253 +1,253 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.5) on: Tu |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Thu Mar 27 13:16:57 2014 | |
4 | # Project: fsw-qt.pro |
|
4 | # Project: fsw-qt.pro | |
5 | # Template: app |
|
5 | # Template: app | |
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
6 | # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
7 | ############################################################################# |
|
7 | ############################################################################# | |
8 |
|
8 | |||
9 | ####### Compiler, tools and options |
|
9 | ####### Compiler, tools and options | |
10 |
|
10 | |||
11 | CC = sparc-rtems-gcc |
|
11 | CC = sparc-rtems-gcc | |
12 | CXX = sparc-rtems-g++ |
|
12 | CXX = sparc-rtems-g++ | |
13 |
DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=3 |
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=3 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../../LFR_basic-parameters |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../../LFR_basic-parameters | |
17 | LINK = sparc-rtems-g++ |
|
17 | LINK = sparc-rtems-g++ | |
18 | LFLAGS = |
|
18 | LFLAGS = | |
19 | LIBS = $(SUBLIBS) |
|
19 | LIBS = $(SUBLIBS) | |
20 | AR = sparc-rtems-ar rcs |
|
20 | AR = sparc-rtems-ar rcs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = sparc-rtems-strip |
|
29 | STRIP = sparc-rtems-strip | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = ../src/wf_handler.c \ |
|
46 | SOURCES = ../src/wf_handler.c \ | |
47 | ../src/tc_handler.c \ |
|
47 | ../src/tc_handler.c \ | |
48 | ../src/fsw_processing.c \ |
|
48 | ../src/fsw_processing.c \ | |
49 | ../src/fsw_misc.c \ |
|
49 | ../src/fsw_misc.c \ | |
50 | ../src/fsw_init.c \ |
|
50 | ../src/fsw_init.c \ | |
51 | ../src/fsw_globals.c \ |
|
51 | ../src/fsw_globals.c \ | |
52 | ../src/fsw_spacewire.c \ |
|
52 | ../src/fsw_spacewire.c \ | |
53 | ../src/tc_load_dump_parameters.c \ |
|
53 | ../src/tc_load_dump_parameters.c \ | |
54 | ../src/tm_lfr_tc_exe.c \ |
|
54 | ../src/tm_lfr_tc_exe.c \ | |
55 | ../src/tc_acceptance.c \ |
|
55 | ../src/tc_acceptance.c \ | |
56 | ../../LFR_basic-parameters/basic_parameters.c |
|
56 | ../../LFR_basic-parameters/basic_parameters.c | |
57 | OBJECTS = obj/wf_handler.o \ |
|
57 | OBJECTS = obj/wf_handler.o \ | |
58 | obj/tc_handler.o \ |
|
58 | obj/tc_handler.o \ | |
59 | obj/fsw_processing.o \ |
|
59 | obj/fsw_processing.o \ | |
60 | obj/fsw_misc.o \ |
|
60 | obj/fsw_misc.o \ | |
61 | obj/fsw_init.o \ |
|
61 | obj/fsw_init.o \ | |
62 | obj/fsw_globals.o \ |
|
62 | obj/fsw_globals.o \ | |
63 | obj/fsw_spacewire.o \ |
|
63 | obj/fsw_spacewire.o \ | |
64 | obj/tc_load_dump_parameters.o \ |
|
64 | obj/tc_load_dump_parameters.o \ | |
65 | obj/tm_lfr_tc_exe.o \ |
|
65 | obj/tm_lfr_tc_exe.o \ | |
66 | obj/tc_acceptance.o \ |
|
66 | obj/tc_acceptance.o \ | |
67 | obj/basic_parameters.o |
|
67 | obj/basic_parameters.o | |
68 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
68 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
69 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
69 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
70 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
70 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
71 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
71 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
72 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
72 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
73 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
73 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
74 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
74 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
75 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
75 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
76 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
76 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
77 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
77 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
78 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
78 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
79 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
79 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
80 | sparc.pri \ |
|
80 | sparc.pri \ | |
81 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
81 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
82 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
90 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
91 | fsw-qt.pro |
|
91 | fsw-qt.pro | |
92 | QMAKE_TARGET = fsw |
|
92 | QMAKE_TARGET = fsw | |
93 | DESTDIR = bin/ |
|
93 | DESTDIR = bin/ | |
94 | TARGET = bin/fsw |
|
94 | TARGET = bin/fsw | |
95 |
|
95 | |||
96 | first: all |
|
96 | first: all | |
97 | ####### Implicit rules |
|
97 | ####### Implicit rules | |
98 |
|
98 | |||
99 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
99 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
100 |
|
100 | |||
101 | .cpp.o: |
|
101 | .cpp.o: | |
102 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
102 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
103 |
|
103 | |||
104 | .cc.o: |
|
104 | .cc.o: | |
105 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
105 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
106 |
|
106 | |||
107 | .cxx.o: |
|
107 | .cxx.o: | |
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
109 |
|
109 | |||
110 | .C.o: |
|
110 | .C.o: | |
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
112 |
|
112 | |||
113 | .c.o: |
|
113 | .c.o: | |
114 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
114 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
115 |
|
115 | |||
116 | ####### Build rules |
|
116 | ####### Build rules | |
117 |
|
117 | |||
118 | all: Makefile $(TARGET) |
|
118 | all: Makefile $(TARGET) | |
119 |
|
119 | |||
120 | $(TARGET): $(OBJECTS) |
|
120 | $(TARGET): $(OBJECTS) | |
121 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
121 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
122 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
122 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
123 |
|
123 | |||
124 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
124 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
125 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
125 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
126 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
126 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
127 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
127 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
128 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
128 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
129 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
129 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
130 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
130 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
131 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
131 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
132 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
132 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
133 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
133 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
134 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
134 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
135 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
135 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
136 | sparc.pri \ |
|
136 | sparc.pri \ | |
137 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
137 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
138 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
138 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
139 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
139 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
140 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
143 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
144 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
144 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
145 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
145 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
146 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
146 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
147 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
147 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
148 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
148 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
149 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
149 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
150 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
150 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
151 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
151 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
152 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
152 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
153 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
153 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
154 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
154 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
155 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
155 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
156 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
156 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
157 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
157 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
158 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
158 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
159 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
159 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
160 | sparc.pri: |
|
160 | sparc.pri: | |
161 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
161 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
162 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
162 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
163 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
163 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
164 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
167 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
168 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
168 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
169 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
169 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
170 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
170 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
171 | qmake: FORCE |
|
171 | qmake: FORCE | |
172 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
172 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
173 |
|
173 | |||
174 | dist: |
|
174 | dist: | |
175 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
175 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
176 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 |
|
176 | $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw1.0.0/ && (cd `dirname obj/fsw1.0.0` && $(TAR) fsw1.0.0.tar fsw1.0.0 && $(COMPRESS) fsw1.0.0.tar) && $(MOVE) `dirname obj/fsw1.0.0`/fsw1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw1.0.0 | |
177 |
|
177 | |||
178 |
|
178 | |||
179 | clean:compiler_clean |
|
179 | clean:compiler_clean | |
180 | -$(DEL_FILE) $(OBJECTS) |
|
180 | -$(DEL_FILE) $(OBJECTS) | |
181 | -$(DEL_FILE) *~ core *.core |
|
181 | -$(DEL_FILE) *~ core *.core | |
182 |
|
182 | |||
183 |
|
183 | |||
184 | ####### Sub-libraries |
|
184 | ####### Sub-libraries | |
185 |
|
185 | |||
186 | distclean: clean |
|
186 | distclean: clean | |
187 | -$(DEL_FILE) $(TARGET) |
|
187 | -$(DEL_FILE) $(TARGET) | |
188 | -$(DEL_FILE) Makefile |
|
188 | -$(DEL_FILE) Makefile | |
189 |
|
189 | |||
190 |
|
190 | |||
191 | grmon: |
|
191 | grmon: | |
192 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
192 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
193 |
|
193 | |||
194 | check: first |
|
194 | check: first | |
195 |
|
195 | |||
196 | compiler_rcc_make_all: |
|
196 | compiler_rcc_make_all: | |
197 | compiler_rcc_clean: |
|
197 | compiler_rcc_clean: | |
198 | compiler_uic_make_all: |
|
198 | compiler_uic_make_all: | |
199 | compiler_uic_clean: |
|
199 | compiler_uic_clean: | |
200 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
200 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
201 | compiler_image_collection_clean: |
|
201 | compiler_image_collection_clean: | |
202 | -$(DEL_FILE) qmake_image_collection.cpp |
|
202 | -$(DEL_FILE) qmake_image_collection.cpp | |
203 | compiler_yacc_decl_make_all: |
|
203 | compiler_yacc_decl_make_all: | |
204 | compiler_yacc_decl_clean: |
|
204 | compiler_yacc_decl_clean: | |
205 | compiler_yacc_impl_make_all: |
|
205 | compiler_yacc_impl_make_all: | |
206 | compiler_yacc_impl_clean: |
|
206 | compiler_yacc_impl_clean: | |
207 | compiler_lex_make_all: |
|
207 | compiler_lex_make_all: | |
208 | compiler_lex_clean: |
|
208 | compiler_lex_clean: | |
209 | compiler_clean: |
|
209 | compiler_clean: | |
210 |
|
210 | |||
211 | ####### Compile |
|
211 | ####### Compile | |
212 |
|
212 | |||
213 | obj/wf_handler.o: ../src/wf_handler.c |
|
213 | obj/wf_handler.o: ../src/wf_handler.c | |
214 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
214 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
215 |
|
215 | |||
216 | obj/tc_handler.o: ../src/tc_handler.c |
|
216 | obj/tc_handler.o: ../src/tc_handler.c | |
217 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
217 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
218 |
|
218 | |||
219 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c |
|
219 | obj/fsw_processing.o: ../src/fsw_processing.c ../src/fsw_processing_globals.c | |
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c |
|
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c | |
221 |
|
221 | |||
222 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
222 | obj/fsw_misc.o: ../src/fsw_misc.c | |
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
224 |
|
224 | |||
225 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
225 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
227 |
|
227 | |||
228 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
228 | obj/fsw_globals.o: ../src/fsw_globals.c | |
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
230 |
|
230 | |||
231 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
231 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
233 |
|
233 | |||
234 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
234 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
236 |
|
236 | |||
237 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
237 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
239 |
|
239 | |||
240 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
240 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
242 |
|
242 | |||
243 | obj/basic_parameters.o: ../../LFR_basic-parameters/basic_parameters.c ../../LFR_basic-parameters/basic_parameters.h |
|
243 | obj/basic_parameters.o: ../../LFR_basic-parameters/basic_parameters.c ../../LFR_basic-parameters/basic_parameters.h | |
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../../LFR_basic-parameters/basic_parameters.c |
|
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../../LFR_basic-parameters/basic_parameters.c | |
245 |
|
245 | |||
246 | ####### Install |
|
246 | ####### Install | |
247 |
|
247 | |||
248 | install: FORCE |
|
248 | install: FORCE | |
249 |
|
249 | |||
250 | uninstall: FORCE |
|
250 | uninstall: FORCE | |
251 |
|
251 | |||
252 | FORCE: |
|
252 | FORCE: | |
253 |
|
253 |
@@ -1,85 +1,85 | |||||
1 | TEMPLATE = app |
|
1 | TEMPLATE = app | |
2 | # CONFIG += console v8 sim |
|
2 | # CONFIG += console v8 sim | |
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch |
|
3 | # CONFIG options = verbose *** boot_messages *** debug_messages *** cpu_usage_report *** stack_report *** vhdl_dev *** debug_tch | |
4 |
CONFIG += console verbose |
|
4 | CONFIG += console verbose | |
5 | CONFIG -= qt |
|
5 | CONFIG -= qt | |
6 |
|
6 | |||
7 | include(./sparc.pri) |
|
7 | include(./sparc.pri) | |
8 |
|
8 | |||
9 | # flight software version |
|
9 | # flight software version | |
10 | SWVERSION=-1-0 |
|
10 | SWVERSION=-1-0 | |
11 | DEFINES += SW_VERSION_N1=1 # major |
|
11 | DEFINES += SW_VERSION_N1=1 # major | |
12 | DEFINES += SW_VERSION_N2=0 # minor |
|
12 | DEFINES += SW_VERSION_N2=0 # minor | |
13 | DEFINES += SW_VERSION_N3=0 # patch |
|
13 | DEFINES += SW_VERSION_N3=0 # patch | |
14 | DEFINES += SW_VERSION_N4=3 # internal |
|
14 | DEFINES += SW_VERSION_N4=3 # internal | |
15 |
|
15 | |||
16 | contains( CONFIG, debug_tch ) { |
|
16 | contains( CONFIG, debug_tch ) { | |
17 | DEFINES += DEBUG_TCH |
|
17 | DEFINES += DEBUG_TCH | |
18 | } |
|
18 | } | |
19 |
|
19 | |||
20 | contains( CONFIG, vhdl_dev ) { |
|
20 | contains( CONFIG, vhdl_dev ) { | |
21 | DEFINES += VHDL_DEV |
|
21 | DEFINES += VHDL_DEV | |
22 | } |
|
22 | } | |
23 |
|
23 | |||
24 | contains( CONFIG, verbose ) { |
|
24 | contains( CONFIG, verbose ) { | |
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE |
|
25 | DEFINES += PRINT_MESSAGES_ON_CONSOLE | |
26 | } |
|
26 | } | |
27 |
|
27 | |||
28 | contains( CONFIG, debug_messages ) { |
|
28 | contains( CONFIG, debug_messages ) { | |
29 | DEFINES += DEBUG_MESSAGES |
|
29 | DEFINES += DEBUG_MESSAGES | |
30 | } |
|
30 | } | |
31 |
|
31 | |||
32 | contains( CONFIG, cpu_usage_report ) { |
|
32 | contains( CONFIG, cpu_usage_report ) { | |
33 | DEFINES += PRINT_TASK_STATISTICS |
|
33 | DEFINES += PRINT_TASK_STATISTICS | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | contains( CONFIG, stack_report ) { |
|
36 | contains( CONFIG, stack_report ) { | |
37 | DEFINES += PRINT_STACK_REPORT |
|
37 | DEFINES += PRINT_STACK_REPORT | |
38 | } |
|
38 | } | |
39 |
|
39 | |||
40 | contains( CONFIG, boot_messages ) { |
|
40 | contains( CONFIG, boot_messages ) { | |
41 | DEFINES += BOOT_MESSAGES |
|
41 | DEFINES += BOOT_MESSAGES | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | #doxygen.target = doxygen |
|
44 | #doxygen.target = doxygen | |
45 | #doxygen.commands = doxygen ../doc/Doxyfile |
|
45 | #doxygen.commands = doxygen ../doc/Doxyfile | |
46 | #QMAKE_EXTRA_TARGETS += doxygen |
|
46 | #QMAKE_EXTRA_TARGETS += doxygen | |
47 |
|
47 | |||
48 | TARGET = fsw |
|
48 | TARGET = fsw | |
49 |
|
49 | |||
50 | INCLUDEPATH += \ |
|
50 | INCLUDEPATH += \ | |
51 | ../src \ |
|
51 | ../src \ | |
52 | ../header \ |
|
52 | ../header \ | |
53 | ../../LFR_basic-parameters |
|
53 | ../../LFR_basic-parameters | |
54 |
|
54 | |||
55 | SOURCES += \ |
|
55 | SOURCES += \ | |
56 | ../src/wf_handler.c \ |
|
56 | ../src/wf_handler.c \ | |
57 | ../src/tc_handler.c \ |
|
57 | ../src/tc_handler.c \ | |
58 | ../src/fsw_processing.c \ |
|
58 | ../src/fsw_processing.c \ | |
59 | ../src/fsw_misc.c \ |
|
59 | ../src/fsw_misc.c \ | |
60 | ../src/fsw_init.c \ |
|
60 | ../src/fsw_init.c \ | |
61 | ../src/fsw_globals.c \ |
|
61 | ../src/fsw_globals.c \ | |
62 | ../src/fsw_spacewire.c \ |
|
62 | ../src/fsw_spacewire.c \ | |
63 | ../src/tc_load_dump_parameters.c \ |
|
63 | ../src/tc_load_dump_parameters.c \ | |
64 | ../src/tm_lfr_tc_exe.c \ |
|
64 | ../src/tm_lfr_tc_exe.c \ | |
65 | ../src/tc_acceptance.c \ |
|
65 | ../src/tc_acceptance.c \ | |
66 | ../../LFR_basic-parameters/basic_parameters.c |
|
66 | ../../LFR_basic-parameters/basic_parameters.c | |
67 |
|
67 | |||
68 |
|
68 | |||
69 | HEADERS += \ |
|
69 | HEADERS += \ | |
70 | ../header/wf_handler.h \ |
|
70 | ../header/wf_handler.h \ | |
71 | ../header/tc_handler.h \ |
|
71 | ../header/tc_handler.h \ | |
72 | ../header/grlib_regs.h \ |
|
72 | ../header/grlib_regs.h \ | |
73 | ../header/fsw_processing.h \ |
|
73 | ../header/fsw_processing.h \ | |
74 | ../header/fsw_params.h \ |
|
74 | ../header/fsw_params.h \ | |
75 | ../header/fsw_misc.h \ |
|
75 | ../header/fsw_misc.h \ | |
76 | ../header/fsw_init.h \ |
|
76 | ../header/fsw_init.h \ | |
77 | ../header/ccsds_types.h \ |
|
77 | ../header/ccsds_types.h \ | |
78 | ../header/fsw_params_processing.h \ |
|
78 | ../header/fsw_params_processing.h \ | |
79 | ../header/fsw_spacewire.h \ |
|
79 | ../header/fsw_spacewire.h \ | |
80 | ../header/tc_load_dump_parameters.h \ |
|
80 | ../header/tc_load_dump_parameters.h \ | |
81 | ../header/tm_lfr_tc_exe.h \ |
|
81 | ../header/tm_lfr_tc_exe.h \ | |
82 | ../header/tc_acceptance.h \ |
|
82 | ../header/tc_acceptance.h \ | |
83 | ../header/fsw_params_nb_bytes.h \ |
|
83 | ../header/fsw_params_nb_bytes.h \ | |
84 | ../../LFR_basic-parameters/basic_parameters.h |
|
84 | ../../LFR_basic-parameters/basic_parameters.h | |
85 |
|
85 |
@@ -1,339 +1,339 | |||||
1 | <?xml version="1.0" encoding="UTF-8"?> |
|
1 | <?xml version="1.0" encoding="UTF-8"?> | |
2 | <!DOCTYPE QtCreatorProject> |
|
2 | <!DOCTYPE QtCreatorProject> | |
3 |
<!-- Written by QtCreator 3.0.1, 2014-03-2 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-03-27T07:16:29. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">1</value> |
|
7 | <value type="int">1</value> | |
8 | </data> |
|
8 | </data> | |
9 | <data> |
|
9 | <data> | |
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> |
|
10 | <variable>ProjectExplorer.Project.EditorSettings</variable> | |
11 | <valuemap type="QVariantMap"> |
|
11 | <valuemap type="QVariantMap"> | |
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> |
|
12 | <value type="bool" key="EditorConfiguration.AutoIndent">true</value> | |
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> |
|
13 | <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value> | |
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> |
|
14 | <value type="bool" key="EditorConfiguration.CamelCaseNavigation">true</value> | |
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> |
|
15 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0"> | |
16 | <value type="QString" key="language">Cpp</value> |
|
16 | <value type="QString" key="language">Cpp</value> | |
17 | <valuemap type="QVariantMap" key="value"> |
|
17 | <valuemap type="QVariantMap" key="value"> | |
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> |
|
18 | <value type="QByteArray" key="CurrentPreferences">CppGlobal</value> | |
19 | </valuemap> |
|
19 | </valuemap> | |
20 | </valuemap> |
|
20 | </valuemap> | |
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> |
|
21 | <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1"> | |
22 | <value type="QString" key="language">QmlJS</value> |
|
22 | <value type="QString" key="language">QmlJS</value> | |
23 | <valuemap type="QVariantMap" key="value"> |
|
23 | <valuemap type="QVariantMap" key="value"> | |
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> |
|
24 | <value type="QByteArray" key="CurrentPreferences">QmlJSGlobal</value> | |
25 | </valuemap> |
|
25 | </valuemap> | |
26 | </valuemap> |
|
26 | </valuemap> | |
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> |
|
27 | <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value> | |
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> |
|
28 | <value type="QByteArray" key="EditorConfiguration.Codec">UTF-8</value> | |
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> |
|
29 | <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value> | |
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> |
|
30 | <value type="int" key="EditorConfiguration.IndentSize">4</value> | |
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> |
|
31 | <value type="bool" key="EditorConfiguration.KeyboardTooltips">false</value> | |
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> |
|
32 | <value type="bool" key="EditorConfiguration.MouseNavigation">true</value> | |
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> |
|
33 | <value type="int" key="EditorConfiguration.PaddingMode">1</value> | |
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> |
|
34 | <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value> | |
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> |
|
35 | <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value> | |
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> |
|
36 | <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value> | |
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> |
|
37 | <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value> | |
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> |
|
38 | <value type="int" key="EditorConfiguration.TabSize">8</value> | |
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> |
|
39 | <value type="bool" key="EditorConfiguration.UseGlobal">true</value> | |
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> |
|
40 | <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value> | |
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> |
|
41 | <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value> | |
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> |
|
42 | <value type="bool" key="EditorConfiguration.cleanIndentation">true</value> | |
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> |
|
43 | <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value> | |
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> |
|
44 | <value type="bool" key="EditorConfiguration.inEntireDocument">false</value> | |
45 | </valuemap> |
|
45 | </valuemap> | |
46 | </data> |
|
46 | </data> | |
47 | <data> |
|
47 | <data> | |
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> |
|
48 | <variable>ProjectExplorer.Project.PluginSettings</variable> | |
49 | <valuemap type="QVariantMap"/> |
|
49 | <valuemap type="QVariantMap"/> | |
50 | </data> |
|
50 | </data> | |
51 | <data> |
|
51 | <data> | |
52 | <variable>ProjectExplorer.Project.Target.0</variable> |
|
52 | <variable>ProjectExplorer.Project.Target.0</variable> | |
53 | <valuemap type="QVariantMap"> |
|
53 | <valuemap type="QVariantMap"> | |
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{e04e3924-0bd8-4708-be18-f1474e45608e}</value> | |
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
57 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
58 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
59 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
60 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
61 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
62 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
63 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
64 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
65 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
66 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
67 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
68 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
69 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
70 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
71 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
72 | </valuemap> |
|
72 | </valuemap> | |
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
73 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
74 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
75 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
76 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
77 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
78 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
79 | <value type="QString">-w</value> |
|
79 | <value type="QString">-w</value> | |
80 | <value type="QString">-r</value> |
|
80 | <value type="QString">-r</value> | |
81 | </valuelist> |
|
81 | </valuelist> | |
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
82 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
83 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
84 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
85 | </valuemap> |
|
85 | </valuemap> | |
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
86 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
87 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
88 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
89 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
90 | </valuemap> |
|
90 | </valuemap> | |
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
91 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
92 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
93 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
94 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
95 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
96 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
97 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
98 | <value type="QString">-w</value> |
|
98 | <value type="QString">-w</value> | |
99 | <value type="QString">-r</value> |
|
99 | <value type="QString">-r</value> | |
100 | </valuelist> |
|
100 | </valuelist> | |
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
101 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
102 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
103 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
104 | </valuemap> |
|
104 | </valuemap> | |
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
105 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
106 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
107 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
108 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
109 | </valuemap> |
|
109 | </valuemap> | |
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
110 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
111 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
112 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
113 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
114 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
115 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
116 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
117 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
118 | </valuemap> |
|
118 | </valuemap> | |
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
119 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
120 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
121 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
122 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
123 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
124 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
125 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
126 | </valuemap> |
|
126 | </valuemap> | |
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
127 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
128 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
129 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
130 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
131 | </valuemap> |
|
131 | </valuemap> | |
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
132 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
133 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
134 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
135 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
136 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
137 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
138 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
139 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
140 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
141 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
142 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
143 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
144 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
145 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
146 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
147 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
148 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
149 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
150 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
151 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
152 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
153 | <value type="int">0</value> |
|
153 | <value type="int">0</value> | |
154 | <value type="int">1</value> |
|
154 | <value type="int">1</value> | |
155 | <value type="int">2</value> |
|
155 | <value type="int">2</value> | |
156 | <value type="int">3</value> |
|
156 | <value type="int">3</value> | |
157 | <value type="int">4</value> |
|
157 | <value type="int">4</value> | |
158 | <value type="int">5</value> |
|
158 | <value type="int">5</value> | |
159 | <value type="int">6</value> |
|
159 | <value type="int">6</value> | |
160 | <value type="int">7</value> |
|
160 | <value type="int">7</value> | |
161 | <value type="int">8</value> |
|
161 | <value type="int">8</value> | |
162 | <value type="int">9</value> |
|
162 | <value type="int">9</value> | |
163 | <value type="int">10</value> |
|
163 | <value type="int">10</value> | |
164 | <value type="int">11</value> |
|
164 | <value type="int">11</value> | |
165 | <value type="int">12</value> |
|
165 | <value type="int">12</value> | |
166 | <value type="int">13</value> |
|
166 | <value type="int">13</value> | |
167 | <value type="int">14</value> |
|
167 | <value type="int">14</value> | |
168 | </valuelist> |
|
168 | </valuelist> | |
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
169 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
170 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
171 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
172 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
173 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
174 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
175 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
176 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
177 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
178 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
179 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">false</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value> | |
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
182 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
183 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
184 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
185 | </valuemap> |
|
185 | </valuemap> | |
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
186 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
187 | </valuemap> |
|
187 | </valuemap> | |
188 | </data> |
|
188 | </data> | |
189 | <data> |
|
189 | <data> | |
190 | <variable>ProjectExplorer.Project.Target.1</variable> |
|
190 | <variable>ProjectExplorer.Project.Target.1</variable> | |
191 | <valuemap type="QVariantMap"> |
|
191 | <valuemap type="QVariantMap"> | |
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
192 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
193 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
194 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> | |
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> |
|
195 | <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value> | |
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> |
|
196 | <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value> | |
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> |
|
197 | <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value> | |
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> |
|
198 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0"> | |
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> |
|
199 | <value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory"></value> | |
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
200 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
201 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
202 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> |
|
203 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value> | |
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
204 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> |
|
205 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value> | |
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> |
|
206 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value> | |
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> |
|
207 | <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">false</value> | |
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> |
|
208 | <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value> | |
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> |
|
209 | <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value> | |
210 | </valuemap> |
|
210 | </valuemap> | |
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> |
|
211 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1"> | |
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
212 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
213 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
214 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
215 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
216 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
217 | <value type="QString">-w</value> |
|
217 | <value type="QString">-w</value> | |
218 | <value type="QString">-r</value> |
|
218 | <value type="QString">-r</value> | |
219 | </valuelist> |
|
219 | </valuelist> | |
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> |
|
220 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value> | |
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> |
|
221 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value> | |
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
222 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
223 | </valuemap> |
|
223 | </valuemap> | |
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> |
|
224 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value> | |
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> |
|
225 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value> | |
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
226 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> |
|
227 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value> | |
228 | </valuemap> |
|
228 | </valuemap> | |
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> |
|
229 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1"> | |
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> |
|
230 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0"> | |
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> |
|
231 | <value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value> | |
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> |
|
232 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value> | |
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
233 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> |
|
234 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value> | |
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> |
|
235 | <valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"> | |
236 | <value type="QString">-w</value> |
|
236 | <value type="QString">-w</value> | |
237 | <value type="QString">-r</value> |
|
237 | <value type="QString">-r</value> | |
238 | </valuelist> |
|
238 | </valuelist> | |
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> |
|
239 | <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value> | |
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> |
|
240 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value> | |
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> |
|
241 | <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value> | |
242 | </valuemap> |
|
242 | </valuemap> | |
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> |
|
243 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value> | |
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> |
|
244 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value> | |
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
245 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> |
|
246 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value> | |
247 | </valuemap> |
|
247 | </valuemap> | |
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> |
|
248 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value> | |
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> |
|
249 | <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value> | |
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> |
|
250 | <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/> | |
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> |
|
251 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Release</value> | |
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
252 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> |
|
253 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value> | |
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> |
|
254 | <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value> | |
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> |
|
255 | <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value> | |
256 | </valuemap> |
|
256 | </valuemap> | |
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> |
|
257 | <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">1</value> | |
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> |
|
258 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0"> | |
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> |
|
259 | <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0"> | |
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> |
|
260 | <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value> | |
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> |
|
261 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value> | |
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
262 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> |
|
263 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value> | |
264 | </valuemap> |
|
264 | </valuemap> | |
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> |
|
265 | <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value> | |
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> |
|
266 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy locally</value> | |
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
267 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> |
|
268 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value> | |
269 | </valuemap> |
|
269 | </valuemap> | |
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> |
|
270 | <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value> | |
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> |
|
271 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.PluginSettings"/> | |
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> |
|
272 | <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0"> | |
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> |
|
273 | <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/> | |
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> |
|
274 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value> | |
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> |
|
275 | <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value> | |
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> |
|
276 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value> | |
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> |
|
277 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value> | |
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> |
|
278 | <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value> | |
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> |
|
279 | <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value> | |
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> |
|
280 | <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value> | |
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> |
|
281 | <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value> | |
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> |
|
282 | <value type="int" key="Analyzer.Valgrind.LeakCheckOnFinish">1</value> | |
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> |
|
283 | <value type="int" key="Analyzer.Valgrind.NumCallers">25</value> | |
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> |
|
284 | <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/> | |
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> |
|
285 | <value type="int" key="Analyzer.Valgrind.SelfModifyingCodeDetection">1</value> | |
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> |
|
286 | <value type="bool" key="Analyzer.Valgrind.Settings.UseGlobalSettings">true</value> | |
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> |
|
287 | <value type="bool" key="Analyzer.Valgrind.ShowReachable">false</value> | |
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> |
|
288 | <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value> | |
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> |
|
289 | <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value> | |
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> |
|
290 | <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds"> | |
291 | <value type="int">0</value> |
|
291 | <value type="int">0</value> | |
292 | <value type="int">1</value> |
|
292 | <value type="int">1</value> | |
293 | <value type="int">2</value> |
|
293 | <value type="int">2</value> | |
294 | <value type="int">3</value> |
|
294 | <value type="int">3</value> | |
295 | <value type="int">4</value> |
|
295 | <value type="int">4</value> | |
296 | <value type="int">5</value> |
|
296 | <value type="int">5</value> | |
297 | <value type="int">6</value> |
|
297 | <value type="int">6</value> | |
298 | <value type="int">7</value> |
|
298 | <value type="int">7</value> | |
299 | <value type="int">8</value> |
|
299 | <value type="int">8</value> | |
300 | <value type="int">9</value> |
|
300 | <value type="int">9</value> | |
301 | <value type="int">10</value> |
|
301 | <value type="int">10</value> | |
302 | <value type="int">11</value> |
|
302 | <value type="int">11</value> | |
303 | <value type="int">12</value> |
|
303 | <value type="int">12</value> | |
304 | <value type="int">13</value> |
|
304 | <value type="int">13</value> | |
305 | <value type="int">14</value> |
|
305 | <value type="int">14</value> | |
306 | </valuelist> |
|
306 | </valuelist> | |
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> |
|
307 | <value type="int" key="PE.EnvironmentAspect.Base">2</value> | |
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> |
|
308 | <valuelist type="QVariantList" key="PE.EnvironmentAspect.Changes"/> | |
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> |
|
309 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value> | |
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> |
|
310 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value> | |
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> |
|
311 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration:/opt/DEV_PLE/FSW-qt/fsw-qt.pro</value> | |
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> |
|
312 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value> | |
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> |
|
313 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value> | |
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> |
|
314 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value> | |
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> |
|
315 | <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value> | |
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> |
|
316 | <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value> | |
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> |
|
317 | <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value> | |
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> |
|
318 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
319 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> | |
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> |
|
320 | <value type="bool" key="RunConfiguration.UseMultiProcess">false</value> | |
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> |
|
321 | <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value> | |
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> |
|
322 | <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value> | |
323 | </valuemap> |
|
323 | </valuemap> | |
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> |
|
324 | <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value> | |
325 | </valuemap> |
|
325 | </valuemap> | |
326 | </data> |
|
326 | </data> | |
327 | <data> |
|
327 | <data> | |
328 | <variable>ProjectExplorer.Project.TargetCount</variable> |
|
328 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
329 | <value type="int">2</value> |
|
329 | <value type="int">2</value> | |
330 | </data> |
|
330 | </data> | |
331 | <data> |
|
331 | <data> | |
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
332 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
333 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
334 | </data> |
|
334 | </data> | |
335 | <data> |
|
335 | <data> | |
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
336 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
337 | <value type="int">15</value> |
|
337 | <value type="int">15</value> | |
338 | </data> |
|
338 | </data> | |
339 | </qtcreator> |
|
339 | </qtcreator> |
@@ -1,58 +1,59 | |||||
1 | #ifndef TC_HANDLER_H_INCLUDED |
|
1 | #ifndef TC_HANDLER_H_INCLUDED | |
2 | #define TC_HANDLER_H_INCLUDED |
|
2 | #define TC_HANDLER_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <leon.h> |
|
5 | #include <leon.h> | |
6 |
|
6 | |||
7 | #include "tc_load_dump_parameters.h" |
|
7 | #include "tc_load_dump_parameters.h" | |
8 | #include "tc_acceptance.h" |
|
8 | #include "tc_acceptance.h" | |
9 | #include "tm_lfr_tc_exe.h" |
|
9 | #include "tm_lfr_tc_exe.h" | |
10 | #include "wf_handler.h" |
|
10 | #include "wf_handler.h" | |
11 | #include "fsw_processing.h" |
|
11 | #include "fsw_processing.h" | |
12 |
|
12 | |||
13 | // MODE PARAMETERS |
|
13 | // MODE PARAMETERS | |
14 | extern unsigned int maxCount; |
|
14 | extern unsigned int maxCount; | |
15 |
|
15 | |||
16 | //**** |
|
16 | //**** | |
17 | // ISR |
|
17 | // ISR | |
18 | rtems_isr commutation_isr1( rtems_vector_number vector ); |
|
18 | rtems_isr commutation_isr1( rtems_vector_number vector ); | |
19 | rtems_isr commutation_isr2( rtems_vector_number vector ); |
|
19 | rtems_isr commutation_isr2( rtems_vector_number vector ); | |
20 |
|
20 | |||
21 | //*********** |
|
21 | //*********** | |
22 | // RTEMS TASK |
|
22 | // RTEMS TASK | |
23 | rtems_task actn_task( rtems_task_argument unused ); |
|
23 | rtems_task actn_task( rtems_task_argument unused ); | |
24 |
|
24 | |||
25 | //*********** |
|
25 | //*********** | |
26 | // TC ACTIONS |
|
26 | // TC ACTIONS | |
27 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
27 | int action_reset( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | |
28 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
28 | int action_enter_mode( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | |
29 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id); |
|
29 | int action_update_info( ccsdsTelecommandPacket_t *TC, rtems_id queue_id ); | |
30 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
30 | int action_enable_calibration( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | |
31 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time); |
|
31 | int action_disable_calibration( ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time ); | |
32 | int action_update_time(ccsdsTelecommandPacket_t *TC); |
|
32 | int action_update_time( ccsdsTelecommandPacket_t *TC); | |
33 |
|
33 | |||
34 | // mode transition |
|
34 | // mode transition | |
35 |
int |
|
35 | int check_mode_value( unsigned char requestedMode ); | |
|
36 | int check_mode_transition( unsigned char requestedMode ); | |||
36 | int stop_current_mode( void ); |
|
37 | int stop_current_mode( void ); | |
37 | int enter_mode(unsigned char mode); |
|
38 | int enter_mode( unsigned char mode ); | |
38 | int restart_science_tasks(); |
|
39 | int restart_science_tasks(); | |
39 | int suspend_science_tasks(); |
|
40 | int suspend_science_tasks(); | |
40 | void launch_waveform_picker( unsigned char mode ); |
|
41 | void launch_waveform_picker( unsigned char mode ); | |
41 | void launch_spectral_matrix( unsigned char mode ); |
|
42 | void launch_spectral_matrix( unsigned char mode ); | |
42 | void set_irq_on_new_ready_matrix(unsigned char value ); |
|
43 | void set_irq_on_new_ready_matrix(unsigned char value ); | |
43 | void set_run_matrix_spectral( unsigned char value ); |
|
44 | void set_run_matrix_spectral( unsigned char value ); | |
44 | void launch_spectral_matrix_simu( unsigned char mode ); |
|
45 | void launch_spectral_matrix_simu( unsigned char mode ); | |
45 |
|
46 | |||
46 | // other functions |
|
47 | // other functions | |
47 | void updateLFRCurrentMode(); |
|
48 | void updateLFRCurrentMode(); | |
48 | void update_last_TC_exe( ccsdsTelecommandPacket_t *TC , unsigned char *time ); |
|
49 | void update_last_TC_exe( ccsdsTelecommandPacket_t *TC , unsigned char *time ); | |
49 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC , unsigned char *time ); |
|
50 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC , unsigned char *time ); | |
50 | void close_action( ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id ); |
|
51 | void close_action( ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id ); | |
51 |
|
52 | |||
52 | extern rtems_status_code get_message_queue_id_send( rtems_id *queue_id ); |
|
53 | extern rtems_status_code get_message_queue_id_send( rtems_id *queue_id ); | |
53 | extern rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ); |
|
54 | extern rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ); | |
54 |
|
55 | |||
55 | #endif // TC_HANDLER_H_INCLUDED |
|
56 | #endif // TC_HANDLER_H_INCLUDED | |
56 |
|
57 | |||
57 |
|
58 | |||
58 |
|
59 |
@@ -1,364 +1,365 | |||||
1 | /** General usage functions and RTEMS tasks. |
|
1 | /** General usage functions and RTEMS tasks. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | */ |
|
6 | */ | |
7 |
|
7 | |||
8 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
9 |
|
9 | |||
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) |
|
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) | |
12 | { |
|
12 | { | |
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. |
|
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. | |
14 | * |
|
14 | * | |
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
18 | * @param interrupt_level is the interrupt level that the timer drives. |
|
18 | * @param interrupt_level is the interrupt level that the timer drives. | |
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. |
|
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. | |
20 | * |
|
20 | * | |
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 |
|
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 | |
22 | * |
|
22 | * | |
23 | */ |
|
23 | */ | |
24 |
|
24 | |||
25 | rtems_status_code status; |
|
25 | rtems_status_code status; | |
26 | rtems_isr_entry old_isr_handler; |
|
26 | rtems_isr_entry old_isr_handler; | |
27 |
|
27 | |||
28 | gptimer_regs->timer[timer].ctrl = 0x00; // reset the control register |
|
28 | gptimer_regs->timer[timer].ctrl = 0x00; // reset the control register | |
29 |
|
29 | |||
30 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels |
|
30 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels | |
31 | if (status!=RTEMS_SUCCESSFUL) |
|
31 | if (status!=RTEMS_SUCCESSFUL) | |
32 | { |
|
32 | { | |
33 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") |
|
33 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); |
|
36 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
39 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
40 | { |
|
40 | { | |
41 | /** This function starts a GPTIMER timer. |
|
41 | /** This function starts a GPTIMER timer. | |
42 | * |
|
42 | * | |
43 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
43 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
44 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
44 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
45 | * |
|
45 | * | |
46 | */ |
|
46 | */ | |
47 |
|
47 | |||
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register |
|
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register | |
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer |
|
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer | |
51 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart |
|
51 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart | |
52 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable |
|
52 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
55 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
56 | { |
|
56 | { | |
57 | /** This function stops a GPTIMER timer. |
|
57 | /** This function stops a GPTIMER timer. | |
58 | * |
|
58 | * | |
59 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
59 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
60 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
60 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
61 | * |
|
61 | * | |
62 | */ |
|
62 | */ | |
63 |
|
63 | |||
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer |
|
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer | |
65 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable |
|
65 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable | |
66 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
66 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
67 | } |
|
67 | } | |
68 |
|
68 | |||
69 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) |
|
69 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) | |
70 | { |
|
70 | { | |
71 | /** This function sets the clock divider of a GPTIMER timer. |
|
71 | /** This function sets the clock divider of a GPTIMER timer. | |
72 | * |
|
72 | * | |
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
75 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
75 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
76 | * |
|
76 | * | |
77 | */ |
|
77 | */ | |
78 |
|
78 | |||
79 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz |
|
79 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port |
|
82 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port | |
83 | { |
|
83 | { | |
84 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
84 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
85 |
|
85 | |||
86 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; |
|
86 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; | |
87 |
|
87 | |||
88 | return 0; |
|
88 | return 0; | |
89 | } |
|
89 | } | |
90 |
|
90 | |||
91 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register |
|
91 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register | |
92 | { |
|
92 | { | |
93 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
93 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
94 |
|
94 | |||
95 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; |
|
95 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; | |
96 |
|
96 | |||
97 | return 0; |
|
97 | return 0; | |
98 | } |
|
98 | } | |
99 |
|
99 | |||
100 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) |
|
100 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) | |
101 | { |
|
101 | { | |
102 | /** This function sets the scaler reload register of the apbuart module |
|
102 | /** This function sets the scaler reload register of the apbuart module | |
103 | * |
|
103 | * | |
104 | * @param regs is the address of the apbuart registers in memory |
|
104 | * @param regs is the address of the apbuart registers in memory | |
105 | * @param value is the value that will be stored in the scaler register |
|
105 | * @param value is the value that will be stored in the scaler register | |
106 | * |
|
106 | * | |
107 | * The value shall be set by the software to get data on the serial interface. |
|
107 | * The value shall be set by the software to get data on the serial interface. | |
108 | * |
|
108 | * | |
109 | */ |
|
109 | */ | |
110 |
|
110 | |||
111 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; |
|
111 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; | |
112 |
|
112 | |||
113 | apbuart_regs->scaler = value; |
|
113 | apbuart_regs->scaler = value; | |
114 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) |
|
114 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
115 | } |
|
115 | } | |
116 |
|
116 | |||
117 | //************ |
|
117 | //************ | |
118 | // RTEMS TASKS |
|
118 | // RTEMS TASKS | |
119 |
|
119 | |||
120 | rtems_task stat_task(rtems_task_argument argument) |
|
120 | rtems_task stat_task(rtems_task_argument argument) | |
121 | { |
|
121 | { | |
122 | int i; |
|
122 | int i; | |
123 | int j; |
|
123 | int j; | |
124 | i = 0; |
|
124 | i = 0; | |
125 | j = 0; |
|
125 | j = 0; | |
126 | BOOT_PRINTF("in STAT *** \n") |
|
126 | BOOT_PRINTF("in STAT *** \n") | |
127 | while(1){ |
|
127 | while(1){ | |
128 | rtems_task_wake_after(1000); |
|
128 | rtems_task_wake_after(1000); | |
129 | PRINTF1("%d\n", j) |
|
129 | PRINTF1("%d\n", j) | |
130 | if (i == CPU_USAGE_REPORT_PERIOD) { |
|
130 | if (i == CPU_USAGE_REPORT_PERIOD) { | |
131 | // #ifdef PRINT_TASK_STATISTICS |
|
131 | // #ifdef PRINT_TASK_STATISTICS | |
132 | // rtems_cpu_usage_report(); |
|
132 | // rtems_cpu_usage_report(); | |
133 | // rtems_cpu_usage_reset(); |
|
133 | // rtems_cpu_usage_reset(); | |
134 | // #endif |
|
134 | // #endif | |
135 | i = 0; |
|
135 | i = 0; | |
136 | } |
|
136 | } | |
137 | else i++; |
|
137 | else i++; | |
138 | j++; |
|
138 | j++; | |
139 | } |
|
139 | } | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | rtems_task hous_task(rtems_task_argument argument) |
|
142 | rtems_task hous_task(rtems_task_argument argument) | |
143 | { |
|
143 | { | |
144 | rtems_status_code status; |
|
144 | rtems_status_code status; | |
145 | rtems_id queue_id; |
|
145 | rtems_id queue_id; | |
146 | rtems_rate_monotonic_period_status period_status; |
|
146 | rtems_rate_monotonic_period_status period_status; | |
147 |
|
147 | |||
148 | status = get_message_queue_id_send( &queue_id ); |
|
148 | status = get_message_queue_id_send( &queue_id ); | |
149 | if (status != RTEMS_SUCCESSFUL) |
|
149 | if (status != RTEMS_SUCCESSFUL) | |
150 | { |
|
150 | { | |
151 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) |
|
151 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 | BOOT_PRINTF("in HOUS ***\n") |
|
154 | BOOT_PRINTF("in HOUS ***\n") | |
155 |
|
155 | |||
156 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { |
|
156 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { | |
157 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); |
|
157 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); | |
158 | if( status != RTEMS_SUCCESSFUL ) { |
|
158 | if( status != RTEMS_SUCCESSFUL ) { | |
159 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) |
|
159 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) | |
160 | } |
|
160 | } | |
161 | } |
|
161 | } | |
162 |
|
162 | |||
163 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
163 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
164 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
164 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
165 | housekeeping_packet.reserved = DEFAULT_RESERVED; |
|
165 | housekeeping_packet.reserved = DEFAULT_RESERVED; | |
166 | housekeeping_packet.userApplication = CCSDS_USER_APP; |
|
166 | housekeeping_packet.userApplication = CCSDS_USER_APP; | |
167 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); |
|
167 | housekeeping_packet.packetID[0] = (unsigned char) (TM_PACKET_ID_HK >> 8); | |
168 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); |
|
168 | housekeeping_packet.packetID[1] = (unsigned char) (TM_PACKET_ID_HK); | |
169 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
169 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
170 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
170 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
171 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); |
|
171 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); | |
172 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); |
|
172 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); | |
173 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
173 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
174 | housekeeping_packet.serviceType = TM_TYPE_HK; |
|
174 | housekeeping_packet.serviceType = TM_TYPE_HK; | |
175 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; |
|
175 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; | |
176 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
176 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
177 | housekeeping_packet.sid = SID_HK; |
|
177 | housekeeping_packet.sid = SID_HK; | |
178 |
|
178 | |||
179 | status = rtems_rate_monotonic_cancel(HK_id); |
|
179 | status = rtems_rate_monotonic_cancel(HK_id); | |
180 | if( status != RTEMS_SUCCESSFUL ) { |
|
180 | if( status != RTEMS_SUCCESSFUL ) { | |
181 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) |
|
181 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) | |
182 | } |
|
182 | } | |
183 | else { |
|
183 | else { | |
184 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") |
|
184 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") | |
185 | } |
|
185 | } | |
186 |
|
186 | |||
187 | // startup phase |
|
187 | // startup phase | |
188 | status = rtems_rate_monotonic_period( HK_id, SY_LFR_TIME_SYN_TIMEOUT_in_ticks ); |
|
188 | status = rtems_rate_monotonic_period( HK_id, SY_LFR_TIME_SYN_TIMEOUT_in_ticks ); | |
189 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); |
|
189 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); | |
190 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) |
|
190 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) | |
191 | while(period_status.state != RATE_MONOTONIC_EXPIRED ) // after SY_LFR_TIME_SYN_TIMEOUT ms, starts HK anyway |
|
191 | while(period_status.state != RATE_MONOTONIC_EXPIRED ) // after SY_LFR_TIME_SYN_TIMEOUT ms, starts HK anyway | |
192 | { |
|
192 | { | |
193 | if ((time_management_regs->coarse_time & 0x80000000) == 0x00000000) // check time synchronization |
|
193 | if ((time_management_regs->coarse_time & 0x80000000) == 0x00000000) // check time synchronization | |
194 | { |
|
194 | { | |
195 | break; // break if LFR is synchronized |
|
195 | break; // break if LFR is synchronized | |
196 | } |
|
196 | } | |
197 | else |
|
197 | else | |
198 | { |
|
198 | { | |
199 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); |
|
199 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); | |
200 | sched_yield(); |
|
200 | sched_yield(); | |
201 | } |
|
201 | } | |
202 | } |
|
202 | } | |
203 | status = rtems_rate_monotonic_cancel(HK_id); |
|
203 | status = rtems_rate_monotonic_cancel(HK_id); | |
204 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) |
|
204 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) | |
205 |
|
205 | |||
206 | while(1){ // launch the rate monotonic task |
|
206 | while(1){ // launch the rate monotonic task | |
207 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); |
|
207 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); | |
208 | if ( status != RTEMS_SUCCESSFUL ) { |
|
208 | if ( status != RTEMS_SUCCESSFUL ) { | |
209 | PRINTF1( "in HOUS *** ERR period: %d\n", status); |
|
209 | PRINTF1( "in HOUS *** ERR period: %d\n", status); | |
210 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); |
|
210 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); | |
211 | } |
|
211 | } | |
212 | else { |
|
212 | else { | |
213 | increment_seq_counter( housekeeping_packet.packetSequenceControl ); |
|
213 | increment_seq_counter( housekeeping_packet.packetSequenceControl ); | |
214 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
214 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
215 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
215 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
216 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
216 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
217 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
217 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
218 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
218 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
219 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
219 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
220 |
|
220 | |||
221 | spacewire_update_statistics(); |
|
221 | spacewire_update_statistics(); | |
222 |
|
222 | |||
223 | // SEND PACKET |
|
223 | // SEND PACKET | |
224 | status = rtems_message_queue_send( queue_id, &housekeeping_packet, |
|
224 | status = rtems_message_queue_send( queue_id, &housekeeping_packet, | |
225 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
225 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
226 | if (status != RTEMS_SUCCESSFUL) { |
|
226 | if (status != RTEMS_SUCCESSFUL) { | |
227 | PRINTF1("in HOUS *** ERR send: %d\n", status) |
|
227 | PRINTF1("in HOUS *** ERR send: %d\n", status) | |
228 | } |
|
228 | } | |
229 | } |
|
229 | } | |
230 | } |
|
230 | } | |
231 |
|
231 | |||
232 | PRINTF("in HOUS *** deleting task\n") |
|
232 | PRINTF("in HOUS *** deleting task\n") | |
233 |
|
233 | |||
234 | status = rtems_task_delete( RTEMS_SELF ); // should not return |
|
234 | status = rtems_task_delete( RTEMS_SELF ); // should not return | |
235 | printf( "rtems_task_delete returned with status of %d.\n", status ); |
|
235 | printf( "rtems_task_delete returned with status of %d.\n", status ); | |
236 | return; |
|
236 | return; | |
237 | } |
|
237 | } | |
238 |
|
238 | |||
239 | rtems_task dumb_task( rtems_task_argument unused ) |
|
239 | rtems_task dumb_task( rtems_task_argument unused ) | |
240 | { |
|
240 | { | |
241 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. |
|
241 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. | |
242 | * |
|
242 | * | |
243 | * @param unused is the starting argument of the RTEMS task |
|
243 | * @param unused is the starting argument of the RTEMS task | |
244 | * |
|
244 | * | |
245 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. |
|
245 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. | |
246 | * |
|
246 | * | |
247 | */ |
|
247 | */ | |
248 |
|
248 | |||
249 | unsigned int i; |
|
249 | unsigned int i; | |
250 | unsigned int intEventOut; |
|
250 | unsigned int intEventOut; | |
251 | unsigned int coarse_time = 0; |
|
251 | unsigned int coarse_time = 0; | |
252 | unsigned int fine_time = 0; |
|
252 | unsigned int fine_time = 0; | |
253 | rtems_event_set event_out; |
|
253 | rtems_event_set event_out; | |
254 |
|
254 | |||
255 |
char *DumbMessages[ |
|
255 | char *DumbMessages[10] = {"in DUMB *** default", // RTEMS_EVENT_0 | |
256 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 |
|
256 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 | |
257 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 |
|
257 | "in DUMB *** waveforms_isr", // RTEMS_EVENT_2 | |
258 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 |
|
258 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 | |
259 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 |
|
259 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 | |
260 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 |
|
260 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 | |
261 | "ERR HK", // RTEMS_EVENT_6 |
|
261 | "ERR HK", // RTEMS_EVENT_6 | |
262 | "ready for dump", // RTEMS_EVENT_7 |
|
262 | "ready for dump", // RTEMS_EVENT_7 | |
263 |
"in DUMB *** spectral_matrices_isr" |
|
263 | "in DUMB *** spectral_matrices_isr", // RTEMS_EVENT_8 | |
|
264 | "tick" // RTEMS_EVENT_9 | |||
264 | }; |
|
265 | }; | |
265 |
|
266 | |||
266 | BOOT_PRINTF("in DUMB *** \n") |
|
267 | BOOT_PRINTF("in DUMB *** \n") | |
267 |
|
268 | |||
268 | while(1){ |
|
269 | while(1){ | |
269 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 |
|
270 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | |
270 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7 |
|
271 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7 | |
271 | | RTEMS_EVENT_8, |
|
272 | | RTEMS_EVENT_8 | RTEMS_EVENT_9, | |
272 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT |
|
273 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT | |
273 | intEventOut = (unsigned int) event_out; |
|
274 | intEventOut = (unsigned int) event_out; | |
274 | for ( i=0; i<32; i++) |
|
275 | for ( i=0; i<32; i++) | |
275 | { |
|
276 | { | |
276 | if ( ((intEventOut >> i) & 0x0001) != 0) |
|
277 | if ( ((intEventOut >> i) & 0x0001) != 0) | |
277 | { |
|
278 | { | |
278 | coarse_time = time_management_regs->coarse_time; |
|
279 | coarse_time = time_management_regs->coarse_time; | |
279 | fine_time = time_management_regs->fine_time; |
|
280 | fine_time = time_management_regs->fine_time; | |
280 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); |
|
281 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); | |
281 | } |
|
282 | } | |
282 | } |
|
283 | } | |
283 | } |
|
284 | } | |
284 | } |
|
285 | } | |
285 |
|
286 | |||
286 | //***************************** |
|
287 | //***************************** | |
287 | // init housekeeping parameters |
|
288 | // init housekeeping parameters | |
288 |
|
289 | |||
289 | void init_housekeeping_parameters( void ) |
|
290 | void init_housekeeping_parameters( void ) | |
290 | { |
|
291 | { | |
291 | /** This function initialize the housekeeping_packet global variable with default values. |
|
292 | /** This function initialize the housekeeping_packet global variable with default values. | |
292 | * |
|
293 | * | |
293 | */ |
|
294 | */ | |
294 |
|
295 | |||
295 | unsigned int i = 0; |
|
296 | unsigned int i = 0; | |
296 | unsigned char *parameters; |
|
297 | unsigned char *parameters; | |
297 |
|
298 | |||
298 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; |
|
299 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; | |
299 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) |
|
300 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) | |
300 | { |
|
301 | { | |
301 | parameters[i] = 0x00; |
|
302 | parameters[i] = 0x00; | |
302 | } |
|
303 | } | |
303 | // init status word |
|
304 | // init status word | |
304 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; |
|
305 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; | |
305 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; |
|
306 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; | |
306 | // init software version |
|
307 | // init software version | |
307 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; |
|
308 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; | |
308 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; |
|
309 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; | |
309 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
310 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; | |
310 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
311 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; | |
311 | // init fpga version |
|
312 | // init fpga version | |
312 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xd0); |
|
313 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xd0); | |
313 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 |
|
314 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 | |
314 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 |
|
315 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 | |
315 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 |
|
316 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 | |
316 | } |
|
317 | } | |
317 |
|
318 | |||
318 | void increment_seq_counter( unsigned char *packet_sequence_control) |
|
319 | void increment_seq_counter( unsigned char *packet_sequence_control) | |
319 | { |
|
320 | { | |
320 | /** This function increment the sequence counter psased in argument. |
|
321 | /** This function increment the sequence counter psased in argument. | |
321 | * |
|
322 | * | |
322 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. |
|
323 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. | |
323 | * |
|
324 | * | |
324 | */ |
|
325 | */ | |
325 |
|
326 | |||
326 | unsigned short sequence_cnt; |
|
327 | unsigned short sequence_cnt; | |
327 | unsigned short segmentation_grouping_flag; |
|
328 | unsigned short segmentation_grouping_flag; | |
328 | unsigned short new_packet_sequence_control; |
|
329 | unsigned short new_packet_sequence_control; | |
329 |
|
330 | |||
330 | segmentation_grouping_flag = (unsigned short) ( (packet_sequence_control[0] & 0xc0) << 8 ); // keep bits 7 downto 6 |
|
331 | segmentation_grouping_flag = (unsigned short) ( (packet_sequence_control[0] & 0xc0) << 8 ); // keep bits 7 downto 6 | |
331 | sequence_cnt = (unsigned short) ( |
|
332 | sequence_cnt = (unsigned short) ( | |
332 | ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 |
|
333 | ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 | |
333 | + packet_sequence_control[1] |
|
334 | + packet_sequence_control[1] | |
334 | ); |
|
335 | ); | |
335 |
|
336 | |||
336 | if ( sequence_cnt < SEQ_CNT_MAX) |
|
337 | if ( sequence_cnt < SEQ_CNT_MAX) | |
337 | { |
|
338 | { | |
338 | sequence_cnt = sequence_cnt + 1; |
|
339 | sequence_cnt = sequence_cnt + 1; | |
339 | } |
|
340 | } | |
340 | else |
|
341 | else | |
341 | { |
|
342 | { | |
342 | sequence_cnt = 0; |
|
343 | sequence_cnt = 0; | |
343 | } |
|
344 | } | |
344 |
|
345 | |||
345 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; |
|
346 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; | |
346 |
|
347 | |||
347 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); |
|
348 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); | |
348 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); |
|
349 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); | |
349 | } |
|
350 | } | |
350 |
|
351 | |||
351 | void getTime( unsigned char *time) |
|
352 | void getTime( unsigned char *time) | |
352 | { |
|
353 | { | |
353 | /** This function write the current local time in the time buffer passed in argument. |
|
354 | /** This function write the current local time in the time buffer passed in argument. | |
354 | * |
|
355 | * | |
355 | */ |
|
356 | */ | |
356 |
|
357 | |||
357 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
358 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
358 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
359 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
359 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
360 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
360 | time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
361 | time[3] = (unsigned char) (time_management_regs->coarse_time); | |
361 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
362 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
362 | time[5] = (unsigned char) (time_management_regs->fine_time); |
|
363 | time[5] = (unsigned char) (time_management_regs->fine_time); | |
363 | } |
|
364 | } | |
364 |
|
365 |
@@ -1,611 +1,610 | |||||
1 | /** Functions related to the SpaceWire interface. |
|
1 | /** Functions related to the SpaceWire interface. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle SpaceWire transmissions: |
|
6 | * A group of functions to handle SpaceWire transmissions: | |
7 | * - configuration of the SpaceWire link |
|
7 | * - configuration of the SpaceWire link | |
8 | * - SpaceWire related interruption requests processing |
|
8 | * - SpaceWire related interruption requests processing | |
9 | * - transmission of TeleMetry packets by a dedicated RTEMS task |
|
9 | * - transmission of TeleMetry packets by a dedicated RTEMS task | |
10 | * - reception of TeleCommands by a dedicated RTEMS task |
|
10 | * - reception of TeleCommands by a dedicated RTEMS task | |
11 | * |
|
11 | * | |
12 | */ |
|
12 | */ | |
13 |
|
13 | |||
14 | #include "fsw_spacewire.h" |
|
14 | #include "fsw_spacewire.h" | |
15 |
|
15 | |||
16 | rtems_name semq_name; |
|
16 | rtems_name semq_name; | |
17 | rtems_id semq_id; |
|
17 | rtems_id semq_id; | |
18 |
|
18 | |||
19 | //*********** |
|
19 | //*********** | |
20 | // RTEMS TASK |
|
20 | // RTEMS TASK | |
21 | rtems_task spiq_task(rtems_task_argument unused) |
|
21 | rtems_task spiq_task(rtems_task_argument unused) | |
22 | { |
|
22 | { | |
23 | /** This RTEMS task is awaken by an rtems_event sent by the interruption subroutine of the SpaceWire driver. |
|
23 | /** This RTEMS task is awaken by an rtems_event sent by the interruption subroutine of the SpaceWire driver. | |
24 | * |
|
24 | * | |
25 | * @param unused is the starting argument of the RTEMS task |
|
25 | * @param unused is the starting argument of the RTEMS task | |
26 | * |
|
26 | * | |
27 | */ |
|
27 | */ | |
28 |
|
28 | |||
29 | rtems_event_set event_out; |
|
29 | rtems_event_set event_out; | |
30 | rtems_status_code status; |
|
30 | rtems_status_code status; | |
31 | int linkStatus; |
|
31 | int linkStatus; | |
32 |
|
32 | |||
33 | BOOT_PRINTF("in SPIQ *** \n") |
|
33 | BOOT_PRINTF("in SPIQ *** \n") | |
34 |
|
34 | |||
35 | while(true){ |
|
35 | while(true){ | |
36 | rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT |
|
36 | rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT | |
37 | PRINTF("in SPIQ *** got SPW_LINKERR_EVENT\n") |
|
37 | PRINTF("in SPIQ *** got SPW_LINKERR_EVENT\n") | |
38 |
|
38 | |||
39 | // [0] SUSPEND RECV AND SEND TASKS |
|
39 | // [0] SUSPEND RECV AND SEND TASKS | |
40 | status = rtems_task_suspend( Task_id[ TASKID_RECV ] ); |
|
40 | status = rtems_task_suspend( Task_id[ TASKID_RECV ] ); | |
41 | if ( status != RTEMS_SUCCESSFUL ) { |
|
41 | if ( status != RTEMS_SUCCESSFUL ) { | |
42 | PRINTF("in SPIQ *** ERR suspending RECV Task\n") |
|
42 | PRINTF("in SPIQ *** ERR suspending RECV Task\n") | |
43 | } |
|
43 | } | |
44 | status = rtems_task_suspend( Task_id[ TASKID_SEND ] ); |
|
44 | status = rtems_task_suspend( Task_id[ TASKID_SEND ] ); | |
45 | if ( status != RTEMS_SUCCESSFUL ) { |
|
45 | if ( status != RTEMS_SUCCESSFUL ) { | |
46 | PRINTF("in SPIQ *** ERR suspending SEND Task\n") |
|
46 | PRINTF("in SPIQ *** ERR suspending SEND Task\n") | |
47 | } |
|
47 | } | |
48 |
|
48 | |||
49 | // [1] CHECK THE LINK |
|
49 | // [1] CHECK THE LINK | |
50 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (1) |
|
50 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (1) | |
51 | if ( linkStatus != 5) { |
|
51 | if ( linkStatus != 5) { | |
52 | PRINTF1("in SPIQ *** linkStatus %d, wait...\n", linkStatus) |
|
52 | PRINTF1("in SPIQ *** linkStatus %d, wait...\n", linkStatus) | |
53 | status = rtems_task_wake_after( SY_LFR_DPU_CONNECT_TIMEOUT ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 1000 ms |
|
53 | status = rtems_task_wake_after( SY_LFR_DPU_CONNECT_TIMEOUT ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 1000 ms | |
54 | } |
|
54 | } | |
55 |
|
55 | |||
56 | // [2] RECHECK THE LINK AFTER SY_LFR_DPU_CONNECT_TIMEOUT |
|
56 | // [2] RECHECK THE LINK AFTER SY_LFR_DPU_CONNECT_TIMEOUT | |
57 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (2) |
|
57 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status (2) | |
58 | if ( linkStatus != 5 ) // [2.a] not in run state, reset the link |
|
58 | if ( linkStatus != 5 ) // [2.a] not in run state, reset the link | |
59 | { |
|
59 | { | |
60 | spacewire_compute_stats_offsets(); |
|
60 | spacewire_compute_stats_offsets(); | |
61 | status = spacewire_reset_link( ); |
|
61 | status = spacewire_reset_link( ); | |
62 | } |
|
62 | } | |
63 | else // [2.b] in run state, start the link |
|
63 | else // [2.b] in run state, start the link | |
64 | { |
|
64 | { | |
65 | status = spacewire_stop_start_link( fdSPW ); // start the link |
|
65 | status = spacewire_stop_start_link( fdSPW ); // start the link | |
66 | if ( status != RTEMS_SUCCESSFUL) |
|
66 | if ( status != RTEMS_SUCCESSFUL) | |
67 | { |
|
67 | { | |
68 | PRINTF1("in SPIQ *** ERR spacewire_start_link %d\n", status) |
|
68 | PRINTF1("in SPIQ *** ERR spacewire_start_link %d\n", status) | |
69 | } |
|
69 | } | |
70 | } |
|
70 | } | |
71 |
|
71 | |||
72 | // [3] COMPLETE RECOVERY ACTION AFTER SY_LFR_DPU_CONNECT_ATTEMPTS |
|
72 | // [3] COMPLETE RECOVERY ACTION AFTER SY_LFR_DPU_CONNECT_ATTEMPTS | |
73 | if ( status == RTEMS_SUCCESSFUL ) // [3.a] the link is in run state and has been started successfully |
|
73 | if ( status == RTEMS_SUCCESSFUL ) // [3.a] the link is in run state and has been started successfully | |
74 | { |
|
74 | { | |
75 | status = rtems_task_restart( Task_id[ TASKID_SEND ], 1 ); |
|
75 | status = rtems_task_restart( Task_id[ TASKID_SEND ], 1 ); | |
76 | if ( status != RTEMS_SUCCESSFUL ) { |
|
76 | if ( status != RTEMS_SUCCESSFUL ) { | |
77 | PRINTF("in SPIQ *** ERR resuming SEND Task\n") |
|
77 | PRINTF("in SPIQ *** ERR resuming SEND Task\n") | |
78 | } |
|
78 | } | |
79 | status = rtems_task_restart( Task_id[ TASKID_RECV ], 1 ); |
|
79 | status = rtems_task_restart( Task_id[ TASKID_RECV ], 1 ); | |
80 | if ( status != RTEMS_SUCCESSFUL ) { |
|
80 | if ( status != RTEMS_SUCCESSFUL ) { | |
81 | PRINTF("in SPIQ *** ERR resuming RECV Task\n") |
|
81 | PRINTF("in SPIQ *** ERR resuming RECV Task\n") | |
82 | } |
|
82 | } | |
83 | } |
|
83 | } | |
84 | else // [3.b] the link is not in run state, go in STANDBY mode |
|
84 | else // [3.b] the link is not in run state, go in STANDBY mode | |
85 | { |
|
85 | { | |
86 | status = stop_current_mode(); |
|
86 | status = stop_current_mode(); | |
87 | if ( status != RTEMS_SUCCESSFUL ) { |
|
87 | if ( status != RTEMS_SUCCESSFUL ) { | |
88 | PRINTF1("in SPIQ *** ERR stop_current_mode *** code %d\n", status) |
|
88 | PRINTF1("in SPIQ *** ERR stop_current_mode *** code %d\n", status) | |
89 | } |
|
89 | } | |
90 | status = enter_mode( LFR_MODE_STANDBY ); |
|
90 | status = enter_mode( LFR_MODE_STANDBY ); | |
91 | if ( status != RTEMS_SUCCESSFUL ) { |
|
91 | if ( status != RTEMS_SUCCESSFUL ) { | |
92 | PRINTF1("in SPIQ *** ERR enter_standby_mode *** code %d\n", status) |
|
92 | PRINTF1("in SPIQ *** ERR enter_standby_mode *** code %d\n", status) | |
93 | } |
|
93 | } | |
94 | // wake the WTDG task up to wait for the link recovery |
|
94 | // wake the WTDG task up to wait for the link recovery | |
95 | status = rtems_event_send ( Task_id[TASKID_WTDG], RTEMS_EVENT_0 ); |
|
95 | status = rtems_event_send ( Task_id[TASKID_WTDG], RTEMS_EVENT_0 ); | |
96 | status = rtems_task_suspend( RTEMS_SELF ); |
|
96 | status = rtems_task_suspend( RTEMS_SELF ); | |
97 | } |
|
97 | } | |
98 | } |
|
98 | } | |
99 | } |
|
99 | } | |
100 |
|
100 | |||
101 | rtems_task recv_task( rtems_task_argument unused ) |
|
101 | rtems_task recv_task( rtems_task_argument unused ) | |
102 | { |
|
102 | { | |
103 | /** This RTEMS task is dedicated to the reception of incoming TeleCommands. |
|
103 | /** This RTEMS task is dedicated to the reception of incoming TeleCommands. | |
104 | * |
|
104 | * | |
105 | * @param unused is the starting argument of the RTEMS task |
|
105 | * @param unused is the starting argument of the RTEMS task | |
106 | * |
|
106 | * | |
107 | * The RECV task blocks on a call to the read system call, waiting for incoming SpaceWire data. When unblocked: |
|
107 | * The RECV task blocks on a call to the read system call, waiting for incoming SpaceWire data. When unblocked: | |
108 | * 1. It reads the incoming data. |
|
108 | * 1. It reads the incoming data. | |
109 | * 2. Launches the acceptance procedure. |
|
109 | * 2. Launches the acceptance procedure. | |
110 | * 3. If the Telecommand is valid, sends it to a dedicated RTEMS message queue. |
|
110 | * 3. If the Telecommand is valid, sends it to a dedicated RTEMS message queue. | |
111 | * |
|
111 | * | |
112 | */ |
|
112 | */ | |
113 |
|
113 | |||
114 | int len; |
|
114 | int len; | |
115 | ccsdsTelecommandPacket_t currentTC; |
|
115 | ccsdsTelecommandPacket_t currentTC; | |
116 | unsigned char computed_CRC[ 2 ]; |
|
116 | unsigned char computed_CRC[ 2 ]; | |
117 | unsigned char currentTC_LEN_RCV[ 2 ]; |
|
117 | unsigned char currentTC_LEN_RCV[ 2 ]; | |
118 | unsigned char destinationID; |
|
118 | unsigned char destinationID; | |
119 | unsigned int currentTC_LEN_RCV_AsUnsignedInt; |
|
119 | unsigned int currentTC_LEN_RCV_AsUnsignedInt; | |
120 | unsigned int parserCode; |
|
120 | unsigned int parserCode; | |
121 | rtems_status_code status; |
|
121 | rtems_status_code status; | |
122 | rtems_id queue_recv_id; |
|
122 | rtems_id queue_recv_id; | |
123 | rtems_id queue_send_id; |
|
123 | rtems_id queue_send_id; | |
124 |
|
124 | |||
125 | initLookUpTableForCRC(); // the table is used to compute Cyclic Redundancy Codes |
|
125 | initLookUpTableForCRC(); // the table is used to compute Cyclic Redundancy Codes | |
126 |
|
126 | |||
127 | status = get_message_queue_id_recv( &queue_recv_id ); |
|
127 | status = get_message_queue_id_recv( &queue_recv_id ); | |
128 | if (status != RTEMS_SUCCESSFUL) |
|
128 | if (status != RTEMS_SUCCESSFUL) | |
129 | { |
|
129 | { | |
130 | PRINTF1("in RECV *** ERR get_message_queue_id_recv %d\n", status) |
|
130 | PRINTF1("in RECV *** ERR get_message_queue_id_recv %d\n", status) | |
131 | } |
|
131 | } | |
132 |
|
132 | |||
133 | status = get_message_queue_id_send( &queue_send_id ); |
|
133 | status = get_message_queue_id_send( &queue_send_id ); | |
134 | if (status != RTEMS_SUCCESSFUL) |
|
134 | if (status != RTEMS_SUCCESSFUL) | |
135 | { |
|
135 | { | |
136 | PRINTF1("in RECV *** ERR get_message_queue_id_send %d\n", status) |
|
136 | PRINTF1("in RECV *** ERR get_message_queue_id_send %d\n", status) | |
137 | } |
|
137 | } | |
138 |
|
138 | |||
139 | BOOT_PRINTF("in RECV *** \n") |
|
139 | BOOT_PRINTF("in RECV *** \n") | |
140 |
|
140 | |||
141 | while(1) |
|
141 | while(1) | |
142 | { |
|
142 | { | |
143 | len = read( fdSPW, (char*) ¤tTC, CCSDS_TC_PKT_MAX_SIZE ); // the call to read is blocking |
|
143 | len = read( fdSPW, (char*) ¤tTC, CCSDS_TC_PKT_MAX_SIZE ); // the call to read is blocking | |
144 | if (len == -1){ // error during the read call |
|
144 | if (len == -1){ // error during the read call | |
145 | PRINTF1("in RECV *** last read call returned -1, ERRNO %d\n", errno) |
|
145 | PRINTF1("in RECV *** last read call returned -1, ERRNO %d\n", errno) | |
146 | } |
|
146 | } | |
147 | else { |
|
147 | else { | |
148 | if ( (len+1) < CCSDS_TC_PKT_MIN_SIZE ) { |
|
148 | if ( (len+1) < CCSDS_TC_PKT_MIN_SIZE ) { | |
149 | PRINTF("in RECV *** packet lenght too short\n") |
|
149 | PRINTF("in RECV *** packet lenght too short\n") | |
150 | } |
|
150 | } | |
151 | else { |
|
151 | else { | |
152 | currentTC_LEN_RCV_AsUnsignedInt = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes |
|
152 | currentTC_LEN_RCV_AsUnsignedInt = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes | |
153 | currentTC_LEN_RCV[ 0 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt >> 8); |
|
153 | currentTC_LEN_RCV[ 0 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt >> 8); | |
154 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt ); |
|
154 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (currentTC_LEN_RCV_AsUnsignedInt ); | |
155 | // CHECK THE TC |
|
155 | // CHECK THE TC | |
156 | parserCode = tc_parser( ¤tTC, currentTC_LEN_RCV_AsUnsignedInt, computed_CRC ) ; |
|
156 | parserCode = tc_parser( ¤tTC, currentTC_LEN_RCV_AsUnsignedInt, computed_CRC ) ; | |
157 | if ( (parserCode == ILLEGAL_APID) || (parserCode == WRONG_LEN_PKT) |
|
157 | if ( (parserCode == ILLEGAL_APID) || (parserCode == WRONG_LEN_PKT) | |
158 | || (parserCode == INCOR_CHECKSUM) || (parserCode == ILL_TYPE) |
|
158 | || (parserCode == INCOR_CHECKSUM) || (parserCode == ILL_TYPE) | |
159 | || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA) |
|
159 | || (parserCode == ILL_SUBTYPE) || (parserCode == WRONG_APP_DATA) | |
160 | || (parserCode == WRONG_SRC_ID) ) |
|
160 | || (parserCode == WRONG_SRC_ID) ) | |
161 | { // send TM_LFR_TC_EXE_CORRUPTED |
|
161 | { // send TM_LFR_TC_EXE_CORRUPTED | |
162 | PRINTF1("TC corrupted received, with code: %d\n", parserCode) |
|
162 | PRINTF1("TC corrupted received, with code: %d\n", parserCode) | |
163 | if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) ) |
|
163 | if ( !( (currentTC.serviceType==TC_TYPE_TIME) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
164 | && |
|
164 | && | |
165 | !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
165 | !( (currentTC.serviceType==TC_TYPE_GEN) && (currentTC.serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
166 | ) |
|
166 | ) | |
167 | { |
|
167 | { | |
168 | if ( parserCode == WRONG_SRC_ID ) |
|
168 | if ( parserCode == WRONG_SRC_ID ) | |
169 | { |
|
169 | { | |
170 | destinationID = SID_TC_GROUND; |
|
170 | destinationID = SID_TC_GROUND; | |
171 | } |
|
171 | } | |
172 | else |
|
172 | else | |
173 | { |
|
173 | { | |
174 | destinationID = currentTC.sourceID; |
|
174 | destinationID = currentTC.sourceID; | |
175 | } |
|
175 | } | |
176 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, |
|
176 | send_tm_lfr_tc_exe_corrupted( ¤tTC, queue_send_id, | |
177 | computed_CRC, currentTC_LEN_RCV, |
|
177 | computed_CRC, currentTC_LEN_RCV, | |
178 | destinationID ); |
|
178 | destinationID ); | |
179 | } |
|
179 | } | |
180 | } |
|
180 | } | |
181 | else |
|
181 | else | |
182 | { // send valid TC to the action launcher |
|
182 | { // send valid TC to the action launcher | |
183 | status = rtems_message_queue_send( queue_recv_id, ¤tTC, |
|
183 | status = rtems_message_queue_send( queue_recv_id, ¤tTC, | |
184 | currentTC_LEN_RCV_AsUnsignedInt + CCSDS_TC_TM_PACKET_OFFSET + 3); |
|
184 | currentTC_LEN_RCV_AsUnsignedInt + CCSDS_TC_TM_PACKET_OFFSET + 3); | |
185 | } |
|
185 | } | |
186 | } |
|
186 | } | |
187 | } |
|
187 | } | |
188 | } |
|
188 | } | |
189 | } |
|
189 | } | |
190 |
|
190 | |||
191 | rtems_task send_task( rtems_task_argument argument) |
|
191 | rtems_task send_task( rtems_task_argument argument) | |
192 | { |
|
192 | { | |
193 | /** This RTEMS task is dedicated to the transmission of TeleMetry packets. |
|
193 | /** This RTEMS task is dedicated to the transmission of TeleMetry packets. | |
194 | * |
|
194 | * | |
195 | * @param unused is the starting argument of the RTEMS task |
|
195 | * @param unused is the starting argument of the RTEMS task | |
196 | * |
|
196 | * | |
197 | * The SEND task waits for a message to become available in the dedicated RTEMS queue. When a message arrives: |
|
197 | * The SEND task waits for a message to become available in the dedicated RTEMS queue. When a message arrives: | |
198 | * - if the first byte is equal to CCSDS_DESTINATION_ID, the message is sent as is using the write system call. |
|
198 | * - if the first byte is equal to CCSDS_DESTINATION_ID, the message is sent as is using the write system call. | |
199 | * - if the first byte is not equal to CCSDS_DESTINATION_ID, the message is handled as a spw_ioctl_pkt_send. After |
|
199 | * - if the first byte is not equal to CCSDS_DESTINATION_ID, the message is handled as a spw_ioctl_pkt_send. After | |
200 | * analyzis, the packet is sent either using the write system call or using the ioctl call SPACEWIRE_IOCTRL_SEND, depending on the |
|
200 | * analyzis, the packet is sent either using the write system call or using the ioctl call SPACEWIRE_IOCTRL_SEND, depending on the | |
201 | * data it contains. |
|
201 | * data it contains. | |
202 | * |
|
202 | * | |
203 | */ |
|
203 | */ | |
204 |
|
204 | |||
205 | rtems_status_code status; // RTEMS status code |
|
205 | rtems_status_code status; // RTEMS status code | |
206 | char incomingData[ACTION_MSG_PKTS_MAX_SIZE]; // incoming data buffer |
|
206 | char incomingData[ACTION_MSG_PKTS_MAX_SIZE]; // incoming data buffer | |
207 | spw_ioctl_pkt_send *spw_ioctl_send; |
|
207 | spw_ioctl_pkt_send *spw_ioctl_send; | |
208 | size_t size; // size of the incoming TC packet |
|
208 | size_t size; // size of the incoming TC packet | |
209 | u_int32_t count; |
|
209 | u_int32_t count; | |
210 | rtems_id queue_id; |
|
210 | rtems_id queue_id; | |
211 |
|
211 | |||
212 | status = get_message_queue_id_send( &queue_id ); |
|
212 | status = get_message_queue_id_send( &queue_id ); | |
213 | if (status != RTEMS_SUCCESSFUL) |
|
213 | if (status != RTEMS_SUCCESSFUL) | |
214 | { |
|
214 | { | |
215 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) |
|
215 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) | |
216 | } |
|
216 | } | |
217 |
|
217 | |||
218 | BOOT_PRINTF("in SEND *** \n") |
|
218 | BOOT_PRINTF("in SEND *** \n") | |
219 |
|
219 | |||
220 | while(1) |
|
220 | while(1) | |
221 | { |
|
221 | { | |
222 | status = rtems_message_queue_receive( queue_id, incomingData, &size, |
|
222 | status = rtems_message_queue_receive( queue_id, incomingData, &size, | |
223 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); |
|
223 | RTEMS_WAIT, RTEMS_NO_TIMEOUT ); | |
224 |
|
224 | |||
225 | if (status!=RTEMS_SUCCESSFUL) |
|
225 | if (status!=RTEMS_SUCCESSFUL) | |
226 | { |
|
226 | { | |
227 | PRINTF1("in SEND *** (1) ERR = %d\n", status) |
|
227 | PRINTF1("in SEND *** (1) ERR = %d\n", status) | |
228 | } |
|
228 | } | |
229 | else |
|
229 | else | |
230 | { |
|
230 | { | |
231 | if ( incomingData[0] == CCSDS_DESTINATION_ID) // the incoming message is a ccsds packet |
|
231 | if ( incomingData[0] == CCSDS_DESTINATION_ID) // the incoming message is a ccsds packet | |
232 | { |
|
232 | { | |
233 | status = write( fdSPW, incomingData, size ); |
|
233 | status = write( fdSPW, incomingData, size ); | |
234 | if (status == -1){ |
|
234 | if (status == -1){ | |
235 | PRINTF2("in SEND *** (2.a) ERRNO = %d, size = %d\n", errno, size) |
|
235 | PRINTF2("in SEND *** (2.a) ERRNO = %d, size = %d\n", errno, size) | |
236 | } |
|
236 | } | |
237 | } |
|
237 | } | |
238 | else // the incoming message is a spw_ioctl_pkt_send structure |
|
238 | else // the incoming message is a spw_ioctl_pkt_send structure | |
239 | { |
|
239 | { | |
240 | spw_ioctl_send = (spw_ioctl_pkt_send*) incomingData; |
|
240 | spw_ioctl_send = (spw_ioctl_pkt_send*) incomingData; | |
241 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_SEND, spw_ioctl_send ); |
|
241 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_SEND, spw_ioctl_send ); | |
242 | if (status == -1){ |
|
242 | if (status == -1){ | |
243 | PRINTF2("in SEND *** (2.b) ERRNO = %d, RTEMS = %d\n", errno, status) |
|
243 | PRINTF2("in SEND *** (2.b) ERRNO = %d, RTEMS = %d\n", errno, status) | |
244 | } |
|
244 | } | |
245 | } |
|
245 | } | |
246 | } |
|
246 | } | |
247 |
|
247 | |||
248 | status = rtems_message_queue_get_number_pending( queue_id, &count ); |
|
248 | status = rtems_message_queue_get_number_pending( queue_id, &count ); | |
249 | if (status != RTEMS_SUCCESSFUL) |
|
249 | if (status != RTEMS_SUCCESSFUL) | |
250 | { |
|
250 | { | |
251 | PRINTF1("in SEND *** (3) ERR = %d\n", status) |
|
251 | PRINTF1("in SEND *** (3) ERR = %d\n", status) | |
252 | } |
|
252 | } | |
253 | else |
|
253 | else | |
254 | { |
|
254 | { | |
255 | if (count > maxCount) |
|
255 | if (count > maxCount) | |
256 | { |
|
256 | { | |
257 | maxCount = count; |
|
257 | maxCount = count; | |
258 | } |
|
258 | } | |
259 | } |
|
259 | } | |
260 | } |
|
260 | } | |
261 | } |
|
261 | } | |
262 |
|
262 | |||
263 | rtems_task wtdg_task( rtems_task_argument argument ) |
|
263 | rtems_task wtdg_task( rtems_task_argument argument ) | |
264 | { |
|
264 | { | |
265 | rtems_event_set event_out; |
|
265 | rtems_event_set event_out; | |
266 | rtems_status_code status; |
|
266 | rtems_status_code status; | |
267 | int linkStatus; |
|
267 | int linkStatus; | |
268 |
|
268 | |||
269 | BOOT_PRINTF("in WTDG ***\n") |
|
269 | BOOT_PRINTF("in WTDG ***\n") | |
270 |
|
270 | |||
271 | while(1) |
|
271 | while(1) | |
272 | { |
|
272 | { | |
273 | // wait for an RTEMS_EVENT |
|
273 | // wait for an RTEMS_EVENT | |
274 | rtems_event_receive( RTEMS_EVENT_0, |
|
274 | rtems_event_receive( RTEMS_EVENT_0, | |
275 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); |
|
275 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); | |
276 | PRINTF("in WTDG *** wait for the link\n") |
|
276 | PRINTF("in WTDG *** wait for the link\n") | |
277 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status |
|
277 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status | |
278 | while( linkStatus != 5) // wait for the link |
|
278 | while( linkStatus != 5) // wait for the link | |
279 | { |
|
279 | { | |
280 | rtems_task_wake_after( 10 ); |
|
280 | rtems_task_wake_after( 10 ); | |
281 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status |
|
281 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status | |
282 | } |
|
282 | } | |
283 |
|
283 | |||
284 | status = spacewire_stop_start_link( fdSPW ); |
|
284 | status = spacewire_stop_start_link( fdSPW ); | |
285 |
|
285 | |||
286 | if (status != RTEMS_SUCCESSFUL) |
|
286 | if (status != RTEMS_SUCCESSFUL) | |
287 | { |
|
287 | { | |
288 | PRINTF1("in WTDG *** ERR link not started %d\n", status) |
|
288 | PRINTF1("in WTDG *** ERR link not started %d\n", status) | |
289 | } |
|
289 | } | |
290 | else |
|
290 | else | |
291 | { |
|
291 | { | |
292 | PRINTF("in WTDG *** OK link started\n") |
|
292 | PRINTF("in WTDG *** OK link started\n") | |
293 | } |
|
293 | } | |
294 |
|
294 | |||
295 | // restart the SPIQ task |
|
295 | // restart the SPIQ task | |
296 | status = rtems_task_restart( Task_id[TASKID_SPIQ], 1 ); |
|
296 | status = rtems_task_restart( Task_id[TASKID_SPIQ], 1 ); | |
297 | if ( status != RTEMS_SUCCESSFUL ) { |
|
297 | if ( status != RTEMS_SUCCESSFUL ) { | |
298 | PRINTF("in SPIQ *** ERR restarting SPIQ Task\n") |
|
298 | PRINTF("in SPIQ *** ERR restarting SPIQ Task\n") | |
299 | } |
|
299 | } | |
300 |
|
300 | |||
301 | // restart RECV and SEND |
|
301 | // restart RECV and SEND | |
302 | status = rtems_task_restart( Task_id[ TASKID_SEND ], 1 ); |
|
302 | status = rtems_task_restart( Task_id[ TASKID_SEND ], 1 ); | |
303 | if ( status != RTEMS_SUCCESSFUL ) { |
|
303 | if ( status != RTEMS_SUCCESSFUL ) { | |
304 | PRINTF("in SPIQ *** ERR restarting SEND Task\n") |
|
304 | PRINTF("in SPIQ *** ERR restarting SEND Task\n") | |
305 | } |
|
305 | } | |
306 | status = rtems_task_restart( Task_id[ TASKID_RECV ], 1 ); |
|
306 | status = rtems_task_restart( Task_id[ TASKID_RECV ], 1 ); | |
307 | if ( status != RTEMS_SUCCESSFUL ) { |
|
307 | if ( status != RTEMS_SUCCESSFUL ) { | |
308 | PRINTF("in SPIQ *** ERR restarting RECV Task\n") |
|
308 | PRINTF("in SPIQ *** ERR restarting RECV Task\n") | |
309 | } |
|
309 | } | |
310 | } |
|
310 | } | |
311 | } |
|
311 | } | |
312 |
|
312 | |||
313 | //**************** |
|
313 | //**************** | |
314 | // OTHER FUNCTIONS |
|
314 | // OTHER FUNCTIONS | |
315 | int spacewire_open_link( void ) |
|
315 | int spacewire_open_link( void ) | |
316 | { |
|
316 | { | |
317 | /** This function opens the SpaceWire link. |
|
317 | /** This function opens the SpaceWire link. | |
318 | * |
|
318 | * | |
319 | * @return a valid file descriptor in case of success, -1 in case of a failure |
|
319 | * @return a valid file descriptor in case of success, -1 in case of a failure | |
320 | * |
|
320 | * | |
321 | */ |
|
321 | */ | |
322 | rtems_status_code status; |
|
322 | rtems_status_code status; | |
323 |
|
323 | |||
324 | fdSPW = open(GRSPW_DEVICE_NAME, O_RDWR); // open the device. the open call resets the hardware |
|
324 | fdSPW = open(GRSPW_DEVICE_NAME, O_RDWR); // open the device. the open call resets the hardware | |
325 | if ( fdSPW < 0 ) { |
|
325 | if ( fdSPW < 0 ) { | |
326 | PRINTF1("ERR *** in configure_spw_link *** error opening "GRSPW_DEVICE_NAME" with ERR %d\n", errno) |
|
326 | PRINTF1("ERR *** in configure_spw_link *** error opening "GRSPW_DEVICE_NAME" with ERR %d\n", errno) | |
327 | } |
|
327 | } | |
328 | else |
|
328 | else | |
329 | { |
|
329 | { | |
330 | status = RTEMS_SUCCESSFUL; |
|
330 | status = RTEMS_SUCCESSFUL; | |
331 | } |
|
331 | } | |
332 |
|
332 | |||
333 | return status; |
|
333 | return status; | |
334 | } |
|
334 | } | |
335 |
|
335 | |||
336 | int spacewire_start_link( int fd ) |
|
336 | int spacewire_start_link( int fd ) | |
337 | { |
|
337 | { | |
338 | rtems_status_code status; |
|
338 | rtems_status_code status; | |
339 |
|
339 | |||
340 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started |
|
340 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started | |
341 | // -1 default hardcoded driver timeout |
|
341 | // -1 default hardcoded driver timeout | |
342 |
|
342 | |||
343 | return status; |
|
343 | return status; | |
344 | } |
|
344 | } | |
345 |
|
345 | |||
346 | int spacewire_stop_start_link( int fd ) |
|
346 | int spacewire_stop_start_link( int fd ) | |
347 | { |
|
347 | { | |
348 | rtems_status_code status; |
|
348 | rtems_status_code status; | |
349 |
|
349 | |||
350 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 |
|
350 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 | |
351 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started |
|
351 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_START, -1); // returns successfuly if the link is started | |
352 | // -1 default hardcoded driver timeout |
|
352 | // -1 default hardcoded driver timeout | |
353 |
|
353 | |||
354 | return status; |
|
354 | return status; | |
355 | } |
|
355 | } | |
356 |
|
356 | |||
357 | int spacewire_configure_link( int fd ) |
|
357 | int spacewire_configure_link( int fd ) | |
358 | { |
|
358 | { | |
359 | /** This function configures the SpaceWire link. |
|
359 | /** This function configures the SpaceWire link. | |
360 | * |
|
360 | * | |
361 | * @return GR-RTEMS-DRIVER directive status codes: |
|
361 | * @return GR-RTEMS-DRIVER directive status codes: | |
362 | * - 22 EINVAL - Null pointer or an out of range value was given as the argument. |
|
362 | * - 22 EINVAL - Null pointer or an out of range value was given as the argument. | |
363 | * - 16 EBUSY - Only used for SEND. Returned when no descriptors are avialble in non-blocking mode. |
|
363 | * - 16 EBUSY - Only used for SEND. Returned when no descriptors are avialble in non-blocking mode. | |
364 | * - 88 ENOSYS - Returned for SET_DESTKEY if RMAP command handler is not available or if a non-implemented call is used. |
|
364 | * - 88 ENOSYS - Returned for SET_DESTKEY if RMAP command handler is not available or if a non-implemented call is used. | |
365 | * - 116 ETIMEDOUT - REturned for SET_PACKET_SIZE and START if the link could not be brought up. |
|
365 | * - 116 ETIMEDOUT - REturned for SET_PACKET_SIZE and START if the link could not be brought up. | |
366 | * - 12 ENOMEM - Returned for SET_PACKETSIZE if it was unable to allocate the new buffers. |
|
366 | * - 12 ENOMEM - Returned for SET_PACKETSIZE if it was unable to allocate the new buffers. | |
367 | * - 5 EIO - Error when writing to grswp hardware registers. |
|
367 | * - 5 EIO - Error when writing to grswp hardware registers. | |
368 | * - 2 ENOENT - No such file or directory |
|
368 | * - 2 ENOENT - No such file or directory | |
369 | */ |
|
369 | */ | |
370 |
|
370 | |||
371 | rtems_status_code status; |
|
371 | rtems_status_code status; | |
372 |
|
372 | |||
373 | spacewire_set_NP(1, REGS_ADDR_GRSPW); // [N]o [P]ort force |
|
373 | spacewire_set_NP(1, REGS_ADDR_GRSPW); // [N]o [P]ort force | |
374 | spacewire_set_RE(1, REGS_ADDR_GRSPW); // [R]MAP [E]nable, the dedicated call seems to break the no port force configuration |
|
374 | spacewire_set_RE(1, REGS_ADDR_GRSPW); // [R]MAP [E]nable, the dedicated call seems to break the no port force configuration | |
375 |
|
375 | |||
376 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_RXBLOCK, 1); // sets the blocking mode for reception |
|
376 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_RXBLOCK, 1); // sets the blocking mode for reception | |
377 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_RXBLOCK\n") |
|
377 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_RXBLOCK\n") | |
378 | // |
|
378 | // | |
379 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_EVENT_ID, Task_id[TASKID_SPIQ]); // sets the task ID to which an event is sent when a |
|
379 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_EVENT_ID, Task_id[TASKID_SPIQ]); // sets the task ID to which an event is sent when a | |
380 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_EVENT_ID\n") // link-error interrupt occurs |
|
380 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_EVENT_ID\n") // link-error interrupt occurs | |
381 | // |
|
381 | // | |
382 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_DISABLE_ERR, 0); // automatic link-disabling due to link-error interrupts |
|
382 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_DISABLE_ERR, 0); // automatic link-disabling due to link-error interrupts | |
383 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_DISABLE_ERR\n") |
|
383 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_DISABLE_ERR\n") | |
384 | // |
|
384 | // | |
385 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ, 1); // sets the link-error interrupt bit |
|
385 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ, 1); // sets the link-error interrupt bit | |
386 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ\n") |
|
386 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_LINK_ERR_IRQ\n") | |
387 | // |
|
387 | // | |
388 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TXBLOCK, 0); // transmission blocks |
|
388 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TXBLOCK, 0); // transmission blocks | |
389 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK\n") |
|
389 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK\n") | |
390 | // |
|
390 | // | |
391 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL, 1); // transmission blocks when no transmission descriptor is available |
|
391 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL, 1); // transmission blocks when no transmission descriptor is available | |
392 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL\n") |
|
392 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TXBLOCK_ON_FULL\n") | |
393 | // |
|
393 | // | |
394 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TCODE_CTRL, 0x0909); // [Time Rx : Time Tx : Link error : Tick-out IRQ] |
|
394 | status = ioctl(fd, SPACEWIRE_IOCTRL_SET_TCODE_CTRL, 0x0909); // [Time Rx : Time Tx : Link error : Tick-out IRQ] | |
395 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TCODE_CTRL,\n") |
|
395 | if (status!=RTEMS_SUCCESSFUL) PRINTF("in SPIQ *** Error SPACEWIRE_IOCTRL_SET_TCODE_CTRL,\n") | |
396 |
|
396 | |||
397 | return status; |
|
397 | return status; | |
398 | } |
|
398 | } | |
399 |
|
399 | |||
400 | int spacewire_reset_link( void ) |
|
400 | int spacewire_reset_link( void ) | |
401 | { |
|
401 | { | |
402 | /** This function is executed by the SPIQ rtems_task wehn it has been awaken by an interruption raised by the SpaceWire driver. |
|
402 | /** This function is executed by the SPIQ rtems_task wehn it has been awaken by an interruption raised by the SpaceWire driver. | |
403 | * |
|
403 | * | |
404 | * @return RTEMS directive status code: |
|
404 | * @return RTEMS directive status code: | |
405 | * - RTEMS_UNSATISFIED is returned is the link is not in the running state after 10 s. |
|
405 | * - RTEMS_UNSATISFIED is returned is the link is not in the running state after 10 s. | |
406 | * - RTEMS_SUCCESSFUL is returned if the link is up before the timeout. |
|
406 | * - RTEMS_SUCCESSFUL is returned if the link is up before the timeout. | |
407 | * |
|
407 | * | |
408 | */ |
|
408 | */ | |
409 |
|
409 | |||
410 | rtems_status_code status_spw; |
|
410 | rtems_status_code status_spw; | |
411 | int i; |
|
411 | int i; | |
412 |
|
412 | |||
413 | for ( i=0; i<SY_LFR_DPU_CONNECT_ATTEMPT; i++ ) |
|
413 | for ( i=0; i<SY_LFR_DPU_CONNECT_ATTEMPT; i++ ) | |
414 | { |
|
414 | { | |
415 | PRINTF1("in spacewire_reset_link *** link recovery, try %d\n", i); |
|
415 | PRINTF1("in spacewire_reset_link *** link recovery, try %d\n", i); | |
416 |
|
416 | |||
417 | // CLOSING THE DRIVER AT THIS POINT WILL MAKE THE SEND TASK BLOCK THE SYSTEM |
|
417 | // CLOSING THE DRIVER AT THIS POINT WILL MAKE THE SEND TASK BLOCK THE SYSTEM | |
418 |
|
418 | |||
419 | status_spw = spacewire_stop_start_link( fdSPW ); |
|
419 | status_spw = spacewire_stop_start_link( fdSPW ); | |
420 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
420 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
421 | { |
|
421 | { | |
422 | PRINTF1("in spacewire_reset_link *** ERR spacewire_start_link code %d\n", status_spw) |
|
422 | PRINTF1("in spacewire_reset_link *** ERR spacewire_start_link code %d\n", status_spw) | |
423 | } |
|
423 | } | |
424 |
|
424 | |||
425 | if ( status_spw == RTEMS_SUCCESSFUL) |
|
425 | if ( status_spw == RTEMS_SUCCESSFUL) | |
426 | { |
|
426 | { | |
427 | break; |
|
427 | break; | |
428 | } |
|
428 | } | |
429 | } |
|
429 | } | |
430 |
|
430 | |||
431 | return status_spw; |
|
431 | return status_spw; | |
432 | } |
|
432 | } | |
433 |
|
433 | |||
434 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ) // [N]o [P]ort force |
|
434 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ) // [N]o [P]ort force | |
435 | { |
|
435 | { | |
436 | /** This function sets the [N]o [P]ort force bit of the GRSPW control register. |
|
436 | /** This function sets the [N]o [P]ort force bit of the GRSPW control register. | |
437 | * |
|
437 | * | |
438 | * @param val is the value, 0 or 1, used to set the value of the NP bit. |
|
438 | * @param val is the value, 0 or 1, used to set the value of the NP bit. | |
439 | * @param regAddr is the address of the GRSPW control register. |
|
439 | * @param regAddr is the address of the GRSPW control register. | |
440 | * |
|
440 | * | |
441 | * NP is the bit 20 of the GRSPW control register. |
|
441 | * NP is the bit 20 of the GRSPW control register. | |
442 | * |
|
442 | * | |
443 | */ |
|
443 | */ | |
444 |
|
444 | |||
445 | unsigned int *spwptr = (unsigned int*) regAddr; |
|
445 | unsigned int *spwptr = (unsigned int*) regAddr; | |
446 |
|
446 | |||
447 | if (val == 1) { |
|
447 | if (val == 1) { | |
448 | *spwptr = *spwptr | 0x00100000; // [NP] set the No port force bit |
|
448 | *spwptr = *spwptr | 0x00100000; // [NP] set the No port force bit | |
449 | } |
|
449 | } | |
450 | if (val== 0) { |
|
450 | if (val== 0) { | |
451 | *spwptr = *spwptr & 0xffdfffff; |
|
451 | *spwptr = *spwptr & 0xffdfffff; | |
452 | } |
|
452 | } | |
453 | } |
|
453 | } | |
454 |
|
454 | |||
455 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ) // [R]MAP [E]nable |
|
455 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ) // [R]MAP [E]nable | |
456 | { |
|
456 | { | |
457 | /** This function sets the [R]MAP [E]nable bit of the GRSPW control register. |
|
457 | /** This function sets the [R]MAP [E]nable bit of the GRSPW control register. | |
458 | * |
|
458 | * | |
459 | * @param val is the value, 0 or 1, used to set the value of the RE bit. |
|
459 | * @param val is the value, 0 or 1, used to set the value of the RE bit. | |
460 | * @param regAddr is the address of the GRSPW control register. |
|
460 | * @param regAddr is the address of the GRSPW control register. | |
461 | * |
|
461 | * | |
462 | * RE is the bit 16 of the GRSPW control register. |
|
462 | * RE is the bit 16 of the GRSPW control register. | |
463 | * |
|
463 | * | |
464 | */ |
|
464 | */ | |
465 |
|
465 | |||
466 | unsigned int *spwptr = (unsigned int*) regAddr; |
|
466 | unsigned int *spwptr = (unsigned int*) regAddr; | |
467 |
|
467 | |||
468 | if (val == 1) |
|
468 | if (val == 1) | |
469 | { |
|
469 | { | |
470 | *spwptr = *spwptr | 0x00010000; // [RE] set the RMAP Enable bit |
|
470 | *spwptr = *spwptr | 0x00010000; // [RE] set the RMAP Enable bit | |
471 | } |
|
471 | } | |
472 | if (val== 0) |
|
472 | if (val== 0) | |
473 | { |
|
473 | { | |
474 | *spwptr = *spwptr & 0xfffdffff; |
|
474 | *spwptr = *spwptr & 0xfffdffff; | |
475 | } |
|
475 | } | |
476 | } |
|
476 | } | |
477 |
|
477 | |||
478 | void spacewire_compute_stats_offsets( void ) |
|
478 | void spacewire_compute_stats_offsets( void ) | |
479 | { |
|
479 | { | |
480 | /** This function computes the SpaceWire statistics offsets in case of a SpaceWire related interruption raising. |
|
480 | /** This function computes the SpaceWire statistics offsets in case of a SpaceWire related interruption raising. | |
481 | * |
|
481 | * | |
482 | * The offsets keep a record of the statistics in case of a reset of the statistics. They are added to the current statistics |
|
482 | * The offsets keep a record of the statistics in case of a reset of the statistics. They are added to the current statistics | |
483 | * to keep the counters consistent even after a reset of the SpaceWire driver (the counter are set to zero by the driver when it |
|
483 | * to keep the counters consistent even after a reset of the SpaceWire driver (the counter are set to zero by the driver when it | |
484 | * during the open systel call). |
|
484 | * during the open systel call). | |
485 | * |
|
485 | * | |
486 | */ |
|
486 | */ | |
487 |
|
487 | |||
488 | spw_stats spacewire_stats_grspw; |
|
488 | spw_stats spacewire_stats_grspw; | |
489 | rtems_status_code status; |
|
489 | rtems_status_code status; | |
490 |
|
490 | |||
491 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); |
|
491 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); | |
492 |
|
492 | |||
493 | spacewire_stats_backup.packets_received = spacewire_stats_grspw.packets_received |
|
493 | spacewire_stats_backup.packets_received = spacewire_stats_grspw.packets_received | |
494 | + spacewire_stats.packets_received; |
|
494 | + spacewire_stats.packets_received; | |
495 | spacewire_stats_backup.packets_sent = spacewire_stats_grspw.packets_sent |
|
495 | spacewire_stats_backup.packets_sent = spacewire_stats_grspw.packets_sent | |
496 | + spacewire_stats.packets_sent; |
|
496 | + spacewire_stats.packets_sent; | |
497 | spacewire_stats_backup.parity_err = spacewire_stats_grspw.parity_err |
|
497 | spacewire_stats_backup.parity_err = spacewire_stats_grspw.parity_err | |
498 | + spacewire_stats.parity_err; |
|
498 | + spacewire_stats.parity_err; | |
499 | spacewire_stats_backup.disconnect_err = spacewire_stats_grspw.disconnect_err |
|
499 | spacewire_stats_backup.disconnect_err = spacewire_stats_grspw.disconnect_err | |
500 | + spacewire_stats.disconnect_err; |
|
500 | + spacewire_stats.disconnect_err; | |
501 | spacewire_stats_backup.escape_err = spacewire_stats_grspw.escape_err |
|
501 | spacewire_stats_backup.escape_err = spacewire_stats_grspw.escape_err | |
502 | + spacewire_stats.escape_err; |
|
502 | + spacewire_stats.escape_err; | |
503 | spacewire_stats_backup.credit_err = spacewire_stats_grspw.credit_err |
|
503 | spacewire_stats_backup.credit_err = spacewire_stats_grspw.credit_err | |
504 | + spacewire_stats.credit_err; |
|
504 | + spacewire_stats.credit_err; | |
505 | spacewire_stats_backup.write_sync_err = spacewire_stats_grspw.write_sync_err |
|
505 | spacewire_stats_backup.write_sync_err = spacewire_stats_grspw.write_sync_err | |
506 | + spacewire_stats.write_sync_err; |
|
506 | + spacewire_stats.write_sync_err; | |
507 | spacewire_stats_backup.rx_rmap_header_crc_err = spacewire_stats_grspw.rx_rmap_header_crc_err |
|
507 | spacewire_stats_backup.rx_rmap_header_crc_err = spacewire_stats_grspw.rx_rmap_header_crc_err | |
508 | + spacewire_stats.rx_rmap_header_crc_err; |
|
508 | + spacewire_stats.rx_rmap_header_crc_err; | |
509 | spacewire_stats_backup.rx_rmap_data_crc_err = spacewire_stats_grspw.rx_rmap_data_crc_err |
|
509 | spacewire_stats_backup.rx_rmap_data_crc_err = spacewire_stats_grspw.rx_rmap_data_crc_err | |
510 | + spacewire_stats.rx_rmap_data_crc_err; |
|
510 | + spacewire_stats.rx_rmap_data_crc_err; | |
511 | spacewire_stats_backup.early_ep = spacewire_stats_grspw.early_ep |
|
511 | spacewire_stats_backup.early_ep = spacewire_stats_grspw.early_ep | |
512 | + spacewire_stats.early_ep; |
|
512 | + spacewire_stats.early_ep; | |
513 | spacewire_stats_backup.invalid_address = spacewire_stats_grspw.invalid_address |
|
513 | spacewire_stats_backup.invalid_address = spacewire_stats_grspw.invalid_address | |
514 | + spacewire_stats.invalid_address; |
|
514 | + spacewire_stats.invalid_address; | |
515 | spacewire_stats_backup.rx_eep_err = spacewire_stats_grspw.rx_eep_err |
|
515 | spacewire_stats_backup.rx_eep_err = spacewire_stats_grspw.rx_eep_err | |
516 | + spacewire_stats.rx_eep_err; |
|
516 | + spacewire_stats.rx_eep_err; | |
517 | spacewire_stats_backup.rx_truncated = spacewire_stats_grspw.rx_truncated |
|
517 | spacewire_stats_backup.rx_truncated = spacewire_stats_grspw.rx_truncated | |
518 | + spacewire_stats.rx_truncated; |
|
518 | + spacewire_stats.rx_truncated; | |
519 | } |
|
519 | } | |
520 |
|
520 | |||
521 | void spacewire_update_statistics( void ) |
|
521 | void spacewire_update_statistics( void ) | |
522 | { |
|
522 | { | |
523 | rtems_status_code status; |
|
523 | rtems_status_code status; | |
524 | spw_stats spacewire_stats_grspw; |
|
524 | spw_stats spacewire_stats_grspw; | |
525 |
|
525 | |||
526 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); |
|
526 | status = ioctl( fdSPW, SPACEWIRE_IOCTRL_GET_STATISTICS, &spacewire_stats_grspw ); | |
527 |
|
527 | |||
528 | spacewire_stats.packets_received = spacewire_stats_backup.packets_received |
|
528 | spacewire_stats.packets_received = spacewire_stats_backup.packets_received | |
529 | + spacewire_stats_grspw.packets_received; |
|
529 | + spacewire_stats_grspw.packets_received; | |
530 | spacewire_stats.packets_sent = spacewire_stats_backup.packets_sent |
|
530 | spacewire_stats.packets_sent = spacewire_stats_backup.packets_sent | |
531 | + spacewire_stats_grspw.packets_sent; |
|
531 | + spacewire_stats_grspw.packets_sent; | |
532 | spacewire_stats.parity_err = spacewire_stats_backup.parity_err |
|
532 | spacewire_stats.parity_err = spacewire_stats_backup.parity_err | |
533 | + spacewire_stats_grspw.parity_err; |
|
533 | + spacewire_stats_grspw.parity_err; | |
534 | spacewire_stats.disconnect_err = spacewire_stats_backup.disconnect_err |
|
534 | spacewire_stats.disconnect_err = spacewire_stats_backup.disconnect_err | |
535 | + spacewire_stats_grspw.disconnect_err; |
|
535 | + spacewire_stats_grspw.disconnect_err; | |
536 | spacewire_stats.escape_err = spacewire_stats_backup.escape_err |
|
536 | spacewire_stats.escape_err = spacewire_stats_backup.escape_err | |
537 | + spacewire_stats_grspw.escape_err; |
|
537 | + spacewire_stats_grspw.escape_err; | |
538 | spacewire_stats.credit_err = spacewire_stats_backup.credit_err |
|
538 | spacewire_stats.credit_err = spacewire_stats_backup.credit_err | |
539 | + spacewire_stats_grspw.credit_err; |
|
539 | + spacewire_stats_grspw.credit_err; | |
540 | spacewire_stats.write_sync_err = spacewire_stats_backup.write_sync_err |
|
540 | spacewire_stats.write_sync_err = spacewire_stats_backup.write_sync_err | |
541 | + spacewire_stats_grspw.write_sync_err; |
|
541 | + spacewire_stats_grspw.write_sync_err; | |
542 | spacewire_stats.rx_rmap_header_crc_err = spacewire_stats_backup.rx_rmap_header_crc_err |
|
542 | spacewire_stats.rx_rmap_header_crc_err = spacewire_stats_backup.rx_rmap_header_crc_err | |
543 | + spacewire_stats_grspw.rx_rmap_header_crc_err; |
|
543 | + spacewire_stats_grspw.rx_rmap_header_crc_err; | |
544 | spacewire_stats.rx_rmap_data_crc_err = spacewire_stats_backup.rx_rmap_data_crc_err |
|
544 | spacewire_stats.rx_rmap_data_crc_err = spacewire_stats_backup.rx_rmap_data_crc_err | |
545 | + spacewire_stats_grspw.rx_rmap_data_crc_err; |
|
545 | + spacewire_stats_grspw.rx_rmap_data_crc_err; | |
546 | spacewire_stats.early_ep = spacewire_stats_backup.early_ep |
|
546 | spacewire_stats.early_ep = spacewire_stats_backup.early_ep | |
547 | + spacewire_stats_grspw.early_ep; |
|
547 | + spacewire_stats_grspw.early_ep; | |
548 | spacewire_stats.invalid_address = spacewire_stats_backup.invalid_address |
|
548 | spacewire_stats.invalid_address = spacewire_stats_backup.invalid_address | |
549 | + spacewire_stats_grspw.invalid_address; |
|
549 | + spacewire_stats_grspw.invalid_address; | |
550 | spacewire_stats.rx_eep_err = spacewire_stats_backup.rx_eep_err |
|
550 | spacewire_stats.rx_eep_err = spacewire_stats_backup.rx_eep_err | |
551 | + spacewire_stats_grspw.rx_eep_err; |
|
551 | + spacewire_stats_grspw.rx_eep_err; | |
552 | spacewire_stats.rx_truncated = spacewire_stats_backup.rx_truncated |
|
552 | spacewire_stats.rx_truncated = spacewire_stats_backup.rx_truncated | |
553 | + spacewire_stats_grspw.rx_truncated; |
|
553 | + spacewire_stats_grspw.rx_truncated; | |
554 | //spacewire_stats.tx_link_err; |
|
554 | //spacewire_stats.tx_link_err; | |
555 |
|
555 | |||
556 | //**************************** |
|
556 | //**************************** | |
557 | // DPU_SPACEWIRE_IF_STATISTICS |
|
557 | // DPU_SPACEWIRE_IF_STATISTICS | |
558 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[0] = (unsigned char) (spacewire_stats.packets_received >> 8); |
|
558 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[0] = (unsigned char) (spacewire_stats.packets_received >> 8); | |
559 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[1] = (unsigned char) (spacewire_stats.packets_received); |
|
559 | housekeeping_packet.hk_lfr_dpu_spw_pkt_rcv_cnt[1] = (unsigned char) (spacewire_stats.packets_received); | |
560 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[0] = (unsigned char) (spacewire_stats.packets_sent >> 8); |
|
560 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[0] = (unsigned char) (spacewire_stats.packets_sent >> 8); | |
561 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[1] = (unsigned char) (spacewire_stats.packets_sent); |
|
561 | housekeeping_packet.hk_lfr_dpu_spw_pkt_sent_cnt[1] = (unsigned char) (spacewire_stats.packets_sent); | |
562 | //housekeeping_packet.hk_lfr_dpu_spw_tick_out_cnt; |
|
562 | //housekeeping_packet.hk_lfr_dpu_spw_tick_out_cnt; | |
563 | //housekeeping_packet.hk_lfr_dpu_spw_last_timc; |
|
563 | //housekeeping_packet.hk_lfr_dpu_spw_last_timc; | |
564 |
|
564 | |||
565 | //****************************************** |
|
565 | //****************************************** | |
566 | // ERROR COUNTERS / SPACEWIRE / LOW SEVERITY |
|
566 | // ERROR COUNTERS / SPACEWIRE / LOW SEVERITY | |
567 | housekeeping_packet.hk_lfr_dpu_spw_parity = (unsigned char) spacewire_stats.parity_err; |
|
567 | housekeeping_packet.hk_lfr_dpu_spw_parity = (unsigned char) spacewire_stats.parity_err; | |
568 | housekeeping_packet.hk_lfr_dpu_spw_disconnect = (unsigned char) spacewire_stats.disconnect_err; |
|
568 | housekeeping_packet.hk_lfr_dpu_spw_disconnect = (unsigned char) spacewire_stats.disconnect_err; | |
569 | housekeeping_packet.hk_lfr_dpu_spw_escape = (unsigned char) spacewire_stats.escape_err; |
|
569 | housekeeping_packet.hk_lfr_dpu_spw_escape = (unsigned char) spacewire_stats.escape_err; | |
570 | housekeeping_packet.hk_lfr_dpu_spw_credit = (unsigned char) spacewire_stats.credit_err; |
|
570 | housekeeping_packet.hk_lfr_dpu_spw_credit = (unsigned char) spacewire_stats.credit_err; | |
571 | housekeeping_packet.hk_lfr_dpu_spw_write_sync = (unsigned char) spacewire_stats.write_sync_err; |
|
571 | housekeeping_packet.hk_lfr_dpu_spw_write_sync = (unsigned char) spacewire_stats.write_sync_err; | |
572 |
|
572 | |||
573 | //********************************************* |
|
573 | //********************************************* | |
574 | // ERROR COUNTERS / SPACEWIRE / MEDIUM SEVERITY |
|
574 | // ERROR COUNTERS / SPACEWIRE / MEDIUM SEVERITY | |
575 | housekeeping_packet.hk_lfr_dpu_spw_early_eop = (unsigned char) spacewire_stats.early_ep; |
|
575 | housekeeping_packet.hk_lfr_dpu_spw_early_eop = (unsigned char) spacewire_stats.early_ep; | |
576 | housekeeping_packet.hk_lfr_dpu_spw_invalid_addr = (unsigned char) spacewire_stats.invalid_address; |
|
576 | housekeeping_packet.hk_lfr_dpu_spw_invalid_addr = (unsigned char) spacewire_stats.invalid_address; | |
577 | housekeeping_packet.hk_lfr_dpu_spw_eep = (unsigned char) spacewire_stats.rx_eep_err; |
|
577 | housekeeping_packet.hk_lfr_dpu_spw_eep = (unsigned char) spacewire_stats.rx_eep_err; | |
578 | housekeeping_packet.hk_lfr_dpu_spw_rx_too_big = (unsigned char) spacewire_stats.rx_truncated; |
|
578 | housekeeping_packet.hk_lfr_dpu_spw_rx_too_big = (unsigned char) spacewire_stats.rx_truncated; | |
579 | } |
|
579 | } | |
580 |
|
580 | |||
581 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ) |
|
581 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ) | |
582 | { |
|
582 | { | |
583 |
// rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_ |
|
583 | // rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_9 ); | |
584 | struct grgpio_regs_str *grgpio_regs = (struct grgpio_regs_str *) REGS_ADDR_GRGPIO; |
|
584 | struct grgpio_regs_str *grgpio_regs = (struct grgpio_regs_str *) REGS_ADDR_GRGPIO; | |
585 |
|
585 | |||
586 | grgpio_regs->io_port_direction_register = |
|
586 | grgpio_regs->io_port_direction_register = | |
587 | grgpio_regs->io_port_direction_register | 0x08; // [0001 1000], 0 = output disabled, 1 = output enabled |
|
587 | grgpio_regs->io_port_direction_register | 0x08; // [0001 1000], 0 = output disabled, 1 = output enabled | |
588 |
|
588 | |||
589 | if ( (grgpio_regs->io_port_output_register & 0x08) == 0x08 ) |
|
589 | if ( (grgpio_regs->io_port_output_register & 0x08) == 0x08 ) | |
590 | { |
|
590 | { | |
591 | grgpio_regs->io_port_output_register = grgpio_regs->io_port_output_register & 0xf7; |
|
591 | grgpio_regs->io_port_output_register = grgpio_regs->io_port_output_register & 0xf7; | |
592 | } |
|
592 | } | |
593 | else |
|
593 | else | |
594 | { |
|
594 | { | |
595 | grgpio_regs->io_port_output_register = grgpio_regs->io_port_output_register | 0x08; |
|
595 | grgpio_regs->io_port_output_register = grgpio_regs->io_port_output_register | 0x08; | |
596 | } |
|
596 | } | |
597 |
|
||||
598 | } |
|
597 | } | |
599 |
|
598 | |||
600 | rtems_timer_service_routine user_routine( rtems_id timer_id, void *user_data ) |
|
599 | rtems_timer_service_routine user_routine( rtems_id timer_id, void *user_data ) | |
601 | { |
|
600 | { | |
602 | int linkStatus; |
|
601 | int linkStatus; | |
603 | rtems_status_code status; |
|
602 | rtems_status_code status; | |
604 |
|
603 | |||
605 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status |
|
604 | status = ioctl(fdSPW, SPACEWIRE_IOCTRL_GET_LINK_STATUS, &linkStatus); // get the link status | |
606 |
|
605 | |||
607 | if ( linkStatus == 5) { |
|
606 | if ( linkStatus == 5) { | |
608 | PRINTF("in spacewire_reset_link *** link is running\n") |
|
607 | PRINTF("in spacewire_reset_link *** link is running\n") | |
609 | status = RTEMS_SUCCESSFUL; |
|
608 | status = RTEMS_SUCCESSFUL; | |
610 | } |
|
609 | } | |
611 | } |
|
610 | } |
@@ -1,790 +1,818 | |||||
1 | /** Functions and tasks related to TeleCommand handling. |
|
1 | /** Functions and tasks related to TeleCommand handling. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * A group of functions to handle TeleCommands:\n |
|
6 | * A group of functions to handle TeleCommands:\n | |
7 | * action launching\n |
|
7 | * action launching\n | |
8 | * TC parsing\n |
|
8 | * TC parsing\n | |
9 | * ... |
|
9 | * ... | |
10 | * |
|
10 | * | |
11 | */ |
|
11 | */ | |
12 |
|
12 | |||
13 | #include "tc_handler.h" |
|
13 | #include "tc_handler.h" | |
14 |
|
14 | |||
15 | //*********** |
|
15 | //*********** | |
16 | // RTEMS TASK |
|
16 | // RTEMS TASK | |
17 |
|
17 | |||
18 | rtems_task actn_task( rtems_task_argument unused ) |
|
18 | rtems_task actn_task( rtems_task_argument unused ) | |
19 | { |
|
19 | { | |
20 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. |
|
20 | /** This RTEMS task is responsible for launching actions upton the reception of valid TeleCommands. | |
21 | * |
|
21 | * | |
22 | * @param unused is the starting argument of the RTEMS task |
|
22 | * @param unused is the starting argument of the RTEMS task | |
23 | * |
|
23 | * | |
24 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending |
|
24 | * The ACTN task waits for data coming from an RTEMS msesage queue. When data arrives, it launches specific actions depending | |
25 | * on the incoming TeleCommand. |
|
25 | * on the incoming TeleCommand. | |
26 | * |
|
26 | * | |
27 | */ |
|
27 | */ | |
28 |
|
28 | |||
29 | int result; |
|
29 | int result; | |
30 | rtems_status_code status; // RTEMS status code |
|
30 | rtems_status_code status; // RTEMS status code | |
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task |
|
31 | ccsdsTelecommandPacket_t TC; // TC sent to the ACTN task | |
32 | size_t size; // size of the incoming TC packet |
|
32 | size_t size; // size of the incoming TC packet | |
33 | unsigned char subtype; // subtype of the current TC packet |
|
33 | unsigned char subtype; // subtype of the current TC packet | |
34 | unsigned char time[6]; |
|
34 | unsigned char time[6]; | |
35 | rtems_id queue_rcv_id; |
|
35 | rtems_id queue_rcv_id; | |
36 | rtems_id queue_snd_id; |
|
36 | rtems_id queue_snd_id; | |
37 |
|
37 | |||
38 | status = get_message_queue_id_recv( &queue_rcv_id ); |
|
38 | status = get_message_queue_id_recv( &queue_rcv_id ); | |
39 | if (status != RTEMS_SUCCESSFUL) |
|
39 | if (status != RTEMS_SUCCESSFUL) | |
40 | { |
|
40 | { | |
41 | PRINTF1("in ACTN *** ERR get_message_queue_id_recv %d\n", status) |
|
41 | PRINTF1("in ACTN *** ERR get_message_queue_id_recv %d\n", status) | |
42 | } |
|
42 | } | |
43 |
|
43 | |||
44 | status = get_message_queue_id_send( &queue_snd_id ); |
|
44 | status = get_message_queue_id_send( &queue_snd_id ); | |
45 | if (status != RTEMS_SUCCESSFUL) |
|
45 | if (status != RTEMS_SUCCESSFUL) | |
46 | { |
|
46 | { | |
47 | PRINTF1("in ACTN *** ERR get_message_queue_id_send %d\n", status) |
|
47 | PRINTF1("in ACTN *** ERR get_message_queue_id_send %d\n", status) | |
48 | } |
|
48 | } | |
49 |
|
49 | |||
50 | result = LFR_SUCCESSFUL; |
|
50 | result = LFR_SUCCESSFUL; | |
51 | subtype = 0; // subtype of the current TC packet |
|
51 | subtype = 0; // subtype of the current TC packet | |
52 |
|
52 | |||
53 | BOOT_PRINTF("in ACTN *** \n") |
|
53 | BOOT_PRINTF("in ACTN *** \n") | |
54 |
|
54 | |||
55 | while(1) |
|
55 | while(1) | |
56 | { |
|
56 | { | |
57 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, |
|
57 | status = rtems_message_queue_receive( queue_rcv_id, (char*) &TC, &size, | |
58 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); |
|
58 | RTEMS_WAIT, RTEMS_NO_TIMEOUT); | |
59 | getTime( time ); // set time to the current time |
|
59 | getTime( time ); // set time to the current time | |
60 | if (status!=RTEMS_SUCCESSFUL) |
|
60 | if (status!=RTEMS_SUCCESSFUL) | |
61 | { |
|
61 | { | |
62 | PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) |
|
62 | PRINTF1("ERR *** in task ACTN *** error receiving a message, code %d \n", status) | |
63 | } |
|
63 | } | |
64 | else |
|
64 | else | |
65 | { |
|
65 | { | |
66 | subtype = TC.serviceSubType; |
|
66 | subtype = TC.serviceSubType; | |
67 | switch(subtype) |
|
67 | switch(subtype) | |
68 | { |
|
68 | { | |
69 | case TC_SUBTYPE_RESET: |
|
69 | case TC_SUBTYPE_RESET: | |
70 | result = action_reset( &TC, queue_snd_id, time ); |
|
70 | result = action_reset( &TC, queue_snd_id, time ); | |
71 | close_action( &TC, result, queue_snd_id ); |
|
71 | close_action( &TC, result, queue_snd_id ); | |
72 | break; |
|
72 | break; | |
73 | // |
|
73 | // | |
74 | case TC_SUBTYPE_LOAD_COMM: |
|
74 | case TC_SUBTYPE_LOAD_COMM: | |
75 | result = action_load_common_par( &TC ); |
|
75 | result = action_load_common_par( &TC ); | |
76 | close_action( &TC, result, queue_snd_id ); |
|
76 | close_action( &TC, result, queue_snd_id ); | |
77 | break; |
|
77 | break; | |
78 | // |
|
78 | // | |
79 | case TC_SUBTYPE_LOAD_NORM: |
|
79 | case TC_SUBTYPE_LOAD_NORM: | |
80 | result = action_load_normal_par( &TC, queue_snd_id, time ); |
|
80 | result = action_load_normal_par( &TC, queue_snd_id, time ); | |
81 | close_action( &TC, result, queue_snd_id ); |
|
81 | close_action( &TC, result, queue_snd_id ); | |
82 | break; |
|
82 | break; | |
83 | // |
|
83 | // | |
84 | case TC_SUBTYPE_LOAD_BURST: |
|
84 | case TC_SUBTYPE_LOAD_BURST: | |
85 | result = action_load_burst_par( &TC, queue_snd_id, time ); |
|
85 | result = action_load_burst_par( &TC, queue_snd_id, time ); | |
86 | close_action( &TC, result, queue_snd_id ); |
|
86 | close_action( &TC, result, queue_snd_id ); | |
87 | break; |
|
87 | break; | |
88 | // |
|
88 | // | |
89 | case TC_SUBTYPE_LOAD_SBM1: |
|
89 | case TC_SUBTYPE_LOAD_SBM1: | |
90 | result = action_load_sbm1_par( &TC, queue_snd_id, time ); |
|
90 | result = action_load_sbm1_par( &TC, queue_snd_id, time ); | |
91 | close_action( &TC, result, queue_snd_id ); |
|
91 | close_action( &TC, result, queue_snd_id ); | |
92 | break; |
|
92 | break; | |
93 | // |
|
93 | // | |
94 | case TC_SUBTYPE_LOAD_SBM2: |
|
94 | case TC_SUBTYPE_LOAD_SBM2: | |
95 | result = action_load_sbm2_par( &TC, queue_snd_id, time ); |
|
95 | result = action_load_sbm2_par( &TC, queue_snd_id, time ); | |
96 | close_action( &TC, result, queue_snd_id ); |
|
96 | close_action( &TC, result, queue_snd_id ); | |
97 | break; |
|
97 | break; | |
98 | // |
|
98 | // | |
99 | case TC_SUBTYPE_DUMP: |
|
99 | case TC_SUBTYPE_DUMP: | |
100 | result = action_dump_par( queue_snd_id ); |
|
100 | result = action_dump_par( queue_snd_id ); | |
101 | close_action( &TC, result, queue_snd_id ); |
|
101 | close_action( &TC, result, queue_snd_id ); | |
102 | break; |
|
102 | break; | |
103 | // |
|
103 | // | |
104 | case TC_SUBTYPE_ENTER: |
|
104 | case TC_SUBTYPE_ENTER: | |
105 | result = action_enter_mode( &TC, queue_snd_id, time ); |
|
105 | result = action_enter_mode( &TC, queue_snd_id, time ); | |
106 | close_action( &TC, result, queue_snd_id ); |
|
106 | close_action( &TC, result, queue_snd_id ); | |
107 | break; |
|
107 | break; | |
108 | // |
|
108 | // | |
109 | case TC_SUBTYPE_UPDT_INFO: |
|
109 | case TC_SUBTYPE_UPDT_INFO: | |
110 | result = action_update_info( &TC, queue_snd_id ); |
|
110 | result = action_update_info( &TC, queue_snd_id ); | |
111 | close_action( &TC, result, queue_snd_id ); |
|
111 | close_action( &TC, result, queue_snd_id ); | |
112 | break; |
|
112 | break; | |
113 | // |
|
113 | // | |
114 | case TC_SUBTYPE_EN_CAL: |
|
114 | case TC_SUBTYPE_EN_CAL: | |
115 | result = action_enable_calibration( &TC, queue_snd_id, time ); |
|
115 | result = action_enable_calibration( &TC, queue_snd_id, time ); | |
116 | close_action( &TC, result, queue_snd_id ); |
|
116 | close_action( &TC, result, queue_snd_id ); | |
117 | break; |
|
117 | break; | |
118 | // |
|
118 | // | |
119 | case TC_SUBTYPE_DIS_CAL: |
|
119 | case TC_SUBTYPE_DIS_CAL: | |
120 | result = action_disable_calibration( &TC, queue_snd_id, time ); |
|
120 | result = action_disable_calibration( &TC, queue_snd_id, time ); | |
121 | close_action( &TC, result, queue_snd_id ); |
|
121 | close_action( &TC, result, queue_snd_id ); | |
122 | break; |
|
122 | break; | |
123 | // |
|
123 | // | |
124 | case TC_SUBTYPE_UPDT_TIME: |
|
124 | case TC_SUBTYPE_UPDT_TIME: | |
125 | result = action_update_time( &TC ); |
|
125 | result = action_update_time( &TC ); | |
126 | close_action( &TC, result, queue_snd_id ); |
|
126 | close_action( &TC, result, queue_snd_id ); | |
127 | break; |
|
127 | break; | |
128 | // |
|
128 | // | |
129 | default: |
|
129 | default: | |
130 | break; |
|
130 | break; | |
131 | } |
|
131 | } | |
132 | } |
|
132 | } | |
133 | } |
|
133 | } | |
134 | } |
|
134 | } | |
135 |
|
135 | |||
136 | //*********** |
|
136 | //*********** | |
137 | // TC ACTIONS |
|
137 | // TC ACTIONS | |
138 |
|
138 | |||
139 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
139 | int action_reset(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
140 | { |
|
140 | { | |
141 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. |
|
141 | /** This function executes specific actions when a TC_LFR_RESET TeleCommand has been received. | |
142 | * |
|
142 | * | |
143 | * @param TC points to the TeleCommand packet that is being processed |
|
143 | * @param TC points to the TeleCommand packet that is being processed | |
144 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
144 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
145 | * |
|
145 | * | |
146 | */ |
|
146 | */ | |
147 |
|
147 | |||
148 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
148 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
149 | return LFR_DEFAULT; |
|
149 | return LFR_DEFAULT; | |
150 | } |
|
150 | } | |
151 |
|
151 | |||
152 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
152 | int action_enter_mode(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
153 | { |
|
153 | { | |
154 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. |
|
154 | /** This function executes specific actions when a TC_LFR_ENTER_MODE TeleCommand has been received. | |
155 | * |
|
155 | * | |
156 | * @param TC points to the TeleCommand packet that is being processed |
|
156 | * @param TC points to the TeleCommand packet that is being processed | |
157 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
157 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
158 | * |
|
158 | * | |
159 | */ |
|
159 | */ | |
160 |
|
160 | |||
161 | rtems_status_code status; |
|
161 | rtems_status_code status; | |
162 | unsigned char requestedMode; |
|
162 | unsigned char requestedMode; | |
163 |
|
163 | |||
164 | requestedMode = TC->dataAndCRC[1]; |
|
164 | requestedMode = TC->dataAndCRC[1]; | |
165 |
|
165 | |||
166 | if ( (requestedMode != LFR_MODE_STANDBY) |
|
166 | status = check_mode_value( requestedMode ); | |
167 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) |
|
167 | if ( status != LFR_SUCCESSFUL ) | |
168 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) |
|
|||
169 | { |
|
168 | { | |
170 | status = RTEMS_UNSATISFIED; |
|
|||
171 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); |
|
169 | send_tm_lfr_tc_exe_inconsistent( TC, queue_id, BYTE_POS_CP_LFR_MODE, requestedMode ); | |
172 | } |
|
170 | } | |
173 | else |
|
171 | else | |
174 | { |
|
172 | { | |
175 | printf("in action_enter_mode *** enter mode %d\n", requestedMode); |
|
173 | status = check_mode_transition(requestedMode); | |
176 |
|
||||
177 | status = transition_validation(requestedMode); |
|
|||
178 |
|
174 | |||
179 |
if ( status == LFR_SUCCESSFUL ) |
|
175 | if ( status == LFR_SUCCESSFUL ) | |
180 | if ( lfrCurrentMode != LFR_MODE_STANDBY) |
|
176 | { | |
181 | { |
|
177 | PRINTF1("OK *** in action_enter_mode *** enter mode %d\n", requestedMode); | |
182 | status = stop_current_mode(); |
|
|||
183 | } |
|
|||
184 | if (status != RTEMS_SUCCESSFUL) |
|
|||
185 | { |
|
|||
186 | PRINTF("ERR *** in action_enter *** stop_current_mode\n") |
|
|||
187 | } |
|
|||
188 | status = enter_mode( requestedMode ); |
|
178 | status = enter_mode( requestedMode ); | |
189 | } |
|
179 | } | |
190 | else |
|
180 | else | |
191 | { |
|
181 | { | |
192 | PRINTF("ERR *** in action_enter *** transition rejected\n") |
|
182 | PRINTF("ERR *** in action_enter_mode *** transition rejected\n") | |
193 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); |
|
183 | send_tm_lfr_tc_exe_not_executable( TC, queue_id ); | |
194 | } |
|
184 | } | |
195 | } |
|
185 | } | |
196 |
|
186 | |||
197 | return status; |
|
187 | return status; | |
198 | } |
|
188 | } | |
199 |
|
189 | |||
200 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) |
|
190 | int action_update_info(ccsdsTelecommandPacket_t *TC, rtems_id queue_id) | |
201 | { |
|
191 | { | |
202 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. |
|
192 | /** This function executes specific actions when a TC_LFR_UPDATE_INFO TeleCommand has been received. | |
203 | * |
|
193 | * | |
204 | * @param TC points to the TeleCommand packet that is being processed |
|
194 | * @param TC points to the TeleCommand packet that is being processed | |
205 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
195 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
206 | * |
|
196 | * | |
207 | * @return LFR directive status code: |
|
197 | * @return LFR directive status code: | |
208 | * - LFR_DEFAULT |
|
198 | * - LFR_DEFAULT | |
209 | * - LFR_SUCCESSFUL |
|
199 | * - LFR_SUCCESSFUL | |
210 | * |
|
200 | * | |
211 | */ |
|
201 | */ | |
212 |
|
202 | |||
213 | unsigned int val; |
|
203 | unsigned int val; | |
214 | int result; |
|
204 | int result; | |
215 | unsigned int status; |
|
205 | unsigned int status; | |
216 | unsigned char mode; |
|
206 | unsigned char mode; | |
217 |
|
207 | |||
218 | // check LFR mode |
|
208 | // check LFR mode | |
219 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET5 ] & 0x1e) >> 1; |
|
209 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET5 ] & 0x1e) >> 1; | |
220 | status = check_update_info_hk_lfr_mode( mode ); |
|
210 | status = check_update_info_hk_lfr_mode( mode ); | |
221 | if (status == LFR_SUCCESSFUL) // check TDS mode |
|
211 | if (status == LFR_SUCCESSFUL) // check TDS mode | |
222 | { |
|
212 | { | |
223 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET6 ] & 0xf0) >> 4; |
|
213 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET6 ] & 0xf0) >> 4; | |
224 | status = check_update_info_hk_tds_mode( mode ); |
|
214 | status = check_update_info_hk_tds_mode( mode ); | |
225 | } |
|
215 | } | |
226 | if (status == LFR_SUCCESSFUL) // check THR mode |
|
216 | if (status == LFR_SUCCESSFUL) // check THR mode | |
227 | { |
|
217 | { | |
228 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET6 ] & 0x0f); |
|
218 | mode = (TC->dataAndCRC[ BYTE_POS_HK_UPDATE_INFO_PAR_SET6 ] & 0x0f); | |
229 | status = check_update_info_hk_thr_mode( mode ); |
|
219 | status = check_update_info_hk_thr_mode( mode ); | |
230 | } |
|
220 | } | |
231 | if (status == LFR_SUCCESSFUL) // if the parameter check is successful |
|
221 | if (status == LFR_SUCCESSFUL) // if the parameter check is successful | |
232 | { |
|
222 | { | |
233 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 |
|
223 | val = housekeeping_packet.hk_lfr_update_info_tc_cnt[0] * 256 | |
234 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; |
|
224 | + housekeeping_packet.hk_lfr_update_info_tc_cnt[1]; | |
235 | val++; |
|
225 | val++; | |
236 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); |
|
226 | housekeeping_packet.hk_lfr_update_info_tc_cnt[0] = (unsigned char) (val >> 8); | |
237 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); |
|
227 | housekeeping_packet.hk_lfr_update_info_tc_cnt[1] = (unsigned char) (val); | |
238 | } |
|
228 | } | |
239 |
|
229 | |||
240 | result = status; |
|
230 | result = status; | |
241 |
|
231 | |||
242 | return result; |
|
232 | return result; | |
243 | } |
|
233 | } | |
244 |
|
234 | |||
245 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
235 | int action_enable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
246 | { |
|
236 | { | |
247 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. |
|
237 | /** This function executes specific actions when a TC_LFR_ENABLE_CALIBRATION TeleCommand has been received. | |
248 | * |
|
238 | * | |
249 | * @param TC points to the TeleCommand packet that is being processed |
|
239 | * @param TC points to the TeleCommand packet that is being processed | |
250 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
240 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
251 | * |
|
241 | * | |
252 | */ |
|
242 | */ | |
253 |
|
243 | |||
254 | int result; |
|
244 | int result; | |
255 | unsigned char lfrMode; |
|
245 | unsigned char lfrMode; | |
256 |
|
246 | |||
257 | result = LFR_DEFAULT; |
|
247 | result = LFR_DEFAULT; | |
258 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
248 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
259 |
|
249 | |||
260 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
250 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
261 | result = LFR_DEFAULT; |
|
251 | result = LFR_DEFAULT; | |
262 |
|
252 | |||
263 | return result; |
|
253 | return result; | |
264 | } |
|
254 | } | |
265 |
|
255 | |||
266 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) |
|
256 | int action_disable_calibration(ccsdsTelecommandPacket_t *TC, rtems_id queue_id, unsigned char *time) | |
267 | { |
|
257 | { | |
268 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. |
|
258 | /** This function executes specific actions when a TC_LFR_DISABLE_CALIBRATION TeleCommand has been received. | |
269 | * |
|
259 | * | |
270 | * @param TC points to the TeleCommand packet that is being processed |
|
260 | * @param TC points to the TeleCommand packet that is being processed | |
271 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
261 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
272 | * |
|
262 | * | |
273 | */ |
|
263 | */ | |
274 |
|
264 | |||
275 | int result; |
|
265 | int result; | |
276 | unsigned char lfrMode; |
|
266 | unsigned char lfrMode; | |
277 |
|
267 | |||
278 | result = LFR_DEFAULT; |
|
268 | result = LFR_DEFAULT; | |
279 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
269 | lfrMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
280 |
|
270 | |||
281 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); |
|
271 | send_tm_lfr_tc_exe_not_implemented( TC, queue_id, time ); | |
282 | result = LFR_DEFAULT; |
|
272 | result = LFR_DEFAULT; | |
283 |
|
273 | |||
284 | return result; |
|
274 | return result; | |
285 | } |
|
275 | } | |
286 |
|
276 | |||
287 | int action_update_time(ccsdsTelecommandPacket_t *TC) |
|
277 | int action_update_time(ccsdsTelecommandPacket_t *TC) | |
288 | { |
|
278 | { | |
289 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. |
|
279 | /** This function executes specific actions when a TC_LFR_UPDATE_TIME TeleCommand has been received. | |
290 | * |
|
280 | * | |
291 | * @param TC points to the TeleCommand packet that is being processed |
|
281 | * @param TC points to the TeleCommand packet that is being processed | |
292 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver |
|
282 | * @param queue_id is the id of the queue which handles TM transmission by the SpaceWire driver | |
293 | * |
|
283 | * | |
294 | * @return LFR_SUCCESSFUL |
|
284 | * @return LFR_SUCCESSFUL | |
295 | * |
|
285 | * | |
296 | */ |
|
286 | */ | |
297 |
|
287 | |||
298 | unsigned int val; |
|
288 | unsigned int val; | |
299 |
|
289 | |||
300 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) |
|
290 | time_management_regs->coarse_time_load = (TC->dataAndCRC[0] << 24) | |
301 | + (TC->dataAndCRC[1] << 16) |
|
291 | + (TC->dataAndCRC[1] << 16) | |
302 | + (TC->dataAndCRC[2] << 8) |
|
292 | + (TC->dataAndCRC[2] << 8) | |
303 | + TC->dataAndCRC[3]; |
|
293 | + TC->dataAndCRC[3]; | |
|
294 | ||||
|
295 | PRINTF1("time received: %x\n", time_management_regs->coarse_time_load) | |||
|
296 | ||||
304 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 |
|
297 | val = housekeeping_packet.hk_lfr_update_time_tc_cnt[0] * 256 | |
305 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; |
|
298 | + housekeeping_packet.hk_lfr_update_time_tc_cnt[1]; | |
306 | val++; |
|
299 | val++; | |
307 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); |
|
300 | housekeeping_packet.hk_lfr_update_time_tc_cnt[0] = (unsigned char) (val >> 8); | |
308 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); |
|
301 | housekeeping_packet.hk_lfr_update_time_tc_cnt[1] = (unsigned char) (val); | |
309 | // time_management_regs->ctrl = time_management_regs->ctrl | 1; // force tick |
|
302 | // time_management_regs->ctrl = time_management_regs->ctrl | 1; // force tick | |
310 |
|
303 | |||
311 | return LFR_SUCCESSFUL; |
|
304 | return LFR_SUCCESSFUL; | |
312 | } |
|
305 | } | |
313 |
|
306 | |||
314 | //******************* |
|
307 | //******************* | |
315 | // ENTERING THE MODES |
|
308 | // ENTERING THE MODES | |
|
309 | int check_mode_value( unsigned char requestedMode ) | |||
|
310 | { | |||
|
311 | int status; | |||
316 |
|
312 | |||
317 | int transition_validation(unsigned char requestedMode) |
|
313 | if ( (requestedMode != LFR_MODE_STANDBY) | |
|
314 | && (requestedMode != LFR_MODE_NORMAL) && (requestedMode != LFR_MODE_BURST) | |||
|
315 | && (requestedMode != LFR_MODE_SBM1) && (requestedMode != LFR_MODE_SBM2) ) | |||
|
316 | { | |||
|
317 | status = LFR_DEFAULT; | |||
|
318 | } | |||
|
319 | else | |||
|
320 | { | |||
|
321 | status = LFR_SUCCESSFUL; | |||
|
322 | } | |||
|
323 | ||||
|
324 | return status; | |||
|
325 | } | |||
|
326 | ||||
|
327 | int check_mode_transition( unsigned char requestedMode ) | |||
318 | { |
|
328 | { | |
319 | /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE. |
|
329 | /** This function checks the validity of the transition requested by the TC_LFR_ENTER_MODE. | |
320 | * |
|
330 | * | |
321 | * @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE |
|
331 | * @param requestedMode is the mode requested by the TC_LFR_ENTER_MODE | |
322 | * |
|
332 | * | |
323 | * @return LFR directive status codes: |
|
333 | * @return LFR directive status codes: | |
324 | * - LFR_SUCCESSFUL - the transition is authorized |
|
334 | * - LFR_SUCCESSFUL - the transition is authorized | |
325 | * - LFR_DEFAULT - the transition is not authorized |
|
335 | * - LFR_DEFAULT - the transition is not authorized | |
326 | * |
|
336 | * | |
327 | */ |
|
337 | */ | |
328 |
|
338 | |||
329 | int status; |
|
339 | int status; | |
330 |
|
340 | |||
331 | switch (requestedMode) |
|
341 | switch (requestedMode) | |
332 | { |
|
342 | { | |
333 | case LFR_MODE_STANDBY: |
|
343 | case LFR_MODE_STANDBY: | |
334 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { |
|
344 | if ( lfrCurrentMode == LFR_MODE_STANDBY ) { | |
335 | status = LFR_DEFAULT; |
|
345 | status = LFR_DEFAULT; | |
336 | } |
|
346 | } | |
337 | else |
|
347 | else | |
338 | { |
|
348 | { | |
339 | status = LFR_SUCCESSFUL; |
|
349 | status = LFR_SUCCESSFUL; | |
340 | } |
|
350 | } | |
341 | break; |
|
351 | break; | |
342 | case LFR_MODE_NORMAL: |
|
352 | case LFR_MODE_NORMAL: | |
343 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { |
|
353 | if ( lfrCurrentMode == LFR_MODE_NORMAL ) { | |
344 | status = LFR_DEFAULT; |
|
354 | status = LFR_DEFAULT; | |
345 | } |
|
355 | } | |
346 | else { |
|
356 | else { | |
347 | status = LFR_SUCCESSFUL; |
|
357 | status = LFR_SUCCESSFUL; | |
348 | } |
|
358 | } | |
349 | break; |
|
359 | break; | |
350 | case LFR_MODE_BURST: |
|
360 | case LFR_MODE_BURST: | |
351 | if ( lfrCurrentMode == LFR_MODE_BURST ) { |
|
361 | if ( lfrCurrentMode == LFR_MODE_BURST ) { | |
352 | status = LFR_DEFAULT; |
|
362 | status = LFR_DEFAULT; | |
353 | } |
|
363 | } | |
354 | else { |
|
364 | else { | |
355 | status = LFR_SUCCESSFUL; |
|
365 | status = LFR_SUCCESSFUL; | |
356 | } |
|
366 | } | |
357 | break; |
|
367 | break; | |
358 | case LFR_MODE_SBM1: |
|
368 | case LFR_MODE_SBM1: | |
359 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { |
|
369 | if ( lfrCurrentMode == LFR_MODE_SBM1 ) { | |
360 | status = LFR_DEFAULT; |
|
370 | status = LFR_DEFAULT; | |
361 | } |
|
371 | } | |
362 | else { |
|
372 | else { | |
363 | status = LFR_SUCCESSFUL; |
|
373 | status = LFR_SUCCESSFUL; | |
364 | } |
|
374 | } | |
365 | break; |
|
375 | break; | |
366 | case LFR_MODE_SBM2: |
|
376 | case LFR_MODE_SBM2: | |
367 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { |
|
377 | if ( lfrCurrentMode == LFR_MODE_SBM2 ) { | |
368 | status = LFR_DEFAULT; |
|
378 | status = LFR_DEFAULT; | |
369 | } |
|
379 | } | |
370 | else { |
|
380 | else { | |
371 | status = LFR_SUCCESSFUL; |
|
381 | status = LFR_SUCCESSFUL; | |
372 | } |
|
382 | } | |
373 | break; |
|
383 | break; | |
374 | default: |
|
384 | default: | |
375 | status = LFR_DEFAULT; |
|
385 | status = LFR_DEFAULT; | |
376 | break; |
|
386 | break; | |
377 | } |
|
387 | } | |
378 |
|
388 | |||
379 | return status; |
|
389 | return status; | |
380 | } |
|
390 | } | |
381 |
|
391 | |||
382 | int stop_current_mode(void) |
|
392 | int stop_current_mode( void ) | |
383 | { |
|
393 | { | |
384 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. |
|
394 | /** This function stops the current mode by masking interrupt lines and suspending science tasks. | |
385 | * |
|
395 | * | |
386 | * @return RTEMS directive status codes: |
|
396 | * @return RTEMS directive status codes: | |
387 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
397 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
388 | * - RTEMS_INVALID_ID - task id invalid |
|
398 | * - RTEMS_INVALID_ID - task id invalid | |
389 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
399 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
390 | * |
|
400 | * | |
391 | */ |
|
401 | */ | |
392 |
|
402 | |||
393 | rtems_status_code status; |
|
403 | rtems_status_code status; | |
394 |
|
404 | |||
395 | status = RTEMS_SUCCESSFUL; |
|
405 | status = RTEMS_SUCCESSFUL; | |
396 |
|
406 | |||
397 | // (1) mask interruptions |
|
407 | // (1) mask interruptions | |
398 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt |
|
408 | LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER ); // mask waveform picker interrupt | |
399 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt |
|
409 | LEON_Mask_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt | |
400 |
|
410 | |||
401 | // (2) clear interruptions |
|
411 | // (2) clear interruptions | |
402 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt |
|
412 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); // clear waveform picker interrupt | |
403 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt |
|
413 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); // clear spectral matrix interrupt | |
404 |
|
414 | |||
405 | // (3) reset registers |
|
415 | // (3) reset registers | |
406 | // waveform picker |
|
416 | // waveform picker | |
407 | reset_wfp_burst_enable(); // reset burst and enable bits |
|
417 | reset_wfp_burst_enable(); // reset burst and enable bits | |
408 | reset_wfp_status(); // reset all the status bits |
|
418 | reset_wfp_status(); // reset all the status bits | |
409 | // spectral matrices |
|
419 | // spectral matrices | |
410 | set_irq_on_new_ready_matrix( 0 ); // stop the spectral matrices |
|
420 | set_irq_on_new_ready_matrix( 0 ); // stop the spectral matrices | |
411 | set_run_matrix_spectral( 0 ); // run_matrix_spectral is set to 0 |
|
421 | set_run_matrix_spectral( 0 ); // run_matrix_spectral is set to 0 | |
412 | reset_extractSWF(); // reset the extractSWF flag to false |
|
422 | reset_extractSWF(); // reset the extractSWF flag to false | |
413 |
|
423 | |||
414 | // <Spectral Matrices simulator> |
|
424 | // <Spectral Matrices simulator> | |
415 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); // mask spectral matrix interrupt simulator |
|
425 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); // mask spectral matrix interrupt simulator | |
416 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
426 | timer_stop( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
417 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); // clear spectral matrix interrupt simulator |
|
427 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); // clear spectral matrix interrupt simulator | |
418 | // </Spectral Matrices simulator> |
|
428 | // </Spectral Matrices simulator> | |
419 |
|
429 | |||
420 | // suspend several tasks |
|
430 | // suspend several tasks | |
421 | if (lfrCurrentMode != LFR_MODE_STANDBY) { |
|
431 | if (lfrCurrentMode != LFR_MODE_STANDBY) { | |
422 | status = suspend_science_tasks(); |
|
432 | status = suspend_science_tasks(); | |
423 | } |
|
433 | } | |
424 |
|
434 | |||
425 | if (status != RTEMS_SUCCESSFUL) |
|
435 | if (status != RTEMS_SUCCESSFUL) | |
426 | { |
|
436 | { | |
427 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
437 | PRINTF1("in stop_current_mode *** in suspend_science_tasks *** ERR code: %d\n", status) | |
428 | } |
|
438 | } | |
429 |
|
439 | |||
430 | return status; |
|
440 | return status; | |
431 | } |
|
441 | } | |
432 |
|
442 | |||
433 | int enter_mode(unsigned char mode ) |
|
443 | int enter_mode( unsigned char mode ) | |
434 | { |
|
444 | { | |
435 | /** This function is launched after a mode transition validation. |
|
445 | /** This function is launched after a mode transition validation. | |
436 | * |
|
446 | * | |
437 | * @param mode is the mode in which LFR will be put. |
|
447 | * @param mode is the mode in which LFR will be put. | |
438 | * |
|
448 | * | |
439 | * @return RTEMS directive status codes: |
|
449 | * @return RTEMS directive status codes: | |
440 | * - RTEMS_SUCCESSFUL - the mode has been entered successfully |
|
450 | * - RTEMS_SUCCESSFUL - the mode has been entered successfully | |
441 | * - RTEMS_NOT_SATISFIED - the mode has not been entered successfully |
|
451 | * - RTEMS_NOT_SATISFIED - the mode has not been entered successfully | |
442 | * |
|
452 | * | |
443 | */ |
|
453 | */ | |
444 |
|
454 | |||
445 | rtems_status_code status; |
|
455 | rtems_status_code status; | |
446 |
|
456 | |||
447 | status = RTEMS_UNSATISFIED; |
|
457 | //********************** | |
|
458 | // STOP THE CURRENT MODE | |||
|
459 | status = stop_current_mode(); | |||
|
460 | if (status != RTEMS_SUCCESSFUL) | |||
|
461 | { | |||
|
462 | PRINTF1("ERR *** in enter_mode *** stop_current_mode with mode = %d\n", mode) | |||
|
463 | } | |||
448 |
|
464 | |||
449 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((mode << 4) + 0x0d); |
|
465 | //************************* | |
450 | updateLFRCurrentMode(); |
|
466 | // ENTER THE REQUESTED MODE | |
451 |
|
||||
452 | if ( (mode == LFR_MODE_NORMAL) || (mode == LFR_MODE_BURST) |
|
467 | if ( (mode == LFR_MODE_NORMAL) || (mode == LFR_MODE_BURST) | |
453 | || (mode == LFR_MODE_SBM1) || (mode == LFR_MODE_SBM2) ) |
|
468 | || (mode == LFR_MODE_SBM1) || (mode == LFR_MODE_SBM2) ) | |
454 | { |
|
469 | { | |
455 | #ifdef PRINT_TASK_STATISTICS |
|
470 | #ifdef PRINT_TASK_STATISTICS | |
456 | rtems_cpu_usage_reset(); |
|
471 | rtems_cpu_usage_reset(); | |
457 | maxCount = 0; |
|
472 | maxCount = 0; | |
458 | #endif |
|
473 | #endif | |
459 | status = restart_science_tasks(); |
|
474 | status = restart_science_tasks(); | |
460 | launch_waveform_picker( mode ); |
|
475 | launch_waveform_picker( mode ); | |
461 | launch_spectral_matrix( mode ); |
|
476 | // launch_spectral_matrix( mode ); | |
462 | } |
|
477 | } | |
463 | else if ( mode == LFR_MODE_STANDBY ) |
|
478 | else if ( mode == LFR_MODE_STANDBY ) | |
464 | { |
|
479 | { | |
465 | #ifdef PRINT_TASK_STATISTICS |
|
480 | #ifdef PRINT_TASK_STATISTICS | |
466 | rtems_cpu_usage_report(); |
|
481 | rtems_cpu_usage_report(); | |
467 | #endif |
|
482 | #endif | |
468 |
|
483 | |||
469 | #ifdef PRINT_STACK_REPORT |
|
484 | #ifdef PRINT_STACK_REPORT | |
470 | rtems_stack_checker_report_usage(); |
|
485 | rtems_stack_checker_report_usage(); | |
471 | #endif |
|
486 | #endif | |
472 | status = stop_current_mode(); |
|
|||
473 | PRINTF1("maxCount = %d\n", maxCount) |
|
487 | PRINTF1("maxCount = %d\n", maxCount) | |
474 | } |
|
488 | } | |
475 | else |
|
489 | else | |
476 | { |
|
490 | { | |
477 | status = RTEMS_UNSATISFIED; |
|
491 | status = RTEMS_UNSATISFIED; | |
478 | } |
|
492 | } | |
479 |
|
493 | |||
480 | if (status != RTEMS_SUCCESSFUL) |
|
494 | if (status != RTEMS_SUCCESSFUL) | |
481 | { |
|
495 | { | |
482 |
PRINTF1("in enter_mode *** |
|
496 | PRINTF1("ERR *** in enter_mode *** status = %d\n", status) | |
483 | status = RTEMS_UNSATISFIED; |
|
497 | status = RTEMS_UNSATISFIED; | |
484 | } |
|
498 | } | |
485 |
|
499 | |||
486 | return status; |
|
500 | return status; | |
487 | } |
|
501 | } | |
488 |
|
502 | |||
489 | int restart_science_tasks() |
|
503 | int restart_science_tasks() | |
490 | { |
|
504 | { | |
491 | /** This function is used to restart all science tasks. |
|
505 | /** This function is used to restart all science tasks. | |
492 | * |
|
506 | * | |
493 | * @return RTEMS directive status codes: |
|
507 | * @return RTEMS directive status codes: | |
494 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
508 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
495 | * - RTEMS_INVALID_ID - task id invalid |
|
509 | * - RTEMS_INVALID_ID - task id invalid | |
496 | * - RTEMS_INCORRECT_STATE - task never started |
|
510 | * - RTEMS_INCORRECT_STATE - task never started | |
497 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task |
|
511 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot restart remote task | |
498 | * |
|
512 | * | |
499 | * Science tasks are AVF0, BPF0, WFRM, CWF3, CW2, CWF1 |
|
513 | * Science tasks are AVF0, BPF0, WFRM, CWF3, CW2, CWF1 | |
500 | * |
|
514 | * | |
501 | */ |
|
515 | */ | |
502 |
|
516 | |||
503 | rtems_status_code status[6]; |
|
517 | rtems_status_code status[6]; | |
504 | rtems_status_code ret; |
|
518 | rtems_status_code ret; | |
505 |
|
519 | |||
506 | ret = RTEMS_SUCCESSFUL; |
|
520 | ret = RTEMS_SUCCESSFUL; | |
507 |
|
521 | |||
508 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); |
|
522 | status[0] = rtems_task_restart( Task_id[TASKID_AVF0], 1 ); | |
509 | if (status[0] != RTEMS_SUCCESSFUL) |
|
523 | if (status[0] != RTEMS_SUCCESSFUL) | |
510 | { |
|
524 | { | |
511 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) |
|
525 | PRINTF1("in restart_science_task *** 0 ERR %d\n", status[0]) | |
512 | } |
|
526 | } | |
513 |
|
527 | |||
514 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); |
|
528 | status[2] = rtems_task_restart( Task_id[TASKID_WFRM],1 ); | |
515 | if (status[2] != RTEMS_SUCCESSFUL) |
|
529 | if (status[2] != RTEMS_SUCCESSFUL) | |
516 | { |
|
530 | { | |
517 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) |
|
531 | PRINTF1("in restart_science_task *** 2 ERR %d\n", status[2]) | |
518 | } |
|
532 | } | |
519 |
|
533 | |||
520 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); |
|
534 | status[3] = rtems_task_restart( Task_id[TASKID_CWF3],1 ); | |
521 | if (status[3] != RTEMS_SUCCESSFUL) |
|
535 | if (status[3] != RTEMS_SUCCESSFUL) | |
522 | { |
|
536 | { | |
523 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) |
|
537 | PRINTF1("in restart_science_task *** 3 ERR %d\n", status[3]) | |
524 | } |
|
538 | } | |
525 |
|
539 | |||
526 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); |
|
540 | status[4] = rtems_task_restart( Task_id[TASKID_CWF2],1 ); | |
527 | if (status[4] != RTEMS_SUCCESSFUL) |
|
541 | if (status[4] != RTEMS_SUCCESSFUL) | |
528 | { |
|
542 | { | |
529 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) |
|
543 | PRINTF1("in restart_science_task *** 4 ERR %d\n", status[4]) | |
530 | } |
|
544 | } | |
531 |
|
545 | |||
532 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); |
|
546 | status[5] = rtems_task_restart( Task_id[TASKID_CWF1],1 ); | |
533 | if (status[5] != RTEMS_SUCCESSFUL) |
|
547 | if (status[5] != RTEMS_SUCCESSFUL) | |
534 | { |
|
548 | { | |
535 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) |
|
549 | PRINTF1("in restart_science_task *** 5 ERR %d\n", status[5]) | |
536 | } |
|
550 | } | |
537 |
|
551 | |||
538 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || |
|
552 | if ( (status[0] != RTEMS_SUCCESSFUL) || (status[2] != RTEMS_SUCCESSFUL) || | |
539 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) |
|
553 | (status[3] != RTEMS_SUCCESSFUL) || (status[4] != RTEMS_SUCCESSFUL) || (status[5] != RTEMS_SUCCESSFUL) ) | |
540 | { |
|
554 | { | |
541 | ret = RTEMS_UNSATISFIED; |
|
555 | ret = RTEMS_UNSATISFIED; | |
542 | } |
|
556 | } | |
543 |
|
557 | |||
544 | return ret; |
|
558 | return ret; | |
545 | } |
|
559 | } | |
546 |
|
560 | |||
547 | int suspend_science_tasks() |
|
561 | int suspend_science_tasks() | |
548 | { |
|
562 | { | |
549 | /** This function suspends the science tasks. |
|
563 | /** This function suspends the science tasks. | |
550 | * |
|
564 | * | |
551 | * @return RTEMS directive status codes: |
|
565 | * @return RTEMS directive status codes: | |
552 | * - RTEMS_SUCCESSFUL - task restarted successfully |
|
566 | * - RTEMS_SUCCESSFUL - task restarted successfully | |
553 | * - RTEMS_INVALID_ID - task id invalid |
|
567 | * - RTEMS_INVALID_ID - task id invalid | |
554 | * - RTEMS_ALREADY_SUSPENDED - task already suspended |
|
568 | * - RTEMS_ALREADY_SUSPENDED - task already suspended | |
555 | * |
|
569 | * | |
556 | */ |
|
570 | */ | |
557 |
|
571 | |||
558 | rtems_status_code status; |
|
572 | rtems_status_code status; | |
559 |
|
573 | |||
560 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); |
|
574 | status = rtems_task_suspend( Task_id[TASKID_AVF0] ); | |
561 | if (status != RTEMS_SUCCESSFUL) |
|
575 | if (status != RTEMS_SUCCESSFUL) | |
562 | { |
|
576 | { | |
563 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) |
|
577 | PRINTF1("in suspend_science_task *** AVF0 ERR %d\n", status) | |
564 | } |
|
578 | } | |
565 |
|
579 | |||
566 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM |
|
580 | if (status == RTEMS_SUCCESSFUL) // suspend WFRM | |
567 | { |
|
581 | { | |
568 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); |
|
582 | status = rtems_task_suspend( Task_id[TASKID_WFRM] ); | |
569 | if (status != RTEMS_SUCCESSFUL) |
|
583 | if (status != RTEMS_SUCCESSFUL) | |
570 | { |
|
584 | { | |
571 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) |
|
585 | PRINTF1("in suspend_science_task *** WFRM ERR %d\n", status) | |
572 | } |
|
586 | } | |
573 | } |
|
587 | } | |
574 |
|
588 | |||
575 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 |
|
589 | if (status == RTEMS_SUCCESSFUL) // suspend CWF3 | |
576 | { |
|
590 | { | |
577 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); |
|
591 | status = rtems_task_suspend( Task_id[TASKID_CWF3] ); | |
578 | if (status != RTEMS_SUCCESSFUL) |
|
592 | if (status != RTEMS_SUCCESSFUL) | |
579 | { |
|
593 | { | |
580 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) |
|
594 | PRINTF1("in suspend_science_task *** CWF3 ERR %d\n", status) | |
581 | } |
|
595 | } | |
582 | } |
|
596 | } | |
583 |
|
597 | |||
584 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 |
|
598 | if (status == RTEMS_SUCCESSFUL) // suspend CWF2 | |
585 | { |
|
599 | { | |
586 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); |
|
600 | status = rtems_task_suspend( Task_id[TASKID_CWF2] ); | |
587 | if (status != RTEMS_SUCCESSFUL) |
|
601 | if (status != RTEMS_SUCCESSFUL) | |
588 | { |
|
602 | { | |
589 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) |
|
603 | PRINTF1("in suspend_science_task *** CWF2 ERR %d\n", status) | |
590 | } |
|
604 | } | |
591 | } |
|
605 | } | |
592 |
|
606 | |||
593 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 |
|
607 | if (status == RTEMS_SUCCESSFUL) // suspend CWF1 | |
594 | { |
|
608 | { | |
595 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); |
|
609 | status = rtems_task_suspend( Task_id[TASKID_CWF1] ); | |
596 | if (status != RTEMS_SUCCESSFUL) |
|
610 | if (status != RTEMS_SUCCESSFUL) | |
597 | { |
|
611 | { | |
598 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) |
|
612 | PRINTF1("in suspend_science_task *** CWF1 ERR %d\n", status) | |
599 | } |
|
613 | } | |
600 | } |
|
614 | } | |
601 |
|
615 | |||
602 | return status; |
|
616 | return status; | |
603 | } |
|
617 | } | |
604 |
|
618 | |||
605 | void launch_waveform_picker( unsigned char mode ) |
|
619 | void launch_waveform_picker( unsigned char mode ) | |
606 | { |
|
620 | { | |
607 | int startDate; |
|
621 | int startDate; | |
608 |
|
622 | |||
609 | reset_current_ring_nodes(); |
|
623 | reset_current_ring_nodes(); | |
610 | reset_waveform_picker_regs(); |
|
624 | reset_waveform_picker_regs(); | |
611 | set_wfp_burst_enable_register( mode ); |
|
625 | set_wfp_burst_enable_register( mode ); | |
612 |
|
626 | |||
613 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); |
|
627 | LEON_Clear_interrupt( IRQ_WAVEFORM_PICKER ); | |
614 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); |
|
628 | LEON_Unmask_interrupt( IRQ_WAVEFORM_PICKER ); | |
615 |
|
629 | |||
616 | startDate = time_management_regs->coarse_time + 2; |
|
630 | startDate = time_management_regs->coarse_time + 2; | |
617 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000] |
|
631 | waveform_picker_regs->run_burst_enable = waveform_picker_regs->run_burst_enable | 0x80; // [1000 0000] | |
618 | waveform_picker_regs->start_date = startDate; |
|
632 | waveform_picker_regs->start_date = startDate; | |
619 | } |
|
633 | } | |
620 |
|
634 | |||
621 | void launch_spectral_matrix( unsigned char mode ) |
|
635 | void launch_spectral_matrix( unsigned char mode ) | |
622 | { |
|
636 | { | |
623 | reset_nb_sm_f0(); |
|
637 | reset_nb_sm_f0(); | |
624 | reset_current_sm_ring_nodes(); |
|
638 | reset_current_sm_ring_nodes(); | |
625 | reset_spectral_matrix_regs(); |
|
639 | reset_spectral_matrix_regs(); | |
626 |
|
640 | |||
627 | #ifdef VHDL_DEV |
|
641 | #ifdef VHDL_DEV | |
|
642 | struct grgpio_regs_str *grgpio_regs = (struct grgpio_regs_str *) REGS_ADDR_GRGPIO; | |||
|
643 | grgpio_regs->io_port_direction_register = | |||
|
644 | grgpio_regs->io_port_direction_register | 0x01; // [0001 1000], 0 = output disabled, 1 = output enabled | |||
|
645 | grgpio_regs->io_port_output_register = grgpio_regs->io_port_output_register | 0x01; // set the bit 0 to 1 | |||
628 | set_irq_on_new_ready_matrix( 1 ); |
|
646 | set_irq_on_new_ready_matrix( 1 ); | |
629 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); |
|
647 | LEON_Clear_interrupt( IRQ_SPECTRAL_MATRIX ); | |
630 | LEON_Unmask_interrupt( IRQ_SPECTRAL_MATRIX ); |
|
648 | LEON_Unmask_interrupt( IRQ_SPECTRAL_MATRIX ); | |
631 | set_run_matrix_spectral( 1 ); |
|
649 | set_run_matrix_spectral( 1 ); | |
632 | #else |
|
650 | #else | |
633 | // Spectral Matrices simulator |
|
651 | // Spectral Matrices simulator | |
634 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
652 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
635 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); |
|
653 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); | |
636 | LEON_Unmask_interrupt( IRQ_SM_SIMULATOR ); |
|
654 | LEON_Unmask_interrupt( IRQ_SM_SIMULATOR ); | |
637 | #endif |
|
655 | #endif | |
638 | } |
|
656 | } | |
639 |
|
657 | |||
640 | void set_irq_on_new_ready_matrix( unsigned char value ) |
|
658 | void set_irq_on_new_ready_matrix( unsigned char value ) | |
641 | { |
|
659 | { | |
642 | if (value == 1) |
|
660 | if (value == 1) | |
643 | { |
|
661 | { | |
644 | spectral_matrix_regs->config = spectral_matrix_regs->config | 0x01; |
|
662 | spectral_matrix_regs->config = spectral_matrix_regs->config | 0x01; | |
645 | } |
|
663 | } | |
646 | else |
|
664 | else | |
647 | { |
|
665 | { | |
648 | spectral_matrix_regs->config = spectral_matrix_regs->config & 0xfffffffe; // 1110 |
|
666 | spectral_matrix_regs->config = spectral_matrix_regs->config & 0xfffffffe; // 1110 | |
649 | } |
|
667 | } | |
650 | } |
|
668 | } | |
651 |
|
669 | |||
652 | void set_run_matrix_spectral( unsigned char value ) |
|
670 | void set_run_matrix_spectral( unsigned char value ) | |
653 | { |
|
671 | { | |
654 | if (value == 1) |
|
672 | if (value == 1) | |
655 | { |
|
673 | { | |
656 | spectral_matrix_regs->config = spectral_matrix_regs->config | 0x4; // [0100] set run_matrix spectral to 1 |
|
674 | spectral_matrix_regs->config = spectral_matrix_regs->config | 0x4; // [0100] set run_matrix spectral to 1 | |
657 | } |
|
675 | } | |
658 | else |
|
676 | else | |
659 | { |
|
677 | { | |
660 | spectral_matrix_regs->config = spectral_matrix_regs->config & 0xfffffffb; // [1011] set run_matrix spectral to 0 |
|
678 | spectral_matrix_regs->config = spectral_matrix_regs->config & 0xfffffffb; // [1011] set run_matrix spectral to 0 | |
661 | } |
|
679 | } | |
662 | } |
|
680 | } | |
663 |
|
681 | |||
664 | void launch_spectral_matrix_simu( unsigned char mode ) |
|
682 | void launch_spectral_matrix_simu( unsigned char mode ) | |
665 | { |
|
683 | { | |
666 | reset_nb_sm_f0(); |
|
684 | reset_nb_sm_f0(); | |
667 | reset_current_sm_ring_nodes(); |
|
685 | reset_current_sm_ring_nodes(); | |
668 | reset_spectral_matrix_regs(); |
|
686 | reset_spectral_matrix_regs(); | |
669 |
|
687 | |||
670 | // Spectral Matrices simulator |
|
688 | // Spectral Matrices simulator | |
671 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); |
|
689 | timer_start( (gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR ); | |
672 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); |
|
690 | LEON_Clear_interrupt( IRQ_SM_SIMULATOR ); | |
673 | LEON_Unmask_interrupt( IRQ_SM_SIMULATOR ); |
|
691 | LEON_Unmask_interrupt( IRQ_SM_SIMULATOR ); | |
674 | set_local_nb_interrupt_f0_MAX(); |
|
692 | set_local_nb_interrupt_f0_MAX(); | |
675 | } |
|
693 | } | |
676 |
|
694 | |||
677 | //**************** |
|
695 | //**************** | |
678 | // CLOSING ACTIONS |
|
696 | // CLOSING ACTIONS | |
679 | void update_last_TC_exe( ccsdsTelecommandPacket_t *TC, unsigned char * time ) |
|
697 | void update_last_TC_exe( ccsdsTelecommandPacket_t *TC, unsigned char * time ) | |
680 | { |
|
698 | { | |
681 | /** This function is used to update the HK packets statistics after a successful TC execution. |
|
699 | /** This function is used to update the HK packets statistics after a successful TC execution. | |
682 | * |
|
700 | * | |
683 | * @param TC points to the TC being processed |
|
701 | * @param TC points to the TC being processed | |
684 | * @param time is the time used to date the TC execution |
|
702 | * @param time is the time used to date the TC execution | |
685 | * |
|
703 | * | |
686 | */ |
|
704 | */ | |
687 |
|
705 | |||
688 | unsigned int val; |
|
706 | unsigned int val; | |
689 |
|
707 | |||
690 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; |
|
708 | housekeeping_packet.hk_lfr_last_exe_tc_id[0] = TC->packetID[0]; | |
691 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; |
|
709 | housekeeping_packet.hk_lfr_last_exe_tc_id[1] = TC->packetID[1]; | |
692 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; |
|
710 | housekeeping_packet.hk_lfr_last_exe_tc_type[0] = 0x00; | |
693 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; |
|
711 | housekeeping_packet.hk_lfr_last_exe_tc_type[1] = TC->serviceType; | |
694 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; |
|
712 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[0] = 0x00; | |
695 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; |
|
713 | housekeeping_packet.hk_lfr_last_exe_tc_subtype[1] = TC->serviceSubType; | |
696 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; |
|
714 | housekeeping_packet.hk_lfr_last_exe_tc_time[0] = time[0]; | |
697 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; |
|
715 | housekeeping_packet.hk_lfr_last_exe_tc_time[1] = time[1]; | |
698 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; |
|
716 | housekeeping_packet.hk_lfr_last_exe_tc_time[2] = time[2]; | |
699 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; |
|
717 | housekeeping_packet.hk_lfr_last_exe_tc_time[3] = time[3]; | |
700 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; |
|
718 | housekeeping_packet.hk_lfr_last_exe_tc_time[4] = time[4]; | |
701 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; |
|
719 | housekeeping_packet.hk_lfr_last_exe_tc_time[5] = time[5]; | |
702 |
|
720 | |||
703 | val = housekeeping_packet.hk_lfr_exe_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_exe_tc_cnt[1]; |
|
721 | val = housekeeping_packet.hk_lfr_exe_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_exe_tc_cnt[1]; | |
704 | val++; |
|
722 | val++; | |
705 | housekeeping_packet.hk_lfr_exe_tc_cnt[0] = (unsigned char) (val >> 8); |
|
723 | housekeeping_packet.hk_lfr_exe_tc_cnt[0] = (unsigned char) (val >> 8); | |
706 | housekeeping_packet.hk_lfr_exe_tc_cnt[1] = (unsigned char) (val); |
|
724 | housekeeping_packet.hk_lfr_exe_tc_cnt[1] = (unsigned char) (val); | |
707 | } |
|
725 | } | |
708 |
|
726 | |||
709 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char * time ) |
|
727 | void update_last_TC_rej(ccsdsTelecommandPacket_t *TC, unsigned char * time ) | |
710 | { |
|
728 | { | |
711 | /** This function is used to update the HK packets statistics after a TC rejection. |
|
729 | /** This function is used to update the HK packets statistics after a TC rejection. | |
712 | * |
|
730 | * | |
713 | * @param TC points to the TC being processed |
|
731 | * @param TC points to the TC being processed | |
714 | * @param time is the time used to date the TC rejection |
|
732 | * @param time is the time used to date the TC rejection | |
715 | * |
|
733 | * | |
716 | */ |
|
734 | */ | |
717 |
|
735 | |||
718 | unsigned int val; |
|
736 | unsigned int val; | |
719 |
|
737 | |||
720 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; |
|
738 | housekeeping_packet.hk_lfr_last_rej_tc_id[0] = TC->packetID[0]; | |
721 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; |
|
739 | housekeeping_packet.hk_lfr_last_rej_tc_id[1] = TC->packetID[1]; | |
722 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; |
|
740 | housekeeping_packet.hk_lfr_last_rej_tc_type[0] = 0x00; | |
723 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; |
|
741 | housekeeping_packet.hk_lfr_last_rej_tc_type[1] = TC->serviceType; | |
724 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; |
|
742 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[0] = 0x00; | |
725 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; |
|
743 | housekeeping_packet.hk_lfr_last_rej_tc_subtype[1] = TC->serviceSubType; | |
726 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; |
|
744 | housekeeping_packet.hk_lfr_last_rej_tc_time[0] = time[0]; | |
727 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; |
|
745 | housekeeping_packet.hk_lfr_last_rej_tc_time[1] = time[1]; | |
728 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; |
|
746 | housekeeping_packet.hk_lfr_last_rej_tc_time[2] = time[2]; | |
729 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; |
|
747 | housekeeping_packet.hk_lfr_last_rej_tc_time[3] = time[3]; | |
730 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; |
|
748 | housekeeping_packet.hk_lfr_last_rej_tc_time[4] = time[4]; | |
731 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; |
|
749 | housekeeping_packet.hk_lfr_last_rej_tc_time[5] = time[5]; | |
732 |
|
750 | |||
733 | val = housekeeping_packet.hk_lfr_rej_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_rej_tc_cnt[1]; |
|
751 | val = housekeeping_packet.hk_lfr_rej_tc_cnt[0] * 256 + housekeeping_packet.hk_lfr_rej_tc_cnt[1]; | |
734 | val++; |
|
752 | val++; | |
735 | housekeeping_packet.hk_lfr_rej_tc_cnt[0] = (unsigned char) (val >> 8); |
|
753 | housekeeping_packet.hk_lfr_rej_tc_cnt[0] = (unsigned char) (val >> 8); | |
736 | housekeeping_packet.hk_lfr_rej_tc_cnt[1] = (unsigned char) (val); |
|
754 | housekeeping_packet.hk_lfr_rej_tc_cnt[1] = (unsigned char) (val); | |
737 | } |
|
755 | } | |
738 |
|
756 | |||
739 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id ) |
|
757 | void close_action(ccsdsTelecommandPacket_t *TC, int result, rtems_id queue_id ) | |
740 | { |
|
758 | { | |
741 | /** This function is the last step of the TC execution workflow. |
|
759 | /** This function is the last step of the TC execution workflow. | |
742 | * |
|
760 | * | |
743 | * @param TC points to the TC being processed |
|
761 | * @param TC points to the TC being processed | |
744 | * @param result is the result of the TC execution (LFR_SUCCESSFUL / LFR_DEFAULT) |
|
762 | * @param result is the result of the TC execution (LFR_SUCCESSFUL / LFR_DEFAULT) | |
745 | * @param queue_id is the id of the RTEMS message queue used to send TM packets |
|
763 | * @param queue_id is the id of the RTEMS message queue used to send TM packets | |
746 | * @param time is the time used to date the TC execution |
|
764 | * @param time is the time used to date the TC execution | |
747 | * |
|
765 | * | |
748 | */ |
|
766 | */ | |
749 |
|
767 | |||
|
768 | unsigned char requestedMode; | |||
|
769 | ||||
750 | if (result == LFR_SUCCESSFUL) |
|
770 | if (result == LFR_SUCCESSFUL) | |
751 | { |
|
771 | { | |
752 | if ( !( (TC->serviceType==TC_TYPE_TIME) & (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) |
|
772 | if ( !( (TC->serviceType==TC_TYPE_TIME) & (TC->serviceSubType==TC_SUBTYPE_UPDT_TIME) ) | |
753 | & |
|
773 | & | |
754 | !( (TC->serviceType==TC_TYPE_GEN) & (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) |
|
774 | !( (TC->serviceType==TC_TYPE_GEN) & (TC->serviceSubType==TC_SUBTYPE_UPDT_INFO)) | |
755 | ) |
|
775 | ) | |
756 | { |
|
776 | { | |
757 | send_tm_lfr_tc_exe_success( TC, queue_id ); |
|
777 | send_tm_lfr_tc_exe_success( TC, queue_id ); | |
758 | } |
|
778 | } | |
|
779 | if ( (TC->serviceType == TC_TYPE_GEN) & (TC->serviceSubType == TC_SUBTYPE_ENTER) ) | |||
|
780 | { | |||
|
781 | //********************************** | |||
|
782 | // UPDATE THE LFRMODE LOCAL VARIABLE | |||
|
783 | requestedMode = TC->dataAndCRC[1]; | |||
|
784 | housekeeping_packet.lfr_status_word[0] = (unsigned char) ((requestedMode << 4) + 0x0d); | |||
|
785 | updateLFRCurrentMode(); | |||
|
786 | } | |||
759 | } |
|
787 | } | |
760 | } |
|
788 | } | |
761 |
|
789 | |||
762 | //*************************** |
|
790 | //*************************** | |
763 | // Interrupt Service Routines |
|
791 | // Interrupt Service Routines | |
764 | rtems_isr commutation_isr1( rtems_vector_number vector ) |
|
792 | rtems_isr commutation_isr1( rtems_vector_number vector ) | |
765 | { |
|
793 | { | |
766 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
794 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
767 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); |
|
795 | printf("In commutation_isr1 *** Error sending event to DUMB\n"); | |
768 | } |
|
796 | } | |
769 | } |
|
797 | } | |
770 |
|
798 | |||
771 | rtems_isr commutation_isr2( rtems_vector_number vector ) |
|
799 | rtems_isr commutation_isr2( rtems_vector_number vector ) | |
772 | { |
|
800 | { | |
773 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { |
|
801 | if (rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) { | |
774 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); |
|
802 | printf("In commutation_isr2 *** Error sending event to DUMB\n"); | |
775 | } |
|
803 | } | |
776 | } |
|
804 | } | |
777 |
|
805 | |||
778 | //**************** |
|
806 | //**************** | |
779 | // OTHER FUNCTIONS |
|
807 | // OTHER FUNCTIONS | |
780 | void updateLFRCurrentMode() |
|
808 | void updateLFRCurrentMode() | |
781 | { |
|
809 | { | |
782 | /** This function updates the value of the global variable lfrCurrentMode. |
|
810 | /** This function updates the value of the global variable lfrCurrentMode. | |
783 | * |
|
811 | * | |
784 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. |
|
812 | * lfrCurrentMode is a parameter used by several functions to know in which mode LFR is running. | |
785 | * |
|
813 | * | |
786 | */ |
|
814 | */ | |
787 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure |
|
815 | // update the local value of lfrCurrentMode with the value contained in the housekeeping_packet structure | |
788 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; |
|
816 | lfrCurrentMode = (housekeeping_packet.lfr_status_word[0] & 0xf0) >> 4; | |
789 | } |
|
817 | } | |
790 |
|
818 |
General Comments 0
You need to be logged in to leave comments.
Login now