@@ -1,273 +1,273 | |||||
1 | ############################################################################# |
|
1 | ############################################################################# | |
2 | # Makefile for building: bin/fsw |
|
2 | # Makefile for building: bin/fsw | |
3 |
# Generated by qmake (2.01a) (Qt 4.8.6) on: |
|
3 | # Generated by qmake (2.01a) (Qt 4.8.6) on: Tue Jun 17 07:27:34 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=10 -DPRINT_MESSAGES_ON_CONSOLE |
|
13 | DEFINES = -DSW_VERSION_N1=1 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=10 -DPRINT_MESSAGES_ON_CONSOLE | |
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
14 | CFLAGS = -pipe -O3 -Wall $(DEFINES) | |
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) |
|
15 | CXXFLAGS = -pipe -O3 -Wall $(DEFINES) | |
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters |
|
16 | INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header -I../header/processing -I../src/LFR_basic-parameters | |
17 | LINK = sparc-rtems-g++ |
|
17 | LINK = sparc-rtems-g++ | |
18 | LFLAGS = |
|
18 | LFLAGS = | |
19 | LIBS = $(SUBLIBS) |
|
19 | LIBS = $(SUBLIBS) | |
20 | AR = sparc-rtems-ar rcs |
|
20 | AR = sparc-rtems-ar rcs | |
21 | RANLIB = |
|
21 | RANLIB = | |
22 | QMAKE = /usr/bin/qmake-qt4 |
|
22 | QMAKE = /usr/bin/qmake-qt4 | |
23 | TAR = tar -cf |
|
23 | TAR = tar -cf | |
24 | COMPRESS = gzip -9f |
|
24 | COMPRESS = gzip -9f | |
25 | COPY = cp -f |
|
25 | COPY = cp -f | |
26 | SED = sed |
|
26 | SED = sed | |
27 | COPY_FILE = $(COPY) |
|
27 | COPY_FILE = $(COPY) | |
28 | COPY_DIR = $(COPY) -r |
|
28 | COPY_DIR = $(COPY) -r | |
29 | STRIP = sparc-rtems-strip |
|
29 | STRIP = sparc-rtems-strip | |
30 | INSTALL_FILE = install -m 644 -p |
|
30 | INSTALL_FILE = install -m 644 -p | |
31 | INSTALL_DIR = $(COPY_DIR) |
|
31 | INSTALL_DIR = $(COPY_DIR) | |
32 | INSTALL_PROGRAM = install -m 755 -p |
|
32 | INSTALL_PROGRAM = install -m 755 -p | |
33 | DEL_FILE = rm -f |
|
33 | DEL_FILE = rm -f | |
34 | SYMLINK = ln -f -s |
|
34 | SYMLINK = ln -f -s | |
35 | DEL_DIR = rmdir |
|
35 | DEL_DIR = rmdir | |
36 | MOVE = mv -f |
|
36 | MOVE = mv -f | |
37 | CHK_DIR_EXISTS= test -d |
|
37 | CHK_DIR_EXISTS= test -d | |
38 | MKDIR = mkdir -p |
|
38 | MKDIR = mkdir -p | |
39 |
|
39 | |||
40 | ####### Output directory |
|
40 | ####### Output directory | |
41 |
|
41 | |||
42 | OBJECTS_DIR = obj/ |
|
42 | OBJECTS_DIR = obj/ | |
43 |
|
43 | |||
44 | ####### Files |
|
44 | ####### Files | |
45 |
|
45 | |||
46 | SOURCES = ../src/wf_handler.c \ |
|
46 | SOURCES = ../src/wf_handler.c \ | |
47 | ../src/tc_handler.c \ |
|
47 | ../src/tc_handler.c \ | |
48 | ../src/fsw_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/processing/fsw_processing.c \ |
|
55 | ../src/processing/fsw_processing.c \ | |
56 | ../src/processing/avf0_prc0.c \ |
|
56 | ../src/processing/avf0_prc0.c \ | |
57 | ../src/processing/avf1_prc1.c \ |
|
57 | ../src/processing/avf1_prc1.c \ | |
58 | ../src/processing/avf2_prc2.c \ |
|
58 | ../src/processing/avf2_prc2.c \ | |
59 | ../src/lfr_cpu_usage_report.c \ |
|
59 | ../src/lfr_cpu_usage_report.c \ | |
60 | ../src/LFR_basic-parameters/basic_parameters.c |
|
60 | ../src/LFR_basic-parameters/basic_parameters.c | |
61 | OBJECTS = obj/wf_handler.o \ |
|
61 | OBJECTS = obj/wf_handler.o \ | |
62 | obj/tc_handler.o \ |
|
62 | obj/tc_handler.o \ | |
63 | obj/fsw_misc.o \ |
|
63 | obj/fsw_misc.o \ | |
64 | obj/fsw_init.o \ |
|
64 | obj/fsw_init.o \ | |
65 | obj/fsw_globals.o \ |
|
65 | obj/fsw_globals.o \ | |
66 | obj/fsw_spacewire.o \ |
|
66 | obj/fsw_spacewire.o \ | |
67 | obj/tc_load_dump_parameters.o \ |
|
67 | obj/tc_load_dump_parameters.o \ | |
68 | obj/tm_lfr_tc_exe.o \ |
|
68 | obj/tm_lfr_tc_exe.o \ | |
69 | obj/tc_acceptance.o \ |
|
69 | obj/tc_acceptance.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 | obj/lfr_cpu_usage_report.o \ |
|
74 | obj/lfr_cpu_usage_report.o \ | |
75 | obj/basic_parameters.o |
|
75 | obj/basic_parameters.o | |
76 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
76 | DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
77 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
77 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
78 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
78 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
79 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
79 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
80 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
80 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
81 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
81 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
82 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
82 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
83 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
83 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
84 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
84 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
85 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
85 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
86 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
86 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
87 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
87 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
88 | sparc.pri \ |
|
88 | sparc.pri \ | |
89 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
89 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
90 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
90 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
91 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
91 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
92 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
92 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
93 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
93 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
94 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
94 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
95 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
95 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
96 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
96 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
97 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
97 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
98 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ |
|
98 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \ | |
99 | fsw-qt.pro |
|
99 | fsw-qt.pro | |
100 | QMAKE_TARGET = fsw |
|
100 | QMAKE_TARGET = fsw | |
101 | DESTDIR = bin/ |
|
101 | DESTDIR = bin/ | |
102 | TARGET = bin/fsw |
|
102 | TARGET = bin/fsw | |
103 |
|
103 | |||
104 | first: all |
|
104 | first: all | |
105 | ####### Implicit rules |
|
105 | ####### Implicit rules | |
106 |
|
106 | |||
107 | .SUFFIXES: .o .c .cpp .cc .cxx .C |
|
107 | .SUFFIXES: .o .c .cpp .cc .cxx .C | |
108 |
|
108 | |||
109 | .cpp.o: |
|
109 | .cpp.o: | |
110 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
110 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
111 |
|
111 | |||
112 | .cc.o: |
|
112 | .cc.o: | |
113 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
113 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
114 |
|
114 | |||
115 | .cxx.o: |
|
115 | .cxx.o: | |
116 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
116 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
117 |
|
117 | |||
118 | .C.o: |
|
118 | .C.o: | |
119 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" |
|
119 | $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<" | |
120 |
|
120 | |||
121 | .c.o: |
|
121 | .c.o: | |
122 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" |
|
122 | $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<" | |
123 |
|
123 | |||
124 | ####### Build rules |
|
124 | ####### Build rules | |
125 |
|
125 | |||
126 | all: Makefile $(TARGET) |
|
126 | all: Makefile $(TARGET) | |
127 |
|
127 | |||
128 | $(TARGET): $(OBJECTS) |
|
128 | $(TARGET): $(OBJECTS) | |
129 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ |
|
129 | @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/ | |
130 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) |
|
130 | $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS) | |
131 |
|
131 | |||
132 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ |
|
132 | Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \ | |
133 | /usr/lib64/qt4/mkspecs/common/linux.conf \ |
|
133 | /usr/lib64/qt4/mkspecs/common/linux.conf \ | |
134 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ |
|
134 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf \ | |
135 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ |
|
135 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \ | |
136 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ |
|
136 | /usr/lib64/qt4/mkspecs/common/g++-base.conf \ | |
137 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ |
|
137 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf \ | |
138 | /usr/lib64/qt4/mkspecs/qconfig.pri \ |
|
138 | /usr/lib64/qt4/mkspecs/qconfig.pri \ | |
139 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ |
|
139 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \ | |
140 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ |
|
140 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf \ | |
141 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ |
|
141 | /usr/lib64/qt4/mkspecs/features/qt_config.prf \ | |
142 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ |
|
142 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \ | |
143 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ |
|
143 | /usr/lib64/qt4/mkspecs/features/default_pre.prf \ | |
144 | sparc.pri \ |
|
144 | sparc.pri \ | |
145 | /usr/lib64/qt4/mkspecs/features/release.prf \ |
|
145 | /usr/lib64/qt4/mkspecs/features/release.prf \ | |
146 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ |
|
146 | /usr/lib64/qt4/mkspecs/features/default_post.prf \ | |
147 | /usr/lib64/qt4/mkspecs/features/shared.prf \ |
|
147 | /usr/lib64/qt4/mkspecs/features/shared.prf \ | |
148 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ |
|
148 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \ | |
149 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ |
|
149 | /usr/lib64/qt4/mkspecs/features/warn_on.prf \ | |
150 | /usr/lib64/qt4/mkspecs/features/resources.prf \ |
|
150 | /usr/lib64/qt4/mkspecs/features/resources.prf \ | |
151 | /usr/lib64/qt4/mkspecs/features/uic.prf \ |
|
151 | /usr/lib64/qt4/mkspecs/features/uic.prf \ | |
152 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ |
|
152 | /usr/lib64/qt4/mkspecs/features/yacc.prf \ | |
153 | /usr/lib64/qt4/mkspecs/features/lex.prf \ |
|
153 | /usr/lib64/qt4/mkspecs/features/lex.prf \ | |
154 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf |
|
154 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf | |
155 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
155 | $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
156 | /usr/lib64/qt4/mkspecs/common/unix.conf: |
|
156 | /usr/lib64/qt4/mkspecs/common/unix.conf: | |
157 | /usr/lib64/qt4/mkspecs/common/linux.conf: |
|
157 | /usr/lib64/qt4/mkspecs/common/linux.conf: | |
158 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: |
|
158 | /usr/lib64/qt4/mkspecs/common/gcc-base.conf: | |
159 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: |
|
159 | /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf: | |
160 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: |
|
160 | /usr/lib64/qt4/mkspecs/common/g++-base.conf: | |
161 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: |
|
161 | /usr/lib64/qt4/mkspecs/common/g++-unix.conf: | |
162 | /usr/lib64/qt4/mkspecs/qconfig.pri: |
|
162 | /usr/lib64/qt4/mkspecs/qconfig.pri: | |
163 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: |
|
163 | /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri: | |
164 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: |
|
164 | /usr/lib64/qt4/mkspecs/features/qt_functions.prf: | |
165 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: |
|
165 | /usr/lib64/qt4/mkspecs/features/qt_config.prf: | |
166 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: |
|
166 | /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf: | |
167 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: |
|
167 | /usr/lib64/qt4/mkspecs/features/default_pre.prf: | |
168 | sparc.pri: |
|
168 | sparc.pri: | |
169 | /usr/lib64/qt4/mkspecs/features/release.prf: |
|
169 | /usr/lib64/qt4/mkspecs/features/release.prf: | |
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: |
|
170 | /usr/lib64/qt4/mkspecs/features/default_post.prf: | |
171 | /usr/lib64/qt4/mkspecs/features/shared.prf: |
|
171 | /usr/lib64/qt4/mkspecs/features/shared.prf: | |
172 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: |
|
172 | /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf: | |
173 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: |
|
173 | /usr/lib64/qt4/mkspecs/features/warn_on.prf: | |
174 | /usr/lib64/qt4/mkspecs/features/resources.prf: |
|
174 | /usr/lib64/qt4/mkspecs/features/resources.prf: | |
175 | /usr/lib64/qt4/mkspecs/features/uic.prf: |
|
175 | /usr/lib64/qt4/mkspecs/features/uic.prf: | |
176 | /usr/lib64/qt4/mkspecs/features/yacc.prf: |
|
176 | /usr/lib64/qt4/mkspecs/features/yacc.prf: | |
177 | /usr/lib64/qt4/mkspecs/features/lex.prf: |
|
177 | /usr/lib64/qt4/mkspecs/features/lex.prf: | |
178 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: |
|
178 | /usr/lib64/qt4/mkspecs/features/include_source_dir.prf: | |
179 | qmake: FORCE |
|
179 | qmake: FORCE | |
180 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro |
|
180 | @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro | |
181 |
|
181 | |||
182 | dist: |
|
182 | dist: | |
183 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 |
|
183 | @$(CHK_DIR_EXISTS) obj/fsw1.0.0 || $(MKDIR) obj/fsw1.0.0 | |
184 | $(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 |
|
184 | $(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 | |
185 |
|
185 | |||
186 |
|
186 | |||
187 | clean:compiler_clean |
|
187 | clean:compiler_clean | |
188 | -$(DEL_FILE) $(OBJECTS) |
|
188 | -$(DEL_FILE) $(OBJECTS) | |
189 | -$(DEL_FILE) *~ core *.core |
|
189 | -$(DEL_FILE) *~ core *.core | |
190 |
|
190 | |||
191 |
|
191 | |||
192 | ####### Sub-libraries |
|
192 | ####### Sub-libraries | |
193 |
|
193 | |||
194 | distclean: clean |
|
194 | distclean: clean | |
195 | -$(DEL_FILE) $(TARGET) |
|
195 | -$(DEL_FILE) $(TARGET) | |
196 | -$(DEL_FILE) Makefile |
|
196 | -$(DEL_FILE) Makefile | |
197 |
|
197 | |||
198 |
|
198 | |||
199 | grmon: |
|
199 | grmon: | |
200 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u |
|
200 | cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u | |
201 |
|
201 | |||
202 | check: first |
|
202 | check: first | |
203 |
|
203 | |||
204 | compiler_rcc_make_all: |
|
204 | compiler_rcc_make_all: | |
205 | compiler_rcc_clean: |
|
205 | compiler_rcc_clean: | |
206 | compiler_uic_make_all: |
|
206 | compiler_uic_make_all: | |
207 | compiler_uic_clean: |
|
207 | compiler_uic_clean: | |
208 | compiler_image_collection_make_all: qmake_image_collection.cpp |
|
208 | compiler_image_collection_make_all: qmake_image_collection.cpp | |
209 | compiler_image_collection_clean: |
|
209 | compiler_image_collection_clean: | |
210 | -$(DEL_FILE) qmake_image_collection.cpp |
|
210 | -$(DEL_FILE) qmake_image_collection.cpp | |
211 | compiler_yacc_decl_make_all: |
|
211 | compiler_yacc_decl_make_all: | |
212 | compiler_yacc_decl_clean: |
|
212 | compiler_yacc_decl_clean: | |
213 | compiler_yacc_impl_make_all: |
|
213 | compiler_yacc_impl_make_all: | |
214 | compiler_yacc_impl_clean: |
|
214 | compiler_yacc_impl_clean: | |
215 | compiler_lex_make_all: |
|
215 | compiler_lex_make_all: | |
216 | compiler_lex_clean: |
|
216 | compiler_lex_clean: | |
217 | compiler_clean: |
|
217 | compiler_clean: | |
218 |
|
218 | |||
219 | ####### Compile |
|
219 | ####### Compile | |
220 |
|
220 | |||
221 | obj/wf_handler.o: ../src/wf_handler.c |
|
221 | obj/wf_handler.o: ../src/wf_handler.c | |
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c |
|
222 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c | |
223 |
|
223 | |||
224 | obj/tc_handler.o: ../src/tc_handler.c |
|
224 | obj/tc_handler.o: ../src/tc_handler.c | |
225 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c |
|
225 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c | |
226 |
|
226 | |||
227 | obj/fsw_misc.o: ../src/fsw_misc.c |
|
227 | obj/fsw_misc.o: ../src/fsw_misc.c | |
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c |
|
228 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c | |
229 |
|
229 | |||
230 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c |
|
230 | obj/fsw_init.o: ../src/fsw_init.c ../src/fsw_config.c | |
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c |
|
231 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c | |
232 |
|
232 | |||
233 | obj/fsw_globals.o: ../src/fsw_globals.c |
|
233 | obj/fsw_globals.o: ../src/fsw_globals.c | |
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c |
|
234 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c | |
235 |
|
235 | |||
236 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c |
|
236 | obj/fsw_spacewire.o: ../src/fsw_spacewire.c | |
237 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c |
|
237 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_spacewire.o ../src/fsw_spacewire.c | |
238 |
|
238 | |||
239 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c |
|
239 | obj/tc_load_dump_parameters.o: ../src/tc_load_dump_parameters.c | |
240 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c |
|
240 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_load_dump_parameters.o ../src/tc_load_dump_parameters.c | |
241 |
|
241 | |||
242 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c |
|
242 | obj/tm_lfr_tc_exe.o: ../src/tm_lfr_tc_exe.c | |
243 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c |
|
243 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tm_lfr_tc_exe.o ../src/tm_lfr_tc_exe.c | |
244 |
|
244 | |||
245 | obj/tc_acceptance.o: ../src/tc_acceptance.c |
|
245 | obj/tc_acceptance.o: ../src/tc_acceptance.c | |
246 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c |
|
246 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_acceptance.o ../src/tc_acceptance.c | |
247 |
|
247 | |||
248 | obj/fsw_processing.o: ../src/processing/fsw_processing.c |
|
248 | obj/fsw_processing.o: ../src/processing/fsw_processing.c | |
249 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c |
|
249 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/processing/fsw_processing.c | |
250 |
|
250 | |||
251 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c |
|
251 | obj/avf0_prc0.o: ../src/processing/avf0_prc0.c | |
252 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c |
|
252 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf0_prc0.o ../src/processing/avf0_prc0.c | |
253 |
|
253 | |||
254 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c |
|
254 | obj/avf1_prc1.o: ../src/processing/avf1_prc1.c | |
255 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c |
|
255 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf1_prc1.o ../src/processing/avf1_prc1.c | |
256 |
|
256 | |||
257 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c |
|
257 | obj/avf2_prc2.o: ../src/processing/avf2_prc2.c | |
258 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c |
|
258 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/avf2_prc2.o ../src/processing/avf2_prc2.c | |
259 |
|
259 | |||
260 | obj/lfr_cpu_usage_report.o: ../src/lfr_cpu_usage_report.c |
|
260 | obj/lfr_cpu_usage_report.o: ../src/lfr_cpu_usage_report.c | |
261 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/lfr_cpu_usage_report.o ../src/lfr_cpu_usage_report.c |
|
261 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/lfr_cpu_usage_report.o ../src/lfr_cpu_usage_report.c | |
262 |
|
262 | |||
263 | obj/basic_parameters.o: ../src/LFR_basic-parameters/basic_parameters.c |
|
263 | obj/basic_parameters.o: ../src/LFR_basic-parameters/basic_parameters.c | |
264 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/LFR_basic-parameters/basic_parameters.c |
|
264 | $(CC) -c $(CFLAGS) $(INCPATH) -o obj/basic_parameters.o ../src/LFR_basic-parameters/basic_parameters.c | |
265 |
|
265 | |||
266 | ####### Install |
|
266 | ####### Install | |
267 |
|
267 | |||
268 | install: FORCE |
|
268 | install: FORCE | |
269 |
|
269 | |||
270 | uninstall: FORCE |
|
270 | uninstall: FORCE | |
271 |
|
271 | |||
272 | FORCE: |
|
272 | FORCE: | |
273 |
|
273 |
@@ -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-06-1 |
|
3 | <!-- Written by QtCreator 3.0.1, 2014-06-17T07:01:31. --> | |
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,782 +1,782 | |||||
1 | /** This is the RTEMS initialization module. |
|
1 | /** This is the RTEMS initialization module. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | * This module contains two very different information: |
|
6 | * This module contains two very different information: | |
7 | * - specific instructions to configure the compilation of the RTEMS executive |
|
7 | * - specific instructions to configure the compilation of the RTEMS executive | |
8 | * - functions related to the fligth softwre initialization, especially the INIT RTEMS task |
|
8 | * - functions related to the fligth softwre initialization, especially the INIT RTEMS task | |
9 | * |
|
9 | * | |
10 | */ |
|
10 | */ | |
11 |
|
11 | |||
12 | //************************* |
|
12 | //************************* | |
13 | // GPL reminder to be added |
|
13 | // GPL reminder to be added | |
14 | //************************* |
|
14 | //************************* | |
15 |
|
15 | |||
16 | #include <rtems.h> |
|
16 | #include <rtems.h> | |
17 |
|
17 | |||
18 | /* configuration information */ |
|
18 | /* configuration information */ | |
19 |
|
19 | |||
20 | #define CONFIGURE_INIT |
|
20 | #define CONFIGURE_INIT | |
21 |
|
21 | |||
22 | #include <bsp.h> /* for device driver prototypes */ |
|
22 | #include <bsp.h> /* for device driver prototypes */ | |
23 |
|
23 | |||
24 | /* configuration information */ |
|
24 | /* configuration information */ | |
25 |
|
25 | |||
26 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
26 | #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
27 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
27 | #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
28 |
|
28 | |||
29 | #define CONFIGURE_MAXIMUM_TASKS 20 |
|
29 | #define CONFIGURE_MAXIMUM_TASKS 20 | |
30 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE |
|
30 | #define CONFIGURE_RTEMS_INIT_TASKS_TABLE | |
31 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) |
|
31 | #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE) | |
32 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 |
|
32 | #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32 | |
33 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 |
|
33 | #define CONFIGURE_INIT_TASK_PRIORITY 1 // instead of 100 | |
34 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) |
|
34 | #define CONFIGURE_INIT_TASK_MODE (RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT) | |
35 | #define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT) |
|
35 | #define CONFIGURE_INIT_TASK_ATTRIBUTES (RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT) | |
36 | #define CONFIGURE_MAXIMUM_DRIVERS 16 |
|
36 | #define CONFIGURE_MAXIMUM_DRIVERS 16 | |
37 | #define CONFIGURE_MAXIMUM_PERIODS 5 |
|
37 | #define CONFIGURE_MAXIMUM_PERIODS 5 | |
38 | #define CONFIGURE_MAXIMUM_TIMERS 5 // STAT (1s), send SWF (0.3s), send CWF3 (1s) |
|
38 | #define CONFIGURE_MAXIMUM_TIMERS 5 // STAT (1s), send SWF (0.3s), send CWF3 (1s) | |
39 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 5 |
|
39 | #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 5 | |
40 | #ifdef PRINT_STACK_REPORT |
|
40 | #ifdef PRINT_STACK_REPORT | |
41 | #define CONFIGURE_STACK_CHECKER_ENABLED |
|
41 | #define CONFIGURE_STACK_CHECKER_ENABLED | |
42 | #endif |
|
42 | #endif | |
43 |
|
43 | |||
44 | #include <rtems/confdefs.h> |
|
44 | #include <rtems/confdefs.h> | |
45 |
|
45 | |||
46 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ |
|
46 | /* If --drvmgr was enabled during the configuration of the RTEMS kernel */ | |
47 | #ifdef RTEMS_DRVMGR_STARTUP |
|
47 | #ifdef RTEMS_DRVMGR_STARTUP | |
48 | #ifdef LEON3 |
|
48 | #ifdef LEON3 | |
49 | /* Add Timer and UART Driver */ |
|
49 | /* Add Timer and UART Driver */ | |
50 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER |
|
50 | #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER | |
51 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER |
|
51 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER | |
52 | #endif |
|
52 | #endif | |
53 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER |
|
53 | #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER | |
54 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART |
|
54 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART | |
55 | #endif |
|
55 | #endif | |
56 | #endif |
|
56 | #endif | |
57 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ |
|
57 | #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */ | |
58 | #include <drvmgr/drvmgr_confdefs.h> |
|
58 | #include <drvmgr/drvmgr_confdefs.h> | |
59 | #endif |
|
59 | #endif | |
60 |
|
60 | |||
61 | #include "fsw_init.h" |
|
61 | #include "fsw_init.h" | |
62 | #include "fsw_config.c" |
|
62 | #include "fsw_config.c" | |
63 |
|
63 | |||
64 | rtems_task Init( rtems_task_argument ignored ) |
|
64 | rtems_task Init( rtems_task_argument ignored ) | |
65 | { |
|
65 | { | |
66 | /** This is the RTEMS INIT taks, it the first task launched by the system. |
|
66 | /** This is the RTEMS INIT taks, it the first task launched by the system. | |
67 | * |
|
67 | * | |
68 | * @param unused is the starting argument of the RTEMS task |
|
68 | * @param unused is the starting argument of the RTEMS task | |
69 | * |
|
69 | * | |
70 | * The INIT task create and run all other RTEMS tasks. |
|
70 | * The INIT task create and run all other RTEMS tasks. | |
71 | * |
|
71 | * | |
72 | */ |
|
72 | */ | |
73 |
|
73 | |||
74 | unsigned char *vhdlVersion; |
|
74 | unsigned char *vhdlVersion; | |
75 |
|
75 | |||
76 | reset_local_time(); |
|
76 | reset_local_time(); | |
77 |
|
77 | |||
78 | rtems_cpu_usage_reset(); |
|
78 | rtems_cpu_usage_reset(); | |
79 |
|
79 | |||
80 | rtems_status_code status; |
|
80 | rtems_status_code status; | |
81 | rtems_status_code status_spw; |
|
81 | rtems_status_code status_spw; | |
82 | rtems_isr_entry old_isr_handler; |
|
82 | rtems_isr_entry old_isr_handler; | |
83 |
|
83 | |||
84 | // UART settings |
|
84 | // UART settings | |
85 | send_console_outputs_on_apbuart_port(); |
|
85 | send_console_outputs_on_apbuart_port(); | |
86 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); |
|
86 | set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE); | |
87 | enable_apbuart_transmitter(); |
|
87 | enable_apbuart_transmitter(); | |
88 | DEBUG_PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") |
|
88 | DEBUG_PRINTF("\n\n\n\n\nIn INIT *** Now the console is on port COM1\n") | |
89 |
|
89 | |||
90 | PRINTF("\n\n\n\n\n") |
|
90 | PRINTF("\n\n\n\n\n") | |
91 | PRINTF("*************************\n") |
|
91 | PRINTF("*************************\n") | |
92 | PRINTF("** LFR Flight Software **\n") |
|
92 | PRINTF("** LFR Flight Software **\n") | |
93 | PRINTF1("** %d.", SW_VERSION_N1) |
|
93 | PRINTF1("** %d.", SW_VERSION_N1) | |
94 | PRINTF1("%d." , SW_VERSION_N2) |
|
94 | PRINTF1("%d." , SW_VERSION_N2) | |
95 | PRINTF1("%d." , SW_VERSION_N3) |
|
95 | PRINTF1("%d." , SW_VERSION_N3) | |
96 | PRINTF1("%d **\n", SW_VERSION_N4) |
|
96 | PRINTF1("%d **\n", SW_VERSION_N4) | |
97 |
|
97 | |||
98 | vhdlVersion = (unsigned char *) (REGS_ADDR_VHDL_VERSION); |
|
98 | vhdlVersion = (unsigned char *) (REGS_ADDR_VHDL_VERSION); | |
99 | PRINTF("** VHDL **\n") |
|
99 | PRINTF("** VHDL **\n") | |
100 | PRINTF1("** %d.", vhdlVersion[1]) |
|
100 | PRINTF1("** %d.", vhdlVersion[1]) | |
101 | PRINTF1("%d." , vhdlVersion[2]) |
|
101 | PRINTF1("%d." , vhdlVersion[2]) | |
102 | PRINTF1("%d **\n", vhdlVersion[3]) |
|
102 | PRINTF1("%d **\n", vhdlVersion[3]) | |
103 | PRINTF("*************************\n") |
|
103 | PRINTF("*************************\n") | |
104 | PRINTF("\n\n") |
|
104 | PRINTF("\n\n") | |
105 |
|
105 | |||
106 | init_parameter_dump(); |
|
106 | init_parameter_dump(); | |
107 | init_local_mode_parameters(); |
|
107 | init_local_mode_parameters(); | |
108 | init_housekeeping_parameters(); |
|
108 | init_housekeeping_parameters(); | |
109 |
|
109 | |||
110 | // waveform picker initialization |
|
110 | // waveform picker initialization | |
111 | WFP_init_rings(); // initialize the waveform rings |
|
111 | WFP_init_rings(); // initialize the waveform rings | |
112 | WFP_reset_current_ring_nodes(); |
|
112 | WFP_reset_current_ring_nodes(); | |
113 | reset_waveform_picker_regs(); |
|
113 | reset_waveform_picker_regs(); | |
114 |
|
114 | |||
115 | // spectral matrices initialization |
|
115 | // spectral matrices initialization | |
116 | SM_init_rings(); // initialize spectral matrices rings |
|
116 | SM_init_rings(); // initialize spectral matrices rings | |
117 | SM_reset_current_ring_nodes(); |
|
117 | SM_reset_current_ring_nodes(); | |
118 | reset_spectral_matrix_regs(); |
|
118 | reset_spectral_matrix_regs(); | |
119 |
|
119 | |||
120 | updateLFRCurrentMode(); |
|
120 | updateLFRCurrentMode(); | |
121 |
|
121 | |||
122 | BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode) |
|
122 | BOOT_PRINTF1("in INIT *** lfrCurrentMode is %d\n", lfrCurrentMode) | |
123 |
|
123 | |||
124 | create_names(); // create all names |
|
124 | create_names(); // create all names | |
125 |
|
125 | |||
126 | status = create_message_queues(); // create message queues |
|
126 | status = create_message_queues(); // create message queues | |
127 | if (status != RTEMS_SUCCESSFUL) |
|
127 | if (status != RTEMS_SUCCESSFUL) | |
128 | { |
|
128 | { | |
129 | PRINTF1("in INIT *** ERR in create_message_queues, code %d", status) |
|
129 | PRINTF1("in INIT *** ERR in create_message_queues, code %d", status) | |
130 | } |
|
130 | } | |
131 |
|
131 | |||
132 | status = create_all_tasks(); // create all tasks |
|
132 | status = create_all_tasks(); // create all tasks | |
133 | if (status != RTEMS_SUCCESSFUL) |
|
133 | if (status != RTEMS_SUCCESSFUL) | |
134 | { |
|
134 | { | |
135 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d\n", status) |
|
135 | PRINTF1("in INIT *** ERR in create_all_tasks, code %d\n", status) | |
136 | } |
|
136 | } | |
137 |
|
137 | |||
138 | // ************************** |
|
138 | // ************************** | |
139 | // <SPACEWIRE INITIALIZATION> |
|
139 | // <SPACEWIRE INITIALIZATION> | |
140 | grspw_timecode_callback = &timecode_irq_handler; |
|
140 | grspw_timecode_callback = &timecode_irq_handler; | |
141 |
|
141 | |||
142 | status_spw = spacewire_open_link(); // (1) open the link |
|
142 | status_spw = spacewire_open_link(); // (1) open the link | |
143 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
143 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
144 | { |
|
144 | { | |
145 | PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw ) |
|
145 | PRINTF1("in INIT *** ERR spacewire_open_link code %d\n", status_spw ) | |
146 | } |
|
146 | } | |
147 |
|
147 | |||
148 | if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link |
|
148 | if ( status_spw == RTEMS_SUCCESSFUL ) // (2) configure the link | |
149 | { |
|
149 | { | |
150 | status_spw = spacewire_configure_link( fdSPW ); |
|
150 | status_spw = spacewire_configure_link( fdSPW ); | |
151 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
151 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
152 | { |
|
152 | { | |
153 | PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw ) |
|
153 | PRINTF1("in INIT *** ERR spacewire_configure_link code %d\n", status_spw ) | |
154 | } |
|
154 | } | |
155 | } |
|
155 | } | |
156 |
|
156 | |||
157 | if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link |
|
157 | if ( status_spw == RTEMS_SUCCESSFUL) // (3) start the link | |
158 | { |
|
158 | { | |
159 | status_spw = spacewire_start_link( fdSPW ); |
|
159 | status_spw = spacewire_start_link( fdSPW ); | |
160 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
160 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
161 | { |
|
161 | { | |
162 | PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw ) |
|
162 | PRINTF1("in INIT *** ERR spacewire_start_link code %d\n", status_spw ) | |
163 | } |
|
163 | } | |
164 | } |
|
164 | } | |
165 | // </SPACEWIRE INITIALIZATION> |
|
165 | // </SPACEWIRE INITIALIZATION> | |
166 | // *************************** |
|
166 | // *************************** | |
167 |
|
167 | |||
168 | status = start_all_tasks(); // start all tasks |
|
168 | status = start_all_tasks(); // start all tasks | |
169 | if (status != RTEMS_SUCCESSFUL) |
|
169 | if (status != RTEMS_SUCCESSFUL) | |
170 | { |
|
170 | { | |
171 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) |
|
171 | PRINTF1("in INIT *** ERR in start_all_tasks, code %d", status) | |
172 | } |
|
172 | } | |
173 |
|
173 | |||
174 | // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization |
|
174 | // start RECV and SEND *AFTER* SpaceWire Initialization, due to the timeout of the start call during the initialization | |
175 | status = start_recv_send_tasks(); |
|
175 | status = start_recv_send_tasks(); | |
176 | if ( status != RTEMS_SUCCESSFUL ) |
|
176 | if ( status != RTEMS_SUCCESSFUL ) | |
177 | { |
|
177 | { | |
178 | PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status ) |
|
178 | PRINTF1("in INIT *** ERR start_recv_send_tasks code %d\n", status ) | |
179 | } |
|
179 | } | |
180 |
|
180 | |||
181 | // suspend science tasks, they will be restarted later depending on the mode |
|
181 | // suspend science tasks, they will be restarted later depending on the mode | |
182 | status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY) |
|
182 | status = suspend_science_tasks(); // suspend science tasks (not done in stop_current_mode if current mode = STANDBY) | |
183 | if (status != RTEMS_SUCCESSFUL) |
|
183 | if (status != RTEMS_SUCCESSFUL) | |
184 | { |
|
184 | { | |
185 | PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status) |
|
185 | PRINTF1("in INIT *** in suspend_science_tasks *** ERR code: %d\n", status) | |
186 | } |
|
186 | } | |
187 |
|
187 | |||
188 | //****************************** |
|
188 | //****************************** | |
189 | // <SPECTRAL MATRICES SIMULATOR> |
|
189 | // <SPECTRAL MATRICES SIMULATOR> | |
190 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); |
|
190 | LEON_Mask_interrupt( IRQ_SM_SIMULATOR ); | |
191 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, |
|
191 | configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR, | |
192 | IRQ_SPARC_SM_SIMULATOR, spectral_matrices_isr_simu ); |
|
192 | IRQ_SPARC_SM_SIMULATOR, spectral_matrices_isr_simu ); | |
193 | // </SPECTRAL MATRICES SIMULATOR> |
|
193 | // </SPECTRAL MATRICES SIMULATOR> | |
194 | //******************************* |
|
194 | //******************************* | |
195 |
|
195 | |||
196 | // configure IRQ handling for the waveform picker unit |
|
196 | // configure IRQ handling for the waveform picker unit | |
197 | status = rtems_interrupt_catch( waveforms_isr, |
|
197 | status = rtems_interrupt_catch( waveforms_isr, | |
198 | IRQ_SPARC_WAVEFORM_PICKER, |
|
198 | IRQ_SPARC_WAVEFORM_PICKER, | |
199 | &old_isr_handler) ; |
|
199 | &old_isr_handler) ; | |
200 | // configure IRQ handling for the spectral matrices unit |
|
200 | // configure IRQ handling for the spectral matrices unit | |
201 | status = rtems_interrupt_catch( spectral_matrices_isr, |
|
201 | status = rtems_interrupt_catch( spectral_matrices_isr, | |
202 | IRQ_SPARC_SPECTRAL_MATRIX, |
|
202 | IRQ_SPARC_SPECTRAL_MATRIX, | |
203 | &old_isr_handler) ; |
|
203 | &old_isr_handler) ; | |
204 |
|
204 | |||
205 | // if the spacewire link is not up then send an event to the SPIQ task for link recovery |
|
205 | // if the spacewire link is not up then send an event to the SPIQ task for link recovery | |
206 | if ( status_spw != RTEMS_SUCCESSFUL ) |
|
206 | if ( status_spw != RTEMS_SUCCESSFUL ) | |
207 | { |
|
207 | { | |
208 | status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT ); |
|
208 | status = rtems_event_send( Task_id[TASKID_SPIQ], SPW_LINKERR_EVENT ); | |
209 | if ( status != RTEMS_SUCCESSFUL ) { |
|
209 | if ( status != RTEMS_SUCCESSFUL ) { | |
210 | PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status ) |
|
210 | PRINTF1("in INIT *** ERR rtems_event_send to SPIQ code %d\n", status ) | |
211 | } |
|
211 | } | |
212 | } |
|
212 | } | |
213 |
|
213 | |||
214 | BOOT_PRINTF("delete INIT\n") |
|
214 | BOOT_PRINTF("delete INIT\n") | |
215 |
|
215 | |||
216 | send_dumb_hk(); |
|
216 | send_dumb_hk(); | |
217 |
|
217 | |||
218 | status = rtems_task_delete(RTEMS_SELF); |
|
218 | status = rtems_task_delete(RTEMS_SELF); | |
219 |
|
219 | |||
220 | } |
|
220 | } | |
221 |
|
221 | |||
222 | void init_local_mode_parameters( void ) |
|
222 | void init_local_mode_parameters( void ) | |
223 | { |
|
223 | { | |
224 | /** This function initialize the param_local global variable with default values. |
|
224 | /** This function initialize the param_local global variable with default values. | |
225 | * |
|
225 | * | |
226 | */ |
|
226 | */ | |
227 |
|
227 | |||
228 | unsigned int i; |
|
228 | unsigned int i; | |
229 |
|
229 | |||
230 | // LOCAL PARAMETERS |
|
230 | // LOCAL PARAMETERS | |
231 |
|
231 | |||
232 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) |
|
232 | BOOT_PRINTF1("local_sbm1_nb_cwf_max %d \n", param_local.local_sbm1_nb_cwf_max) | |
233 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) |
|
233 | BOOT_PRINTF1("local_sbm2_nb_cwf_max %d \n", param_local.local_sbm2_nb_cwf_max) | |
234 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) |
|
234 | BOOT_PRINTF1("nb_interrupt_f0_MAX = %d\n", param_local.local_nb_interrupt_f0_MAX) | |
235 |
|
235 | |||
236 | // init sequence counters |
|
236 | // init sequence counters | |
237 |
|
237 | |||
238 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) |
|
238 | for(i = 0; i<SEQ_CNT_NB_DEST_ID; i++) | |
239 | { |
|
239 | { | |
240 | sequenceCounters_TC_EXE[i] = 0x00; |
|
240 | sequenceCounters_TC_EXE[i] = 0x00; | |
241 | } |
|
241 | } | |
242 | sequenceCounters_SCIENCE_NORMAL_BURST = 0x00; |
|
242 | sequenceCounters_SCIENCE_NORMAL_BURST = 0x00; | |
243 | sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00; |
|
243 | sequenceCounters_SCIENCE_SBM1_SBM2 = 0x00; | |
244 | sequenceCounterHK = TM_PACKET_SEQ_CTRL_STANDALONE << 8; |
|
244 | sequenceCounterHK = TM_PACKET_SEQ_CTRL_STANDALONE << 8; | |
245 | sequenceCounterParameterDump = TM_PACKET_SEQ_CTRL_STANDALONE << 8; |
|
245 | sequenceCounterParameterDump = TM_PACKET_SEQ_CTRL_STANDALONE << 8; | |
246 | } |
|
246 | } | |
247 |
|
247 | |||
248 | void reset_local_time( void ) |
|
248 | void reset_local_time( void ) | |
249 | { |
|
249 | { | |
250 | time_management_regs->ctrl = 0x02; // software reset, coarse time = 0x80000000 |
|
250 | time_management_regs->ctrl = 0x02; // software reset, coarse time = 0x80000000 | |
251 | } |
|
251 | } | |
252 |
|
252 | |||
253 | void create_names( void ) // create all names for tasks and queues |
|
253 | void create_names( void ) // create all names for tasks and queues | |
254 | { |
|
254 | { | |
255 | /** This function creates all RTEMS names used in the software for tasks and queues. |
|
255 | /** This function creates all RTEMS names used in the software for tasks and queues. | |
256 | * |
|
256 | * | |
257 | * @return RTEMS directive status codes: |
|
257 | * @return RTEMS directive status codes: | |
258 | * - RTEMS_SUCCESSFUL - successful completion |
|
258 | * - RTEMS_SUCCESSFUL - successful completion | |
259 | * |
|
259 | * | |
260 | */ |
|
260 | */ | |
261 |
|
261 | |||
262 | // task names |
|
262 | // task names | |
263 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); |
|
263 | Task_name[TASKID_RECV] = rtems_build_name( 'R', 'E', 'C', 'V' ); | |
264 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); |
|
264 | Task_name[TASKID_ACTN] = rtems_build_name( 'A', 'C', 'T', 'N' ); | |
265 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); |
|
265 | Task_name[TASKID_SPIQ] = rtems_build_name( 'S', 'P', 'I', 'Q' ); | |
266 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); |
|
266 | Task_name[TASKID_STAT] = rtems_build_name( 'S', 'T', 'A', 'T' ); | |
267 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); |
|
267 | Task_name[TASKID_AVF0] = rtems_build_name( 'A', 'V', 'F', '0' ); | |
268 | Task_name[TASKID_SWBD] = rtems_build_name( 'S', 'W', 'B', 'D' ); |
|
268 | Task_name[TASKID_SWBD] = rtems_build_name( 'S', 'W', 'B', 'D' ); | |
269 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); |
|
269 | Task_name[TASKID_WFRM] = rtems_build_name( 'W', 'F', 'R', 'M' ); | |
270 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); |
|
270 | Task_name[TASKID_DUMB] = rtems_build_name( 'D', 'U', 'M', 'B' ); | |
271 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
271 | Task_name[TASKID_HOUS] = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
272 | Task_name[TASKID_PRC0] = rtems_build_name( 'P', 'R', 'C', '0' ); |
|
272 | Task_name[TASKID_PRC0] = rtems_build_name( 'P', 'R', 'C', '0' ); | |
273 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); |
|
273 | Task_name[TASKID_CWF3] = rtems_build_name( 'C', 'W', 'F', '3' ); | |
274 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); |
|
274 | Task_name[TASKID_CWF2] = rtems_build_name( 'C', 'W', 'F', '2' ); | |
275 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); |
|
275 | Task_name[TASKID_CWF1] = rtems_build_name( 'C', 'W', 'F', '1' ); | |
276 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); |
|
276 | Task_name[TASKID_SEND] = rtems_build_name( 'S', 'E', 'N', 'D' ); | |
277 | Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' ); |
|
277 | Task_name[TASKID_WTDG] = rtems_build_name( 'W', 'T', 'D', 'G' ); | |
278 | Task_name[TASKID_AVF1] = rtems_build_name( 'A', 'V', 'F', '1' ); |
|
278 | Task_name[TASKID_AVF1] = rtems_build_name( 'A', 'V', 'F', '1' ); | |
279 | Task_name[TASKID_PRC1] = rtems_build_name( 'P', 'R', 'C', '1' ); |
|
279 | Task_name[TASKID_PRC1] = rtems_build_name( 'P', 'R', 'C', '1' ); | |
280 | Task_name[TASKID_AVF2] = rtems_build_name( 'A', 'V', 'F', '2' ); |
|
280 | Task_name[TASKID_AVF2] = rtems_build_name( 'A', 'V', 'F', '2' ); | |
281 | Task_name[TASKID_PRC2] = rtems_build_name( 'P', 'R', 'C', '2' ); |
|
281 | Task_name[TASKID_PRC2] = rtems_build_name( 'P', 'R', 'C', '2' ); | |
282 |
|
282 | |||
283 | // rate monotonic period names |
|
283 | // rate monotonic period names | |
284 | name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' ); |
|
284 | name_hk_rate_monotonic = rtems_build_name( 'H', 'O', 'U', 'S' ); | |
285 |
|
285 | |||
286 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' ); |
|
286 | misc_name[QUEUE_RECV] = rtems_build_name( 'Q', '_', 'R', 'V' ); | |
287 | misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' ); |
|
287 | misc_name[QUEUE_SEND] = rtems_build_name( 'Q', '_', 'S', 'D' ); | |
288 | misc_name[QUEUE_PRC0] = rtems_build_name( 'Q', '_', 'P', '0' ); |
|
288 | misc_name[QUEUE_PRC0] = rtems_build_name( 'Q', '_', 'P', '0' ); | |
289 | misc_name[QUEUE_PRC1] = rtems_build_name( 'Q', '_', 'P', '1' ); |
|
289 | misc_name[QUEUE_PRC1] = rtems_build_name( 'Q', '_', 'P', '1' ); | |
290 | misc_name[QUEUE_PRC2] = rtems_build_name( 'Q', '_', 'P', '2' ); |
|
290 | misc_name[QUEUE_PRC2] = rtems_build_name( 'Q', '_', 'P', '2' ); | |
291 | } |
|
291 | } | |
292 |
|
292 | |||
293 | int create_all_tasks( void ) // create all tasks which run in the software |
|
293 | int create_all_tasks( void ) // create all tasks which run in the software | |
294 | { |
|
294 | { | |
295 | /** This function creates all RTEMS tasks used in the software. |
|
295 | /** This function creates all RTEMS tasks used in the software. | |
296 | * |
|
296 | * | |
297 | * @return RTEMS directive status codes: |
|
297 | * @return RTEMS directive status codes: | |
298 | * - RTEMS_SUCCESSFUL - task created successfully |
|
298 | * - RTEMS_SUCCESSFUL - task created successfully | |
299 | * - RTEMS_INVALID_ADDRESS - id is NULL |
|
299 | * - RTEMS_INVALID_ADDRESS - id is NULL | |
300 | * - RTEMS_INVALID_NAME - invalid task name |
|
300 | * - RTEMS_INVALID_NAME - invalid task name | |
301 | * - RTEMS_INVALID_PRIORITY - invalid task priority |
|
301 | * - RTEMS_INVALID_PRIORITY - invalid task priority | |
302 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured |
|
302 | * - RTEMS_MP_NOT_CONFIGURED - multiprocessing not configured | |
303 | * - RTEMS_TOO_MANY - too many tasks created |
|
303 | * - RTEMS_TOO_MANY - too many tasks created | |
304 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context |
|
304 | * - RTEMS_UNSATISFIED - not enough memory for stack/FP context | |
305 | * - RTEMS_TOO_MANY - too many global objects |
|
305 | * - RTEMS_TOO_MANY - too many global objects | |
306 | * |
|
306 | * | |
307 | */ |
|
307 | */ | |
308 |
|
308 | |||
309 | rtems_status_code status; |
|
309 | rtems_status_code status; | |
310 |
|
310 | |||
311 | //********** |
|
311 | //********** | |
312 | // SPACEWIRE |
|
312 | // SPACEWIRE | |
313 | // RECV |
|
313 | // RECV | |
314 | status = rtems_task_create( |
|
314 | status = rtems_task_create( | |
315 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, |
|
315 | Task_name[TASKID_RECV], TASK_PRIORITY_RECV, RTEMS_MINIMUM_STACK_SIZE, | |
316 | RTEMS_DEFAULT_MODES, |
|
316 | RTEMS_DEFAULT_MODES, | |
317 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] |
|
317 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_RECV] | |
318 | ); |
|
318 | ); | |
319 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
319 | if (status == RTEMS_SUCCESSFUL) // SEND | |
320 | { |
|
320 | { | |
321 | status = rtems_task_create( |
|
321 | status = rtems_task_create( | |
322 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, |
|
322 | Task_name[TASKID_SEND], TASK_PRIORITY_SEND, RTEMS_MINIMUM_STACK_SIZE, | |
323 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
323 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
324 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] |
|
324 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SEND] | |
325 | ); |
|
325 | ); | |
326 | } |
|
326 | } | |
327 | if (status == RTEMS_SUCCESSFUL) // WTDG |
|
327 | if (status == RTEMS_SUCCESSFUL) // WTDG | |
328 | { |
|
328 | { | |
329 | status = rtems_task_create( |
|
329 | status = rtems_task_create( | |
330 | Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE, |
|
330 | Task_name[TASKID_WTDG], TASK_PRIORITY_WTDG, RTEMS_MINIMUM_STACK_SIZE, | |
331 | RTEMS_DEFAULT_MODES, |
|
331 | RTEMS_DEFAULT_MODES, | |
332 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG] |
|
332 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_WTDG] | |
333 | ); |
|
333 | ); | |
334 | } |
|
334 | } | |
335 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
335 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
336 | { |
|
336 | { | |
337 | status = rtems_task_create( |
|
337 | status = rtems_task_create( | |
338 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, |
|
338 | Task_name[TASKID_ACTN], TASK_PRIORITY_ACTN, RTEMS_MINIMUM_STACK_SIZE, | |
339 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
339 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
340 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] |
|
340 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_ACTN] | |
341 | ); |
|
341 | ); | |
342 | } |
|
342 | } | |
343 | if (status == RTEMS_SUCCESSFUL) // SPIQ |
|
343 | if (status == RTEMS_SUCCESSFUL) // SPIQ | |
344 | { |
|
344 | { | |
345 | status = rtems_task_create( |
|
345 | status = rtems_task_create( | |
346 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, |
|
346 | Task_name[TASKID_SPIQ], TASK_PRIORITY_SPIQ, RTEMS_MINIMUM_STACK_SIZE, | |
347 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
347 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
348 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] |
|
348 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_SPIQ] | |
349 | ); |
|
349 | ); | |
350 | } |
|
350 | } | |
351 |
|
351 | |||
352 | //****************** |
|
352 | //****************** | |
353 | // SPECTRAL MATRICES |
|
353 | // SPECTRAL MATRICES | |
354 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
354 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
355 | { |
|
355 | { | |
356 | status = rtems_task_create( |
|
356 | status = rtems_task_create( | |
357 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, |
|
357 | Task_name[TASKID_AVF0], TASK_PRIORITY_AVF0, RTEMS_MINIMUM_STACK_SIZE, | |
358 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
358 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
359 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] |
|
359 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF0] | |
360 | ); |
|
360 | ); | |
361 | } |
|
361 | } | |
362 | if (status == RTEMS_SUCCESSFUL) // PRC0 |
|
362 | if (status == RTEMS_SUCCESSFUL) // PRC0 | |
363 | { |
|
363 | { | |
364 | status = rtems_task_create( |
|
364 | status = rtems_task_create( | |
365 | Task_name[TASKID_PRC0], TASK_PRIORITY_PRC0, RTEMS_MINIMUM_STACK_SIZE * 2, |
|
365 | Task_name[TASKID_PRC0], TASK_PRIORITY_PRC0, RTEMS_MINIMUM_STACK_SIZE * 2, | |
366 | RTEMS_DEFAULT_MODES, |
|
366 | RTEMS_DEFAULT_MODES, | |
367 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC0] |
|
367 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC0] | |
368 | ); |
|
368 | ); | |
369 | } |
|
369 | } | |
370 | if (status == RTEMS_SUCCESSFUL) // AVF1 |
|
370 | if (status == RTEMS_SUCCESSFUL) // AVF1 | |
371 | { |
|
371 | { | |
372 | status = rtems_task_create( |
|
372 | status = rtems_task_create( | |
373 | Task_name[TASKID_AVF1], TASK_PRIORITY_AVF1, RTEMS_MINIMUM_STACK_SIZE, |
|
373 | Task_name[TASKID_AVF1], TASK_PRIORITY_AVF1, RTEMS_MINIMUM_STACK_SIZE, | |
374 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
374 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
375 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF1] |
|
375 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF1] | |
376 | ); |
|
376 | ); | |
377 | } |
|
377 | } | |
378 | if (status == RTEMS_SUCCESSFUL) // PRC1 |
|
378 | if (status == RTEMS_SUCCESSFUL) // PRC1 | |
379 | { |
|
379 | { | |
380 | status = rtems_task_create( |
|
380 | status = rtems_task_create( | |
381 | Task_name[TASKID_PRC1], TASK_PRIORITY_PRC1, RTEMS_MINIMUM_STACK_SIZE * 2, |
|
381 | Task_name[TASKID_PRC1], TASK_PRIORITY_PRC1, RTEMS_MINIMUM_STACK_SIZE * 2, | |
382 | RTEMS_DEFAULT_MODES, |
|
382 | RTEMS_DEFAULT_MODES, | |
383 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC1] |
|
383 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC1] | |
384 | ); |
|
384 | ); | |
385 | } |
|
385 | } | |
386 | if (status == RTEMS_SUCCESSFUL) // AVF2 |
|
386 | if (status == RTEMS_SUCCESSFUL) // AVF2 | |
387 | { |
|
387 | { | |
388 | status = rtems_task_create( |
|
388 | status = rtems_task_create( | |
389 | Task_name[TASKID_AVF2], TASK_PRIORITY_AVF2, RTEMS_MINIMUM_STACK_SIZE, |
|
389 | Task_name[TASKID_AVF2], TASK_PRIORITY_AVF2, RTEMS_MINIMUM_STACK_SIZE, | |
390 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
390 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
391 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF2] |
|
391 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_AVF2] | |
392 | ); |
|
392 | ); | |
393 | } |
|
393 | } | |
394 | if (status == RTEMS_SUCCESSFUL) // PRC2 |
|
394 | if (status == RTEMS_SUCCESSFUL) // PRC2 | |
395 | { |
|
395 | { | |
396 | status = rtems_task_create( |
|
396 | status = rtems_task_create( | |
397 | Task_name[TASKID_PRC2], TASK_PRIORITY_PRC2, RTEMS_MINIMUM_STACK_SIZE * 2, |
|
397 | Task_name[TASKID_PRC2], TASK_PRIORITY_PRC2, RTEMS_MINIMUM_STACK_SIZE * 2, | |
398 | RTEMS_DEFAULT_MODES, |
|
398 | RTEMS_DEFAULT_MODES, | |
399 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC2] |
|
399 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_PRC2] | |
400 | ); |
|
400 | ); | |
401 | } |
|
401 | } | |
402 |
|
402 | |||
403 | //**************** |
|
403 | //**************** | |
404 | // WAVEFORM PICKER |
|
404 | // WAVEFORM PICKER | |
405 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
405 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
406 | { |
|
406 | { | |
407 | status = rtems_task_create( |
|
407 | status = rtems_task_create( | |
408 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, |
|
408 | Task_name[TASKID_WFRM], TASK_PRIORITY_WFRM, RTEMS_MINIMUM_STACK_SIZE, | |
409 | RTEMS_DEFAULT_MODES, |
|
409 | RTEMS_DEFAULT_MODES, | |
410 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] |
|
410 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_WFRM] | |
411 | ); |
|
411 | ); | |
412 | } |
|
412 | } | |
413 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
413 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
414 | { |
|
414 | { | |
415 | status = rtems_task_create( |
|
415 | status = rtems_task_create( | |
416 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, |
|
416 | Task_name[TASKID_CWF3], TASK_PRIORITY_CWF3, RTEMS_MINIMUM_STACK_SIZE, | |
417 | RTEMS_DEFAULT_MODES, |
|
417 | RTEMS_DEFAULT_MODES, | |
418 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF3] |
|
418 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF3] | |
419 | ); |
|
419 | ); | |
420 | } |
|
420 | } | |
421 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
421 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
422 | { |
|
422 | { | |
423 | status = rtems_task_create( |
|
423 | status = rtems_task_create( | |
424 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, |
|
424 | Task_name[TASKID_CWF2], TASK_PRIORITY_CWF2, RTEMS_MINIMUM_STACK_SIZE, | |
425 | RTEMS_DEFAULT_MODES, |
|
425 | RTEMS_DEFAULT_MODES, | |
426 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF2] |
|
426 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF2] | |
427 | ); |
|
427 | ); | |
428 | } |
|
428 | } | |
429 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
429 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
430 | { |
|
430 | { | |
431 | status = rtems_task_create( |
|
431 | status = rtems_task_create( | |
432 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, |
|
432 | Task_name[TASKID_CWF1], TASK_PRIORITY_CWF1, RTEMS_MINIMUM_STACK_SIZE, | |
433 | RTEMS_DEFAULT_MODES, |
|
433 | RTEMS_DEFAULT_MODES, | |
434 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF1] |
|
434 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_CWF1] | |
435 | ); |
|
435 | ); | |
436 | } |
|
436 | } | |
437 | if (status == RTEMS_SUCCESSFUL) // SWBD |
|
437 | if (status == RTEMS_SUCCESSFUL) // SWBD | |
438 | { |
|
438 | { | |
439 | status = rtems_task_create( |
|
439 | status = rtems_task_create( | |
440 | Task_name[TASKID_SWBD], TASK_PRIORITY_SWBD, RTEMS_MINIMUM_STACK_SIZE, |
|
440 | Task_name[TASKID_SWBD], TASK_PRIORITY_SWBD, RTEMS_MINIMUM_STACK_SIZE, | |
441 | RTEMS_DEFAULT_MODES, |
|
441 | RTEMS_DEFAULT_MODES, | |
442 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_SWBD] |
|
442 | RTEMS_DEFAULT_ATTRIBUTES | RTEMS_FLOATING_POINT, &Task_id[TASKID_SWBD] | |
443 | ); |
|
443 | ); | |
444 | } |
|
444 | } | |
445 |
|
445 | |||
446 | //***** |
|
446 | //***** | |
447 | // MISC |
|
447 | // MISC | |
448 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
448 | if (status == RTEMS_SUCCESSFUL) // STAT | |
449 | { |
|
449 | { | |
450 | status = rtems_task_create( |
|
450 | status = rtems_task_create( | |
451 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, |
|
451 | Task_name[TASKID_STAT], TASK_PRIORITY_STAT, RTEMS_MINIMUM_STACK_SIZE, | |
452 | RTEMS_DEFAULT_MODES, |
|
452 | RTEMS_DEFAULT_MODES, | |
453 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] |
|
453 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_STAT] | |
454 | ); |
|
454 | ); | |
455 | } |
|
455 | } | |
456 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
456 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
457 | { |
|
457 | { | |
458 | status = rtems_task_create( |
|
458 | status = rtems_task_create( | |
459 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, |
|
459 | Task_name[TASKID_DUMB], TASK_PRIORITY_DUMB, RTEMS_MINIMUM_STACK_SIZE, | |
460 | RTEMS_DEFAULT_MODES, |
|
460 | RTEMS_DEFAULT_MODES, | |
461 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] |
|
461 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_DUMB] | |
462 | ); |
|
462 | ); | |
463 | } |
|
463 | } | |
464 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
464 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
465 | { |
|
465 | { | |
466 | status = rtems_task_create( |
|
466 | status = rtems_task_create( | |
467 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, |
|
467 | Task_name[TASKID_HOUS], TASK_PRIORITY_HOUS, RTEMS_MINIMUM_STACK_SIZE, | |
468 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, |
|
468 | RTEMS_DEFAULT_MODES | RTEMS_NO_PREEMPT, | |
469 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] |
|
469 | RTEMS_DEFAULT_ATTRIBUTES, &Task_id[TASKID_HOUS] | |
470 | ); |
|
470 | ); | |
471 | } |
|
471 | } | |
472 |
|
472 | |||
473 | return status; |
|
473 | return status; | |
474 | } |
|
474 | } | |
475 |
|
475 | |||
476 | int start_recv_send_tasks( void ) |
|
476 | int start_recv_send_tasks( void ) | |
477 | { |
|
477 | { | |
478 | rtems_status_code status; |
|
478 | rtems_status_code status; | |
479 |
|
479 | |||
480 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); |
|
480 | status = rtems_task_start( Task_id[TASKID_RECV], recv_task, 1 ); | |
481 | if (status!=RTEMS_SUCCESSFUL) { |
|
481 | if (status!=RTEMS_SUCCESSFUL) { | |
482 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") |
|
482 | BOOT_PRINTF("in INIT *** Error starting TASK_RECV\n") | |
483 | } |
|
483 | } | |
484 |
|
484 | |||
485 | if (status == RTEMS_SUCCESSFUL) // SEND |
|
485 | if (status == RTEMS_SUCCESSFUL) // SEND | |
486 | { |
|
486 | { | |
487 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); |
|
487 | status = rtems_task_start( Task_id[TASKID_SEND], send_task, 1 ); | |
488 | if (status!=RTEMS_SUCCESSFUL) { |
|
488 | if (status!=RTEMS_SUCCESSFUL) { | |
489 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") |
|
489 | BOOT_PRINTF("in INIT *** Error starting TASK_SEND\n") | |
490 | } |
|
490 | } | |
491 | } |
|
491 | } | |
492 |
|
492 | |||
493 | return status; |
|
493 | return status; | |
494 | } |
|
494 | } | |
495 |
|
495 | |||
496 | int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS |
|
496 | int start_all_tasks( void ) // start all tasks except SEND RECV and HOUS | |
497 | { |
|
497 | { | |
498 | /** This function starts all RTEMS tasks used in the software. |
|
498 | /** This function starts all RTEMS tasks used in the software. | |
499 | * |
|
499 | * | |
500 | * @return RTEMS directive status codes: |
|
500 | * @return RTEMS directive status codes: | |
501 | * - RTEMS_SUCCESSFUL - ask started successfully |
|
501 | * - RTEMS_SUCCESSFUL - ask started successfully | |
502 | * - RTEMS_INVALID_ADDRESS - invalid task entry point |
|
502 | * - RTEMS_INVALID_ADDRESS - invalid task entry point | |
503 | * - RTEMS_INVALID_ID - invalid task id |
|
503 | * - RTEMS_INVALID_ID - invalid task id | |
504 | * - RTEMS_INCORRECT_STATE - task not in the dormant state |
|
504 | * - RTEMS_INCORRECT_STATE - task not in the dormant state | |
505 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task |
|
505 | * - RTEMS_ILLEGAL_ON_REMOTE_OBJECT - cannot start remote task | |
506 | * |
|
506 | * | |
507 | */ |
|
507 | */ | |
508 | // starts all the tasks fot eh flight software |
|
508 | // starts all the tasks fot eh flight software | |
509 |
|
509 | |||
510 | rtems_status_code status; |
|
510 | rtems_status_code status; | |
511 |
|
511 | |||
512 | //********** |
|
512 | //********** | |
513 | // SPACEWIRE |
|
513 | // SPACEWIRE | |
514 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); |
|
514 | status = rtems_task_start( Task_id[TASKID_SPIQ], spiq_task, 1 ); | |
515 | if (status!=RTEMS_SUCCESSFUL) { |
|
515 | if (status!=RTEMS_SUCCESSFUL) { | |
516 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") |
|
516 | BOOT_PRINTF("in INIT *** Error starting TASK_SPIQ\n") | |
517 | } |
|
517 | } | |
518 |
|
518 | |||
519 | if (status == RTEMS_SUCCESSFUL) // WTDG |
|
519 | if (status == RTEMS_SUCCESSFUL) // WTDG | |
520 | { |
|
520 | { | |
521 | status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 ); |
|
521 | status = rtems_task_start( Task_id[TASKID_WTDG], wtdg_task, 1 ); | |
522 | if (status!=RTEMS_SUCCESSFUL) { |
|
522 | if (status!=RTEMS_SUCCESSFUL) { | |
523 | BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n") |
|
523 | BOOT_PRINTF("in INIT *** Error starting TASK_WTDG\n") | |
524 | } |
|
524 | } | |
525 | } |
|
525 | } | |
526 |
|
526 | |||
527 | if (status == RTEMS_SUCCESSFUL) // ACTN |
|
527 | if (status == RTEMS_SUCCESSFUL) // ACTN | |
528 | { |
|
528 | { | |
529 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); |
|
529 | status = rtems_task_start( Task_id[TASKID_ACTN], actn_task, 1 ); | |
530 | if (status!=RTEMS_SUCCESSFUL) { |
|
530 | if (status!=RTEMS_SUCCESSFUL) { | |
531 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") |
|
531 | BOOT_PRINTF("in INIT *** Error starting TASK_ACTN\n") | |
532 | } |
|
532 | } | |
533 | } |
|
533 | } | |
534 |
|
534 | |||
535 | //****************** |
|
535 | //****************** | |
536 | // SPECTRAL MATRICES |
|
536 | // SPECTRAL MATRICES | |
537 | if (status == RTEMS_SUCCESSFUL) // AVF0 |
|
537 | if (status == RTEMS_SUCCESSFUL) // AVF0 | |
538 | { |
|
538 | { | |
539 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, LFR_MODE_STANDBY ); |
|
539 | status = rtems_task_start( Task_id[TASKID_AVF0], avf0_task, LFR_MODE_STANDBY ); | |
540 | if (status!=RTEMS_SUCCESSFUL) { |
|
540 | if (status!=RTEMS_SUCCESSFUL) { | |
541 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") |
|
541 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF0\n") | |
542 | } |
|
542 | } | |
543 | } |
|
543 | } | |
544 | if (status == RTEMS_SUCCESSFUL) // PRC0 |
|
544 | if (status == RTEMS_SUCCESSFUL) // PRC0 | |
545 | { |
|
545 | { | |
546 | status = rtems_task_start( Task_id[TASKID_PRC0], prc0_task, LFR_MODE_STANDBY ); |
|
546 | status = rtems_task_start( Task_id[TASKID_PRC0], prc0_task, LFR_MODE_STANDBY ); | |
547 | if (status!=RTEMS_SUCCESSFUL) { |
|
547 | if (status!=RTEMS_SUCCESSFUL) { | |
548 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC0\n") |
|
548 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC0\n") | |
549 | } |
|
549 | } | |
550 | } |
|
550 | } | |
551 | if (status == RTEMS_SUCCESSFUL) // AVF1 |
|
551 | if (status == RTEMS_SUCCESSFUL) // AVF1 | |
552 | { |
|
552 | { | |
553 | status = rtems_task_start( Task_id[TASKID_AVF1], avf1_task, LFR_MODE_STANDBY ); |
|
553 | status = rtems_task_start( Task_id[TASKID_AVF1], avf1_task, LFR_MODE_STANDBY ); | |
554 | if (status!=RTEMS_SUCCESSFUL) { |
|
554 | if (status!=RTEMS_SUCCESSFUL) { | |
555 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF1\n") |
|
555 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF1\n") | |
556 | } |
|
556 | } | |
557 | } |
|
557 | } | |
558 | if (status == RTEMS_SUCCESSFUL) // PRC1 |
|
558 | if (status == RTEMS_SUCCESSFUL) // PRC1 | |
559 | { |
|
559 | { | |
560 | status = rtems_task_start( Task_id[TASKID_PRC1], prc1_task, LFR_MODE_STANDBY ); |
|
560 | status = rtems_task_start( Task_id[TASKID_PRC1], prc1_task, LFR_MODE_STANDBY ); | |
561 | if (status!=RTEMS_SUCCESSFUL) { |
|
561 | if (status!=RTEMS_SUCCESSFUL) { | |
562 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC1\n") |
|
562 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC1\n") | |
563 | } |
|
563 | } | |
564 | } |
|
564 | } | |
565 | if (status == RTEMS_SUCCESSFUL) // AVF2 |
|
565 | if (status == RTEMS_SUCCESSFUL) // AVF2 | |
566 | { |
|
566 | { | |
567 | status = rtems_task_start( Task_id[TASKID_AVF2], avf2_task, 1 ); |
|
567 | status = rtems_task_start( Task_id[TASKID_AVF2], avf2_task, 1 ); | |
568 | if (status!=RTEMS_SUCCESSFUL) { |
|
568 | if (status!=RTEMS_SUCCESSFUL) { | |
569 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF2\n") |
|
569 | BOOT_PRINTF("in INIT *** Error starting TASK_AVF2\n") | |
570 | } |
|
570 | } | |
571 | } |
|
571 | } | |
572 | if (status == RTEMS_SUCCESSFUL) // PRC2 |
|
572 | if (status == RTEMS_SUCCESSFUL) // PRC2 | |
573 | { |
|
573 | { | |
574 | status = rtems_task_start( Task_id[TASKID_PRC2], prc2_task, 1 ); |
|
574 | status = rtems_task_start( Task_id[TASKID_PRC2], prc2_task, 1 ); | |
575 | if (status!=RTEMS_SUCCESSFUL) { |
|
575 | if (status!=RTEMS_SUCCESSFUL) { | |
576 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC2\n") |
|
576 | BOOT_PRINTF("in INIT *** Error starting TASK_PRC2\n") | |
577 | } |
|
577 | } | |
578 | } |
|
578 | } | |
579 |
|
579 | |||
580 | //**************** |
|
580 | //**************** | |
581 | // WAVEFORM PICKER |
|
581 | // WAVEFORM PICKER | |
582 | if (status == RTEMS_SUCCESSFUL) // WFRM |
|
582 | if (status == RTEMS_SUCCESSFUL) // WFRM | |
583 | { |
|
583 | { | |
584 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); |
|
584 | status = rtems_task_start( Task_id[TASKID_WFRM], wfrm_task, 1 ); | |
585 | if (status!=RTEMS_SUCCESSFUL) { |
|
585 | if (status!=RTEMS_SUCCESSFUL) { | |
586 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") |
|
586 | BOOT_PRINTF("in INIT *** Error starting TASK_WFRM\n") | |
587 | } |
|
587 | } | |
588 | } |
|
588 | } | |
589 | if (status == RTEMS_SUCCESSFUL) // CWF3 |
|
589 | if (status == RTEMS_SUCCESSFUL) // CWF3 | |
590 | { |
|
590 | { | |
591 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); |
|
591 | status = rtems_task_start( Task_id[TASKID_CWF3], cwf3_task, 1 ); | |
592 | if (status!=RTEMS_SUCCESSFUL) { |
|
592 | if (status!=RTEMS_SUCCESSFUL) { | |
593 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") |
|
593 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF3\n") | |
594 | } |
|
594 | } | |
595 | } |
|
595 | } | |
596 | if (status == RTEMS_SUCCESSFUL) // CWF2 |
|
596 | if (status == RTEMS_SUCCESSFUL) // CWF2 | |
597 | { |
|
597 | { | |
598 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); |
|
598 | status = rtems_task_start( Task_id[TASKID_CWF2], cwf2_task, 1 ); | |
599 | if (status!=RTEMS_SUCCESSFUL) { |
|
599 | if (status!=RTEMS_SUCCESSFUL) { | |
600 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") |
|
600 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF2\n") | |
601 | } |
|
601 | } | |
602 | } |
|
602 | } | |
603 | if (status == RTEMS_SUCCESSFUL) // CWF1 |
|
603 | if (status == RTEMS_SUCCESSFUL) // CWF1 | |
604 | { |
|
604 | { | |
605 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); |
|
605 | status = rtems_task_start( Task_id[TASKID_CWF1], cwf1_task, 1 ); | |
606 | if (status!=RTEMS_SUCCESSFUL) { |
|
606 | if (status!=RTEMS_SUCCESSFUL) { | |
607 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") |
|
607 | BOOT_PRINTF("in INIT *** Error starting TASK_CWF1\n") | |
608 | } |
|
608 | } | |
609 | } |
|
609 | } | |
610 | if (status == RTEMS_SUCCESSFUL) // SWBD |
|
610 | if (status == RTEMS_SUCCESSFUL) // SWBD | |
611 | { |
|
611 | { | |
612 | status = rtems_task_start( Task_id[TASKID_SWBD], swbd_task, 1 ); |
|
612 | status = rtems_task_start( Task_id[TASKID_SWBD], swbd_task, 1 ); | |
613 | if (status!=RTEMS_SUCCESSFUL) { |
|
613 | if (status!=RTEMS_SUCCESSFUL) { | |
614 | BOOT_PRINTF("in INIT *** Error starting TASK_SWBD\n") |
|
614 | BOOT_PRINTF("in INIT *** Error starting TASK_SWBD\n") | |
615 | } |
|
615 | } | |
616 | } |
|
616 | } | |
617 |
|
617 | |||
618 | //***** |
|
618 | //***** | |
619 | // MISC |
|
619 | // MISC | |
620 | if (status == RTEMS_SUCCESSFUL) // HOUS |
|
620 | if (status == RTEMS_SUCCESSFUL) // HOUS | |
621 | { |
|
621 | { | |
622 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); |
|
622 | status = rtems_task_start( Task_id[TASKID_HOUS], hous_task, 1 ); | |
623 | if (status!=RTEMS_SUCCESSFUL) { |
|
623 | if (status!=RTEMS_SUCCESSFUL) { | |
624 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") |
|
624 | BOOT_PRINTF("in INIT *** Error starting TASK_HOUS\n") | |
625 | } |
|
625 | } | |
626 | } |
|
626 | } | |
627 | if (status == RTEMS_SUCCESSFUL) // DUMB |
|
627 | if (status == RTEMS_SUCCESSFUL) // DUMB | |
628 | { |
|
628 | { | |
629 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); |
|
629 | status = rtems_task_start( Task_id[TASKID_DUMB], dumb_task, 1 ); | |
630 | if (status!=RTEMS_SUCCESSFUL) { |
|
630 | if (status!=RTEMS_SUCCESSFUL) { | |
631 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") |
|
631 | BOOT_PRINTF("in INIT *** Error starting TASK_DUMB\n") | |
632 | } |
|
632 | } | |
633 | } |
|
633 | } | |
634 | if (status == RTEMS_SUCCESSFUL) // STAT |
|
634 | if (status == RTEMS_SUCCESSFUL) // STAT | |
635 | { |
|
635 | { | |
636 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); |
|
636 | status = rtems_task_start( Task_id[TASKID_STAT], stat_task, 1 ); | |
637 | if (status!=RTEMS_SUCCESSFUL) { |
|
637 | if (status!=RTEMS_SUCCESSFUL) { | |
638 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") |
|
638 | BOOT_PRINTF("in INIT *** Error starting TASK_STAT\n") | |
639 | } |
|
639 | } | |
640 | } |
|
640 | } | |
641 |
|
641 | |||
642 | return status; |
|
642 | return status; | |
643 | } |
|
643 | } | |
644 |
|
644 | |||
645 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software |
|
645 | rtems_status_code create_message_queues( void ) // create the two message queues used in the software | |
646 | { |
|
646 | { | |
647 | rtems_status_code status_recv; |
|
647 | rtems_status_code status_recv; | |
648 | rtems_status_code status_send; |
|
648 | rtems_status_code status_send; | |
649 | rtems_status_code status_q_p0; |
|
649 | rtems_status_code status_q_p0; | |
650 | rtems_status_code status_q_p1; |
|
650 | rtems_status_code status_q_p1; | |
651 | rtems_status_code status_q_p2; |
|
651 | rtems_status_code status_q_p2; | |
652 | rtems_status_code ret; |
|
652 | rtems_status_code ret; | |
653 | rtems_id queue_id; |
|
653 | rtems_id queue_id; | |
654 |
|
654 | |||
655 | //**************************************** |
|
655 | //**************************************** | |
656 | // create the queue for handling valid TCs |
|
656 | // create the queue for handling valid TCs | |
657 | status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV], |
|
657 | status_recv = rtems_message_queue_create( misc_name[QUEUE_RECV], | |
658 | MSG_QUEUE_COUNT_RECV, CCSDS_TC_PKT_MAX_SIZE, |
|
658 | MSG_QUEUE_COUNT_RECV, CCSDS_TC_PKT_MAX_SIZE, | |
659 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
659 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
660 | if ( status_recv != RTEMS_SUCCESSFUL ) { |
|
660 | if ( status_recv != RTEMS_SUCCESSFUL ) { | |
661 | PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv) |
|
661 | PRINTF1("in create_message_queues *** ERR creating QUEU queue, %d\n", status_recv) | |
662 | } |
|
662 | } | |
663 |
|
663 | |||
664 | //************************************************ |
|
664 | //************************************************ | |
665 | // create the queue for handling TM packet sending |
|
665 | // create the queue for handling TM packet sending | |
666 | status_send = rtems_message_queue_create( misc_name[QUEUE_SEND], |
|
666 | status_send = rtems_message_queue_create( misc_name[QUEUE_SEND], | |
667 | MSG_QUEUE_COUNT_SEND, MSG_QUEUE_SIZE_SEND, |
|
667 | MSG_QUEUE_COUNT_SEND, MSG_QUEUE_SIZE_SEND, | |
668 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
668 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
669 | if ( status_send != RTEMS_SUCCESSFUL ) { |
|
669 | if ( status_send != RTEMS_SUCCESSFUL ) { | |
670 | PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send) |
|
670 | PRINTF1("in create_message_queues *** ERR creating PKTS queue, %d\n", status_send) | |
671 | } |
|
671 | } | |
672 |
|
672 | |||
673 | //***************************************************************************** |
|
673 | //***************************************************************************** | |
674 | // create the queue for handling averaged spectral matrices for processing @ f0 |
|
674 | // create the queue for handling averaged spectral matrices for processing @ f0 | |
675 | status_q_p0 = rtems_message_queue_create( misc_name[QUEUE_PRC0], |
|
675 | status_q_p0 = rtems_message_queue_create( misc_name[QUEUE_PRC0], | |
676 | MSG_QUEUE_COUNT_PRC0, MSG_QUEUE_SIZE_PRC0, |
|
676 | MSG_QUEUE_COUNT_PRC0, MSG_QUEUE_SIZE_PRC0, | |
677 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
677 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
678 | if ( status_q_p0 != RTEMS_SUCCESSFUL ) { |
|
678 | if ( status_q_p0 != RTEMS_SUCCESSFUL ) { | |
679 | PRINTF1("in create_message_queues *** ERR creating Q_P0 queue, %d\n", status_q_p0) |
|
679 | PRINTF1("in create_message_queues *** ERR creating Q_P0 queue, %d\n", status_q_p0) | |
680 | } |
|
680 | } | |
681 |
|
681 | |||
682 | //***************************************************************************** |
|
682 | //***************************************************************************** | |
683 | // create the queue for handling averaged spectral matrices for processing @ f1 |
|
683 | // create the queue for handling averaged spectral matrices for processing @ f1 | |
684 | status_q_p1 = rtems_message_queue_create( misc_name[QUEUE_PRC1], |
|
684 | status_q_p1 = rtems_message_queue_create( misc_name[QUEUE_PRC1], | |
685 | MSG_QUEUE_COUNT_PRC1, MSG_QUEUE_SIZE_PRC1, |
|
685 | MSG_QUEUE_COUNT_PRC1, MSG_QUEUE_SIZE_PRC1, | |
686 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
686 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
687 | if ( status_q_p1 != RTEMS_SUCCESSFUL ) { |
|
687 | if ( status_q_p1 != RTEMS_SUCCESSFUL ) { | |
688 | PRINTF1("in create_message_queues *** ERR creating Q_P1 queue, %d\n", status_q_p1) |
|
688 | PRINTF1("in create_message_queues *** ERR creating Q_P1 queue, %d\n", status_q_p1) | |
689 | } |
|
689 | } | |
690 |
|
690 | |||
691 | //***************************************************************************** |
|
691 | //***************************************************************************** | |
692 | // create the queue for handling averaged spectral matrices for processing @ f2 |
|
692 | // create the queue for handling averaged spectral matrices for processing @ f2 | |
693 | status_q_p2 = rtems_message_queue_create( misc_name[QUEUE_PRC2], |
|
693 | status_q_p2 = rtems_message_queue_create( misc_name[QUEUE_PRC2], | |
694 | MSG_QUEUE_COUNT_PRC2, MSG_QUEUE_SIZE_PRC2, |
|
694 | MSG_QUEUE_COUNT_PRC2, MSG_QUEUE_SIZE_PRC2, | |
695 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); |
|
695 | RTEMS_FIFO | RTEMS_LOCAL, &queue_id ); | |
696 | if ( status_q_p2 != RTEMS_SUCCESSFUL ) { |
|
696 | if ( status_q_p2 != RTEMS_SUCCESSFUL ) { | |
697 | PRINTF1("in create_message_queues *** ERR creating Q_P2 queue, %d\n", status_q_p2) |
|
697 | PRINTF1("in create_message_queues *** ERR creating Q_P2 queue, %d\n", status_q_p2) | |
698 | } |
|
698 | } | |
699 |
|
699 | |||
700 | if ( status_recv != RTEMS_SUCCESSFUL ) |
|
700 | if ( status_recv != RTEMS_SUCCESSFUL ) | |
701 | { |
|
701 | { | |
702 | ret = status_recv; |
|
702 | ret = status_recv; | |
703 | } |
|
703 | } | |
704 | else if( status_send != RTEMS_SUCCESSFUL ) |
|
704 | else if( status_send != RTEMS_SUCCESSFUL ) | |
705 | { |
|
705 | { | |
706 | ret = status_send; |
|
706 | ret = status_send; | |
707 | } |
|
707 | } | |
708 | else if( status_q_p0 != RTEMS_SUCCESSFUL ) |
|
708 | else if( status_q_p0 != RTEMS_SUCCESSFUL ) | |
709 | { |
|
709 | { | |
710 | ret = status_q_p0; |
|
710 | ret = status_q_p0; | |
711 | } |
|
711 | } | |
712 | else if( status_q_p1 != RTEMS_SUCCESSFUL ) |
|
712 | else if( status_q_p1 != RTEMS_SUCCESSFUL ) | |
713 | { |
|
713 | { | |
714 | ret = status_q_p1; |
|
714 | ret = status_q_p1; | |
715 | } |
|
715 | } | |
716 | else |
|
716 | else | |
717 | { |
|
717 | { | |
718 | ret = status_q_p2; |
|
718 | ret = status_q_p2; | |
719 | } |
|
719 | } | |
720 |
|
720 | |||
721 | return ret; |
|
721 | return ret; | |
722 | } |
|
722 | } | |
723 |
|
723 | |||
724 | rtems_status_code get_message_queue_id_send( rtems_id *queue_id ) |
|
724 | rtems_status_code get_message_queue_id_send( rtems_id *queue_id ) | |
725 | { |
|
725 | { | |
726 | rtems_status_code status; |
|
726 | rtems_status_code status; | |
727 | rtems_name queue_name; |
|
727 | rtems_name queue_name; | |
728 |
|
728 | |||
729 | queue_name = rtems_build_name( 'Q', '_', 'S', 'D' ); |
|
729 | queue_name = rtems_build_name( 'Q', '_', 'S', 'D' ); | |
730 |
|
730 | |||
731 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
731 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
732 |
|
732 | |||
733 | return status; |
|
733 | return status; | |
734 | } |
|
734 | } | |
735 |
|
735 | |||
736 | rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ) |
|
736 | rtems_status_code get_message_queue_id_recv( rtems_id *queue_id ) | |
737 | { |
|
737 | { | |
738 | rtems_status_code status; |
|
738 | rtems_status_code status; | |
739 | rtems_name queue_name; |
|
739 | rtems_name queue_name; | |
740 |
|
740 | |||
741 | queue_name = rtems_build_name( 'Q', '_', 'R', 'V' ); |
|
741 | queue_name = rtems_build_name( 'Q', '_', 'R', 'V' ); | |
742 |
|
742 | |||
743 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
743 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
744 |
|
744 | |||
745 | return status; |
|
745 | return status; | |
746 | } |
|
746 | } | |
747 |
|
747 | |||
748 | rtems_status_code get_message_queue_id_prc0( rtems_id *queue_id ) |
|
748 | rtems_status_code get_message_queue_id_prc0( rtems_id *queue_id ) | |
749 | { |
|
749 | { | |
750 | rtems_status_code status; |
|
750 | rtems_status_code status; | |
751 | rtems_name queue_name; |
|
751 | rtems_name queue_name; | |
752 |
|
752 | |||
753 | queue_name = rtems_build_name( 'Q', '_', 'P', '0' ); |
|
753 | queue_name = rtems_build_name( 'Q', '_', 'P', '0' ); | |
754 |
|
754 | |||
755 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
755 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
756 |
|
756 | |||
757 | return status; |
|
757 | return status; | |
758 | } |
|
758 | } | |
759 |
|
759 | |||
760 | rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id ) |
|
760 | rtems_status_code get_message_queue_id_prc1( rtems_id *queue_id ) | |
761 | { |
|
761 | { | |
762 | rtems_status_code status; |
|
762 | rtems_status_code status; | |
763 | rtems_name queue_name; |
|
763 | rtems_name queue_name; | |
764 |
|
764 | |||
765 | queue_name = rtems_build_name( 'Q', '_', 'P', '1' ); |
|
765 | queue_name = rtems_build_name( 'Q', '_', 'P', '1' ); | |
766 |
|
766 | |||
767 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
767 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
768 |
|
768 | |||
769 | return status; |
|
769 | return status; | |
770 | } |
|
770 | } | |
771 |
|
771 | |||
772 | rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ) |
|
772 | rtems_status_code get_message_queue_id_prc2( rtems_id *queue_id ) | |
773 | { |
|
773 | { | |
774 | rtems_status_code status; |
|
774 | rtems_status_code status; | |
775 | rtems_name queue_name; |
|
775 | rtems_name queue_name; | |
776 |
|
776 | |||
777 | queue_name = rtems_build_name( 'Q', '_', 'P', '2' ); |
|
777 | queue_name = rtems_build_name( 'Q', '_', 'P', '2' ); | |
778 |
|
778 | |||
779 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); |
|
779 | status = rtems_message_queue_ident( queue_name, 0, queue_id ); | |
780 |
|
780 | |||
781 | return status; |
|
781 | return status; | |
782 | } |
|
782 | } |
@@ -1,621 +1,588 | |||||
1 | /** General usage functions and RTEMS tasks. |
|
1 | /** General usage functions and RTEMS tasks. | |
2 | * |
|
2 | * | |
3 | * @file |
|
3 | * @file | |
4 | * @author P. LEROY |
|
4 | * @author P. LEROY | |
5 | * |
|
5 | * | |
6 | */ |
|
6 | */ | |
7 |
|
7 | |||
8 | #include "fsw_misc.h" |
|
8 | #include "fsw_misc.h" | |
9 |
|
9 | |||
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, |
|
10 | void configure_timer(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider, | |
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) |
|
11 | unsigned char interrupt_level, rtems_isr (*timer_isr)() ) | |
12 | { |
|
12 | { | |
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. |
|
13 | /** This function configures a GPTIMER timer instantiated in the VHDL design. | |
14 | * |
|
14 | * | |
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
15 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
16 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
17 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
18 | * @param interrupt_level is the interrupt level that the timer drives. |
|
18 | * @param interrupt_level is the interrupt level that the timer drives. | |
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. |
|
19 | * @param timer_isr is the interrupt subroutine that will be attached to the IRQ driven by the timer. | |
20 | * |
|
20 | * | |
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 |
|
21 | * Interrupt levels are described in the SPARC documentation sparcv8.pdf p.76 | |
22 | * |
|
22 | * | |
23 | */ |
|
23 | */ | |
24 |
|
24 | |||
25 | rtems_status_code status; |
|
25 | rtems_status_code status; | |
26 | rtems_isr_entry old_isr_handler; |
|
26 | rtems_isr_entry old_isr_handler; | |
27 |
|
27 | |||
28 | gptimer_regs->timer[timer].ctrl = 0x00; // reset the control register |
|
28 | gptimer_regs->timer[timer].ctrl = 0x00; // reset the control register | |
29 |
|
29 | |||
30 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels |
|
30 | status = rtems_interrupt_catch( timer_isr, interrupt_level, &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels | |
31 | if (status!=RTEMS_SUCCESSFUL) |
|
31 | if (status!=RTEMS_SUCCESSFUL) | |
32 | { |
|
32 | { | |
33 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") |
|
33 | PRINTF("in configure_timer *** ERR rtems_interrupt_catch\n") | |
34 | } |
|
34 | } | |
35 |
|
35 | |||
36 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); |
|
36 | timer_set_clock_divider( gptimer_regs, timer, clock_divider); | |
37 | } |
|
37 | } | |
38 |
|
38 | |||
39 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
39 | void timer_start(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
40 | { |
|
40 | { | |
41 | /** This function starts a GPTIMER timer. |
|
41 | /** This function starts a GPTIMER timer. | |
42 | * |
|
42 | * | |
43 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
43 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
44 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
44 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
45 | * |
|
45 | * | |
46 | */ |
|
46 | */ | |
47 |
|
47 | |||
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
48 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register |
|
49 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000004; // LD load value from the reload register | |
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer |
|
50 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000001; // EN enable the timer | |
51 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart |
|
51 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000002; // RS restart | |
52 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable |
|
52 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000008; // IE interrupt enable | |
53 | } |
|
53 | } | |
54 |
|
54 | |||
55 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) |
|
55 | void timer_stop(gptimer_regs_t *gptimer_regs, unsigned char timer) | |
56 | { |
|
56 | { | |
57 | /** This function stops a GPTIMER timer. |
|
57 | /** This function stops a GPTIMER timer. | |
58 | * |
|
58 | * | |
59 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
59 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
60 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
60 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
61 | * |
|
61 | * | |
62 | */ |
|
62 | */ | |
63 |
|
63 | |||
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer |
|
64 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xfffffffe; // EN enable the timer | |
65 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable |
|
65 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl & 0xffffffef; // IE interrupt enable | |
66 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any |
|
66 | gptimer_regs->timer[timer].ctrl = gptimer_regs->timer[timer].ctrl | 0x00000010; // clear pending IRQ if any | |
67 | } |
|
67 | } | |
68 |
|
68 | |||
69 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) |
|
69 | void timer_set_clock_divider(gptimer_regs_t *gptimer_regs, unsigned char timer, unsigned int clock_divider) | |
70 | { |
|
70 | { | |
71 | /** This function sets the clock divider of a GPTIMER timer. |
|
71 | /** This function sets the clock divider of a GPTIMER timer. | |
72 | * |
|
72 | * | |
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. |
|
73 | * @param gptimer_regs points to the APB registers of the GPTIMER IP core. | |
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). |
|
74 | * @param timer is the number of the timer in the IP core (several timers can be instantiated). | |
75 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. |
|
75 | * @param clock_divider is the divider of the 1 MHz clock that will be configured. | |
76 | * |
|
76 | * | |
77 | */ |
|
77 | */ | |
78 |
|
78 | |||
79 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz |
|
79 | gptimer_regs->timer[timer].reload = clock_divider; // base clock frequency is 1 MHz | |
80 | } |
|
80 | } | |
81 |
|
81 | |||
82 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port |
|
82 | int send_console_outputs_on_apbuart_port( void ) // Send the console outputs on the apbuart port | |
83 | { |
|
83 | { | |
84 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
84 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
85 |
|
85 | |||
86 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; |
|
86 | apbuart_regs->ctrl = APBUART_CTRL_REG_MASK_TE; | |
87 |
|
87 | |||
88 | return 0; |
|
88 | return 0; | |
89 | } |
|
89 | } | |
90 |
|
90 | |||
91 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register |
|
91 | int enable_apbuart_transmitter( void ) // set the bit 1, TE Transmitter Enable to 1 in the APBUART control register | |
92 | { |
|
92 | { | |
93 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; |
|
93 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) REGS_ADDR_APBUART; | |
94 |
|
94 | |||
95 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; |
|
95 | apbuart_regs->ctrl = apbuart_regs->ctrl | APBUART_CTRL_REG_MASK_TE; | |
96 |
|
96 | |||
97 | return 0; |
|
97 | return 0; | |
98 | } |
|
98 | } | |
99 |
|
99 | |||
100 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) |
|
100 | void set_apbuart_scaler_reload_register(unsigned int regs, unsigned int value) | |
101 | { |
|
101 | { | |
102 | /** This function sets the scaler reload register of the apbuart module |
|
102 | /** This function sets the scaler reload register of the apbuart module | |
103 | * |
|
103 | * | |
104 | * @param regs is the address of the apbuart registers in memory |
|
104 | * @param regs is the address of the apbuart registers in memory | |
105 | * @param value is the value that will be stored in the scaler register |
|
105 | * @param value is the value that will be stored in the scaler register | |
106 | * |
|
106 | * | |
107 | * The value shall be set by the software to get data on the serial interface. |
|
107 | * The value shall be set by the software to get data on the serial interface. | |
108 | * |
|
108 | * | |
109 | */ |
|
109 | */ | |
110 |
|
110 | |||
111 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; |
|
111 | struct apbuart_regs_str *apbuart_regs = (struct apbuart_regs_str *) regs; | |
112 |
|
112 | |||
113 | apbuart_regs->scaler = value; |
|
113 | apbuart_regs->scaler = value; | |
114 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) |
|
114 | BOOT_PRINTF1("OK *** apbuart port scaler reload register set to 0x%x\n", value) | |
115 | } |
|
115 | } | |
116 |
|
116 | |||
117 | //************ |
|
117 | //************ | |
118 | // RTEMS TASKS |
|
118 | // RTEMS TASKS | |
119 |
|
119 | |||
120 | rtems_task stat_task(rtems_task_argument argument) |
|
120 | rtems_task stat_task(rtems_task_argument argument) | |
121 | { |
|
121 | { | |
122 | int i; |
|
122 | int i; | |
123 | int j; |
|
123 | int j; | |
124 | i = 0; |
|
124 | i = 0; | |
125 | j = 0; |
|
125 | j = 0; | |
126 | BOOT_PRINTF("in STAT *** \n") |
|
126 | BOOT_PRINTF("in STAT *** \n") | |
127 | while(1){ |
|
127 | while(1){ | |
128 | rtems_task_wake_after(1000); |
|
128 | rtems_task_wake_after(1000); | |
129 | PRINTF1("%d\n", j) |
|
129 | PRINTF1("%d\n", j) | |
130 | if (i == CPU_USAGE_REPORT_PERIOD) { |
|
130 | if (i == CPU_USAGE_REPORT_PERIOD) { | |
131 | // #ifdef PRINT_TASK_STATISTICS |
|
131 | // #ifdef PRINT_TASK_STATISTICS | |
132 | // rtems_cpu_usage_report(); |
|
132 | // rtems_cpu_usage_report(); | |
133 | // rtems_cpu_usage_reset(); |
|
133 | // rtems_cpu_usage_reset(); | |
134 | // #endif |
|
134 | // #endif | |
135 | i = 0; |
|
135 | i = 0; | |
136 | } |
|
136 | } | |
137 | else i++; |
|
137 | else i++; | |
138 | j++; |
|
138 | j++; | |
139 | } |
|
139 | } | |
140 | } |
|
140 | } | |
141 |
|
141 | |||
142 | rtems_task hous_task(rtems_task_argument argument) |
|
142 | rtems_task hous_task(rtems_task_argument argument) | |
143 | { |
|
143 | { | |
144 | rtems_status_code status; |
|
144 | rtems_status_code status; | |
145 | rtems_id queue_id; |
|
145 | rtems_id queue_id; | |
146 | rtems_rate_monotonic_period_status period_status; |
|
146 | rtems_rate_monotonic_period_status period_status; | |
147 |
|
147 | |||
148 | status = get_message_queue_id_send( &queue_id ); |
|
148 | status = get_message_queue_id_send( &queue_id ); | |
149 | if (status != RTEMS_SUCCESSFUL) |
|
149 | if (status != RTEMS_SUCCESSFUL) | |
150 | { |
|
150 | { | |
151 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) |
|
151 | PRINTF1("in HOUS *** ERR get_message_queue_id_send %d\n", status) | |
152 | } |
|
152 | } | |
153 |
|
153 | |||
154 | BOOT_PRINTF("in HOUS ***\n") |
|
154 | BOOT_PRINTF("in HOUS ***\n") | |
155 |
|
155 | |||
156 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { |
|
156 | if (rtems_rate_monotonic_ident( name_hk_rate_monotonic, &HK_id) != RTEMS_SUCCESSFUL) { | |
157 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); |
|
157 | status = rtems_rate_monotonic_create( name_hk_rate_monotonic, &HK_id ); | |
158 | if( status != RTEMS_SUCCESSFUL ) { |
|
158 | if( status != RTEMS_SUCCESSFUL ) { | |
159 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) |
|
159 | PRINTF1( "rtems_rate_monotonic_create failed with status of %d\n", status ) | |
160 | } |
|
160 | } | |
161 | } |
|
161 | } | |
162 |
|
162 | |||
163 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
163 | housekeeping_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
164 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
164 | housekeeping_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
165 | housekeeping_packet.reserved = DEFAULT_RESERVED; |
|
165 | housekeeping_packet.reserved = DEFAULT_RESERVED; | |
166 | housekeeping_packet.userApplication = CCSDS_USER_APP; |
|
166 | housekeeping_packet.userApplication = CCSDS_USER_APP; | |
167 | housekeeping_packet.packetID[0] = (unsigned char) (APID_TM_HK >> 8); |
|
167 | housekeeping_packet.packetID[0] = (unsigned char) (APID_TM_HK >> 8); | |
168 | housekeeping_packet.packetID[1] = (unsigned char) (APID_TM_HK); |
|
168 | housekeeping_packet.packetID[1] = (unsigned char) (APID_TM_HK); | |
169 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
169 | housekeeping_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
170 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
170 | housekeeping_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
171 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); |
|
171 | housekeeping_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); | |
172 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); |
|
172 | housekeeping_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); | |
173 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
173 | housekeeping_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
174 | housekeeping_packet.serviceType = TM_TYPE_HK; |
|
174 | housekeeping_packet.serviceType = TM_TYPE_HK; | |
175 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; |
|
175 | housekeeping_packet.serviceSubType = TM_SUBTYPE_HK; | |
176 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
176 | housekeeping_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
177 | housekeeping_packet.sid = SID_HK; |
|
177 | housekeeping_packet.sid = SID_HK; | |
178 |
|
178 | |||
179 | status = rtems_rate_monotonic_cancel(HK_id); |
|
179 | status = rtems_rate_monotonic_cancel(HK_id); | |
180 | if( status != RTEMS_SUCCESSFUL ) { |
|
180 | if( status != RTEMS_SUCCESSFUL ) { | |
181 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) |
|
181 | PRINTF1( "ERR *** in HOUS *** rtems_rate_monotonic_cancel(HK_id) ***code: %d\n", status ) | |
182 | } |
|
182 | } | |
183 | else { |
|
183 | else { | |
184 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") |
|
184 | DEBUG_PRINTF("OK *** in HOUS *** rtems_rate_monotonic_cancel(HK_id)\n") | |
185 | } |
|
185 | } | |
186 |
|
186 | |||
187 | // startup phase |
|
187 | // startup phase | |
188 | status = rtems_rate_monotonic_period( HK_id, SY_LFR_TIME_SYN_TIMEOUT_in_ticks ); |
|
188 | status = rtems_rate_monotonic_period( HK_id, SY_LFR_TIME_SYN_TIMEOUT_in_ticks ); | |
189 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); |
|
189 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); | |
190 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) |
|
190 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) | |
191 | while(period_status.state != RATE_MONOTONIC_EXPIRED ) // after SY_LFR_TIME_SYN_TIMEOUT ms, starts HK anyway |
|
191 | while(period_status.state != RATE_MONOTONIC_EXPIRED ) // after SY_LFR_TIME_SYN_TIMEOUT ms, starts HK anyway | |
192 | { |
|
192 | { | |
193 | if ((time_management_regs->coarse_time & 0x80000000) == 0x00000000) // check time synchronization |
|
193 | if ((time_management_regs->coarse_time & 0x80000000) == 0x00000000) // check time synchronization | |
194 | { |
|
194 | { | |
195 | break; // break if LFR is synchronized |
|
195 | break; // break if LFR is synchronized | |
196 | } |
|
196 | } | |
197 | else |
|
197 | else | |
198 | { |
|
198 | { | |
199 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); |
|
199 | status = rtems_rate_monotonic_get_status( HK_id, &period_status ); | |
200 | // sched_yield(); |
|
200 | // sched_yield(); | |
201 | status = rtems_task_wake_after( 10 ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 100 ms = 10 * 10 ms |
|
201 | status = rtems_task_wake_after( 10 ); // wait SY_LFR_DPU_CONNECT_TIMEOUT 100 ms = 10 * 10 ms | |
202 | } |
|
202 | } | |
203 | } |
|
203 | } | |
204 | status = rtems_rate_monotonic_cancel(HK_id); |
|
204 | status = rtems_rate_monotonic_cancel(HK_id); | |
205 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) |
|
205 | DEBUG_PRINTF1("startup HK, HK_id status = %d\n", period_status.state) | |
206 |
|
206 | |||
207 | while(1){ // launch the rate monotonic task |
|
207 | while(1){ // launch the rate monotonic task | |
208 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); |
|
208 | status = rtems_rate_monotonic_period( HK_id, HK_PERIOD ); | |
209 | if ( status != RTEMS_SUCCESSFUL ) { |
|
209 | if ( status != RTEMS_SUCCESSFUL ) { | |
210 | PRINTF1( "in HOUS *** ERR period: %d\n", status); |
|
210 | PRINTF1( "in HOUS *** ERR period: %d\n", status); | |
211 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); |
|
211 | rtems_event_send( Task_id[TASKID_DUMB], RTEMS_EVENT_6 ); | |
212 | } |
|
212 | } | |
213 | else { |
|
213 | else { | |
214 | housekeeping_packet.packetSequenceControl[0] = (unsigned char) sequenceCounterHK >> 8; |
|
214 | housekeeping_packet.packetSequenceControl[0] = (unsigned char) (sequenceCounterHK >> 8); | |
215 | housekeeping_packet.packetSequenceControl[1] = (unsigned char) sequenceCounterHK; |
|
215 | housekeeping_packet.packetSequenceControl[1] = (unsigned char) (sequenceCounterHK ); | |
216 | increment_seq_counter( &sequenceCounterHK ); |
|
216 | increment_seq_counter( &sequenceCounterHK ); | |
217 |
|
217 | |||
218 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
218 | housekeeping_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
219 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
219 | housekeeping_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
220 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
220 | housekeeping_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
221 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
221 | housekeeping_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
222 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
222 | housekeeping_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
223 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
223 | housekeeping_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
224 |
|
224 | |||
225 | spacewire_update_statistics(); |
|
225 | spacewire_update_statistics(); | |
226 |
|
226 | |||
227 | get_v_e1_e2_f3( housekeeping_packet.hk_lfr_sc_v_f3 ); |
|
227 | get_v_e1_e2_f3( housekeeping_packet.hk_lfr_sc_v_f3 ); | |
228 | get_cpu_load( (unsigned char *) &housekeeping_packet.hk_lfr_cpu_load ); |
|
228 | get_cpu_load( (unsigned char *) &housekeeping_packet.hk_lfr_cpu_load ); | |
229 |
|
229 | |||
230 | // SEND PACKET |
|
230 | // SEND PACKET | |
231 | status = rtems_message_queue_urgent( queue_id, &housekeeping_packet, |
|
231 | status = rtems_message_queue_urgent( queue_id, &housekeeping_packet, | |
232 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
232 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
233 | if (status != RTEMS_SUCCESSFUL) { |
|
233 | if (status != RTEMS_SUCCESSFUL) { | |
234 | PRINTF1("in HOUS *** ERR send: %d\n", status) |
|
234 | PRINTF1("in HOUS *** ERR send: %d\n", status) | |
235 | } |
|
235 | } | |
236 | } |
|
236 | } | |
237 | } |
|
237 | } | |
238 |
|
238 | |||
239 | PRINTF("in HOUS *** deleting task\n") |
|
239 | PRINTF("in HOUS *** deleting task\n") | |
240 |
|
240 | |||
241 | status = rtems_task_delete( RTEMS_SELF ); // should not return |
|
241 | status = rtems_task_delete( RTEMS_SELF ); // should not return | |
242 | printf( "rtems_task_delete returned with status of %d.\n", status ); |
|
242 | printf( "rtems_task_delete returned with status of %d.\n", status ); | |
243 | return; |
|
243 | return; | |
244 | } |
|
244 | } | |
245 |
|
245 | |||
246 | rtems_task dumb_task( rtems_task_argument unused ) |
|
246 | rtems_task dumb_task( rtems_task_argument unused ) | |
247 | { |
|
247 | { | |
248 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. |
|
248 | /** This RTEMS taks is used to print messages without affecting the general behaviour of the software. | |
249 | * |
|
249 | * | |
250 | * @param unused is the starting argument of the RTEMS task |
|
250 | * @param unused is the starting argument of the RTEMS task | |
251 | * |
|
251 | * | |
252 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. |
|
252 | * The DUMB taks waits for RTEMS events and print messages depending on the incoming events. | |
253 | * |
|
253 | * | |
254 | */ |
|
254 | */ | |
255 |
|
255 | |||
256 | unsigned int i; |
|
256 | unsigned int i; | |
257 | unsigned int intEventOut; |
|
257 | unsigned int intEventOut; | |
258 | unsigned int coarse_time = 0; |
|
258 | unsigned int coarse_time = 0; | |
259 | unsigned int fine_time = 0; |
|
259 | unsigned int fine_time = 0; | |
260 | rtems_event_set event_out; |
|
260 | rtems_event_set event_out; | |
261 |
|
261 | |||
262 | char *DumbMessages[12] = {"in DUMB *** default", // RTEMS_EVENT_0 |
|
262 | char *DumbMessages[12] = {"in DUMB *** default", // RTEMS_EVENT_0 | |
263 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 |
|
263 | "in DUMB *** timecode_irq_handler", // RTEMS_EVENT_1 | |
264 | "in DUMB *** f3 buffer changed", // RTEMS_EVENT_2 |
|
264 | "in DUMB *** f3 buffer changed", // RTEMS_EVENT_2 | |
265 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 |
|
265 | "in DUMB *** in SMIQ *** Error sending event to AVF0", // RTEMS_EVENT_3 | |
266 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 |
|
266 | "in DUMB *** spectral_matrices_isr *** Error sending event to SMIQ", // RTEMS_EVENT_4 | |
267 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 |
|
267 | "in DUMB *** waveforms_simulator_isr", // RTEMS_EVENT_5 | |
268 | "ERR HK", // RTEMS_EVENT_6 |
|
268 | "ERR HK", // RTEMS_EVENT_6 | |
269 | "ready for dump", // RTEMS_EVENT_7 |
|
269 | "ready for dump", // RTEMS_EVENT_7 | |
270 | "VHDL ERR *** spectral matrix", // RTEMS_EVENT_8 |
|
270 | "VHDL ERR *** spectral matrix", // RTEMS_EVENT_8 | |
271 | "tick", // RTEMS_EVENT_9 |
|
271 | "tick", // RTEMS_EVENT_9 | |
272 | "VHDL ERR *** waveform picker", // RTEMS_EVENT_10 |
|
272 | "VHDL ERR *** waveform picker", // RTEMS_EVENT_10 | |
273 | "VHDL ERR *** unexpected ready matrix values" // RTEMS_EVENT_11 |
|
273 | "VHDL ERR *** unexpected ready matrix values" // RTEMS_EVENT_11 | |
274 | }; |
|
274 | }; | |
275 |
|
275 | |||
276 | BOOT_PRINTF("in DUMB *** \n") |
|
276 | BOOT_PRINTF("in DUMB *** \n") | |
277 |
|
277 | |||
278 | while(1){ |
|
278 | while(1){ | |
279 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 |
|
279 | rtems_event_receive(RTEMS_EVENT_0 | RTEMS_EVENT_1 | RTEMS_EVENT_2 | RTEMS_EVENT_3 | |
280 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7 |
|
280 | | RTEMS_EVENT_4 | RTEMS_EVENT_5 | RTEMS_EVENT_6 | RTEMS_EVENT_7 | |
281 | | RTEMS_EVENT_8 | RTEMS_EVENT_9, |
|
281 | | RTEMS_EVENT_8 | RTEMS_EVENT_9, | |
282 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT |
|
282 | RTEMS_WAIT | RTEMS_EVENT_ANY, RTEMS_NO_TIMEOUT, &event_out); // wait for an RTEMS_EVENT | |
283 | intEventOut = (unsigned int) event_out; |
|
283 | intEventOut = (unsigned int) event_out; | |
284 | for ( i=0; i<32; i++) |
|
284 | for ( i=0; i<32; i++) | |
285 | { |
|
285 | { | |
286 | if ( ((intEventOut >> i) & 0x0001) != 0) |
|
286 | if ( ((intEventOut >> i) & 0x0001) != 0) | |
287 | { |
|
287 | { | |
288 | coarse_time = time_management_regs->coarse_time; |
|
288 | coarse_time = time_management_regs->coarse_time; | |
289 | fine_time = time_management_regs->fine_time; |
|
289 | fine_time = time_management_regs->fine_time; | |
290 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); |
|
290 | printf("in DUMB *** coarse: %x, fine: %x, %s\n", coarse_time, fine_time, DumbMessages[i]); | |
291 | if (i==8) |
|
291 | if (i==8) | |
292 | { |
|
292 | { | |
293 | PRINTF1("spectral_matrix_regs->status = %x\n", spectral_matrix_regs->status) |
|
293 | PRINTF1("spectral_matrix_regs->status = %x\n", spectral_matrix_regs->status) | |
294 | } |
|
294 | } | |
295 | if (i==10) |
|
295 | if (i==10) | |
296 | { |
|
296 | { | |
297 | PRINTF1("waveform_picker_regs->status = %x\n", waveform_picker_regs->status) |
|
297 | PRINTF1("waveform_picker_regs->status = %x\n", waveform_picker_regs->status) | |
298 | } |
|
298 | } | |
299 | } |
|
299 | } | |
300 | } |
|
300 | } | |
301 | } |
|
301 | } | |
302 | } |
|
302 | } | |
303 |
|
303 | |||
304 | //***************************** |
|
304 | //***************************** | |
305 | // init housekeeping parameters |
|
305 | // init housekeeping parameters | |
306 |
|
306 | |||
307 | void init_housekeeping_parameters( void ) |
|
307 | void init_housekeeping_parameters( void ) | |
308 | { |
|
308 | { | |
309 | /** This function initialize the housekeeping_packet global variable with default values. |
|
309 | /** This function initialize the housekeeping_packet global variable with default values. | |
310 | * |
|
310 | * | |
311 | */ |
|
311 | */ | |
312 |
|
312 | |||
313 | unsigned int i = 0; |
|
313 | unsigned int i = 0; | |
314 | unsigned char *parameters; |
|
314 | unsigned char *parameters; | |
315 |
|
315 | |||
316 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; |
|
316 | parameters = (unsigned char*) &housekeeping_packet.lfr_status_word; | |
317 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) |
|
317 | for(i = 0; i< SIZE_HK_PARAMETERS; i++) | |
318 | { |
|
318 | { | |
319 | parameters[i] = 0x00; |
|
319 | parameters[i] = 0x00; | |
320 | } |
|
320 | } | |
321 | // init status word |
|
321 | // init status word | |
322 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; |
|
322 | housekeeping_packet.lfr_status_word[0] = DEFAULT_STATUS_WORD_BYTE0; | |
323 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; |
|
323 | housekeeping_packet.lfr_status_word[1] = DEFAULT_STATUS_WORD_BYTE1; | |
324 | // init software version |
|
324 | // init software version | |
325 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; |
|
325 | housekeeping_packet.lfr_sw_version[0] = SW_VERSION_N1; | |
326 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; |
|
326 | housekeeping_packet.lfr_sw_version[1] = SW_VERSION_N2; | |
327 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
327 | housekeeping_packet.lfr_sw_version[2] = SW_VERSION_N3; | |
328 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
328 | housekeeping_packet.lfr_sw_version[3] = SW_VERSION_N4; | |
329 | // init fpga version |
|
329 | // init fpga version | |
330 | parameters = (unsigned char *) (REGS_ADDR_VHDL_VERSION); |
|
330 | parameters = (unsigned char *) (REGS_ADDR_VHDL_VERSION); | |
331 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 |
|
331 | housekeeping_packet.lfr_fpga_version[0] = parameters[1]; // n1 | |
332 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 |
|
332 | housekeeping_packet.lfr_fpga_version[1] = parameters[2]; // n2 | |
333 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 |
|
333 | housekeeping_packet.lfr_fpga_version[2] = parameters[3]; // n3 | |
334 | } |
|
334 | } | |
335 |
|
335 | |||
336 | void increment_seq_counter_old( unsigned char *packet_sequence_control) |
|
|||
337 | { |
|
|||
338 | /** This function increment the sequence counter psased in argument. |
|
|||
339 | * |
|
|||
340 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. |
|
|||
341 | * |
|
|||
342 | */ |
|
|||
343 |
|
||||
344 | unsigned short sequence_cnt; |
|
|||
345 | unsigned short segmentation_grouping_flag; |
|
|||
346 | unsigned short new_packet_sequence_control; |
|
|||
347 |
|
||||
348 | segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6 |
|
|||
349 | sequence_cnt = (unsigned short) ( |
|
|||
350 | ( (packet_sequence_control[0] & 0x3f) << 8 ) // keep bits 5 downto 0 |
|
|||
351 | + packet_sequence_control[1] |
|
|||
352 | ); |
|
|||
353 |
|
||||
354 | new_packet_sequence_control = segmentation_grouping_flag | sequence_cnt ; |
|
|||
355 |
|
||||
356 | packet_sequence_control[0] = (unsigned char) (new_packet_sequence_control >> 8); |
|
|||
357 | packet_sequence_control[1] = (unsigned char) (new_packet_sequence_control ); |
|
|||
358 |
|
||||
359 | if ( sequence_cnt < SEQ_CNT_MAX) |
|
|||
360 | { |
|
|||
361 | sequence_cnt = sequence_cnt + 1; |
|
|||
362 | } |
|
|||
363 | else |
|
|||
364 | { |
|
|||
365 | sequence_cnt = 0; |
|
|||
366 | } |
|
|||
367 | } |
|
|||
368 |
|
||||
369 | void increment_seq_counter( unsigned short *packetSequenceControl ) |
|
336 | void increment_seq_counter( unsigned short *packetSequenceControl ) | |
370 | { |
|
337 | { | |
371 | /** This function increment the sequence counter psased in argument. |
|
338 | /** This function increment the sequence counter psased in argument. | |
372 | * |
|
339 | * | |
373 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. |
|
340 | * The increment does not affect the grouping flag. In case of an overflow, the counter is reset to 0. | |
374 | * |
|
341 | * | |
375 | */ |
|
342 | */ | |
376 |
|
343 | |||
|
344 | unsigned short segmentation_grouping_flag; | |||
377 | unsigned short sequence_cnt; |
|
345 | unsigned short sequence_cnt; | |
378 | unsigned short segmentation_grouping_flag; |
|
|||
379 |
|
346 | |||
380 | segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6 |
|
347 | segmentation_grouping_flag = TM_PACKET_SEQ_CTRL_STANDALONE << 8; // keep bits 7 downto 6 | |
381 |
sequence_cnt = (*packetSequenceControl) & 0x3fff; |
|
348 | sequence_cnt = (*packetSequenceControl) & 0x3fff; // [0011 1111 1111 1111] | |
382 |
|
349 | |||
383 | if ( sequence_cnt < SEQ_CNT_MAX) |
|
350 | if ( sequence_cnt < SEQ_CNT_MAX) | |
384 | { |
|
351 | { | |
385 | sequence_cnt = sequence_cnt + 1; |
|
352 | sequence_cnt = sequence_cnt + 1; | |
386 | } |
|
353 | } | |
387 | else |
|
354 | else | |
388 | { |
|
355 | { | |
389 | sequence_cnt = 0; |
|
356 | sequence_cnt = 0; | |
390 | } |
|
357 | } | |
391 |
|
358 | |||
392 | *packetSequenceControl = segmentation_grouping_flag | sequence_cnt ; |
|
359 | *packetSequenceControl = segmentation_grouping_flag | sequence_cnt ; | |
393 | } |
|
360 | } | |
394 |
|
361 | |||
395 | void getTime( unsigned char *time) |
|
362 | void getTime( unsigned char *time) | |
396 | { |
|
363 | { | |
397 | /** This function write the current local time in the time buffer passed in argument. |
|
364 | /** This function write the current local time in the time buffer passed in argument. | |
398 | * |
|
365 | * | |
399 | */ |
|
366 | */ | |
400 |
|
367 | |||
401 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
368 | time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
402 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
369 | time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
403 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
370 | time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
404 | time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
371 | time[3] = (unsigned char) (time_management_regs->coarse_time); | |
405 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
372 | time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
406 | time[5] = (unsigned char) (time_management_regs->fine_time); |
|
373 | time[5] = (unsigned char) (time_management_regs->fine_time); | |
407 | } |
|
374 | } | |
408 |
|
375 | |||
409 | unsigned long long int getTimeAsUnsignedLongLongInt( ) |
|
376 | unsigned long long int getTimeAsUnsignedLongLongInt( ) | |
410 | { |
|
377 | { | |
411 | /** This function write the current local time in the time buffer passed in argument. |
|
378 | /** This function write the current local time in the time buffer passed in argument. | |
412 | * |
|
379 | * | |
413 | */ |
|
380 | */ | |
414 | unsigned long long int time; |
|
381 | unsigned long long int time; | |
415 |
|
382 | |||
416 | time = ( (unsigned long long int) (time_management_regs->coarse_time & 0x7fffffff) << 16 ) |
|
383 | time = ( (unsigned long long int) (time_management_regs->coarse_time & 0x7fffffff) << 16 ) | |
417 | + time_management_regs->fine_time; |
|
384 | + time_management_regs->fine_time; | |
418 |
|
385 | |||
419 | return time; |
|
386 | return time; | |
420 | } |
|
387 | } | |
421 |
|
388 | |||
422 | void send_dumb_hk( void ) |
|
389 | void send_dumb_hk( void ) | |
423 | { |
|
390 | { | |
424 | Packet_TM_LFR_HK_t dummy_hk_packet; |
|
391 | Packet_TM_LFR_HK_t dummy_hk_packet; | |
425 | unsigned char *parameters; |
|
392 | unsigned char *parameters; | |
426 | unsigned int i; |
|
393 | unsigned int i; | |
427 | rtems_id queue_id; |
|
394 | rtems_id queue_id; | |
428 |
|
395 | |||
429 | dummy_hk_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; |
|
396 | dummy_hk_packet.targetLogicalAddress = CCSDS_DESTINATION_ID; | |
430 | dummy_hk_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; |
|
397 | dummy_hk_packet.protocolIdentifier = CCSDS_PROTOCOLE_ID; | |
431 | dummy_hk_packet.reserved = DEFAULT_RESERVED; |
|
398 | dummy_hk_packet.reserved = DEFAULT_RESERVED; | |
432 | dummy_hk_packet.userApplication = CCSDS_USER_APP; |
|
399 | dummy_hk_packet.userApplication = CCSDS_USER_APP; | |
433 | dummy_hk_packet.packetID[0] = (unsigned char) (APID_TM_HK >> 8); |
|
400 | dummy_hk_packet.packetID[0] = (unsigned char) (APID_TM_HK >> 8); | |
434 | dummy_hk_packet.packetID[1] = (unsigned char) (APID_TM_HK); |
|
401 | dummy_hk_packet.packetID[1] = (unsigned char) (APID_TM_HK); | |
435 | dummy_hk_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; |
|
402 | dummy_hk_packet.packetSequenceControl[0] = TM_PACKET_SEQ_CTRL_STANDALONE; | |
436 | dummy_hk_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; |
|
403 | dummy_hk_packet.packetSequenceControl[1] = TM_PACKET_SEQ_CNT_DEFAULT; | |
437 | dummy_hk_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); |
|
404 | dummy_hk_packet.packetLength[0] = (unsigned char) (PACKET_LENGTH_HK >> 8); | |
438 | dummy_hk_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); |
|
405 | dummy_hk_packet.packetLength[1] = (unsigned char) (PACKET_LENGTH_HK ); | |
439 | dummy_hk_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; |
|
406 | dummy_hk_packet.spare1_pusVersion_spare2 = DEFAULT_SPARE1_PUSVERSION_SPARE2; | |
440 | dummy_hk_packet.serviceType = TM_TYPE_HK; |
|
407 | dummy_hk_packet.serviceType = TM_TYPE_HK; | |
441 | dummy_hk_packet.serviceSubType = TM_SUBTYPE_HK; |
|
408 | dummy_hk_packet.serviceSubType = TM_SUBTYPE_HK; | |
442 | dummy_hk_packet.destinationID = TM_DESTINATION_ID_GROUND; |
|
409 | dummy_hk_packet.destinationID = TM_DESTINATION_ID_GROUND; | |
443 | dummy_hk_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); |
|
410 | dummy_hk_packet.time[0] = (unsigned char) (time_management_regs->coarse_time>>24); | |
444 | dummy_hk_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); |
|
411 | dummy_hk_packet.time[1] = (unsigned char) (time_management_regs->coarse_time>>16); | |
445 | dummy_hk_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); |
|
412 | dummy_hk_packet.time[2] = (unsigned char) (time_management_regs->coarse_time>>8); | |
446 | dummy_hk_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); |
|
413 | dummy_hk_packet.time[3] = (unsigned char) (time_management_regs->coarse_time); | |
447 | dummy_hk_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); |
|
414 | dummy_hk_packet.time[4] = (unsigned char) (time_management_regs->fine_time>>8); | |
448 | dummy_hk_packet.time[5] = (unsigned char) (time_management_regs->fine_time); |
|
415 | dummy_hk_packet.time[5] = (unsigned char) (time_management_regs->fine_time); | |
449 | dummy_hk_packet.sid = SID_HK; |
|
416 | dummy_hk_packet.sid = SID_HK; | |
450 |
|
417 | |||
451 | // init status word |
|
418 | // init status word | |
452 | dummy_hk_packet.lfr_status_word[0] = 0xff; |
|
419 | dummy_hk_packet.lfr_status_word[0] = 0xff; | |
453 | dummy_hk_packet.lfr_status_word[1] = 0xff; |
|
420 | dummy_hk_packet.lfr_status_word[1] = 0xff; | |
454 | // init software version |
|
421 | // init software version | |
455 | dummy_hk_packet.lfr_sw_version[0] = SW_VERSION_N1; |
|
422 | dummy_hk_packet.lfr_sw_version[0] = SW_VERSION_N1; | |
456 | dummy_hk_packet.lfr_sw_version[1] = SW_VERSION_N2; |
|
423 | dummy_hk_packet.lfr_sw_version[1] = SW_VERSION_N2; | |
457 | dummy_hk_packet.lfr_sw_version[2] = SW_VERSION_N3; |
|
424 | dummy_hk_packet.lfr_sw_version[2] = SW_VERSION_N3; | |
458 | dummy_hk_packet.lfr_sw_version[3] = SW_VERSION_N4; |
|
425 | dummy_hk_packet.lfr_sw_version[3] = SW_VERSION_N4; | |
459 | // init fpga version |
|
426 | // init fpga version | |
460 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xb0); |
|
427 | parameters = (unsigned char *) (REGS_ADDR_WAVEFORM_PICKER + 0xb0); | |
461 | dummy_hk_packet.lfr_fpga_version[0] = parameters[1]; // n1 |
|
428 | dummy_hk_packet.lfr_fpga_version[0] = parameters[1]; // n1 | |
462 | dummy_hk_packet.lfr_fpga_version[1] = parameters[2]; // n2 |
|
429 | dummy_hk_packet.lfr_fpga_version[1] = parameters[2]; // n2 | |
463 | dummy_hk_packet.lfr_fpga_version[2] = parameters[3]; // n3 |
|
430 | dummy_hk_packet.lfr_fpga_version[2] = parameters[3]; // n3 | |
464 |
|
431 | |||
465 | parameters = (unsigned char *) &dummy_hk_packet.hk_lfr_cpu_load; |
|
432 | parameters = (unsigned char *) &dummy_hk_packet.hk_lfr_cpu_load; | |
466 |
|
433 | |||
467 | for (i=0; i<100; i++) |
|
434 | for (i=0; i<100; i++) | |
468 | { |
|
435 | { | |
469 | parameters[i] = 0xff; |
|
436 | parameters[i] = 0xff; | |
470 | } |
|
437 | } | |
471 |
|
438 | |||
472 | get_message_queue_id_send( &queue_id ); |
|
439 | get_message_queue_id_send( &queue_id ); | |
473 |
|
440 | |||
474 | rtems_message_queue_urgent( queue_id, &dummy_hk_packet, |
|
441 | rtems_message_queue_urgent( queue_id, &dummy_hk_packet, | |
475 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); |
|
442 | PACKET_LENGTH_HK + CCSDS_TC_TM_PACKET_OFFSET + CCSDS_PROTOCOLE_EXTRA_BYTES); | |
476 | } |
|
443 | } | |
477 |
|
444 | |||
478 | void get_v_e1_e2_f3_old( unsigned char *spacecraft_potential ) |
|
445 | void get_v_e1_e2_f3_old( unsigned char *spacecraft_potential ) | |
479 | { |
|
446 | { | |
480 | unsigned int coarseTime; |
|
447 | unsigned int coarseTime; | |
481 | unsigned int acquisitionTime; |
|
448 | unsigned int acquisitionTime; | |
482 | unsigned int deltaT = 0; |
|
449 | unsigned int deltaT = 0; | |
483 | unsigned char *bufferPtr; |
|
450 | unsigned char *bufferPtr; | |
484 |
|
451 | |||
485 | unsigned int offset_in_samples; |
|
452 | unsigned int offset_in_samples; | |
486 | unsigned int offset_in_bytes; |
|
453 | unsigned int offset_in_bytes; | |
487 | unsigned char f3 = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz |
|
454 | unsigned char f3 = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz | |
488 |
|
455 | |||
489 | if (lfrCurrentMode == LFR_MODE_STANDBY) |
|
456 | if (lfrCurrentMode == LFR_MODE_STANDBY) | |
490 | { |
|
457 | { | |
491 | spacecraft_potential[0] = 0x00; |
|
458 | spacecraft_potential[0] = 0x00; | |
492 | spacecraft_potential[1] = 0x00; |
|
459 | spacecraft_potential[1] = 0x00; | |
493 | spacecraft_potential[2] = 0x00; |
|
460 | spacecraft_potential[2] = 0x00; | |
494 | spacecraft_potential[3] = 0x00; |
|
461 | spacecraft_potential[3] = 0x00; | |
495 | spacecraft_potential[4] = 0x00; |
|
462 | spacecraft_potential[4] = 0x00; | |
496 | spacecraft_potential[5] = 0x00; |
|
463 | spacecraft_potential[5] = 0x00; | |
497 | } |
|
464 | } | |
498 | else |
|
465 | else | |
499 | { |
|
466 | { | |
500 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; |
|
467 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; | |
501 | bufferPtr = (unsigned char*) current_ring_node_f3->buffer_address; |
|
468 | bufferPtr = (unsigned char*) current_ring_node_f3->buffer_address; | |
502 | acquisitionTime = (unsigned int) ( ( bufferPtr[2] & 0x7f ) << 24 ) |
|
469 | acquisitionTime = (unsigned int) ( ( bufferPtr[2] & 0x7f ) << 24 ) | |
503 | + (unsigned int) ( bufferPtr[3] << 16 ) |
|
470 | + (unsigned int) ( bufferPtr[3] << 16 ) | |
504 | + (unsigned int) ( bufferPtr[0] << 8 ) |
|
471 | + (unsigned int) ( bufferPtr[0] << 8 ) | |
505 | + (unsigned int) ( bufferPtr[1] ); |
|
472 | + (unsigned int) ( bufferPtr[1] ); | |
506 | if ( coarseTime > acquisitionTime ) |
|
473 | if ( coarseTime > acquisitionTime ) | |
507 | { |
|
474 | { | |
508 | deltaT = coarseTime - acquisitionTime; |
|
475 | deltaT = coarseTime - acquisitionTime; | |
509 | offset_in_samples = (deltaT-1) * f3 ; |
|
476 | offset_in_samples = (deltaT-1) * f3 ; | |
510 | } |
|
477 | } | |
511 | else if( coarseTime == acquisitionTime ) |
|
478 | else if( coarseTime == acquisitionTime ) | |
512 | { |
|
479 | { | |
513 | bufferPtr = (unsigned char*) current_ring_node_f3->previous->buffer_address; // pick up v e1 and e2 in the previous f3 buffer |
|
480 | bufferPtr = (unsigned char*) current_ring_node_f3->previous->buffer_address; // pick up v e1 and e2 in the previous f3 buffer | |
514 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT-1; |
|
481 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT-1; | |
515 | } |
|
482 | } | |
516 | else |
|
483 | else | |
517 | { |
|
484 | { | |
518 | offset_in_samples = 0; |
|
485 | offset_in_samples = 0; | |
519 | PRINTF2("ERR *** in get_v_e1_e2_f3 *** coarseTime = %x, acquisitionTime = %x\n", coarseTime, acquisitionTime) |
|
486 | PRINTF2("ERR *** in get_v_e1_e2_f3 *** coarseTime = %x, acquisitionTime = %x\n", coarseTime, acquisitionTime) | |
520 | } |
|
487 | } | |
521 |
|
488 | |||
522 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) |
|
489 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) | |
523 | { |
|
490 | { | |
524 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out of the buffer, counter = %d\n", offset_in_samples) |
|
491 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out of the buffer, counter = %d\n", offset_in_samples) | |
525 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; |
|
492 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; | |
526 | } |
|
493 | } | |
527 | offset_in_bytes = TIME_OFFSET_IN_BYTES + offset_in_samples * NB_WORDS_SWF_BLK * 4; |
|
494 | offset_in_bytes = TIME_OFFSET_IN_BYTES + offset_in_samples * NB_WORDS_SWF_BLK * 4; | |
528 | spacecraft_potential[0] = bufferPtr[ offset_in_bytes + 0]; |
|
495 | spacecraft_potential[0] = bufferPtr[ offset_in_bytes + 0]; | |
529 | spacecraft_potential[1] = bufferPtr[ offset_in_bytes + 1]; |
|
496 | spacecraft_potential[1] = bufferPtr[ offset_in_bytes + 1]; | |
530 | spacecraft_potential[2] = bufferPtr[ offset_in_bytes + 2]; |
|
497 | spacecraft_potential[2] = bufferPtr[ offset_in_bytes + 2]; | |
531 | spacecraft_potential[3] = bufferPtr[ offset_in_bytes + 3]; |
|
498 | spacecraft_potential[3] = bufferPtr[ offset_in_bytes + 3]; | |
532 | spacecraft_potential[4] = bufferPtr[ offset_in_bytes + 4]; |
|
499 | spacecraft_potential[4] = bufferPtr[ offset_in_bytes + 4]; | |
533 | spacecraft_potential[5] = bufferPtr[ offset_in_bytes + 5]; |
|
500 | spacecraft_potential[5] = bufferPtr[ offset_in_bytes + 5]; | |
534 | } |
|
501 | } | |
535 | } |
|
502 | } | |
536 |
|
503 | |||
537 | void get_v_e1_e2_f3( unsigned char *spacecraft_potential ) |
|
504 | void get_v_e1_e2_f3( unsigned char *spacecraft_potential ) | |
538 | { |
|
505 | { | |
539 | unsigned int coarseTime; |
|
506 | unsigned int coarseTime; | |
540 | unsigned int acquisitionTime; |
|
507 | unsigned int acquisitionTime; | |
541 | unsigned int deltaT = 0; |
|
508 | unsigned int deltaT = 0; | |
542 | unsigned char *bufferPtr; |
|
509 | unsigned char *bufferPtr; | |
543 |
|
510 | |||
544 | unsigned int offset_in_samples; |
|
511 | unsigned int offset_in_samples; | |
545 | unsigned int offset_in_bytes; |
|
512 | unsigned int offset_in_bytes; | |
546 | unsigned char f3 = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz |
|
513 | unsigned char f3 = 16; // v, e1 and e2 will be picked up each second, f3 = 16 Hz | |
547 |
|
514 | |||
548 | if (lfrCurrentMode == LFR_MODE_STANDBY) |
|
515 | if (lfrCurrentMode == LFR_MODE_STANDBY) | |
549 | { |
|
516 | { | |
550 | spacecraft_potential[0] = 0x00; |
|
517 | spacecraft_potential[0] = 0x00; | |
551 | spacecraft_potential[1] = 0x00; |
|
518 | spacecraft_potential[1] = 0x00; | |
552 | spacecraft_potential[2] = 0x00; |
|
519 | spacecraft_potential[2] = 0x00; | |
553 | spacecraft_potential[3] = 0x00; |
|
520 | spacecraft_potential[3] = 0x00; | |
554 | spacecraft_potential[4] = 0x00; |
|
521 | spacecraft_potential[4] = 0x00; | |
555 | spacecraft_potential[5] = 0x00; |
|
522 | spacecraft_potential[5] = 0x00; | |
556 | } |
|
523 | } | |
557 | else |
|
524 | else | |
558 | { |
|
525 | { | |
559 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; |
|
526 | coarseTime = time_management_regs->coarse_time & 0x7fffffff; | |
560 | bufferPtr = (unsigned char*) current_ring_node_f3->buffer_address; |
|
527 | bufferPtr = (unsigned char*) current_ring_node_f3->buffer_address; | |
561 | acquisitionTime = (unsigned int) ( ( bufferPtr[0] & 0x7f ) << 24 ) |
|
528 | acquisitionTime = (unsigned int) ( ( bufferPtr[0] & 0x7f ) << 24 ) | |
562 | + (unsigned int) ( bufferPtr[1] << 16 ) |
|
529 | + (unsigned int) ( bufferPtr[1] << 16 ) | |
563 | + (unsigned int) ( bufferPtr[2] << 8 ) |
|
530 | + (unsigned int) ( bufferPtr[2] << 8 ) | |
564 | + (unsigned int) ( bufferPtr[3] ); |
|
531 | + (unsigned int) ( bufferPtr[3] ); | |
565 | if ( coarseTime > acquisitionTime ) |
|
532 | if ( coarseTime > acquisitionTime ) | |
566 | { |
|
533 | { | |
567 | deltaT = coarseTime - acquisitionTime; |
|
534 | deltaT = coarseTime - acquisitionTime; | |
568 | offset_in_samples = (deltaT-1) * f3 ; |
|
535 | offset_in_samples = (deltaT-1) * f3 ; | |
569 | } |
|
536 | } | |
570 | else if( coarseTime == acquisitionTime ) |
|
537 | else if( coarseTime == acquisitionTime ) | |
571 | { |
|
538 | { | |
572 | bufferPtr = (unsigned char*) current_ring_node_f3->previous->buffer_address; // pick up v e1 and e2 in the previous f3 buffer |
|
539 | bufferPtr = (unsigned char*) current_ring_node_f3->previous->buffer_address; // pick up v e1 and e2 in the previous f3 buffer | |
573 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT-1; |
|
540 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT-1; | |
574 | } |
|
541 | } | |
575 | else |
|
542 | else | |
576 | { |
|
543 | { | |
577 | offset_in_samples = 0; |
|
544 | offset_in_samples = 0; | |
578 | PRINTF2("ERR *** in get_v_e1_e2_f3 *** coarseTime = %x, acquisitionTime = %x\n", coarseTime, acquisitionTime) |
|
545 | PRINTF2("ERR *** in get_v_e1_e2_f3 *** coarseTime = %x, acquisitionTime = %x\n", coarseTime, acquisitionTime) | |
579 | } |
|
546 | } | |
580 |
|
547 | |||
581 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) |
|
548 | if ( offset_in_samples > (NB_SAMPLES_PER_SNAPSHOT - 1) ) | |
582 | { |
|
549 | { | |
583 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out of the buffer, counter = %d\n", offset_in_samples) |
|
550 | PRINTF1("ERR *** in get_v_e1_e2_f3 *** trying to read out of the buffer, counter = %d\n", offset_in_samples) | |
584 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; |
|
551 | offset_in_samples = NB_SAMPLES_PER_SNAPSHOT -1; | |
585 | } |
|
552 | } | |
586 | offset_in_bytes = TIME_OFFSET_IN_BYTES + offset_in_samples * NB_WORDS_SWF_BLK * 4; |
|
553 | offset_in_bytes = TIME_OFFSET_IN_BYTES + offset_in_samples * NB_WORDS_SWF_BLK * 4; | |
587 | spacecraft_potential[0] = bufferPtr[ offset_in_bytes + 0]; |
|
554 | spacecraft_potential[0] = bufferPtr[ offset_in_bytes + 0]; | |
588 | spacecraft_potential[1] = bufferPtr[ offset_in_bytes + 1]; |
|
555 | spacecraft_potential[1] = bufferPtr[ offset_in_bytes + 1]; | |
589 | spacecraft_potential[2] = bufferPtr[ offset_in_bytes + 2]; |
|
556 | spacecraft_potential[2] = bufferPtr[ offset_in_bytes + 2]; | |
590 | spacecraft_potential[3] = bufferPtr[ offset_in_bytes + 3]; |
|
557 | spacecraft_potential[3] = bufferPtr[ offset_in_bytes + 3]; | |
591 | spacecraft_potential[4] = bufferPtr[ offset_in_bytes + 4]; |
|
558 | spacecraft_potential[4] = bufferPtr[ offset_in_bytes + 4]; | |
592 | spacecraft_potential[5] = bufferPtr[ offset_in_bytes + 5]; |
|
559 | spacecraft_potential[5] = bufferPtr[ offset_in_bytes + 5]; | |
593 | } |
|
560 | } | |
594 | } |
|
561 | } | |
595 |
|
562 | |||
596 | void get_cpu_load( unsigned char *resource_statistics ) |
|
563 | void get_cpu_load( unsigned char *resource_statistics ) | |
597 | { |
|
564 | { | |
598 | unsigned char cpu_load; |
|
565 | unsigned char cpu_load; | |
599 |
|
566 | |||
600 | cpu_load = lfr_rtems_cpu_usage_report(); |
|
567 | cpu_load = lfr_rtems_cpu_usage_report(); | |
601 |
|
568 | |||
602 | // HK_LFR_CPU_LOAD |
|
569 | // HK_LFR_CPU_LOAD | |
603 | resource_statistics[0] = cpu_load; |
|
570 | resource_statistics[0] = cpu_load; | |
604 |
|
571 | |||
605 | // HK_LFR_CPU_LOAD_MAX |
|
572 | // HK_LFR_CPU_LOAD_MAX | |
606 | if (cpu_load > resource_statistics[1]) |
|
573 | if (cpu_load > resource_statistics[1]) | |
607 | { |
|
574 | { | |
608 | resource_statistics[1] = cpu_load; |
|
575 | resource_statistics[1] = cpu_load; | |
609 | } |
|
576 | } | |
610 |
|
577 | |||
611 | // CPU_LOAD_AVE |
|
578 | // CPU_LOAD_AVE | |
612 | resource_statistics[2] = 0; |
|
579 | resource_statistics[2] = 0; | |
613 |
|
580 | |||
614 | #ifndef PRINT_TASK_STATISTICS |
|
581 | #ifndef PRINT_TASK_STATISTICS | |
615 | rtems_cpu_usage_reset(); |
|
582 | rtems_cpu_usage_reset(); | |
616 | #endif |
|
583 | #endif | |
617 |
|
584 | |||
618 | } |
|
585 | } | |
619 |
|
586 | |||
620 |
|
587 | |||
621 |
|
588 |
General Comments 0
You need to be logged in to leave comments.
Login now