##// END OF EJS Templates
All modes partially implemented...
paul@pc-solar1.lab-lpp.local -
r22:c4e2ba2dd2be default
parent child
Show More
@@ -1,225 +1,225
1 1 #############################################################################
2 # Makefile for building: bin/fsw$(SW_VERSION)
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Fri Jun 14 07:50:58 2013
2 # Makefile for building: bin/fsw-gsa
3 # Generated by qmake (2.01a) (Qt 4.8.4) on: Tue Jun 18 14:00:55 2013
4 4 # Project: fsw-qt.pro
5 5 # Template: app
6 6 # Command: /usr/bin/qmake-qt4 -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
7 7 #############################################################################
8 8
9 9 ####### Compiler, tools and options
10 10
11 11 CC = sparc-rtems-gcc
12 12 CXX = sparc-rtems-g++
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=4 -DPRINT_MESSAGES_ON_CONSOLE
13 DEFINES = -DSW_VERSION_N1=0 -DSW_VERSION_N2=0 -DSW_VERSION_N3=0 -DSW_VERSION_N4=5 -DPRINT_MESSAGES_ON_CONSOLE -DGSA
14 14 CFLAGS = -pipe -O3 -Wall $(DEFINES)
15 15 CXXFLAGS = -pipe -O3 -Wall $(DEFINES)
16 16 INCPATH = -I/usr/lib64/qt4/mkspecs/linux-g++ -I. -I../src -I../header
17 17 LINK = sparc-rtems-g++
18 18 LFLAGS =
19 19 LIBS = $(SUBLIBS)
20 20 AR = sparc-rtems-ar rcs
21 21 RANLIB =
22 22 QMAKE = /usr/bin/qmake-qt4
23 23 TAR = tar -cf
24 24 COMPRESS = gzip -9f
25 25 COPY = cp -f
26 26 SED = sed
27 27 COPY_FILE = $(COPY)
28 28 COPY_DIR = $(COPY) -r
29 29 STRIP = sparc-rtems-strip
30 30 INSTALL_FILE = install -m 644 -p
31 31 INSTALL_DIR = $(COPY_DIR)
32 32 INSTALL_PROGRAM = install -m 755 -p
33 33 DEL_FILE = rm -f
34 34 SYMLINK = ln -f -s
35 35 DEL_DIR = rmdir
36 36 MOVE = mv -f
37 37 CHK_DIR_EXISTS= test -d
38 38 MKDIR = mkdir -p
39 39
40 40 ####### Output directory
41 41
42 42 OBJECTS_DIR = obj/
43 43
44 44 ####### Files
45 45
46 46 SOURCES = ../src/wf_handler.c \
47 47 ../src/tc_handler.c \
48 48 ../src/fsw_processing.c \
49 49 ../src/fsw_misc.c \
50 50 ../src/fsw_init.c \
51 51 ../src/fsw_globals.c
52 52 OBJECTS = obj/wf_handler.o \
53 53 obj/tc_handler.o \
54 54 obj/fsw_processing.o \
55 55 obj/fsw_misc.o \
56 56 obj/fsw_init.o \
57 57 obj/fsw_globals.o
58 58 DIST = /usr/lib64/qt4/mkspecs/common/unix.conf \
59 59 /usr/lib64/qt4/mkspecs/common/linux.conf \
60 60 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
61 61 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
62 62 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
63 63 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
64 64 /usr/lib64/qt4/mkspecs/qconfig.pri \
65 65 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
66 66 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
67 67 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
68 68 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
69 69 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
70 70 sparc.pri \
71 71 /usr/lib64/qt4/mkspecs/features/release.prf \
72 72 /usr/lib64/qt4/mkspecs/features/default_post.prf \
73 73 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
74 74 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
75 75 /usr/lib64/qt4/mkspecs/features/resources.prf \
76 76 /usr/lib64/qt4/mkspecs/features/uic.prf \
77 77 /usr/lib64/qt4/mkspecs/features/yacc.prf \
78 78 /usr/lib64/qt4/mkspecs/features/lex.prf \
79 79 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf \
80 80 fsw-qt.pro
81 QMAKE_TARGET = fsw$(SW_VERSION)
81 QMAKE_TARGET = fsw-gsa
82 82 DESTDIR = bin/
83 TARGET = bin/fsw$(SW_VERSION)
83 TARGET = bin/fsw-gsa
84 84
85 85 first: all
86 86 ####### Implicit rules
87 87
88 88 .SUFFIXES: .o .c .cpp .cc .cxx .C
89 89
90 90 .cpp.o:
91 91 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
92 92
93 93 .cc.o:
94 94 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
95 95
96 96 .cxx.o:
97 97 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
98 98
99 99 .C.o:
100 100 $(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
101 101
102 102 .c.o:
103 103 $(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
104 104
105 105 ####### Build rules
106 106
107 107 all: Makefile $(TARGET)
108 108
109 109 $(TARGET): $(OBJECTS)
110 110 @$(CHK_DIR_EXISTS) bin/ || $(MKDIR) bin/
111 111 $(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
112 112
113 113 Makefile: fsw-qt.pro /usr/lib64/qt4/mkspecs/linux-g++/qmake.conf /usr/lib64/qt4/mkspecs/common/unix.conf \
114 114 /usr/lib64/qt4/mkspecs/common/linux.conf \
115 115 /usr/lib64/qt4/mkspecs/common/gcc-base.conf \
116 116 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf \
117 117 /usr/lib64/qt4/mkspecs/common/g++-base.conf \
118 118 /usr/lib64/qt4/mkspecs/common/g++-unix.conf \
119 119 /usr/lib64/qt4/mkspecs/qconfig.pri \
120 120 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri \
121 121 /usr/lib64/qt4/mkspecs/features/qt_functions.prf \
122 122 /usr/lib64/qt4/mkspecs/features/qt_config.prf \
123 123 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf \
124 124 /usr/lib64/qt4/mkspecs/features/default_pre.prf \
125 125 sparc.pri \
126 126 /usr/lib64/qt4/mkspecs/features/release.prf \
127 127 /usr/lib64/qt4/mkspecs/features/default_post.prf \
128 128 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf \
129 129 /usr/lib64/qt4/mkspecs/features/warn_on.prf \
130 130 /usr/lib64/qt4/mkspecs/features/resources.prf \
131 131 /usr/lib64/qt4/mkspecs/features/uic.prf \
132 132 /usr/lib64/qt4/mkspecs/features/yacc.prf \
133 133 /usr/lib64/qt4/mkspecs/features/lex.prf \
134 134 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf
135 135 $(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
136 136 /usr/lib64/qt4/mkspecs/common/unix.conf:
137 137 /usr/lib64/qt4/mkspecs/common/linux.conf:
138 138 /usr/lib64/qt4/mkspecs/common/gcc-base.conf:
139 139 /usr/lib64/qt4/mkspecs/common/gcc-base-unix.conf:
140 140 /usr/lib64/qt4/mkspecs/common/g++-base.conf:
141 141 /usr/lib64/qt4/mkspecs/common/g++-unix.conf:
142 142 /usr/lib64/qt4/mkspecs/qconfig.pri:
143 143 /usr/lib64/qt4/mkspecs/modules/qt_webkit.pri:
144 144 /usr/lib64/qt4/mkspecs/features/qt_functions.prf:
145 145 /usr/lib64/qt4/mkspecs/features/qt_config.prf:
146 146 /usr/lib64/qt4/mkspecs/features/exclusive_builds.prf:
147 147 /usr/lib64/qt4/mkspecs/features/default_pre.prf:
148 148 sparc.pri:
149 149 /usr/lib64/qt4/mkspecs/features/release.prf:
150 150 /usr/lib64/qt4/mkspecs/features/default_post.prf:
151 151 /usr/lib64/qt4/mkspecs/features/unix/gdb_dwarf_index.prf:
152 152 /usr/lib64/qt4/mkspecs/features/warn_on.prf:
153 153 /usr/lib64/qt4/mkspecs/features/resources.prf:
154 154 /usr/lib64/qt4/mkspecs/features/uic.prf:
155 155 /usr/lib64/qt4/mkspecs/features/yacc.prf:
156 156 /usr/lib64/qt4/mkspecs/features/lex.prf:
157 157 /usr/lib64/qt4/mkspecs/features/include_source_dir.prf:
158 158 qmake: FORCE
159 159 @$(QMAKE) -spec /usr/lib64/qt4/mkspecs/linux-g++ -o Makefile fsw-qt.pro
160 160
161 161 dist:
162 @$(CHK_DIR_EXISTS) obj/fsw$(SW_VERSION)1.0.0 || $(MKDIR) obj/fsw$(SW_VERSION)1.0.0
163 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw$(SW_VERSION)1.0.0/ && (cd `dirname obj/fsw$(SW_VERSION)1.0.0` && $(TAR) fsw$(SW_VERSION)1.0.0.tar fsw$(SW_VERSION)1.0.0 && $(COMPRESS) fsw$(SW_VERSION)1.0.0.tar) && $(MOVE) `dirname obj/fsw$(SW_VERSION)1.0.0`/fsw$(SW_VERSION)1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw$(SW_VERSION)1.0.0
162 @$(CHK_DIR_EXISTS) obj/fsw-gsa1.0.0 || $(MKDIR) obj/fsw-gsa1.0.0
163 $(COPY_FILE) --parents $(SOURCES) $(DIST) obj/fsw-gsa1.0.0/ && (cd `dirname obj/fsw-gsa1.0.0` && $(TAR) fsw-gsa1.0.0.tar fsw-gsa1.0.0 && $(COMPRESS) fsw-gsa1.0.0.tar) && $(MOVE) `dirname obj/fsw-gsa1.0.0`/fsw-gsa1.0.0.tar.gz . && $(DEL_FILE) -r obj/fsw-gsa1.0.0
164 164
165 165
166 166 clean:compiler_clean
167 167 -$(DEL_FILE) $(OBJECTS)
168 168 -$(DEL_FILE) *~ core *.core
169 169
170 170
171 171 ####### Sub-libraries
172 172
173 173 distclean: clean
174 174 -$(DEL_FILE) $(TARGET)
175 175 -$(DEL_FILE) Makefile
176 176
177 177
178 178 grmon:
179 179 cd bin && C:/opt/grmon-eval-2.0.29b/win32/bin/grmon.exe -uart COM4 -u
180 180
181 181 check: first
182 182
183 183 compiler_rcc_make_all:
184 184 compiler_rcc_clean:
185 185 compiler_uic_make_all:
186 186 compiler_uic_clean:
187 187 compiler_image_collection_make_all: qmake_image_collection.cpp
188 188 compiler_image_collection_clean:
189 189 -$(DEL_FILE) qmake_image_collection.cpp
190 190 compiler_yacc_decl_make_all:
191 191 compiler_yacc_decl_clean:
192 192 compiler_yacc_impl_make_all:
193 193 compiler_yacc_impl_clean:
194 194 compiler_lex_make_all:
195 195 compiler_lex_clean:
196 196 compiler_clean:
197 197
198 198 ####### Compile
199 199
200 200 obj/wf_handler.o: ../src/wf_handler.c
201 201 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/wf_handler.o ../src/wf_handler.c
202 202
203 203 obj/tc_handler.o: ../src/tc_handler.c
204 204 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/tc_handler.o ../src/tc_handler.c
205 205
206 206 obj/fsw_processing.o: ../src/fsw_processing.c
207 207 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_processing.o ../src/fsw_processing.c
208 208
209 209 obj/fsw_misc.o: ../src/fsw_misc.c
210 210 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_misc.o ../src/fsw_misc.c
211 211
212 212 obj/fsw_init.o: ../src/fsw_init.c
213 213 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_init.o ../src/fsw_init.c
214 214
215 215 obj/fsw_globals.o: ../src/fsw_globals.c
216 216 $(CC) -c $(CFLAGS) $(INCPATH) -o obj/fsw_globals.o ../src/fsw_globals.c
217 217
218 218 ####### Install
219 219
220 220 install: FORCE
221 221
222 222 uninstall: FORCE
223 223
224 224 FORCE:
225 225
1 NO CONTENT: modified file, binary diff hidden
1 NO CONTENT: modified file, binary diff hidden
@@ -1,51 +1,51
1 1 TEMPLATE = app
2 2 # CONFIG += console v8 sim
3 3 # CONFIG options = verbose *** cpu_usage_report *** gsa
4 CONFIG += console verbose
4 CONFIG += console verbose gsa
5 5 CONFIG -= qt
6 6
7 7 include(./sparc.pri)
8 8
9 9 # flight software version
10 SW_VERSION=-0-5
10 SWVERSION=-0-5
11 11 DEFINES += SW_VERSION_N1=0
12 12 DEFINES += SW_VERSION_N2=0
13 13 DEFINES += SW_VERSION_N3=0
14 14 DEFINES += SW_VERSION_N4=5
15 15
16 16 contains( CONFIG, verbose ) {
17 17 DEFINES += PRINT_MESSAGES_ON_CONSOLE
18 18 }
19 19
20 20 contains( CONFIG, cpu_usage_report ) {
21 21 DEFINES += PRINT_TASK_STATISTICS
22 22 }
23 23
24 TARGET = fsw$(SW_VERSION)
24 TARGET = fsw
25 25 contains( CONFIG, gsa ) {
26 26 DEFINES += GSA
27 TARGET = fsw-gsa$(SW_VERSION)
27 TARGET = fsw-gsa
28 28 }
29 29
30 30 INCLUDEPATH += \
31 31 ../src \
32 32 ../header
33 33
34 34 SOURCES += \
35 35 ../src/wf_handler.c \
36 36 ../src/tc_handler.c \
37 37 ../src/fsw_processing.c \
38 38 ../src/fsw_misc.c \
39 39 ../src/fsw_init.c \
40 40 ../src/fsw_globals.c
41 41
42 42 HEADERS += \
43 43 ../header/wf_handler.h \
44 44 ../header/tc_handler.h \
45 45 ../header/grlib_regs.h \
46 46 ../header/fsw_processing.h \
47 47 ../header/fsw_params.h \
48 48 ../header/fsw_misc.h \
49 49 ../header/fsw_init.h \
50 50 ../header/ccsds_types.h
51 51
@@ -1,265 +1,265
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE QtCreatorProject>
3 <!-- Written by Qt Creator 2.4.1, 2013-06-17T15:56:28. -->
3 <!-- Written by Qt Creator 2.4.1, 2013-06-18T14:38:28. -->
4 4 <qtcreator>
5 5 <data>
6 6 <variable>ProjectExplorer.Project.ActiveTarget</variable>
7 7 <value type="int">0</value>
8 8 </data>
9 9 <data>
10 10 <variable>ProjectExplorer.Project.EditorSettings</variable>
11 11 <valuemap type="QVariantMap">
12 12 <value type="bool" key="EditorConfiguration.AutoIndent">true</value>
13 13 <value type="bool" key="EditorConfiguration.AutoSpacesForTabs">false</value>
14 14 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.0">
15 15 <value type="QString" key="language">Cpp</value>
16 16 <valuemap type="QVariantMap" key="value">
17 17 <value type="QString" key="CurrentPreferences">CppGlobal</value>
18 18 </valuemap>
19 19 </valuemap>
20 20 <valuemap type="QVariantMap" key="EditorConfiguration.CodeStyle.1">
21 21 <value type="QString" key="language">QmlJS</value>
22 22 <valuemap type="QVariantMap" key="value">
23 23 <value type="QString" key="CurrentPreferences">QmlJSGlobal</value>
24 24 </valuemap>
25 25 </valuemap>
26 26 <value type="int" key="EditorConfiguration.CodeStyle.Count">2</value>
27 27 <value type="QByteArray" key="EditorConfiguration.Codec">System</value>
28 28 <value type="bool" key="EditorConfiguration.ConstrainTooltips">false</value>
29 29 <value type="int" key="EditorConfiguration.IndentSize">4</value>
30 30 <value type="bool" key="EditorConfiguration.MouseNavigation">true</value>
31 31 <value type="int" key="EditorConfiguration.PaddingMode">1</value>
32 32 <value type="bool" key="EditorConfiguration.ScrollWheelZooming">true</value>
33 33 <value type="int" key="EditorConfiguration.SmartBackspaceBehavior">0</value>
34 34 <value type="bool" key="EditorConfiguration.SpacesForTabs">true</value>
35 35 <value type="int" key="EditorConfiguration.TabKeyBehavior">0</value>
36 36 <value type="int" key="EditorConfiguration.TabSize">8</value>
37 37 <value type="bool" key="EditorConfiguration.UseGlobal">true</value>
38 38 <value type="int" key="EditorConfiguration.Utf8BomBehavior">1</value>
39 39 <value type="bool" key="EditorConfiguration.addFinalNewLine">true</value>
40 40 <value type="bool" key="EditorConfiguration.cleanIndentation">true</value>
41 41 <value type="bool" key="EditorConfiguration.cleanWhitespace">true</value>
42 42 <value type="bool" key="EditorConfiguration.inEntireDocument">false</value>
43 43 </valuemap>
44 44 </data>
45 45 <data>
46 46 <variable>ProjectExplorer.Project.PluginSettings</variable>
47 47 <valuemap type="QVariantMap"/>
48 48 </data>
49 49 <data>
50 50 <variable>ProjectExplorer.Project.Target.0</variable>
51 51 <valuemap type="QVariantMap">
52 52 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop</value>
53 53 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop</value>
54 54 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Target.DesktopTarget</value>
55 55 <value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
56 56 <value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
57 57 <value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
58 58 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
59 59 <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value>
60 60 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
61 61 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
62 62 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
63 63 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
64 64 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
65 65 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
66 66 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
67 67 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
68 68 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
69 69 </valuemap>
70 70 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
71 71 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
72 72 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
73 73 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
74 74 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
75 75 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
76 76 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
77 77 </valuemap>
78 78 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
79 79 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
80 80 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
81 81 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
82 82 </valuemap>
83 83 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
84 84 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
85 85 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
86 86 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
87 87 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
88 88 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
89 89 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
90 90 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
91 91 </valuemap>
92 92 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
93 93 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
94 94 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
95 95 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
96 96 </valuemap>
97 97 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
98 98 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
99 99 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
100 100 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Release</value>
101 101 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
102 102 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
103 103 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">0</value>
104 104 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
105 105 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
106 106 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
107 107 </valuemap>
108 108 <valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
109 109 <value type="QString" key="ProjectExplorer.BuildCOnfiguration.ToolChain">ProjectExplorer.ToolChain.Gcc:/usr/bin/g++.x86-linux-generic-elf-64bit./usr/bin/gdb</value>
110 110 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
111 111 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
112 112 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
113 113 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
114 114 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
115 115 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
116 116 <value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibraryAuto">true</value>
117 117 <value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
118 118 <value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
119 119 </valuemap>
120 120 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
121 121 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
122 122 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
123 123 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
124 124 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
125 125 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
126 126 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
127 127 </valuemap>
128 128 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
129 129 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
130 130 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
131 131 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
132 132 </valuemap>
133 133 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.1">
134 134 <valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
135 135 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Make</value>
136 136 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
137 137 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
138 138 <value type="bool" key="Qt4ProjectManager.MakeStep.Clean">true</value>
139 139 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">clean</value>
140 140 <value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
141 141 </valuemap>
142 142 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">1</value>
143 143 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Clean</value>
144 144 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
145 145 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Clean</value>
146 146 </valuemap>
147 147 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">2</value>
148 148 <value type="bool" key="ProjectExplorer.BuildConfiguration.ClearSystemEnvironment">false</value>
149 149 <valuelist type="QVariantList" key="ProjectExplorer.BuildConfiguration.UserEnvironmentChanges"/>
150 150 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Qt 4.8.2 in PATH (System) Debug</value>
151 151 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
152 152 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4BuildConfiguration</value>
153 153 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildConfiguration">2</value>
154 154 <value type="QString" key="Qt4ProjectManager.Qt4BuildConfiguration.BuildDirectory">/opt/DEV_PLE/FSW-qt</value>
155 155 <value type="int" key="Qt4ProjectManager.Qt4BuildConfiguration.QtVersionId">1</value>
156 156 <value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">false</value>
157 157 </valuemap>
158 158 <value type="int" key="ProjectExplorer.Target.BuildConfigurationCount">2</value>
159 159 <valuemap type="QVariantMap" key="ProjectExplorer.Target.DeployConfiguration.0">
160 160 <valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
161 161 <value type="int" key="ProjectExplorer.BuildStepList.StepsCount">0</value>
162 162 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Deploy</value>
163 163 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
164 164 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Deploy</value>
165 165 </valuemap>
166 166 <value type="int" key="ProjectExplorer.BuildConfiguration.BuildStepListCount">1</value>
167 167 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">No deployment</value>
168 168 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
169 169 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.DefaultDeployConfiguration</value>
170 170 </valuemap>
171 171 <value type="int" key="ProjectExplorer.Target.DeployConfigurationCount">1</value>
172 172 <valuemap type="QVariantMap" key="ProjectExplorer.Target.RunConfiguration.0">
173 173 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
174 174 <value type="bool" key="Analyzer.Project.UseGlobal">true</value>
175 175 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
176 176 <valuelist type="QVariantList" key="Analyzer.Valgrind.AddedSuppressionFiles"/>
177 177 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
178 178 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectBusEvents">false</value>
179 179 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
180 180 <value type="bool" key="Analyzer.Valgrind.Callgrind.CollectSystime">false</value>
181 181 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
182 182 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableBranchSim">false</value>
183 183 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
184 184 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableCacheSim">false</value>
185 185 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
186 186 <value type="bool" key="Analyzer.Valgrind.Callgrind.EnableEventToolTips">true</value>
187 187 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
188 188 <value type="double" key="Analyzer.Valgrind.Callgrind.MinimumCostRatio">0.01</value>
189 189 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
190 190 <value type="double" key="Analyzer.Valgrind.Callgrind.VisualisationMinimumCostRatio">10</value>
191 191 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
192 192 <value type="bool" key="Analyzer.Valgrind.FilterExternalIssues">true</value>
193 193 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
194 194 <value type="int" key="Analyzer.Valgrind.NumCallers">25</value>
195 195 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
196 196 <valuelist type="QVariantList" key="Analyzer.Valgrind.RemovedSuppressionFiles"/>
197 197 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
198 198 <value type="bool" key="Analyzer.Valgrind.TrackOrigins">true</value>
199 199 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
200 200 <value type="QString" key="Analyzer.Valgrind.ValgrindExecutable">valgrind</value>
201 201 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
202 202 <value type="int">0</value>
203 203 <value type="int">1</value>
204 204 <value type="int">2</value>
205 205 <value type="int">3</value>
206 206 <value type="int">4</value>
207 207 <value type="int">5</value>
208 208 <value type="int">6</value>
209 209 <value type="int">7</value>
210 210 <value type="int">8</value>
211 211 <value type="int">9</value>
212 212 <value type="int">10</value>
213 213 <value type="int">11</value>
214 214 <value type="int">12</value>
215 215 <value type="int">13</value>
216 216 <value type="int">14</value>
217 217 </valuelist>
218 218 <valuelist type="QVariantList" key="Analyzer.Valgrind.VisibleErrorKinds">
219 219 <value type="int">0</value>
220 220 <value type="int">1</value>
221 221 <value type="int">2</value>
222 222 <value type="int">3</value>
223 223 <value type="int">4</value>
224 224 <value type="int">5</value>
225 225 <value type="int">6</value>
226 226 <value type="int">7</value>
227 227 <value type="int">8</value>
228 228 <value type="int">9</value>
229 229 <value type="int">10</value>
230 230 <value type="int">11</value>
231 231 <value type="int">12</value>
232 232 <value type="int">13</value>
233 233 <value type="int">14</value>
234 234 </valuelist>
235 235 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">fsw-qt</value>
236 236 <value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
237 237 <value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.Qt4RunConfiguration</value>
238 238 <value type="int" key="Qt4ProjectManager.Qt4RunConfiguration.BaseEnvironmentBase">2</value>
239 239 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"></value>
240 240 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">fsw-qt.pro</value>
241 241 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
242 242 <value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseTerminal">true</value>
243 243 <valuelist type="QVariantList" key="Qt4ProjectManager.Qt4RunConfiguration.UserEnvironmentChanges"/>
244 244 <value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
245 245 <value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
246 246 <value type="bool" key="RunConfiguration.UseCppDebugger">true</value>
247 247 <value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
248 248 <value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
249 249 </valuemap>
250 250 <value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
251 251 </valuemap>
252 252 </data>
253 253 <data>
254 254 <variable>ProjectExplorer.Project.TargetCount</variable>
255 255 <value type="int">1</value>
256 256 </data>
257 257 <data>
258 258 <variable>ProjectExplorer.Project.Updater.EnvironmentId</variable>
259 259 <value type="QString">{2e58a81f-9962-4bba-ae6b-760177f0656c}</value>
260 260 </data>
261 261 <data>
262 262 <variable>ProjectExplorer.Project.Updater.FileVersion</variable>
263 263 <value type="int">10</value>
264 264 </data>
265 265 </qtcreator>
@@ -1,77 +1,76
1 1 #ifndef TC_HANDLER_H_INCLUDED
2 2 #define TC_HANDLER_H_INCLUDED
3 3
4 4 #include <rtems.h>
5 5 #include <bsp.h> // for the LEON_Unmask_interrupt function
6 6 #include <stdio.h>
7 7 #include <unistd.h> // for the read call
8 8 #include <sys/ioctl.h> // for the ioctl call
9 9 #include <ccsds_types.h>
10 10 #include <grspw.h>
11 11 #include <fsw_init.h>
12 12
13 13 extern int fdSPW;
14 14 extern rtems_name misc_name[ ];
15 15 extern rtems_name misc_id[ ];
16 16 extern rtems_id Task_id[ ]; // array of task ids
17 17 // MODE PARAMETERS
18 18 extern struct param_common_str param_common;
19 19 extern struct param_norm_str param_norm;
20 20 extern struct param_sbm1_str param_sbm1;
21 21 extern struct param_sbm2_str param_sbm2;
22 22 extern Packet_TM_LFR_HK_t housekeeping_packet;
23 23 extern time_management_regs_t *time_management_regs;
24 24 extern waveform_picker_regs_t *waveform_picker_regs;
25 25 extern gptimer_regs_t *gptimer_regs;
26 26
27 27 //****
28 28 // ISR
29 29 rtems_isr commutation_isr1( rtems_vector_number vector );
30 30 rtems_isr commutation_isr2( rtems_vector_number vector );
31 31
32 32 //**********************
33 33 // GENERAL USE FUNCTIONS
34 34 void initLookUpTableForCRC( void );
35 35 void GetCRCAsTwoBytes(unsigned char* data, unsigned char* crcAsTwoBytes, unsigned int sizeOfData);
36 36
37 37 //*********************
38 38 // ACCEPTANCE FUNCTIONS
39 39 unsigned char acceptTM(ccsdsTelecommandPacket_t * TMPacket, unsigned int tc_len_recv);
40 40
41 41 unsigned char TM_build_header( enum TM_TYPE tm_type, unsigned int packetLength,
42 42 unsigned int coarseTime, unsigned int fineTime, TMHeader_t *TMHeader);
43 43 unsigned char TM_build_data(ccsdsTelecommandPacket_t *TC, char* data, unsigned int SID, unsigned char *computed_CRC);
44 44 int TC_checker(ccsdsTelecommandPacket_t *TC, unsigned int TC_LEN_RCV);
45 45
46 46 //***********
47 47 // RTEMS TASK
48 48 rtems_task recv_task( rtems_task_argument unused );
49 49 rtems_task actn_task( rtems_task_argument unused );
50 50 rtems_task dumb_task( rtems_task_argument unused );
51 51 int create_message_queue( void );
52 52
53 53 //***********
54 54 // TC ACTIONS
55 55 int action_default(ccsdsTelecommandPacket_t *TC);
56 56 int action_default_alt(ccsdsTelecommandPacket_t *TC);
57 57 int send_tm_lfr_tc_exe_success(ccsdsTelecommandPacket_t *TC);
58 58 //
59 59 int stop_current_mode();
60 60 int enter_normal_mode();
61 int enter_burst_mode();
61 62 int enter_sbm1_mode();
63 int enter_sbm2_mode();
62 64 int action_load_comm(ccsdsTelecommandPacket_t *TC);
63 65 int action_load_norm(ccsdsTelecommandPacket_t *TC);
64 66 int action_enter(ccsdsTelecommandPacket_t *TC);
65 67 int action_updt_time(ccsdsTelecommandPacket_t *TC);
66 68 //
67 69 void update_last_TC_exe(ccsdsTelecommandPacket_t *TC);
68 70 void update_last_TC_rej(ccsdsTelecommandPacket_t *TC);
69 71 void close_action(ccsdsTelecommandPacket_t *TC, int result);
70 //
71 rtems_status_code restart_if_needed(rtems_id id);
72 rtems_status_code suspend_if_needed(rtems_id id);
73 72
74 73 #endif // TC_HANDLER_H_INCLUDED
75 74
76 75
77 76
@@ -1,40 +1,40
1 1 #ifndef WF_HANDLER_H_INCLUDED
2 2 #define WF_HANDLER_H_INCLUDED
3 3
4 4 #include <rtems.h>
5 5 #include <fsw_params.h>
6 6 #include <grspw.h>
7 7 #include <grlib_regs.h>
8 8 #include <ccsds_types.h>
9 9 #include <stdio.h>
10 10 #include <fsw_init.h>
11 11 #include <math.h>
12 12
13 13 #define pi 3.1415
14 14
15 15 //#include <sys/ioctl.h>
16 16
17 17 extern rtems_id Task_id[]; /* array of task ids */
18 18 extern int fdSPW;
19 19 extern volatile int wf_snap_f0[ ];
20 20 extern volatile int wf_snap_f1[ ];
21 21 extern volatile int wf_snap_f1_bis[ ];
22 22 extern volatile int wf_snap_f2[ ];
23 extern volatile int wf_snap_f2_bis[ ];
23 24 extern volatile int wf_cont_f3[ ];
24 25 extern waveform_picker_regs_t *waveform_picker_regs;
25 26
26 27 rtems_isr waveforms_isr( rtems_vector_number vector );
27 rtems_isr waveforms_isr_alternative( rtems_vector_number vector );
28 28 rtems_isr waveforms_simulator_isr( rtems_vector_number vector );
29 29 rtems_task wfrm_task(rtems_task_argument argument);
30 30
31 31 //******************
32 32 // general functions
33 33 void init_waveforms( void );
34 34 void reset_waveforms( void );
35 35 void send_waveform( ExtendedTMHeader_t *header, volatile int *waveform, unsigned int sid, spw_ioctl_pkt_send *spw_ioctl_send);
36 36 void init_waveform_picker_regs();
37 37 void set_data_shaping_parameters(unsigned char parameters);
38 38 int build_value(int value1, int value0);
39 39
40 40 #endif // WF_HANDLER_H_INCLUDED
@@ -1,54 +1,55
1 1 #include <fsw_processing.h>
2 2 #include <rtems.h>
3 3 #include <ccsds_types.h>
4 4
5 5 // RTEMS GLOBAL VARIABLES
6 6 rtems_name misc_name[5];
7 7 rtems_name misc_id[5];
8 8 rtems_id Task_id[15]; /* array of task ids */
9 9 rtems_name Task_name[15]; /* array of task names */
10 10 int fdSPW = 0;
11 11 int fdUART = 0;
12 12
13 13 spectral_matrices_regs_t *spectral_matrices_regs = NULL;
14 14
15 15 // APB CONFIGURATION REGISTERS
16 16 time_management_regs_t *time_management_regs = (time_management_regs_t*) REGS_ADDR_TIME_MANAGEMENT;
17 17 waveform_picker_regs_t *waveform_picker_regs = (waveform_picker_regs_t*) REGS_ADDR_WAVEFORM_PICKER;
18 18 gptimer_regs_t *gptimer_regs = (gptimer_regs_t *) REGS_ADDR_GPTIMER;
19 19
20 20 // WAVEFORMS GLOBAL VARIABLES // 2048 * 3 * 4 + 2 * 4 = 24576 + 8 bytes
21 21 volatile int wf_snap_f0[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
22 22 volatile int wf_snap_f1[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
23 23 volatile int wf_snap_f1_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
24 24 volatile int wf_snap_f2[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
25 volatile int wf_snap_f2_bis[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
25 26 volatile int wf_cont_f3[ NB_SAMPLES_PER_SNAPSHOT * NB_WORDS_SWF_BLK + TIME_OFFSET];
26 27
27 28 // SPECTRAL MATRICES GLOBAL VARIABLES
28 29 volatile int spec_mat_f0_a[ TOTAL_SIZE_SPEC_MAT ];
29 30 volatile int spec_mat_f0_b[ TOTAL_SIZE_SPEC_MAT ];
30 31 volatile int spec_mat_f0_c[ TOTAL_SIZE_SPEC_MAT ];
31 32 volatile int spec_mat_f0_d[ TOTAL_SIZE_SPEC_MAT ];
32 33 volatile int spec_mat_f0_e[ TOTAL_SIZE_SPEC_MAT ];
33 34 volatile int spec_mat_f0_f[ TOTAL_SIZE_SPEC_MAT ];
34 35 volatile int spec_mat_f0_g[ TOTAL_SIZE_SPEC_MAT ];
35 36 volatile int spec_mat_f0_h[ TOTAL_SIZE_SPEC_MAT ];
36 37 //
37 38 float averaged_spec_mat_f0[ TOTAL_SIZE_SPEC_MAT ];
38 39 float compressed_spec_mat_f0[ TOTAL_SIZE_COMPRESSED_MATRIX_f0 ];
39 40
40 41 // MODE PARAMETERS
41 42 struct param_common_str param_common;
42 43 struct param_norm_str param_norm;
43 44 struct param_burst_str param_burst;
44 45 struct param_sbm1_str param_sbm1;
45 46 struct param_sbm2_str param_sbm2;
46 47
47 48 // HK PACKETS
48 49 Packet_TM_LFR_HK_t housekeeping_packet;
49 50 unsigned short sequenceCounters[SEQ_CNT_NB_PID][SEQ_CNT_NB_CAT][SEQ_CNT_NB_DEST_ID];
50 51
51 52 // BASIC PARAMETERS GLOBAL VARIABLES
52 53 unsigned char LFR_BP1_F0[ NB_BINS_COMPRESSED_MATRIX_f0 * 9 ];
53 54 BP1_t data_BP1[ NB_BINS_COMPRESSED_MATRIX_f0 ];
54 55
@@ -1,448 +1,449
1 1 //*************************
2 2 // GPL reminder to be added
3 3 //*************************
4 4
5 5 #include <rtems.h>
6 6
7 7 /* configuration information */
8 8
9 9 #define CONFIGURE_INIT
10 10
11 11 #include <bsp.h> /* for device driver prototypes */
12 12
13 13 /* configuration information */
14 14
15 15 #define CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
16 16 #define CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
17 17
18 18 #define CONFIGURE_MAXIMUM_TASKS 15
19 19 #define CONFIGURE_RTEMS_INIT_TASKS_TABLE
20 20 #define CONFIGURE_EXTRA_TASK_STACKS (3 * RTEMS_MINIMUM_STACK_SIZE)
21 21 #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 32
22 22 #define CONFIGURE_INIT_TASK_PRIORITY 100
23 23 #define CONFIGURE_MAXIMUM_DRIVERS 16
24 24 #define CONFIGURE_MAXIMUM_PERIODS 5
25 25 #define CONFIGURE_MAXIMUM_MESSAGE_QUEUES 1
26 26
27 27 #include <rtems/confdefs.h>
28 28
29 29 /* If --drvmgr was enabled during the configuration of the RTEMS kernel */
30 30 #ifdef RTEMS_DRVMGR_STARTUP
31 31 #ifdef LEON3
32 32 /* Add Timer and UART Driver */
33 33 #ifdef CONFIGURE_APPLICATION_NEEDS_CLOCK_DRIVER
34 34 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GPTIMER
35 35 #endif
36 36 #ifdef CONFIGURE_APPLICATION_NEEDS_CONSOLE_DRIVER
37 37 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_APBUART
38 38 #endif
39 39 #endif
40 40 #define CONFIGURE_DRIVER_AMBAPP_GAISLER_GRSPW /* GRSPW Driver */
41 41 #include <drvmgr/drvmgr_confdefs.h>
42 42 #endif
43 43
44 44 #include <fsw_init.h>
45 45 #include <fsw_config.c>
46 46
47 47 char *lstates[6] = {"Error-reset",
48 48 "Error-wait",
49 49 "Ready",
50 50 "Started",
51 51 "Connecting",
52 52 "Run"
53 53 };
54 54
55 55 rtems_task Init( rtems_task_argument ignored )
56 56 {
57 57 rtems_status_code status;
58 58 rtems_isr_entry old_isr_handler;
59 59
60 60 PRINTF("\n\n\n\n\n")
61 61 PRINTF("***************************\n")
62 62 PRINTF("** START Flight Software **\n")
63 63 PRINTF("***************************\n")
64 64 PRINTF("\n\n")
65 65
66 66 //send_console_outputs_on_serial_port();
67 67 set_apbuart_scaler_reload_register(REGS_ADDR_APBUART, APBUART_SCALER_RELOAD_VALUE);
68 68
69 69 initLookUpTableForCRC(); // in tc_handler.h
70 70 init_default_mode_parameters();
71 71 init_housekeeping_parameters();
72 72 create_message_queue();
73 73
74 create_names();
75 create_all_tasks();
76 start_all_tasks();
74 create_names(); // create all names
75 create_all_tasks(); // create all tasks
76 start_all_tasks(); // start all tasks
77 stop_current_mode(); // go in STANDBY mode
77 78
78 79 grspw_timecode_callback = &timecode_irq_handler;
79 80
80 81 configure_spw_link();
81 82
82 83 //****************************
83 84 // Spectral Matrices simulator
84 85 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_SM_SIMULATOR, CLKDIV_SM_SIMULATOR,
85 86 IRQ_SPARC_SM, spectral_matrices_isr );
86 87
87 88 //**********
88 89 // WAVEFORMS
89 90 // simulator
90 91
91 92 #ifdef GSA
92 93 configure_timer((gptimer_regs_t*) REGS_ADDR_GPTIMER, TIMER_WF_SIMULATOR, CLKDIV_WF_SIMULATOR,
93 94 IRQ_SPARC_WF, waveforms_simulator_isr );
94 95 #else
95 96 // configure the registers of the waveform picker
96 97 init_waveform_picker_regs();
97 98 // configure the waveform picker interrupt service routine
98 99 status = rtems_interrupt_catch( waveforms_isr,
99 100 IRQ_SPARC_WAVEFORM_PICKER,
100 101 &old_isr_handler) ;
101 102 LEON_Mask_interrupt( IRQ_WAVEFORM_PICKER );
102 103 #endif
103 104
104 105 //**********
105 106
106 107 //*****************************************
107 108 // irq handling of the time management unit
108 109 status = rtems_interrupt_catch( commutation_isr1,
109 110 IRQ_SPARC_TIME1,
110 111 &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels
111 112 if (status==RTEMS_SUCCESSFUL) {
112 113 PRINTF("OK *** commutation_isr1 *** rtems_interrupt_catch successfullly configured\n")
113 114 }
114 115
115 116 status = rtems_interrupt_catch( commutation_isr2,
116 117 IRQ_SPARC_TIME2,
117 118 &old_isr_handler) ; // see sparcv8.pdf p.76 for interrupt levels
118 119 if (status==RTEMS_SUCCESSFUL) {
119 120 PRINTF("OK *** commutation_isr2 *** rtems_interrupt_catch successfullly configured\n")
120 121 }
121 122
122 123 LEON_Unmask_interrupt( IRQ_TIME1 );
123 124 LEON_Unmask_interrupt( IRQ_TIME2 );
124 125
125 126 #ifdef GSA
126 127 //if (rtems_event_send( Task_id[TASKID_WFRM], RTEMS_EVENT_0 ) != RTEMS_SUCCESSFUL) {
127 128 // printf("in INIT *** Error sending event to WFRM\n");
128 129 //}
129 130 #endif
130 131
131 132 status = rtems_task_delete(RTEMS_SELF);
132 133
133 134 }
134 135
135 136 rtems_task spiq_task(rtems_task_argument unused)
136 137 {
137 138 rtems_event_set event_out;
138 139 rtems_status_code status;
139 140
140 141 while(true){
141 142 PRINTF("in SPIQ *** Waiting for SPW_LINKERR_EVENT\n")
142 143 rtems_event_receive(SPW_LINKERR_EVENT, RTEMS_WAIT, RTEMS_NO_TIMEOUT, &event_out); // wait for an SPW_LINKERR_EVENT
143 144
144 145 if (rtems_task_suspend(Task_id[TASKID_RECV])!=RTEMS_SUCCESSFUL) { // suspend RECV task
145 146 PRINTF("in SPIQ *** Error suspending RECV Task\n")
146 147 }
147 148 if (rtems_task_suspend(Task_id[TASKID_HOUS])!=RTEMS_SUCCESSFUL) { // suspend HOUS task
148 149 PRINTF("in SPIQ *** Error suspending HOUS Task\n")
149 150 }
150 151
151 152 configure_spw_link();
152 153
153 154 status = rtems_task_restart( Task_id[TASKID_HOUS], 1 );
154 155 if (status!=RTEMS_SUCCESSFUL) {
155 156 PRINTF1("in SPIQ *** Error restarting HOUS Task *** code %d\n", status)
156 157 }
157 158
158 159 if (rtems_task_restart(Task_id[TASKID_RECV], 1)!=RTEMS_SUCCESSFUL) { // restart RECV task
159 160 PRINTF("in SPIQ *** Error restarting RECV Task\n")
160 161 }
161 162 }
162 163 }
163 164
164 165 void init_default_mode_parameters(void)
165 166 {
166 167 // COMMON PARAMETERS
167 168 param_common.sy_lfr_common0 = 0x00;
168 169 param_common.sy_lfr_common1 = 0x10; // default value 0 0 0 1 0 0 0 0
169 170 // NORMAL MODE
170 171 param_norm.sy_lfr_n_swf_l = 2048; // nb sample
171 172 param_norm.sy_lfr_n_swf_p = 300; // sec
172 173 param_norm.sy_lfr_n_asm_p = 3600; // sec
173 174 param_norm.sy_lfr_n_bp_p0 = 4; // sec
174 175 param_norm.sy_lfr_n_bp_p1 = 20; // sec
175 176 // BURST M