@@ -1,268 +1,268 | |||||
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: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.5) on: Tue Apr 29 14:02:09 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=6 -DPRINT_MESSAGES_ON_CONSOLE -DPRINT_TASK_STATISTICS |
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=6 -DPRINT_MESSAGES_ON_CONSOLE -DPRINT_TASK_STATISTICS | |
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../header/processing -I../src/basic_parameters |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/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_misc.c \ |
|
48 | ../src/fsw_misc.c \ | |
49 | ../src/fsw_init.c \ |
|
49 | ../src/fsw_init.c \ | |
50 | ../src/fsw_globals.c \ |
|
50 | ../src/fsw_globals.c \ | |
51 | ../src/fsw_spacewire.c \ |
|
51 | ../src/fsw_spacewire.c \ | |
52 | ../src/tc_load_dump_parameters.c \ |
|
52 | ../src/tc_load_dump_parameters.c \ | |
53 | ../src/tm_lfr_tc_exe.c \ |
|
53 | ../src/tm_lfr_tc_exe.c \ | |
54 | ../src/tc_acceptance.c \ |
|
54 | ../src/tc_acceptance.c \ | |
55 | ../src/basic_parameters/basic_parameters.c \ |
|
55 | ../src/basic_parameters/basic_parameters.c \ | |
56 | ../src/processing/fsw_processing.c \ |
|
56 | ../src/processing/fsw_processing.c \ | |
57 | ../src/processing/avf0_prc0.c \ |
|
57 | ../src/processing/avf0_prc0.c \ | |
58 | ../src/processing/avf1_prc1.c \ |
|
58 | ../src/processing/avf1_prc1.c \ | |
59 | ../src/processing/avf2_prc2.c |
|
59 | ../src/processing/avf2_prc2.c | |
60 | OBJECTS = obj/wf_handler.o \ |
|
60 | OBJECTS = obj/wf_handler.o \ | |
61 | obj/tc_handler.o \ |
|
61 | obj/tc_handler.o \ | |
62 | obj/fsw_misc.o \ |
|
62 | obj/fsw_misc.o \ | |
63 | obj/fsw_init.o \ |
|
63 | obj/fsw_init.o \ | |
64 | obj/fsw_globals.o \ |
|
64 | obj/fsw_globals.o \ | |
65 | obj/fsw_spacewire.o \ |
|
65 | obj/fsw_spacewire.o \ | |
66 | obj/tc_load_dump_parameters.o \ |
|
66 | obj/tc_load_dump_parameters.o \ | |
67 | obj/tm_lfr_tc_exe.o \ |
|
67 | obj/tm_lfr_tc_exe.o \ | |
68 | obj/tc_acceptance.o \ |
|
68 | obj/tc_acceptance.o \ | |
69 | obj/basic_parameters.o \ |
|
69 | obj/basic_parameters.o \ | |
70 | obj/fsw_processing.o \ |
|
70 | obj/fsw_processing.o \ | |
71 | obj/avf0_prc0.o \ |
|
71 | obj/avf0_prc0.o \ | |
72 | obj/avf1_prc1.o \ |
|
72 | obj/avf1_prc1.o \ | |
73 | obj/avf2_prc2.o |
|
73 | obj/avf2_prc2.o | |
74 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
74 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
75 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
75 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
76 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
76 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
77 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
77 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
78 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
78 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
79 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
79 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
80 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
80 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
81 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
81 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
82 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
82 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
83 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
83 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
84 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
86 | sparc.pri \ |
|
86 | sparc.pri \ | |
87 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
88 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
88 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
89 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
90 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
91 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
91 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
92 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
92 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
93 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
93 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
94 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
94 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
95 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
95 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
96 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
96 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
97 | fsw-qt.pro |
|
97 | fsw-qt.pro | |
98 | QMAKE_TARGET = fsw |
|
98 | QMAKE_TARGET = fsw | |
99 | DESTDIR = bin/ |
|
99 | DESTDIR = bin/ | |
100 | TARGET = bin/fsw |
|
100 | TARGET = bin/fsw | |
101 |
|
101 | |||
102 | first: all |
|
102 | first: all | |
103 | ####### Implicit rules |
|
103 | ####### Implicit rules | |
104 |
|
104 | |||
105 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
105 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
106 |
|
106 | |||
107 | .cpp.o: |
|
107 | .cpp.o: | |
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
108 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
109 |
|
109 | |||
110 | .cc.o: |
|
110 | .cc.o: | |
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
111 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
112 |
|
112 | |||
113 | .cxx.o: |
|
113 | .cxx.o: | |
114 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
114 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
115 |
|
115 | |||
116 | .C.o: |
|
116 | .C.o: | |
117 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
117 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
118 |
|
118 | |||
119 | .c.o: |
|
119 | .c.o: | |
120 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
120 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
121 |
|
121 | |||
122 | ####### Build rules |
|
122 | ####### Build rules | |
123 |
|
123 | |||
124 | all: Makefile $(TARGET) |
|
124 | all: Makefile $(TARGET) | |
125 |
|
125 | |||
126 | $(TARGET): $(OBJECTS) |
|
126 | $(TARGET): $(OBJECTS) | |
127 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
127 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
128 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
128 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
129 |
|
129 | |||
130 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
130 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
131 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
131 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
132 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
132 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
133 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
133 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
134 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
134 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
135 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
135 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
136 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
136 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
137 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
137 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
138 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
138 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
139 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
139 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
140 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
142 | sparc.pri \ |
|
142 | sparc.pri \ | |
143 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
144 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
144 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
145 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
145 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
146 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
146 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
147 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
147 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
148 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
148 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
149 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
149 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
150 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
150 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
151 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
151 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
152 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
152 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
153 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
153 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
154 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
154 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
155 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
155 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
156 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
156 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
157 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
157 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
158 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
158 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
159 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
159 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
160 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
160 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
161 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
161 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
162 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
162 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
163 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
163 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
164 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
166 | sparc.pri: |
|
166 | sparc.pri: | |
167 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
168 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
168 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
169 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
169 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
170 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
170 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
171 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
171 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
172 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
172 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
173 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
173 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
174 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
174 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
175 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
175 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
176 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
176 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
177 | qmake: FORCE |
|
177 | qmake: FORCE | |
178 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
178 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
179 |
|
179 | |||
180 | dist: |
|
180 | dist: | |
181 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
181 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
182 | $(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 |
|
182 | $(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 | |
183 |
|
183 | |||
184 |
|
184 | |||
185 | clean:compiler_clean |
|
185 | clean:compiler_clean | |
186 | -$(DEL_FILE) $(OBJECTS) |
|
186 | -$(DEL_FILE) $(OBJECTS) | |
187 | -$(DEL_FILE) *~ core *.core |
|
187 | -$(DEL_FILE) *~ core *.core | |
188 |
|
188 | |||
189 |
|
189 | |||
190 | ####### Sub-libraries |
|
190 | ####### Sub-libraries | |
191 |
|
191 | |||
192 | distclean: clean |
|
192 | distclean: clean | |
193 | -$(DEL_FILE) $(TARGET) |
|
193 | -$(DEL_FILE) $(TARGET) | |
194 | -$(DEL_FILE) Makefile |
|
194 | -$(DEL_FILE) Makefile | |
195 |
|
195 | |||
196 |
|
196 | |||
197 | grmon: |
|
197 | grmon: | |
198 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
198 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
199 |
|
199 | |||
200 | check: first |
|
200 | check: first | |
201 |
|
201 | |||
202 | compiler_rcc_make_all: |
|
202 | compiler_rcc_make_all: | |
203 | compiler_rcc_clean: |
|
203 | compiler_rcc_clean: | |
204 | compiler_uic_make_all: |
|
204 | compiler_uic_make_all: | |
205 | compiler_uic_clean: |
|
205 | compiler_uic_clean: | |
206 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
206 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
207 | compiler_image_collection_clean: |
|
207 | compiler_image_collection_clean: | |
208 | -$(DEL_FILE) qmake_image_collection.cpp |
|
208 | -$(DEL_FILE) qmake_image_collection.cpp | |
209 | compiler_yacc_decl_make_all: |
|
209 | compiler_yacc_decl_make_all: | |
210 | compiler_yacc_decl_clean: |
|
210 | compiler_yacc_decl_clean: | |
211 | compiler_yacc_impl_make_all: |
|
211 | compiler_yacc_impl_make_all: | |
212 | compiler_yacc_impl_clean: |
|
212 | compiler_yacc_impl_clean: | |
213 | compiler_lex_make_all: |
|
213 | compiler_lex_make_all: | |
214 | compiler_lex_clean: |
|
214 | compiler_lex_clean: | |
215 | compiler_clean: |
|
215 | compiler_clean: | |
216 |
|
216 | |||
217 | ####### Compile |
|
217 | ####### Compile | |
218 |
|
218 | |||
219 | obj/wf_handler.o: ../src/wf_handler.c |
|
219 | obj/wf_handler.o: ../src/wf_handler.c | |
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
220 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
221 |
|
221 | |||
222 | obj/tc_handler.o: ../src/tc_handler.c |
|
222 | obj/tc_handler.o: ../src/tc_handler.c | |
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
223 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
224 |
|
224 | |||
225 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
225 | obj/fsw_misc.o: ../src/fsw_misc.c | |
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
226 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
227 |
|
227 | |||
228 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
228 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
229 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
230 |
|
230 | |||
231 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
231 | obj/fsw_globals.o: ../src/fsw_globals.c | |
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
232 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
233 |
|
233 | |||
234 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
234 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
235 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
236 |
|
236 | |||
237 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
237 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
238 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
239 |
|
239 | |||
240 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
240 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
241 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
242 |
|
242 | |||
243 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
243 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
244 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
245 |
|
245 | |||
246 | obj/basic_parameters.o: ../src/basic_parameters/basic_parameters.c ../src/basic_parameters/basic_parameters.h |
|
246 | obj/basic_parameters.o: ../src/basic_parameters/basic_parameters.c ../src/basic_parameters/basic_parameters.h | |
247 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/basic_parameters/basic_parameters.c |
|
247 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/basic_parameters/basic_parameters.c | |
248 |
|
248 | |||
249 | obj/fsw_processing.o: ../src/processing/fsw_processing.c |
|
249 | obj/fsw_processing.o: ../src/processing/fsw_processing.c | |
250 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c |
|
250 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c | |
251 |
|
251 | |||
252 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c |
|
252 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c | |
253 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c |
|
253 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c | |
254 |
|
254 | |||
255 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c |
|
255 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c | |
256 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c |
|
256 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c | |
257 |
|
257 | |||
258 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c |
|
258 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c | |
259 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c |
|
259 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c | |
260 |
|
260 | |||
261 | ####### Install |
|
261 | ####### Install | |
262 |
|
262 | |||
263 | install: FORCE |
|
263 | install: FORCE | |
264 |
|
264 | |||
265 | uninstall: FORCE |
|
265 | uninstall: FORCE | |
266 |
|
266 | |||
267 | FORCE: |
|
267 | FORCE: | |
268 |
|
268 |
@@ -1,57 +1,72 | |||||
1 | #!/usr/bin/lppmon -e |
|
1 | #!/usr/bin/lppmon -e | |
2 |
|
2 | |||
3 | #################### |
|
3 | #################### | |
4 | ## BUILD THE DATA ## |
|
4 | ## BUILD THE DATA ## | |
5 | #################### |
|
5 | #################### | |
6 |
|
6 | |||
7 | with open('/opt/DEV_PLE/FSW-qt/bin/spectralmatrix/asm_f0_test_20140403_case2.txt', 'r') as f: |
|
7 | with open('/opt/DEV_PLE/FSW-qt/bin/spectralmatrix/asm_f0_test_20140403_case2.txt', 'r') as f: | |
8 | listOfLines = [] |
|
8 | listOfLines = [] | |
9 | for line in f.readlines(): |
|
9 | for line in f.readlines(): | |
10 | listOfLines.append(line) |
|
10 | listOfLines.append(line) | |
11 |
|
11 | |||
12 | data = listOfLines[10] # line 10 contains the data |
|
12 | data = listOfLines[10] # line 10 contains the data | |
13 | data = data.split() # get the data from the global string |
|
13 | data = data.split() # get the data from the global string | |
14 |
|
14 | |||
15 | dataInFloat = [] |
|
15 | dataInFloat = [] | |
16 | nbData = len(data) |
|
16 | nbData = len(data) | |
17 | print "nbData = " + str(nbData) |
|
17 | print "nbData = " + str(nbData) | |
18 | for i in range( nbData ): |
|
18 | for i in range( nbData ): | |
19 | dataInFloat.append( float( data[i] ) ) # convert each string into a float |
|
19 | dataInFloat.append( float( data[i] ) ) # convert each string into a float | |
20 |
|
20 | |||
21 | # reorganize the data to have a matrix in the VHDL format |
|
21 | # reorganize the data to have a matrix in the VHDL format | |
22 | # INPUT (ICD format) |
|
22 | # INPUT (ICD format) | |
23 | # matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] |
|
23 | # matrix_0[0 .. 24] matrix_1[0 .. 24] .. matrix_127[0 .. 24] | |
24 | # OUTPUT (VHDL format) |
|
24 | # OUTPUT (VHDL format) | |
25 | # component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127] |
|
25 | # component_0[0 .. 127] component_1[0 .. 127] .. component_24[0 .. 127] | |
26 |
|
26 | |||
27 | dataInFloatReorganized = [] |
|
27 | dataInFloatReorganized = [] | |
28 | dataInIntReorganized = [] |
|
28 | dataInIntReorganized = [] | |
29 | nbComponentsByMatrix = 25 |
|
29 | nbComponentsByMatrix = 25 | |
30 | nbFrequencyBins = 128 |
|
30 | nbFrequencyBins = 128 | |
31 | for indexComponent in range(nbComponentsByMatrix): |
|
31 | for indexComponent in range(nbComponentsByMatrix): | |
32 | for frequencyBin in range(nbFrequencyBins): |
|
32 | for frequencyBin in range(nbFrequencyBins): | |
33 | dataInFloatReorganized.append( |
|
33 | dataInFloatReorganized.append( | |
34 | dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] |
|
34 | dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] | |
35 | ) |
|
35 | ) | |
36 | dataInIntReorganized.append( |
|
36 | dataInIntReorganized.append( | |
37 | int( dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] ) |
|
37 | int( dataInFloat[ indexComponent + frequencyBin * nbComponentsByMatrix ] ) | |
38 | ) |
|
38 | ) | |
39 |
|
39 | |||
40 | #################### |
|
40 | #################### | |
41 | ## WRITE THE DATA ## |
|
41 | ## WRITE THE DATA ## | |
42 | #################### |
|
42 | #################### | |
43 |
|
43 | |||
|
44 | # F0 buffer address | |||
44 | address_to_read = 0x80000f08 |
|
45 | address_to_read = 0x80000f08 | |
45 | val = RMAPPlugin0.Read( address_to_read, 1) |
|
46 | val = RMAPPlugin0.Read( address_to_read, 1) | |
46 | matrixF0_Address0 = val[0] |
|
47 | matrixF0_Address0 = val[0] | |
|
48 | ||||
|
49 | # F1 buffer address | |||
|
50 | address_to_read = 0x80000f10 | |||
|
51 | val = RMAPPlugin0.Read( address_to_read, 1) | |||
|
52 | matrixF1_Address = val[0] | |||
|
53 | ||||
|
54 | # F2 buffer address | |||
|
55 | address_to_read = 0x80000f14 | |||
|
56 | val = RMAPPlugin0.Read( address_to_read, 1) | |||
|
57 | matrixF2_Address = val[0] | |||
|
58 | ||||
47 | print str( len(dataInIntReorganized) ) + " data to write" |
|
59 | print str( len(dataInIntReorganized) ) + " data to write" | |
48 | RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized ) |
|
60 | RMAPPlugin0.Write( matrixF0_Address0, dataInIntReorganized ) | |
49 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0) |
|
61 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF0_Address0) | |
|
62 | RMAPPlugin0.Write( matrixF1_Address, dataInIntReorganized ) | |||
|
63 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF1_Address) | |||
|
64 | RMAPPlugin0.Write( matrixF2_Address, dataInIntReorganized ) | |||
|
65 | print str( len(dataInIntReorganized) ) + " data written @" + hex(matrixF2_Address) | |||
50 |
|
66 | |||
51 |
|
67 | |||
52 |
|
68 | |||
53 |
|
69 | |||
54 |
|
70 | |||
55 |
|
71 | |||
56 |
|
72 | |||
57 |
|
@@ -1,91 +1,91 | |||||
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 cpu_usage_report |
|
4 | CONFIG += console verbose cpu_usage_report | |
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=6 # internal |
|
14 | DEFINES += SW_VERSION_N4=6 # 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 | ../header/processing \ |
|
53 | ../header/processing \ | |
54 | ../src/basic_parameters |
|
54 | ../src/basic_parameters | |
55 |
|
55 | |||
56 | SOURCES += \ |
|
56 | SOURCES += \ | |
57 | ../src/wf_handler.c \ |
|
57 | ../src/wf_handler.c \ | |
58 | ../src/tc_handler.c \ |
|
58 | ../src/tc_handler.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 | ../src/basic_parameters/basic_parameters.c \ |
|
66 | ../src/basic_parameters/basic_parameters.c \ | |
67 | ../src/processing/fsw_processing.c \ |
|
67 | ../src/processing/fsw_processing.c \ | |
68 | ../src/processing/avf0_prc0.c \ |
|
68 | ../src/processing/avf0_prc0.c \ | |
69 | ../src/processing/avf1_prc1.c \ |
|
69 | ../src/processing/avf1_prc1.c \ | |
70 | ../src/processing/avf2_prc2.c |
|
70 | ../src/processing/avf2_prc2.c | |
71 |
|
71 | |||
72 | HEADERS += \ |
|
72 | HEADERS += \ | |
73 | ../header/wf_handler.h \ |
|
73 | ../header/wf_handler.h \ | |
74 | ../header/tc_handler.h \ |
|
74 | ../header/tc_handler.h \ | |
75 | ../header/grlib_regs.h \ |
|
75 | ../header/grlib_regs.h \ | |
76 | ../header/fsw_params.h \ |
|
76 | ../header/fsw_params.h \ | |
77 | ../header/fsw_misc.h \ |
|
77 | ../header/fsw_misc.h \ | |
78 | ../header/fsw_init.h \ |
|
78 | ../header/fsw_init.h \ | |
79 | ../header/ccsds_types.h \ |
|
79 | ../header/ccsds_types.h \ | |
80 | ../header/fsw_spacewire.h \ |
|
80 | ../header/fsw_spacewire.h \ | |
81 | ../header/tc_load_dump_parameters.h \ |
|
81 | ../header/tc_load_dump_parameters.h \ | |
82 | ../header/tm_lfr_tc_exe.h \ |
|
82 | ../header/tm_lfr_tc_exe.h \ | |
83 | ../header/tc_acceptance.h \ |
|
83 | ../header/tc_acceptance.h \ | |
84 | ../header/fsw_params_nb_bytes.h \ |
|
84 | ../header/fsw_params_nb_bytes.h \ | |
85 | ../src/basic_parameters/basic_parameters.h \ |
|
85 | ../src/basic_parameters/basic_parameters.h \ | |
|
86 | ../header/fsw_params_processing.h \ | |||
86 | ../header/processing/fsw_processing.h \ |
|
87 | ../header/processing/fsw_processing.h \ | |
87 | ../header/processing/fsw_params_processing.h \ |
|
|||
88 | ../header/processing/avf0_prc0.h \ |
|
88 | ../header/processing/avf0_prc0.h \ | |
89 | ../header/processing/avf1_prc1.h \ |
|
89 | ../header/processing/avf1_prc1.h \ | |
90 | ../header/processing/avf2_prc2.h |
|
90 | ../header/processing/avf2_prc2.h | |
91 |
|
91 |
@@ -1,201 +1,201 | |||||
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-04-2 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-04-29T15:43:03. --> | |
4 | <qtcreator> |
|
4 | <qtcreator> | |
5 | <data> |
|
5 | <data> | |
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> |
|
6 | <variable>ProjectExplorer.Project.ActiveTarget</variable> | |
7 | <value type="int">0</value> |
|
7 | <value type="int">0</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-Qt 4.8.2 in PATH (System)</value> |
|
54 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> |
|
55 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop-Qt 4.8.2 in PATH (System)</value> | |
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</value> |
|
56 | <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">{5289e843-9ef2-45ce-88c6-ad27d8e08def}</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">true</value> |
|
180 | <value type="bool" key="RunConfiguration.UseCppDebugger">true</value> | |
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</value> |
|
181 | <value type="bool" key="RunConfiguration.UseCppDebuggerAuto">false</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.TargetCount</variable> |
|
190 | <variable>ProjectExplorer.Project.TargetCount</variable> | |
191 | <value type="int">1</value> |
|
191 | <value type="int">1</value> | |
192 | </data> |
|
192 | </data> | |
193 | <data> |
|
193 | <data> | |
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> |
|
194 | <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable> | |
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> |
|
195 | <value type="QByteArray">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value> | |
196 | </data> |
|
196 | </data> | |
197 | <data> |
|
197 | <data> | |
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> |
|
198 | <variable>ProjectExplorer.Project.Updater.FileVersion</variable> | |
199 | <value type="int">15</value> |
|
199 | <value type="int">15</value> | |
200 | </data> |
|
200 | </data> | |
201 | </qtcreator> |
|
201 | </qtcreator> |
@@ -1,39 +1,39 | |||||
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED |
|
1 | #ifndef FSW_SPACEWIRE_H_INCLUDED | |
2 | #define FSW_SPACEWIRE_H_INCLUDED |
|
2 | #define FSW_SPACEWIRE_H_INCLUDED | |
3 |
|
3 | |||
4 | #include <rtems.h> |
|
4 | #include <rtems.h> | |
5 | #include <grspw.h> |
|
5 | #include <grspw.h> | |
6 |
|
6 | |||
7 | #include <fcntl.h> // for O_RDWR |
|
7 | #include <fcntl.h> // for O_RDWR | |
8 | #include <unistd.h> // for the read call |
|
8 | #include <unistd.h> // for the read call | |
9 | #include <sys/ioctl.h> // for the ioctl call |
|
9 | #include <sys/ioctl.h> // for the ioctl call | |
10 | #include <errno.h> |
|
10 | #include <errno.h> | |
11 |
|
11 | |||
12 | #include "fsw_params.h" |
|
12 | #include "fsw_params.h" | |
13 | #include "tc_handler.h" |
|
13 | #include "tc_handler.h" | |
14 |
|
14 | |||
15 | extern spw_stats spacewire_stats; |
|
15 | extern spw_stats spacewire_stats; | |
16 | extern spw_stats spacewire_stats_backup; |
|
16 | extern spw_stats spacewire_stats_backup; | |
17 |
|
17 | |||
18 | // RTEMS TASK |
|
18 | // RTEMS TASK | |
19 | rtems_task spiq_task( rtems_task_argument argument ); |
|
19 | rtems_task spiq_task( rtems_task_argument argument ); | |
20 | rtems_task recv_task( rtems_task_argument unused ); |
|
20 | rtems_task recv_task( rtems_task_argument unused ); | |
21 | rtems_task send_task( rtems_task_argument argument ); |
|
21 | rtems_task send_task( rtems_task_argument argument ); | |
22 | rtems_task wtdg_task( rtems_task_argument argument ); |
|
22 | rtems_task wtdg_task( rtems_task_argument argument ); | |
23 |
|
23 | |||
24 | int spacewire_open_link( void ); |
|
24 | int spacewire_open_link( void ); | |
25 | int spacewire_start_link( int fd ); |
|
25 | int spacewire_start_link( int fd ); | |
26 | int spacewire_stop_start_link( int fd ); |
|
26 | int spacewire_stop_and_start_link( int fd ); | |
27 | int spacewire_configure_link(int fd ); |
|
27 | int spacewire_configure_link(int fd ); | |
28 | int spacewire_reset_link( void ); |
|
28 | int spacewire_reset_link( void ); | |
29 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force |
|
29 | void spacewire_set_NP( unsigned char val, unsigned int regAddr ); // No Port force | |
30 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ); // RMAP Enable |
|
30 | void spacewire_set_RE( unsigned char val, unsigned int regAddr ); // RMAP Enable | |
31 | void spacewire_compute_stats_offsets( void ); |
|
31 | void spacewire_compute_stats_offsets( void ); | |
32 | void spacewire_update_statistics( void ); |
|
32 | void spacewire_update_statistics( void ); | |
33 |
|
33 | |||
34 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ); |
|
34 | void timecode_irq_handler( void *pDev, void *regs, int minor, unsigned int tc ); | |
35 | rtems_timer_service_routine user_routine( rtems_id timer_id, void *user_data ); |
|
35 | rtems_timer_service_routine user_routine( rtems_id timer_id, void *user_data ); | |
36 |
|
36 | |||
37 | void (*grspw_timecode_callback) ( void *pDev, void *regs, int minor, unsigned int tc ); |
|
37 | void (*grspw_timecode_callback) ( void *pDev, void *regs, int minor, unsigned int tc ); | |
38 |
|
38 | |||
39 | #endif // FSW_SPACEWIRE_H_INCLUDED |
|
39 | #endif // FSW_SPACEWIRE_H_INCLUDED |
@@ -1,100 +1,100 | |||||
1 | #ifndef GRLIB_REGS_H_INCLUDED |
|
1 | #ifndef GRLIB_REGS_H_INCLUDED | |
2 | #define GRLIB_REGS_H_INCLUDED |
|
2 | #define GRLIB_REGS_H_INCLUDED | |
3 |
|
3 | |||
4 | #define NB_GPTIMER 3 |
|
4 | #define NB_GPTIMER 3 | |
5 |
|
5 | |||
6 | struct apbuart_regs_str{ |
|
6 | struct apbuart_regs_str{ | |
7 | volatile unsigned int data; |
|
7 | volatile unsigned int data; | |
8 | volatile unsigned int status; |
|
8 | volatile unsigned int status; | |
9 | volatile unsigned int ctrl; |
|
9 | volatile unsigned int ctrl; | |
10 | volatile unsigned int scaler; |
|
10 | volatile unsigned int scaler; | |
11 | volatile unsigned int fifoDebug; |
|
11 | volatile unsigned int fifoDebug; | |
12 | }; |
|
12 | }; | |
13 |
|
13 | |||
14 | struct grgpio_regs_str{ |
|
14 | struct grgpio_regs_str{ | |
15 | volatile int io_port_data_register; |
|
15 | volatile int io_port_data_register; | |
16 | int io_port_output_register; |
|
16 | int io_port_output_register; | |
17 | int io_port_direction_register; |
|
17 | int io_port_direction_register; | |
18 | int interrupt_mak_register; |
|
18 | int interrupt_mak_register; | |
19 | int interrupt_polarity_register; |
|
19 | int interrupt_polarity_register; | |
20 | int interrupt_edge_register; |
|
20 | int interrupt_edge_register; | |
21 | int bypass_register; |
|
21 | int bypass_register; | |
22 | int reserved; |
|
22 | int reserved; | |
23 | // 0x20-0x3c interrupt map register(s) |
|
23 | // 0x20-0x3c interrupt map register(s) | |
24 | }; |
|
24 | }; | |
25 |
|
25 | |||
26 | typedef struct { |
|
26 | typedef struct { | |
27 | volatile unsigned int counter; |
|
27 | volatile unsigned int counter; | |
28 | volatile unsigned int reload; |
|
28 | volatile unsigned int reload; | |
29 | volatile unsigned int ctrl; |
|
29 | volatile unsigned int ctrl; | |
30 | volatile unsigned int unused; |
|
30 | volatile unsigned int unused; | |
31 | } timer_regs_t; |
|
31 | } timer_regs_t; | |
32 |
|
32 | |||
33 | typedef struct { |
|
33 | typedef struct { | |
34 | volatile unsigned int scaler_value; |
|
34 | volatile unsigned int scaler_value; | |
35 | volatile unsigned int scaler_reload; |
|
35 | volatile unsigned int scaler_reload; | |
36 | volatile unsigned int conf; |
|
36 | volatile unsigned int conf; | |
37 | volatile unsigned int unused0; |
|
37 | volatile unsigned int unused0; | |
38 | timer_regs_t timer[NB_GPTIMER]; |
|
38 | timer_regs_t timer[NB_GPTIMER]; | |
39 | } gptimer_regs_t; |
|
39 | } gptimer_regs_t; | |
40 |
|
40 | |||
41 | typedef struct { |
|
41 | typedef struct { | |
42 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time |
|
42 | volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time | |
43 | volatile int coarse_time_load; |
|
43 | volatile int coarse_time_load; | |
44 | volatile int coarse_time; |
|
44 | volatile int coarse_time; | |
45 | volatile int fine_time; |
|
45 | volatile int fine_time; | |
46 | } time_management_regs_t; |
|
46 | } time_management_regs_t; | |
47 |
|
47 | |||
48 | typedef struct { |
|
48 | typedef struct { | |
49 | volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW |
|
49 | volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW | |
50 | volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0 |
|
50 | volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0 | |
51 | volatile int addr_data_f0; // 0x08 10 *** |
|
51 | volatile int addr_data_f0; // 0x08 10 *** | |
52 | volatile int addr_data_f1; // 0x0c 11 *** |
|
52 | volatile int addr_data_f1; // 0x0c 11 *** | |
53 | volatile int addr_data_f2; // 0x10 100 *** |
|
53 | volatile int addr_data_f2; // 0x10 100 *** | |
54 | volatile int addr_data_f3; // 0x14 101 *** |
|
54 | volatile int addr_data_f3; // 0x14 101 *** | |
55 | volatile int status; // 0x18 110 *** |
|
55 | volatile int status; // 0x18 110 *** | |
56 | volatile int delta_snapshot; // 0x1c 111 *** |
|
56 | volatile int delta_snapshot; // 0x1c 111 *** | |
57 | volatile int delta_f2_f1; // 0x20 0000 *** |
|
57 | volatile int delta_f2_f1; // 0x20 0000 *** | |
58 | volatile int delta_f2_f0; // 0x24 0001 *** |
|
58 | volatile int delta_f2_f0; // 0x24 0001 *** | |
59 | volatile int nb_burst_available;// 0x28 0010 *** |
|
59 | volatile int nb_burst_available;// 0x28 0010 *** | |
60 | volatile int nb_snapshot_param; // 0x2c 0011 *** |
|
60 | volatile int nb_snapshot_param; // 0x2c 0011 *** | |
61 | } waveform_picker_regs_t; |
|
61 | } waveform_picker_regs_t; | |
62 |
|
62 | |||
63 | typedef struct{ |
|
63 | typedef struct{ | |
64 | int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW |
|
64 | int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW | |
65 | int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] |
|
65 | int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ] | |
66 | int addr_data_f0; // 0x08 |
|
66 | int addr_data_f0; // 0x08 | |
67 | int addr_data_f1; // 0x0c |
|
67 | int addr_data_f1; // 0x0c | |
68 | int addr_data_f2; // 0x10 |
|
68 | int addr_data_f2; // 0x10 | |
69 | int addr_data_f3; // 0x14 |
|
69 | int addr_data_f3; // 0x14 | |
70 | volatile int status; // 0x18 |
|
70 | volatile int status; // 0x18 | |
71 | int delta_snapshot; // 0x1c |
|
71 | int delta_snapshot; // 0x1c | |
72 | int delta_f0; // 0x20 |
|
72 | int delta_f0; // 0x20 | |
73 | int delta_f0_2; // 0x24 |
|
73 | int delta_f0_2; // 0x24 | |
74 | int delta_f1; // 0x28 |
|
74 | int delta_f1; // 0x28 | |
75 | int delta_f2; // 0x2c |
|
75 | int delta_f2; // 0x2c | |
76 | int nb_data_by_buffer; // 0x30 |
|
76 | int nb_data_by_buffer; // 0x30 | |
77 | int snapshot_param; // 0x34 |
|
77 | int snapshot_param; // 0x34 | |
78 | int start_date; // 0x38 |
|
78 | int start_date; // 0x38 | |
79 | int nb_word_in_buffer; // 0x3c |
|
79 | int nb_word_in_buffer; // 0x3c | |
80 | } waveform_picker_regs_new_t; |
|
80 | } waveform_picker_regs_new_t; | |
81 |
|
81 | |||
82 | typedef struct { |
|
82 | typedef struct { | |
83 | volatile int config; |
|
83 | volatile int config; // 0x00 | |
84 | volatile int status; |
|
84 | volatile int status; // 0x04 | |
85 | volatile int matrixF0_Address0; |
|
85 | volatile int matrixF0_Address0; // 0x08 | |
86 | volatile int matrixFO_Address1; |
|
86 | volatile int matrixFO_Address1; // 0x0C | |
87 | volatile int matrixF1_Address; |
|
87 | volatile int matrixF1_Address; // 0x10 | |
88 | volatile int matrixF2_Address; |
|
88 | volatile int matrixF2_Address; // 0x14 | |
89 | volatile int coarse_time_F0_0; |
|
89 | volatile int coarse_time_F0_0; // 0x18 | |
90 | volatile int coarse_time_F0_1; |
|
90 | volatile int coarse_time_F0_1; // 0x1C | |
91 | volatile int coarse_time_F1; |
|
91 | volatile int coarse_time_F1; // 0x20 | |
92 | volatile int coarse_time_F2; |
|
92 | volatile int coarse_time_F2; // 0x24 | |
93 | volatile int fine_time_FO_0; |
|
93 | volatile int fine_time_FO_0; // 0x28 | |
94 | volatile int fine_time_F0_1; |
|
94 | volatile int fine_time_F0_1; // 0x2C | |
95 | volatile int fine_time_F1; |
|
95 | volatile int fine_time_F1; // 0x30 | |
96 | volatile int fine_time_F2; |
|
96 | volatile int fine_time_F2; // 0x34 | |
97 | volatile int debug; |
|
97 | volatile int debug; // 0x38 | |
98 | } spectral_matrix_regs_t; |
|
98 | } spectral_matrix_regs_t; | |
99 |
|
99 | |||
100 | #endif // GRLIB_REGS_H_INCLUDED |
|
100 | #endif // GRLIB_REGS_H_INCLUDED |
@@ -1,610 +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_and_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, 0 ); |
|
90 | status = enter_mode( LFR_MODE_STANDBY, 0 ); | |
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 estimatedPacketLength; |
|
119 | unsigned int estimatedPacketLength; | |
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 | estimatedPacketLength = (unsigned int) (len - CCSDS_TC_TM_PACKET_OFFSET - 3); // => -3 is for Prot ID, Reserved and User App bytes |
|
152 | estimatedPacketLength = (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) (estimatedPacketLength >> 8); |
|
153 | currentTC_LEN_RCV[ 0 ] = (unsigned char) (estimatedPacketLength >> 8); | |
154 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (estimatedPacketLength ); |
|
154 | currentTC_LEN_RCV[ 1 ] = (unsigned char) (estimatedPacketLength ); | |
155 | // CHECK THE TC |
|
155 | // CHECK THE TC | |
156 | parserCode = tc_parser( ¤tTC, estimatedPacketLength, computed_CRC ) ; |
|
156 | parserCode = tc_parser( ¤tTC, estimatedPacketLength, 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 | estimatedPacketLength + CCSDS_TC_TM_PACKET_OFFSET + 3); |
|
184 | estimatedPacketLength + 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[MSG_QUEUE_SIZE_SEND]; // incoming data buffer |
|
206 | char incomingData[MSG_QUEUE_SIZE_SEND]; // 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_and_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 ) // by default, the driver resets the core: [SPW_CTRL_WRITE(pDev, SPW_CTRL_RESET);] | |
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( fd |
|
340 | status = ioctl( fd, 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_and_start_link( int fd ) | |
347 | { |
|
347 | { | |
348 | rtems_status_code status; |
|
348 | rtems_status_code status; | |
349 |
|
349 | |||
350 |
status = ioctl( fd |
|
350 | status = ioctl( fd, SPACEWIRE_IOCTRL_STOP); // start fails if link pDev->running != 0 | |
351 |
status = ioctl( fd |
|
351 | status = ioctl( fd, 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_and_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_9 ); |
|
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 | } |
|
597 | } | |
598 |
|
598 | |||
599 | 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 ) | |
600 | { |
|
600 | { | |
601 | int linkStatus; |
|
601 | int linkStatus; | |
602 | rtems_status_code status; |
|
602 | rtems_status_code status; | |
603 |
|
603 | |||
604 | 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 | |
605 |
|
605 | |||
606 | if ( linkStatus == 5) { |
|
606 | if ( linkStatus == 5) { | |
607 | PRINTF("in spacewire_reset_link *** link is running\n") |
|
607 | PRINTF("in spacewire_reset_link *** link is running\n") | |
608 | status = RTEMS_SUCCESSFUL; |
|
608 | status = RTEMS_SUCCESSFUL; | |
609 | } |
|
609 | } | |
610 | } |
|
610 | } |
General Comments 0
You need to be logged in to leave comments.
Login now