##// END OF EJS Templates
timegen version 0.0.0.1
paul -
r170:3efd0a6e1344 VHDL_0_1_28
parent child
Show More
@@ -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: Thu Oct 9 10:12:36 2014
3 # Generated by qmake (2.01a) (Qt 4.8.6) on: Fri Oct 24 13:25:08 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=2 -DSW_VERSION_N2=0 -DSW_VERSION_N3=1 -DSW_VERSION_N4=1 -DLPP_DPU_DESTID -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=2 -DSW_VERSION_N2=0 -DSW_VERSION_N3=1 -DSW_VERSION_N4=1 -DLPP_DPU_DESTID -DPRINT_MESSAGES_ON_CONSOLE
14 CFLAGS = -pipe -O3 -fprofile-arcs -ftest-coverage -Wall $(DEFINES)
14 CFLAGS = -pipe -O3 -fprofile-arcs -ftest-coverage -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) -lgcov /opt/GCOV/01A/lib/overload.o -lc
19 LIBS = $(SUBLIBS) -lgcov /opt/GCOV/01A/lib/overload.o -lc
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,256 +1,259
1 #ifndef FSW_PARAMS_H_INCLUDED
1 #ifndef FSW_PARAMS_H_INCLUDED
2 #define FSW_PARAMS_H_INCLUDED
2 #define FSW_PARAMS_H_INCLUDED
3
3
4 #include "grlib_regs.h"
4 #include "grlib_regs.h"
5 #include "fsw_params_processing.h"
5 #include "fsw_params_processing.h"
6 #include "fsw_params_nb_bytes.h"
6 #include "fsw_params_nb_bytes.h"
7 #include "tm_byte_positions.h"
7 #include "tm_byte_positions.h"
8 #include "ccsds_types.h"
8 #include "ccsds_types.h"
9
9
10 #define GRSPW_DEVICE_NAME "/dev/grspw0"
10 #define GRSPW_DEVICE_NAME "/dev/grspw0"
11 #define UART_DEVICE_NAME "/dev/console"
11 #define UART_DEVICE_NAME "/dev/console"
12
12
13 typedef struct ring_node
13 typedef struct ring_node
14 {
14 {
15 struct ring_node *previous;
15 struct ring_node *previous;
16 int buffer_address;
16 int buffer_address;
17 struct ring_node *next;
17 struct ring_node *next;
18 unsigned int status;
18 unsigned int status;
19 unsigned coarseTime;
20 unsigned int fineTime;
19 } ring_node;
21 } ring_node;
20
22
21 //************************
23 //************************
22 // flight software version
24 // flight software version
23 // this parameters is handled by the Qt project options
25 // this parameters is handled by the Qt project options
24
26
25 #define NB_PACKETS_PER_GROUP_OF_CWF 8 // 8 packets containing 336 blk
27 #define NB_PACKETS_PER_GROUP_OF_CWF 8 // 8 packets containing 336 blk
26 #define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk
28 #define NB_PACKETS_PER_GROUP_OF_CWF_LIGHT 4 // 4 packets containing 672 blk
27 #define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688
29 #define NB_SAMPLES_PER_SNAPSHOT 2688 // 336 * 8 = 672 * 4 = 2688
28 #define TIME_OFFSET 2
30 #define TIME_OFFSET 2
29 #define TIME_OFFSET_IN_BYTES 8
31 #define TIME_OFFSET_IN_BYTES 8
30 //#define WAVEFORM_EXTENDED_HEADER_OFFSET 22
32 //#define WAVEFORM_EXTENDED_HEADER_OFFSET 22
31 #define NB_BYTES_SWF_BLK (2 * 6)
33 #define NB_BYTES_SWF_BLK (2 * 6)
32 #define NB_WORDS_SWF_BLK 3
34 #define NB_WORDS_SWF_BLK 3
33 #define NB_BYTES_CWF3_LIGHT_BLK 6
35 #define NB_BYTES_CWF3_LIGHT_BLK 6
34 //#define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8
36 //#define WFRM_INDEX_OF_LAST_PACKET 6 // waveforms are transmitted in groups of 2048 blocks, 6 packets of 340 and 1 of 8
35 #define NB_RING_NODES_F0 3 // AT LEAST 3
37 #define NB_RING_NODES_F0 3 // AT LEAST 3
36 #define NB_RING_NODES_F1 5 // AT LEAST 3
38 #define NB_RING_NODES_F1 5 // AT LEAST 3
37 #define NB_RING_NODES_F2 5 // AT LEAST 3
39 #define NB_RING_NODES_F2 5 // AT LEAST 3
38 #define NB_RING_NODES_F3 3 // AT LEAST 3
40 #define NB_RING_NODES_F3 3 // AT LEAST 3
39
41
40 //**********
42 //**********
41 // LFR MODES
43 // LFR MODES
42 #define LFR_MODE_STANDBY 0
44 #define LFR_MODE_STANDBY 0
43 #define LFR_MODE_NORMAL 1
45 #define LFR_MODE_NORMAL 1
44 #define LFR_MODE_BURST 2
46 #define LFR_MODE_BURST 2
45 #define LFR_MODE_SBM1 3
47 #define LFR_MODE_SBM1 3
46 #define LFR_MODE_SBM2 4
48 #define LFR_MODE_SBM2 4
47
49
48 #define TDS_MODE_LFM 5
50 #define TDS_MODE_LFM 5
49 #define TDS_MODE_STANDBY 0
51 #define TDS_MODE_STANDBY 0
50 #define TDS_MODE_NORMAL 1
52 #define TDS_MODE_NORMAL 1
51 #define TDS_MODE_BURST 2
53 #define TDS_MODE_BURST 2
52 #define TDS_MODE_SBM1 3
54 #define TDS_MODE_SBM1 3
53 #define TDS_MODE_SBM2 4
55 #define TDS_MODE_SBM2 4
54
56
55 #define THR_MODE_STANDBY 0
57 #define THR_MODE_STANDBY 0
56 #define THR_MODE_NORMAL 1
58 #define THR_MODE_NORMAL 1
57 #define THR_MODE_BURST 2
59 #define THR_MODE_BURST 2
58
60
59 #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0
61 #define RTEMS_EVENT_MODE_STANDBY RTEMS_EVENT_0
60 #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1
62 #define RTEMS_EVENT_MODE_NORMAL RTEMS_EVENT_1
61 #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2
63 #define RTEMS_EVENT_MODE_BURST RTEMS_EVENT_2
62 #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3
64 #define RTEMS_EVENT_MODE_SBM1 RTEMS_EVENT_3
63 #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4
65 #define RTEMS_EVENT_MODE_SBM2 RTEMS_EVENT_4
64 #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5
66 #define RTEMS_EVENT_MODE_SBM2_WFRM RTEMS_EVENT_5
65 #define RTEMS_EVENT_NORM_BP1_F0 RTEMS_EVENT_6
67 #define RTEMS_EVENT_NORM_BP1_F0 RTEMS_EVENT_6
66 #define RTEMS_EVENT_NORM_BP2_F0 RTEMS_EVENT_7
68 #define RTEMS_EVENT_NORM_BP2_F0 RTEMS_EVENT_7
67 #define RTEMS_EVENT_NORM_ASM_F0 RTEMS_EVENT_8 // ASM only in NORM mode
69 #define RTEMS_EVENT_NORM_ASM_F0 RTEMS_EVENT_8 // ASM only in NORM mode
68 #define RTEMS_EVENT_NORM_BP1_F1 RTEMS_EVENT_9
70 #define RTEMS_EVENT_NORM_BP1_F1 RTEMS_EVENT_9
69 #define RTEMS_EVENT_NORM_BP2_F1 RTEMS_EVENT_10
71 #define RTEMS_EVENT_NORM_BP2_F1 RTEMS_EVENT_10
70 #define RTEMS_EVENT_NORM_ASM_F1 RTEMS_EVENT_11 // ASM only in NORM mode
72 #define RTEMS_EVENT_NORM_ASM_F1 RTEMS_EVENT_11 // ASM only in NORM mode
71 #define RTEMS_EVENT_NORM_BP1_F2 RTEMS_EVENT_12
73 #define RTEMS_EVENT_NORM_BP1_F2 RTEMS_EVENT_12
72 #define RTEMS_EVENT_NORM_BP2_F2 RTEMS_EVENT_13
74 #define RTEMS_EVENT_NORM_BP2_F2 RTEMS_EVENT_13
73 #define RTEMS_EVENT_NORM_ASM_F2 RTEMS_EVENT_14 // ASM only in NORM mode
75 #define RTEMS_EVENT_NORM_ASM_F2 RTEMS_EVENT_14 // ASM only in NORM mode
74 #define RTEMS_EVENT_SBM_BP1_F0 RTEMS_EVENT_15
76 #define RTEMS_EVENT_SBM_BP1_F0 RTEMS_EVENT_15
75 #define RTEMS_EVENT_SBM_BP2_F0 RTEMS_EVENT_16
77 #define RTEMS_EVENT_SBM_BP2_F0 RTEMS_EVENT_16
76 #define RTEMS_EVENT_SBM_BP1_F1 RTEMS_EVENT_17
78 #define RTEMS_EVENT_SBM_BP1_F1 RTEMS_EVENT_17
77 #define RTEMS_EVENT_SBM_BP2_F1 RTEMS_EVENT_18
79 #define RTEMS_EVENT_SBM_BP2_F1 RTEMS_EVENT_18
78 #define RTEMS_EVENT_BURST_BP1_F0 RTEMS_EVENT_19
80 #define RTEMS_EVENT_BURST_BP1_F0 RTEMS_EVENT_19
79 #define RTEMS_EVENT_BURST_BP2_F0 RTEMS_EVENT_20
81 #define RTEMS_EVENT_BURST_BP2_F0 RTEMS_EVENT_20
80 #define RTEMS_EVENT_BURST_BP1_F1 RTEMS_EVENT_21
82 #define RTEMS_EVENT_BURST_BP1_F1 RTEMS_EVENT_21
81 #define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22
83 #define RTEMS_EVENT_BURST_BP2_F1 RTEMS_EVENT_22
82
84
83 //****************************
85 //****************************
84 // LFR DEFAULT MODE PARAMETERS
86 // LFR DEFAULT MODE PARAMETERS
85 // COMMON
87 // COMMON
86 #define DEFAULT_SY_LFR_COMMON0 0x00
88 #define DEFAULT_SY_LFR_COMMON0 0x00
87 #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0
89 #define DEFAULT_SY_LFR_COMMON1 0x10 // default value 0 0 0 1 0 0 0 0
88 // NORM
90 // NORM
89 #define DFLT_SY_LFR_N_SWF_L 2048 // nb sample
91 #define DFLT_SY_LFR_N_SWF_L 2048 // nb sample
90 #define DFLT_SY_LFR_N_SWF_P 300 // sec
92 #define DFLT_SY_LFR_N_SWF_P 300 // sec
91 #define DFLT_SY_LFR_N_ASM_P 3600 // sec
93 #define DFLT_SY_LFR_N_ASM_P 3600 // sec
92 #define DFLT_SY_LFR_N_BP_P0 4 // sec
94 #define DFLT_SY_LFR_N_BP_P0 4 // sec
93 #define DFLT_SY_LFR_N_BP_P1 20 // sec
95 #define DFLT_SY_LFR_N_BP_P1 20 // sec
94 #define DFLT_SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3
96 #define DFLT_SY_LFR_N_CWF_LONG_F3 0 // 0 => production of light continuous waveforms at f3
95 #define MIN_DELTA_SNAPSHOT 16 // sec
97 #define MIN_DELTA_SNAPSHOT 16 // sec
96 // BURST
98 // BURST
97 #define DEFAULT_SY_LFR_B_BP_P0 1 // sec
99 #define DEFAULT_SY_LFR_B_BP_P0 1 // sec
98 #define DEFAULT_SY_LFR_B_BP_P1 5 // sec
100 #define DEFAULT_SY_LFR_B_BP_P1 5 // sec
99 // SBM1
101 // SBM1
100 #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec
102 #define DEFAULT_SY_LFR_S1_BP_P0 1 // sec
101 #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec
103 #define DEFAULT_SY_LFR_S1_BP_P1 1 // sec
102 // SBM2
104 // SBM2
103 #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec
105 #define DEFAULT_SY_LFR_S2_BP_P0 1 // sec
104 #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec
106 #define DEFAULT_SY_LFR_S2_BP_P1 5 // sec
105 // ADDITIONAL PARAMETERS
107 // ADDITIONAL PARAMETERS
106 #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms
108 #define TIME_BETWEEN_TWO_SWF_PACKETS 30 // nb x 10 ms => 300 ms
107 #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s
109 #define TIME_BETWEEN_TWO_CWF3_PACKETS 1000 // nb x 10 ms => 10 s
108 // STATUS WORD
110 // STATUS WORD
109 #define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits
111 #define DEFAULT_STATUS_WORD_BYTE0 0x0d // [0000] [1] [101] mode 4 bits / SPW enabled 1 bit / state is run 3 bits
110 #define DEFAULT_STATUS_WORD_BYTE1 0x00
112 #define DEFAULT_STATUS_WORD_BYTE1 0x00
111 //
113 //
112 #define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s
114 #define SY_LFR_DPU_CONNECT_TIMEOUT 100 // 100 * 10 ms = 1 s
113 #define SY_LFR_DPU_CONNECT_ATTEMPT 3
115 #define SY_LFR_DPU_CONNECT_ATTEMPT 3
114 //****************************
116 //****************************
115
117
116 //*****************************
118 //*****************************
117 // APB REGISTERS BASE ADDRESSES
119 // APB REGISTERS BASE ADDRESSES
118 #define REGS_ADDR_APBUART 0x80000100
120 #define REGS_ADDR_APBUART 0x80000100
119 #define REGS_ADDR_GPTIMER 0x80000300
121 #define REGS_ADDR_GPTIMER 0x80000300
120 #define REGS_ADDR_GRSPW 0x80000500
122 #define REGS_ADDR_GRSPW 0x80000500
121 #define REGS_ADDR_TIME_MANAGEMENT 0x80000600
123 #define REGS_ADDR_TIME_MANAGEMENT 0x80000600
122 #define REGS_ADDR_GRGPIO 0x80000b00
124 #define REGS_ADDR_GRGPIO 0x80000b00
123
125
124 #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00
126 #define REGS_ADDR_SPECTRAL_MATRIX 0x80000f00
125 #define REGS_ADDR_WAVEFORM_PICKER 0x80000f50
127 //#define REGS_ADDR_WAVEFORM_PICKER 0x80000f50
128 #define REGS_ADDR_WAVEFORM_PICKER 0x80000f54 // PDB >= 0.1.28
126 #define REGS_ADDR_VHDL_VERSION 0x80000ff0
129 #define REGS_ADDR_VHDL_VERSION 0x80000ff0
127
130
128 #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff
131 #define APBUART_CTRL_REG_MASK_DB 0xfffff7ff
129 #define APBUART_CTRL_REG_MASK_TE 0x00000002
132 #define APBUART_CTRL_REG_MASK_TE 0x00000002
130 // scaler value = system_clock_frequency / ( baud_rate * 8 ) - 1
133 // scaler value = system_clock_frequency / ( baud_rate * 8 ) - 1
131 #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400
134 #define APBUART_SCALER_RELOAD_VALUE 0x00000050 // 25 MHz => about 38400
132
135
133 //**********
136 //**********
134 // IRQ LINES
137 // IRQ LINES
135 #define IRQ_SM_SIMULATOR 9
138 #define IRQ_SM_SIMULATOR 9
136 #define IRQ_SPARC_SM_SIMULATOR 0x19 // see sparcv8.pdf p.76 for interrupt levels
139 #define IRQ_SPARC_SM_SIMULATOR 0x19 // see sparcv8.pdf p.76 for interrupt levels
137 #define IRQ_WAVEFORM_PICKER 14
140 #define IRQ_WAVEFORM_PICKER 14
138 #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels
141 #define IRQ_SPARC_WAVEFORM_PICKER 0x1e // see sparcv8.pdf p.76 for interrupt levels
139 #define IRQ_SPECTRAL_MATRIX 6
142 #define IRQ_SPECTRAL_MATRIX 6
140 #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels
143 #define IRQ_SPARC_SPECTRAL_MATRIX 0x16 // see sparcv8.pdf p.76 for interrupt levels
141
144
142 //*****
145 //*****
143 // TIME
146 // TIME
144 #define CLKDIV_SM_SIMULATOR (10416 - 1) // 10 ms => nominal is 1/96 = 0.010416667, 10417 - 1 = 10416
147 #define CLKDIV_SM_SIMULATOR (10416 - 1) // 10 ms => nominal is 1/96 = 0.010416667, 10417 - 1 = 10416
145 #define TIMER_SM_SIMULATOR 1
148 #define TIMER_SM_SIMULATOR 1
146 #define HK_PERIOD 100 // 100 * 10ms => 1s
149 #define HK_PERIOD 100 // 100 * 10ms => 1s
147 #define SY_LFR_TIME_SYN_TIMEOUT_in_ms 2000
150 #define SY_LFR_TIME_SYN_TIMEOUT_in_ms 2000
148 #define SY_LFR_TIME_SYN_TIMEOUT_in_ticks 200 // 200 * 10 ms = 2 s
151 #define SY_LFR_TIME_SYN_TIMEOUT_in_ticks 200 // 200 * 10 ms = 2 s
149
152
150 //**********
153 //**********
151 // LPP CODES
154 // LPP CODES
152 #define LFR_SUCCESSFUL 0
155 #define LFR_SUCCESSFUL 0
153 #define LFR_DEFAULT 1
156 #define LFR_DEFAULT 1
154 #define LFR_EXE_ERROR 2
157 #define LFR_EXE_ERROR 2
155
158
156 //******
159 //******
157 // RTEMS
160 // RTEMS
158 #define TASKID_RECV 1
161 #define TASKID_RECV 1
159 #define TASKID_ACTN 2
162 #define TASKID_ACTN 2
160 #define TASKID_SPIQ 3
163 #define TASKID_SPIQ 3
161 #define TASKID_STAT 4
164 #define TASKID_STAT 4
162 #define TASKID_AVF0 5
165 #define TASKID_AVF0 5
163 #define TASKID_SWBD 6
166 #define TASKID_SWBD 6
164 #define TASKID_WFRM 7
167 #define TASKID_WFRM 7
165 #define TASKID_DUMB 8
168 #define TASKID_DUMB 8
166 #define TASKID_HOUS 9
169 #define TASKID_HOUS 9
167 #define TASKID_PRC0 10
170 #define TASKID_PRC0 10
168 #define TASKID_CWF3 11
171 #define TASKID_CWF3 11
169 #define TASKID_CWF2 12
172 #define TASKID_CWF2 12
170 #define TASKID_CWF1 13
173 #define TASKID_CWF1 13
171 #define TASKID_SEND 14
174 #define TASKID_SEND 14
172 #define TASKID_WTDG 15
175 #define TASKID_WTDG 15
173 #define TASKID_AVF1 16
176 #define TASKID_AVF1 16
174 #define TASKID_PRC1 17
177 #define TASKID_PRC1 17
175 #define TASKID_AVF2 18
178 #define TASKID_AVF2 18
176 #define TASKID_PRC2 19
179 #define TASKID_PRC2 19
177
180
178 #define TASK_PRIORITY_SPIQ 5
181 #define TASK_PRIORITY_SPIQ 5
179 #define TASK_PRIORITY_WTDG 20
182 #define TASK_PRIORITY_WTDG 20
180 #define TASK_PRIORITY_HOUS 30
183 #define TASK_PRIORITY_HOUS 30
181 #define TASK_PRIORITY_CWF1 35 // CWF1 and CWF2 are never running together
184 #define TASK_PRIORITY_CWF1 35 // CWF1 and CWF2 are never running together
182 #define TASK_PRIORITY_CWF2 35 //
185 #define TASK_PRIORITY_CWF2 35 //
183 #define TASK_PRIORITY_SWBD 37 // SWBD has a lower priority than WFRM, this is to extract the snapshot before sending it
186 #define TASK_PRIORITY_SWBD 37 // SWBD has a lower priority than WFRM, this is to extract the snapshot before sending it
184 #define TASK_PRIORITY_WFRM 40
187 #define TASK_PRIORITY_WFRM 40
185 #define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1
188 #define TASK_PRIORITY_CWF3 40 // there is a printf in this function, be careful with its priority wrt CWF1
186 #define TASK_PRIORITY_SEND 45
189 #define TASK_PRIORITY_SEND 45
187 #define TASK_PRIORITY_RECV 50
190 #define TASK_PRIORITY_RECV 50
188 #define TASK_PRIORITY_ACTN 50
191 #define TASK_PRIORITY_ACTN 50
189 #define TASK_PRIORITY_AVF0 60
192 #define TASK_PRIORITY_AVF0 60
190 #define TASK_PRIORITY_AVF1 70
193 #define TASK_PRIORITY_AVF1 70
191 #define TASK_PRIORITY_PRC0 100
194 #define TASK_PRIORITY_PRC0 100
192 #define TASK_PRIORITY_PRC1 100
195 #define TASK_PRIORITY_PRC1 100
193 #define TASK_PRIORITY_AVF2 110
196 #define TASK_PRIORITY_AVF2 110
194 #define TASK_PRIORITY_PRC2 110
197 #define TASK_PRIORITY_PRC2 110
195 #define TASK_PRIORITY_STAT 200
198 #define TASK_PRIORITY_STAT 200
196 #define TASK_PRIORITY_DUMB 200
199 #define TASK_PRIORITY_DUMB 200
197
200
198 #define MSG_QUEUE_COUNT_RECV 10
201 #define MSG_QUEUE_COUNT_RECV 10
199 #define MSG_QUEUE_COUNT_SEND 50
202 #define MSG_QUEUE_COUNT_SEND 50
200 #define MSG_QUEUE_COUNT_PRC0 10
203 #define MSG_QUEUE_COUNT_PRC0 10
201 #define MSG_QUEUE_COUNT_PRC1 10
204 #define MSG_QUEUE_COUNT_PRC1 10
202 #define MSG_QUEUE_COUNT_PRC2 5
205 #define MSG_QUEUE_COUNT_PRC2 5
203 #define MSG_QUEUE_SIZE_SEND 810 // 806 + 4 => TM_LFR_SCIENCE_BURST_BP2_F1
206 #define MSG_QUEUE_SIZE_SEND 810 // 806 + 4 => TM_LFR_SCIENCE_BURST_BP2_F1
204 #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options
207 #define ACTION_MSG_SPW_IOCTL_SEND_SIZE 24 // hlen *hdr dlen *data sent options
205 #define MSG_QUEUE_SIZE_PRC0 20 // two pointers and one rtems_event + 2 integers
208 #define MSG_QUEUE_SIZE_PRC0 20 // two pointers and one rtems_event + 2 integers
206 #define MSG_QUEUE_SIZE_PRC1 20 // two pointers and one rtems_event + 2 integers
209 #define MSG_QUEUE_SIZE_PRC1 20 // two pointers and one rtems_event + 2 integers
207 #define MSG_QUEUE_SIZE_PRC2 20 // two pointers and one rtems_event + 2 integers
210 #define MSG_QUEUE_SIZE_PRC2 20 // two pointers and one rtems_event + 2 integers
208
211
209 #define QUEUE_RECV 0
212 #define QUEUE_RECV 0
210 #define QUEUE_SEND 1
213 #define QUEUE_SEND 1
211 #define QUEUE_PRC0 2
214 #define QUEUE_PRC0 2
212 #define QUEUE_PRC1 3
215 #define QUEUE_PRC1 3
213 #define QUEUE_PRC2 4
216 #define QUEUE_PRC2 4
214
217
215 //*******
218 //*******
216 // MACROS
219 // MACROS
217 #ifdef PRINT_MESSAGES_ON_CONSOLE
220 #ifdef PRINT_MESSAGES_ON_CONSOLE
218 #define PRINTF(x) printf(x);
221 #define PRINTF(x) printf(x);
219 #define PRINTF1(x,y) printf(x,y);
222 #define PRINTF1(x,y) printf(x,y);
220 #define PRINTF2(x,y,z) printf(x,y,z);
223 #define PRINTF2(x,y,z) printf(x,y,z);
221 #else
224 #else
222 #define PRINTF(x) ;
225 #define PRINTF(x) ;
223 #define PRINTF1(x,y) ;
226 #define PRINTF1(x,y) ;
224 #define PRINTF2(x,y,z) ;
227 #define PRINTF2(x,y,z) ;
225 #endif
228 #endif
226
229
227 #ifdef BOOT_MESSAGES
230 #ifdef BOOT_MESSAGES
228 #define BOOT_PRINTF(x) printf(x);
231 #define BOOT_PRINTF(x) printf(x);
229 #define BOOT_PRINTF1(x,y) printf(x,y);
232 #define BOOT_PRINTF1(x,y) printf(x,y);
230 #define BOOT_PRINTF2(x,y,z) printf(x,y,z);
233 #define BOOT_PRINTF2(x,y,z) printf(x,y,z);
231 #else
234 #else
232 #define BOOT_PRINTF(x) ;
235 #define BOOT_PRINTF(x) ;
233 #define BOOT_PRINTF1(x,y) ;
236 #define BOOT_PRINTF1(x,y) ;
234 #define BOOT_PRINTF2(x,y,z) ;
237 #define BOOT_PRINTF2(x,y,z) ;
235 #endif
238 #endif
236
239
237 #ifdef DEBUG_MESSAGES
240 #ifdef DEBUG_MESSAGES
238 #define DEBUG_PRINTF(x) printf(x);
241 #define DEBUG_PRINTF(x) printf(x);
239 #define DEBUG_PRINTF1(x,y) printf(x,y);
242 #define DEBUG_PRINTF1(x,y) printf(x,y);
240 #define DEBUG_PRINTF2(x,y,z) printf(x,y,z);
243 #define DEBUG_PRINTF2(x,y,z) printf(x,y,z);
241 #else
244 #else
242 #define DEBUG_PRINTF(x) ;
245 #define DEBUG_PRINTF(x) ;
243 #define DEBUG_PRINTF1(x,y) ;
246 #define DEBUG_PRINTF1(x,y) ;
244 #define DEBUG_PRINTF2(x,y,z) ;
247 #define DEBUG_PRINTF2(x,y,z) ;
245 #endif
248 #endif
246
249
247 #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period
250 #define CPU_USAGE_REPORT_PERIOD 6 // * 10 s = period
248
251
249 struct param_local_str{
252 struct param_local_str{
250 unsigned int local_sbm1_nb_cwf_sent;
253 unsigned int local_sbm1_nb_cwf_sent;
251 unsigned int local_sbm1_nb_cwf_max;
254 unsigned int local_sbm1_nb_cwf_max;
252 unsigned int local_sbm2_nb_cwf_sent;
255 unsigned int local_sbm2_nb_cwf_sent;
253 unsigned int local_sbm2_nb_cwf_max;
256 unsigned int local_sbm2_nb_cwf_max;
254 };
257 };
255
258
256 #endif // FSW_PARAMS_H_INCLUDED
259 #endif // FSW_PARAMS_H_INCLUDED
@@ -1,109 +1,122
1 #ifndef GRLIB_REGS_H_INCLUDED
1 #ifndef GRLIB_REGS_H_INCLUDED
2 #define GRLIB_REGS_H_INCLUDED
2 #define GRLIB_REGS_H_INCLUDED
3
3
4 #define NB_GPTIMER 3
4 #define NB_GPTIMER 3
5
5
6 struct apbuart_regs_str{
6 struct apbuart_regs_str{
7 volatile unsigned int data;
7 volatile unsigned int data;
8 volatile unsigned int status;
8 volatile unsigned int status;
9 volatile unsigned int ctrl;
9 volatile unsigned int ctrl;
10 volatile unsigned int scaler;
10 volatile unsigned int scaler;
11 volatile unsigned int fifoDebug;
11 volatile unsigned int fifoDebug;
12 };
12 };
13
13
14 struct grgpio_regs_str{
14 struct grgpio_regs_str{
15 volatile int io_port_data_register;
15 volatile int io_port_data_register;
16 int io_port_output_register;
16 int io_port_output_register;
17 int io_port_direction_register;
17 int io_port_direction_register;
18 int interrupt_mak_register;
18 int interrupt_mak_register;
19 int interrupt_polarity_register;
19 int interrupt_polarity_register;
20 int interrupt_edge_register;
20 int interrupt_edge_register;
21 int bypass_register;
21 int bypass_register;
22 int reserved;
22 int reserved;
23 // 0x20-0x3c interrupt map register(s)
23 // 0x20-0x3c interrupt map register(s)
24 };
24 };
25
25
26 typedef struct {
26 typedef struct {
27 volatile unsigned int counter;
27 volatile unsigned int counter;
28 volatile unsigned int reload;
28 volatile unsigned int reload;
29 volatile unsigned int ctrl;
29 volatile unsigned int ctrl;
30 volatile unsigned int unused;
30 volatile unsigned int unused;
31 } timer_regs_t;
31 } timer_regs_t;
32
32
33 typedef struct {
33 typedef struct {
34 volatile unsigned int scaler_value;
34 volatile unsigned int scaler_value;
35 volatile unsigned int scaler_reload;
35 volatile unsigned int scaler_reload;
36 volatile unsigned int conf;
36 volatile unsigned int conf;
37 volatile unsigned int unused0;
37 volatile unsigned int unused0;
38 timer_regs_t timer[NB_GPTIMER];
38 timer_regs_t timer[NB_GPTIMER];
39 } gptimer_regs_t;
39 } gptimer_regs_t;
40
40
41 typedef struct {
41 typedef struct {
42 volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time
42 volatile int ctrl; // bit 0 forces the load of the coarse_time_load value and resets the fine_time
43 volatile int coarse_time_load;
43 volatile int coarse_time_load;
44 volatile int coarse_time;
44 volatile int coarse_time;
45 volatile int fine_time;
45 volatile int fine_time;
46 } time_management_regs_t;
46 } time_management_regs_t;
47
47
48 typedef struct {
48 // PDB >= 0.1.28
49 volatile int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
50 volatile int burst_enable; // 0x04 01 *** burst f2, f1, f0 enable f3, f2, f1, f0
51 volatile int addr_data_f0; // 0x08 10 ***
52 volatile int addr_data_f1; // 0x0c 11 ***
53 volatile int addr_data_f2; // 0x10 100 ***
54 volatile int addr_data_f3; // 0x14 101 ***
55 volatile int status; // 0x18 110 ***
56 volatile int delta_snapshot; // 0x1c 111 ***
57 volatile int delta_f2_f1; // 0x20 0000 ***
58 volatile int delta_f2_f0; // 0x24 0001 ***
59 volatile int nb_burst_available;// 0x28 0010 ***
60 volatile int nb_snapshot_param; // 0x2c 0011 ***
61 } waveform_picker_regs_t;
62
63 typedef struct{
49 typedef struct{
64 int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
50 int data_shaping; // 0x00 00 *** R1 R0 SP1 SP0 BW
65 int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
51 int run_burst_enable; // 0x04 01 *** [run *** burst f2, f1, f0 *** enable f3, f2, f1, f0 ]
66 int addr_data_f0; // 0x08
52 int addr_data_f0_0; // 0x08
67 int addr_data_f1; // 0x0c
53 int addr_data_f0_1; // 0x0c
68 int addr_data_f2; // 0x10
54 int addr_data_f1_0; // 0x10
69 int addr_data_f3; // 0x14
55 int addr_data_f1_1; // 0x14
70 volatile int status; // 0x18
56 int addr_data_f2_0; // 0x18
71 int delta_snapshot; // 0x1c
57 int addr_data_f2_1; // 0x1c
72 int delta_f0; // 0x20
58 int addr_data_f3_0; // 0x20
73 int delta_f0_2; // 0x24
59 int addr_data_f3_1; // 0x24
74 int delta_f1; // 0x28
60 volatile int status; // 0x28
75 int delta_f2; // 0x2c
61 int delta_snapshot; // 0x2c
76 int nb_data_by_buffer; // 0x30
62 int delta_f0; // 0x30
77 int snapshot_param; // 0x34
63 int delta_f0_2; // 0x34
78 int start_date; // 0x38
64 int delta_f1; // 0x38
79 int nb_word_in_buffer; // 0x3c
65 int delta_f2; // 0x3c
80 } waveform_picker_regs_new_t;
66 int nb_data_by_buffer; // 0x40 number of samples in a buffer = 2688
67 int snapshot_param; // 0x44
68 int start_date; // 0x48
69 //
70 volatile unsigned int f0_0_coarse_time; // 0x4c
71 volatile unsigned int f0_0_fine_time; // 0x50
72 volatile unsigned int f0_1_coarse_time; // 0x54
73 volatile unsigned int f0_1_fine_time; // 0x58
74 //
75 volatile unsigned int f1_0_coarse_time; // 0x5c
76 volatile unsigned int f1_0_fine_time; // 0x60
77 volatile unsigned int f1_1_coarse_time; // 0x64
78 volatile unsigned int f1_1_fine_time; // 0x68
79 //
80 volatile unsigned int f2_0_coarse_time; // 0x6c
81 volatile unsigned int f2_0_fine_time; // 0x70
82 volatile unsigned int f2_1_coarse_time; // 0x74
83 volatile unsigned int f2_1_fine_time; // 0x78
84 //
85 volatile unsigned int f3_0_coarse_time; // 0x7c
86 volatile unsigned int f3_0_fine_time; // 0x80
87 volatile unsigned int f3_1_coarse_time; // 0x84
88 volatile unsigned int f3_1_fine_time; // 0x88
89 //
90 unsigned int buffer_length; // 0x8c = buffer length in burst 2688 / 16 = 168
91 } waveform_picker_regs_0_1_18_t;
81
92
82 typedef struct {
93 typedef struct {
83 volatile int config; // 0x00