Compare commits

..

349 Commits

Author SHA1 Message Date
0a11ca6051 Merge pull request 'Update to v1.8.0' (#100) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #100
2021-09-24 10:17:43 +02:00
b305924e11 Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-24 10:13:18 +02:00
863295cd31 Merge pull request 'RW ReplyHandler fix' (#99) from mueller/rw-replyhandler-fix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #99
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-23 20:14:27 +02:00
b1a91da844 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:15:51 +02:00
397e1433fd GPS and RW handler improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 17:14:08 +02:00
31c84d47fe Merge pull request 'ACS board now working' (#98) from mueller/acs-board-working into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #98
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-23 16:03:11 +02:00
8fc144b595 RW handler tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 16:03:09 +02:00
8693075061 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:58:03 +02:00
b128455217 RW small improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:35:33 +02:00
99c975d0cd Merge branch 'mueller/acs-board-working' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:28:44 +02:00
d5205b59c1 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 15:24:47 +02:00
26fbd81d39 Merge branch 'develop' into mueller/acs-board-working
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-09-23 15:23:46 +02:00
0ccf062d51 transition delays
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-23 15:20:55 +02:00
aa71159a9a A side enabled by default
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-23 14:45:42 +02:00
e56a30df06 HW bug fixes, board should work cleanly now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-23 13:13:46 +02:00
7b7bd76703 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 18:38:06 +02:00
ee878d9fe9 bugfix EIVE PST
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 16:14:33 +02:00
0b50d9aedf fix for ADIS device
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 16:00:31 +02:00
4131084973 several tweaks and fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 15:43:11 +02:00
b81ff7f8f5 Merge pull request 'GPIO Refactoring' (#97) from mueller/gpio-refactoring into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #97
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-22 14:40:27 +02:00
1284d10257 RPI updates
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 14:27:01 +02:00
af9a9b837a added missing GPIO
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 14:10:21 +02:00
9a16544836 cleaning up RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 14:04:39 +02:00
dbcf4f5d69 more improvements for RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 12:29:43 +02:00
f9050ab185 fixes for RPi code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 12:19:45 +02:00
d6e22e7d4d trying other timing
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 11:48:56 +02:00
e1ae1c021a made more spi devices optional
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 11:45:25 +02:00
da45326150 bumped SW subversion
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-22 09:22:06 +02:00
28040f85cc fixes for new gpio update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 19:28:22 +02:00
652cfa0986 gpio refactoring
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 17:31:55 +02:00
3a76ee366d Merge remote-tracking branch 'origin/develop' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-21 16:03:39 +02:00
09c602a830 Merge pull request 'meier/gpioNaming' (#96) from meier/gpioNaming into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #96
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-21 16:02:22 +02:00
1d8c4be47a fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-21 14:47:03 +02:00
c4ba578285 fixed warning
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-09-20 18:46:48 +02:00
804afa5d96 add test code now default 0 2021-09-20 18:15:35 +02:00
26162f8e78 gpio chips now opened by label 2021-09-20 17:47:29 +02:00
38903f647b Merge branch 'develop' into meier/gpioNaming 2021-09-20 16:31:15 +02:00
cd92f4a611 open gpio by label test on te0720 2021-09-20 16:30:50 +02:00
8f1d521007 Merge pull request 'Update Package' (#95) from mueller/update-voltage-switch-cmds into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #95
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-20 15:59:18 +02:00
cf9ff87560 bugfixes for new print commands
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-20 14:34:39 +02:00
cbb7fdfa99 p60 print command
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-20 11:47:19 +02:00
487b6fd5ca updated print commands for PDUs
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-20 11:22:11 +02:00
87d00dbcee some more acs board tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-17 16:53:15 +02:00
5cb6ab8416 more acs tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-17 13:08:03 +02:00
4b5f22f013 Merge pull request 'Update Package' (#94) from mueller/update-package into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #94
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-17 08:01:17 +02:00
48a8a52b1c moved lis3mdl to fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 18:51:06 +02:00
8dcd2f0c95 some cfg improvements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 17:33:47 +02:00
2cb562cdee tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 17:25:16 +02:00
00bafd98fe obsw config, gps update 2021-09-16 17:24:34 +02:00
536c0cb0fe new commands now working
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 15:00:31 +02:00
0f57fc33c8 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 14:51:51 +02:00
2aa76766af added print commands for PCDU 2021-09-16 14:51:14 +02:00
00711c148a rm3100 changes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 13:40:29 +02:00
d0cba24a37 Merge branch 'mueller/update-package' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:52:34 +02:00
adb0147ea9 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:52:03 +02:00
086d076262 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:46:55 +02:00
260082c425 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-16 11:46:34 +02:00
ad052462c1 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:36:40 +02:00
b8b6cd8872 moved RM3100 handler to framework
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:34:07 +02:00
799e90f617 reverted some change
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:15:14 +02:00
8afc6dea11 Merge remote-tracking branch 'origin/develop' into mueller/update-package
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-16 11:13:34 +02:00
8af3a91b5a correct RW pin
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2021-09-16 11:11:25 +02:00
bdd5a7dd21 more storage for events
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 18:50:23 +02:00
2630d7fae7 tweak for rm3100
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:49:15 +02:00
df5b0a19de improved preprocessor defines
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:38:26 +02:00
c7d0a9551e small bugfix for rm3100
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 17:26:23 +02:00
26fa568d72 Merge pull request 'GNSS ACS board update' (#92) from mueller/gnss-acs-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #92
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-09-15 15:43:01 +02:00
39acc24535 testing ADIS handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-15 13:41:13 +02:00
d29b86a0bd Merge remote-tracking branch 'origin/develop' into mueller/master 2021-09-15 13:40:54 +02:00
8e6a2a1f02 Merge pull request 'LIS3MDL scaling bugfix' (#93) from lis3mdl-scaling-bugfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #93
Looks good.
2021-09-15 10:35:19 +02:00
43fe7e0aa0 using enum for sensitivity now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-14 13:55:56 +02:00
ca79f370b0 Fixed bugs in mag. field scaling math.
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-14 12:30:46 +02:00
10f5933c1e enable pins
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 18:10:24 +02:00
3354f2a696 acd board tests continued
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 18:07:07 +02:00
c67a7ef1d8 added more package pin comments
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-13 11:48:11 +02:00
63ec5d6338 fsfw update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-13 10:26:20 +02:00
a66a76609f Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master 2021-09-13 10:26:10 +02:00
9f389fb920 added newline 2021-09-13 10:25:58 +02:00
9dff2e1479 enable periodci reply now
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-11 17:40:13 +02:00
299136f1a5 Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-10 10:05:53 +02:00
2c65849bc6 tmtc update 2021-09-10 10:05:37 +02:00
0343372910 very important bugfix for reset pin gnss
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 19:27:49 +02:00
366c475b05 bug fixed in fsfw
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 17:25:13 +02:00
46e3956bca generating finish reply
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 17:02:37 +02:00
6409c596f7 fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 16:21:22 +02:00
5779f511cf some tweaks for reset pin command
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 16:03:20 +02:00
63c7903f9b now the print command works
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 13:41:27 +02:00
87495fd3af Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 13:22:43 +02:00
38c60f37da tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-08 13:46:33 +02:00
baba8b5cf0 tmtc 2021-09-08 13:21:56 +02:00
a4cd99ec90 sanity check on altitude, set unix seconds
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:42:04 +02:00
e837532b22 form improvements
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:14:54 +02:00
f7c6f16777 added gps reset callback
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-07 16:11:02 +02:00
3b3b2ed8c3 preproc define to log NMEA data
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-07 12:00:22 +02:00
52d0182a52 Merge branch 'mueller/master' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-07 09:46:01 +02:00
405b9e7074 tmtc update 2021-09-07 09:45:51 +02:00
24c7a4e7e3 added additional comment 2021-09-07 09:45:12 +02:00
30a57ad5a4 using old transition delay
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-06 18:42:58 +02:00
d78c746552 GPS Handler bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-06 18:27:33 +02:00
773b745c76 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-06 14:53:04 +02:00
45409fc2d6 gps handler working properly now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-06 12:07:15 +02:00
f97d5df75f fsfw and tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-06 11:35:23 +02:00
49b8232f12 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-06 11:12:54 +02:00
ac3812f268 tmtc update 2021-09-06 11:12:29 +02:00
ed6ee02861 Merge remote-tracking branch 'origin/develop' into mueller/gnss-acs-update 2021-09-06 11:12:14 +02:00
94979e3561 pulling reset pin gnss high
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-09-02 20:27:12 +02:00
74e4415d58 updated busConf file
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-09-02 20:04:41 +02:00
08bc44ce8b Merge pull request 'v1.7.0' (#91) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #91
2021-09-02 09:29:48 +02:00
aeb289b758 Merge branch 'main' into develop
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-02 09:28:08 +02:00
56108aed66 Merge pull request 'meier/plocMemoryDumper' (#90) from meier/plocMemoryDumper into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main This commit looks good
Reviewed-on: #90
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-02 09:16:33 +02:00
225dcf27ba Merge remote-tracking branch 'origin/develop' into meier/plocMemoryDumper
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
2021-09-02 09:15:22 +02:00
146035de5a Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-09-02 09:14:28 +02:00
cc602ddada Merge pull request 'meier/plocSupervisor' (#89) from meier/plocSupervisor into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #89
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-09-02 09:13:00 +02:00
e13db2e6b6 Merge branch 'develop' into meier/plocMemoryDumper
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-31 11:20:43 +02:00
0f79864446 ploc memory dumper complete 2021-08-31 11:20:21 +02:00
01dd2eb92e Merge branch 'develop' into meier/plocSupervisor
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-29 07:32:19 +02:00
89b68940be ploc memory dumper wip 2021-08-29 07:31:34 +02:00
c8150dff17 Merge pull request 'added LICENSE and NOTICE file' (#88) from mueller/license-notice-file into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #88
2021-08-29 07:31:01 +02:00
d8e1e4561d troubleshooting for wayland issue
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-24 16:41:10 +02:00
c1ca43113b update README
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-24 10:40:23 +02:00
26afe1d94a fixes in C++ test code
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 20:43:27 +02:00
90622eb25a important fixes 2021-08-23 20:38:18 +02:00
e4e765300d more bugfixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:08:48 -04:00
922c33df57 using Q7S_ROOTFS now
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:03:48 -04:00
23894f9749 updated link
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 08:50:41 -04:00
1716034926 updated submodule link
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 08:49:06 -04:00
acc1849fbb fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-23 09:40:35 +02:00
d1a25bfa65 bugfixes hyperion handler 2021-08-22 20:25:05 +02:00
dc0c8c704c debugging GPS: uart is blocking!
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 20:18:56 +02:00
bb58281fba minor fix for gps
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 18:48:05 +02:00
5b9811a950 disabled all devices except for ADIS device
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 15:46:51 +02:00
e9849bfedd some fixes
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 15:25:02 +02:00
6ecd4ec2f3 pin fixes for ACS board
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 14:50:40 +02:00
333c46bdf8 adaptions to build ploc supervisor for trenz te0720
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-20 14:48:22 +02:00
23782dc2fa Device update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
1. Sun sensors added but can be disabled with preprocessor defines
2. GPS Handler
2021-08-20 14:08:11 +02:00
95b49ca49d update tmtc and arcsec submodule
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 13:56:43 +02:00
a45d4592c3 lwgps update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 12:05:15 +02:00
9a84abf77f Merge pull request 'Writeprotection handler in CoreController' (#87) from mueller/writeprotect-handler into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #87
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-20 11:08:25 +02:00
5789e2a3b5 added LICENSE and NOTICE file
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 10:43:34 +02:00
92528c7350 added LICENSE and NOTICE file
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-20 10:01:37 +02:00
3acb61959a mram dump standalone packet 2021-08-20 06:56:29 +02:00
ef75d92415 smaller tweaks
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 18:26:00 +02:00
e821a9700a refactoring and bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 18:10:19 +02:00
d1afdfe578 bugfix core controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 17:31:13 +02:00
24ecfe84ae minor fix 2021-08-19 17:27:13 +02:00
42d225bb6c fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 17:20:40 +02:00
7c828427e9 unix file guard diagnostic prefix adaption
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-19 17:08:51 +02:00
8ddd7b02dc renamed function and bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:45:25 +02:00
963e40120f added TODO
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:35:36 +02:00
faee071edc bugfixes, more tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:34:24 +02:00
a6777067da moved test 2021-08-19 14:16:26 +02:00
c1b22af695 several bugfixes for prot handler
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 14:05:25 +02:00
7fc3285272 added functions to handle writeprotection
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 13:34:44 +02:00
19d4349c05 submodule update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-19 10:16:55 +02:00
99a24a9a35 Merge pull request 'ACS board added' (#86) from mueller/acs-board-added into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #86
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-18 12:44:28 +02:00
2b061a2b1c fsfw update
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-18 11:32:49 +02:00
124abf0213 crc for ploc update 2021-08-18 08:26:31 +02:00
2f72b4e42a cleaned up
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 19:50:48 +02:00
e98b985d66 cleaning up preproc defines 2021-08-17 17:48:51 +02:00
9efcd90cc0 Merge pull request 'meier/pcdu' (#85) from meier/pcdu into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #85
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-17 17:14:19 +02:00
aa248b7997 new busConf file, cleaning up
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 17:11:59 +02:00
921e82f6d1 acs board tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:35:41 +02:00
aa43bd7d75 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:17:24 +02:00
be6056aadb adaptions to build software for Trenz TE0720
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:14:23 +02:00
a298fff602 tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-17 16:07:33 +02:00
5204afca9e pcdu debug output disabled now
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-17 12:00:58 +02:00
1722f14a60 added debug output for pcdu modules
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2021-08-17 11:59:32 +02:00
3a65f1d39f Merge pull request 'Raspberry Pi fixes, GPS Handler update, Stripped Executable' (#84) from mueller/stripped-exec into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #84
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-16 13:41:21 +02:00
567199f460 Merge branch 'develop' into mueller/stripped-exec
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-16 10:05:55 +02:00
cfbacd4d80 generating stripped executable now
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
2021-08-14 15:25:30 +02:00
95c06d5a09 added make size cfg
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-14 15:19:32 +02:00
dc8879b1af tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 19:33:26 +02:00
1962b30e5f testing HK downlink
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 19:27:17 +02:00
cb330bcf29 hyperion handler: HK packet subscription
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:59:40 +02:00
268cd33677 gps handler tweaks
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:52:33 +02:00
0ae55e0783 no ARCSEC lib for Raspberry Pi
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 18:13:43 +02:00
be43dbd293 Merge pull request 'Core Controller Bugfix' (#83) from mueller/core-controller-bugfix into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #83
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-11 16:48:24 +02:00
45b78a0100 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 16:45:17 +02:00
fc22f7d86f Merge branch 'develop' into mueller/core-controller-bugfix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-11 16:30:31 +02:00
0622b78dde Merge branch 'mueller/core-controller-bugfix' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 16:30:00 +02:00
cf355a0451 missing :
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-11 16:29:11 +02:00
337aa39ecc Merge pull request 'meier/firmwareChanges' (#82) from meier/firmwareChanges into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #82
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-11 16:26:53 +02:00
24b58e50d1 Merge core controller bugfix
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-11 16:24:41 +02:00
11c2efa733 bugfix core controller
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
1. Increaed robustness of CoreController against invalid state struct
2. Bugfix: If PREFSD not set, set SD card 0 properly now
2021-08-11 16:07:00 +02:00
0efaa13a9f tmtc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 15:53:27 +02:00
ae08d14626 Merge branch 'develop' into meier/firmwareChanges
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-11 13:32:30 +02:00
681ad25847 Merge pull request 'v1.6.1' (#81) from develop into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #81
2021-08-11 10:47:37 +02:00
53f6a0d3a6 Merge branch 'main' into develop
Some checks are pending
EIVE/eive-obsw/pipeline/pr-main Build queued...
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 10:47:16 +02:00
4fdcb5d7cd minor changes to match software to updated fpga design
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-11 09:41:29 +02:00
f3bc2958f9 Merge pull request 'Moved Q7S specific files' (#80) from mueller/moved-q7s-specific-files into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-main Build queued...
Reviewed-on: #80
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-09 19:46:12 +02:00
d714f84df8 bumped revision
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 18:30:20 +02:00
bda8550ef9 fixes for hosted
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 18:26:34 +02:00
d604f8d3d1 one port is okay
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 18:23:18 +02:00
e92af98f34 moved q7s specific code to q7s folder
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 17:19:10 +02:00
3b915f4c97 Merge remote-tracking branch 'origin/develop' into mueller/master 2021-08-09 16:45:32 +02:00
03510e5de9 updated TCP port
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 16:34:06 +02:00
1d714ff85e Moved PLOC components to q7s folder
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 16:30:59 +02:00
b3f2a05385 Merge pull request 'v1.6.0' (#78) from develop into main
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #78
2021-08-09 16:08:25 +02:00
ec27521c35 Merge branch 'main' into develop
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 16:01:51 +02:00
cd7bc466ae tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit
2021-08-09 15:53:48 +02:00
12dbc5569e mode power down sus
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-09 14:44:06 +02:00
8f124de79c set all devices to mode power down in doShutDown
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 14:41:46 +02:00
9fd0009c7b Merge pull request 'bumped subversion for release' (#77) from mueller/version-bump into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #77
2021-08-09 14:34:39 +02:00
74dbfae225 tmtc update
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-09 14:30:14 +02:00
6871cc597a Merge remote-tracking branch 'origin/develop' into mueller/version-bump 2021-08-09 14:29:47 +02:00
ce1124472a Merge branch 'develop' into meier/develop 2021-08-09 14:23:27 +02:00
6e22c3e017 Merge pull request 'Non Blocking SD Card Initialization' (#75) from mueller/non-blocking-sd-card-init into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #75
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-09 14:18:49 +02:00
f5f8df61ae bumped subversion
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 11:27:08 +02:00
4a74a3ac37 API change fix
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 11:24:59 +02:00
444389a41c Merge remote-tracking branch 'origin/develop' into mueller/non-blocking-sd-card-init
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-09 11:20:28 +02:00
f4ef0cb7ab Merge pull request 'meier/plocUpdater' (#76) from meier/plocUpdater into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #76
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-09 11:10:30 +02:00
f56c8ba1c0 minor fixes and additional printout
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-09 11:00:58 +02:00
66f38daf56 typo in include of ploc updater
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-09 10:44:14 +02:00
0580784d16 added mode power down in star tracker 2021-08-09 10:41:28 +02:00
74dc04daeb updated fsfw and tmtc
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-08 16:18:49 +02:00
dc3dfa1292 ploc updater
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-08 15:02:59 +02:00
891ba6881b reordered control operation
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-08 13:00:11 +02:00
02a837c964 tweaks for no-init variant
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-08 12:59:21 +02:00
8cdb877df6 removed endif block
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-08 12:50:45 +02:00
22d7af4b78 always perform state machine
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
in initAfterTaskCreation
2021-08-08 12:49:04 +02:00
0fecfab2f0 minor formatting changes
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-08 12:46:24 +02:00
e05c52be85 always performing state machine now
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-08 12:45:26 +02:00
ea56a5d536 includes reordered
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-08 12:43:54 +02:00
106228c2ee Merge branch 'mueller/non-blocking-sd-card-init' into mueller/master
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-08 12:43:17 +02:00
365fa0adc4 tweaks and fixes for state machine
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
2021-08-08 12:43:02 +02:00
51dbc95750 fixes for NO_INIT code 2021-08-08 12:39:53 +02:00
a3eb6b2093 Merge remote-tracking branch 'origin/develop' into mueller/non-blocking-sd-card-init
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-08 12:37:45 +02:00
5045eeb867 Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-08 12:37:26 +02:00
f50b9de4a5 extneded state machine for commanding support
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-08 01:24:18 +02:00
1c0ea5cbb1 tested hot redundant config as well 2021-08-08 00:37:07 +02:00
5a4d287f67 more testing and bugfixes 2021-08-08 00:11:21 +02:00
e186bff4e4 important bugfixes for core controller
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-07 18:52:36 +02:00
2fb54f7de9 first successfull tests
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-06 01:25:36 +02:00
f0e282c6e1 continued a bit
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-05 18:37:14 +02:00
05088ce02c SDC manager and core controller refactoring
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-05 18:13:32 +02:00
f64356d75e ploc udpater wip 2021-08-05 16:37:39 +02:00
7f327c3900 bugfixes for sdc manager
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-05 16:02:35 +02:00
8104ac0df8 using new command executor
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-05 15:43:19 +02:00
1cfb9250fa SDC manager non-blocking mode
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-05 10:14:17 +02:00
0315a2a3d5 merged develop 2021-08-04 13:22:44 +02:00
0c13c32e82 Merge pull request 'Include corrections, correct tmtc branch' (#74) from mueller/master into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #74
2021-08-04 13:21:11 +02:00
2700d4d28c ploc updater wip 2021-08-04 13:20:28 +02:00
3a88a43505 tmtc update
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop Build queued...
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-04 13:18:09 +02:00
b52aca643f Merge remote-tracking branch 'origin/develop' into mueller/master 2021-08-04 13:16:59 +02:00
fcf2e363d8 Merge pull request 'meier/plocSupervisorHandler' (#73) from meier/plocSupervisorHandler into develop
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Reviewed-on: #73
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-08-04 13:00:27 +02:00
acca10cc34 Merge branch 'develop' into meier/plocSupervisorHandler
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-04 10:21:31 +02:00
c431deede0 ploc udpdater wip 2021-08-04 10:20:36 +02:00
15c7493584 Merge pull request 'Reboot Feature' (#72) from mueller/reboot-feature into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #72
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-04 10:03:13 +02:00
addddb4342 Merge branch 'develop' into mueller/reboot-feature
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-03 18:35:34 +02:00
9790b395e6 include replacements
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-03 15:58:01 +02:00
3cc3786505 TCP default now, bugfixes in CoreController
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-03 15:29:45 +02:00
59c4ed74e0 minor bugfix
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-03 11:21:28 +02:00
f8f0032d1e reboot feature finished
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-03 11:18:24 +02:00
ba51ca58f3 tmtc update
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-08-02 15:58:17 +02:00
9de28fdfc9 tmtc update 2021-08-02 15:57:14 +02:00
aeecf33763 supervisor added debug TCs 2021-08-02 15:28:57 +02:00
d6d60249c1 Merge pull request 'FSFW Gen and Build Scripts Update' (#71) from mueller/fsfwgen-update into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #71
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-08-02 13:11:36 +02:00
9edd6fc3be supplying project string now
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-08-02 13:02:50 +02:00
009234612a updated retval list
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-08-02 12:50:36 +02:00
528b3c8610 updated object file generator
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-02 11:49:00 +02:00
fe0a4844aa Merge remote-tracking branch 'origin/develop' into mueller/master
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-02 11:44:00 +02:00
4b4cfc09c5 update fsfwgen 2021-08-02 11:43:49 +02:00
340ca0618c supervisor mram dump
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-08-01 17:11:32 +02:00
0b1b74e879 renamed cmake var, updated all shell scripts
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-07-31 19:31:04 +02:00
72533f1d14 updated tmtc 2021-07-31 08:54:49 +02:00
298a87d349 Merge pull request 'Added OBSW Watchdog' (#67) from mueller/added-watchdog into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #67
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-07-31 08:51:55 +02:00
926e1e336a mram dump reply 2021-07-31 08:32:57 +02:00
503d5923c4 making some stuff optional
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
2021-07-30 16:40:24 +02:00
8c3d25f62d updated README
Some checks are pending
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head Build queued...
2021-07-29 19:43:00 +02:00
d8acf94a02 more corrections
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-07-29 18:33:15 +02:00
940d4965bc small corrections
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-07-29 18:32:02 +02:00
df971d4ec5 dont need csp lib in watchdog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-07-29 18:21:05 +02:00
b4447b6d8c Merge branch 'mueller/added-watchdog' of https://egit.irs.uni-stuttgart.de/eive/eive-obsw into mueller/added-watchdog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-07-29 18:17:25 +02:00
208aeb6640 added build scripts, updated proj files 2021-07-29 18:17:14 +02:00
bc1d236a85 Merge branch 'develop' into mueller/added-watchdog
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
2021-07-29 18:10:26 +02:00
34d3479e81 various bugfixes and improvements 2021-07-29 18:09:54 +02:00
dba620baf2 various bugfixes, watchdog working now 2021-07-29 17:21:27 +02:00
c9da184b7f Merge pull request 'first steps in CI integration' (#66) from mohr_ci into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
Reviewed-on: #66
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-07-29 16:45:12 +02:00
ff86c8af73 watchdog handling finished 2021-07-29 16:31:04 +02:00
983ce045a9 continued 2021-07-29 13:07:07 +02:00
4fbfbe8bb8 cleanCI
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
EIVE/eive-obsw/pipeline/head This commit looks good
2021-07-29 12:38:24 +02:00
12be969ca2 jenkins seems to overwrite out PATH
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:34:01 +02:00
93fa82c413 copy pasted wrong cmake line
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:23:17 +02:00
6c8336bcfe something's broken with the automatic docker build, reverting change, will look into it later
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:20:02 +02:00
af6f24d668 forcing docker build #2
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:18:32 +02:00
acaf87095a forcing docker build
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:17:30 +02:00
afb7a2008f typo in Jenkinsfile
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
2021-07-29 12:14:37 +02:00
6361fcb6bb added Jenkinsfile, moved together with Dockerfile into automation folder
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
having the automation files in an empty folder accelerates docker build.
Also, I think these files are not related to the source code and as such should live in their own space
2021-07-29 12:06:14 +02:00
55727accf5 minor tweaks 2021-07-29 11:59:32 +02:00
59bcf6cec2 added eive-watchdog 2021-07-29 11:35:20 +02:00
6cd4f6cfe3 ploc supervisor mram dump 2021-07-29 09:21:33 +02:00
664f8e84b9 Merge pull request 'RTD update and TCP server in hosted build' (#65) from mueller/staging-rtd-update-hosted-tcp into develop
Reviewed-on: #65
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-07-29 09:07:50 +02:00
190590e1b5 new conf option 2021-07-28 20:11:22 +02:00
125593be21 reading chip and copy works 2021-07-28 19:46:19 +02:00
4f3a680a07 updated tmtc 2021-07-28 19:38:54 +02:00
f4b67945cc wipe mram command 2021-07-28 19:34:10 +02:00
fc769be789 updated cp script 2021-07-28 18:56:36 +02:00
b846a936b4 README update 2021-07-28 18:50:50 +02:00
1e6ea91438 README update 2021-07-28 18:43:11 +02:00
1a4f907925 moved sd card init, more functions static now 2021-07-28 17:48:08 +02:00
c0b91a4879 added functions to get current boot copy 2021-07-28 16:37:08 +02:00
dd61af5bb3 tmtc update 2021-07-28 15:28:51 +02:00
d511903872 tmtc update 2021-07-28 15:24:48 +02:00
50ca738d5c select nvm command 2021-07-28 11:55:16 +02:00
3d39ddf85c copy adc data to mram command 2021-07-28 11:08:40 +02:00
14cd3e9eea supervisor handler get latchup status report 2021-07-28 08:38:36 +02:00
03a601d450 auto calibrate alert and enable/disable latchup alert 2021-07-27 12:02:30 +02:00
bd9dbc5fc8 ploc supervisor watchdog configure timeout command 2021-07-26 19:56:00 +02:00
3824daa865 tmtc update 2021-07-26 18:00:14 +02:00
6625d562e9 tmtc update 2021-07-26 17:55:45 +02:00
0abc854567 tmtc update 2021-07-26 17:29:59 +02:00
2a5cc62af7 tmtc update 2021-07-26 17:25:11 +02:00
6506baa7b6 ploc supervisor watchdogs enable command 2021-07-26 16:30:20 +02:00
292bfaad16 readme extended 2021-07-26 14:23:22 +02:00
f7ac382498 fixes for host build 2021-07-26 14:00:15 +02:00
96c9069a69 new pool entry for rtd value 2021-07-26 13:56:53 +02:00
5018b24cfc storing RTD value now as well 2021-07-26 13:55:58 +02:00
261fc8b58f moved config flag to cmmon config 2021-07-26 13:51:00 +02:00
590d5e11e1 tmtc update 2021-07-26 13:41:45 +02:00
a2079ffb8c Merge pull request 'meier/plocSupervisorHandler' (#64) from meier/plocSupervisorHandler into develop
Reviewed-on: #64
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
2021-07-26 13:40:43 +02:00
dc73036c7a udp server port in UpdTmTcBridge 2021-07-26 12:24:21 +02:00
f0dc1279c4 merged develop 2021-07-26 12:13:00 +02:00
01a02f896f ploc supervisor update available cmd, wip 2021-07-26 12:08:38 +02:00
7eb57d4027 Merge pull request 'Added TCP support' (#63) from mueller/added-tcp-support into develop
Reviewed-on: #63
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-07-26 12:07:47 +02:00
9878b8defc updated shell scripts 2021-07-26 12:03:17 +02:00
5b99199b6c changed back some configuration 2021-07-26 12:02:40 +02:00
eee7ab98cb Merge branch 'mueller/readme-update-cp-script' into mueller/master 2021-07-26 11:58:39 +02:00
4093b2cff2 updating README 2021-07-26 11:58:28 +02:00
3f509ce472 updated port forwarding scripts 2021-07-26 11:56:39 +02:00
cffd6af1e1 Merge pull request 'README update and utility host scripts' (#62) from mueller/readme-update-cp-script into develop
Reviewed-on: #62
Reviewed-by: Jakob.Meier <meierj@irs.uni-stuttgart.de>
2021-07-26 11:55:20 +02:00
2a5f824161 UDP remains default for now 2021-07-26 11:47:45 +02:00
be6ae6b7ae added TCP support 2021-07-26 11:33:38 +02:00
10507904e8 small update 2021-07-26 11:07:41 +02:00
e82ca9e749 update README 2021-07-26 11:05:43 +02:00
84ce7d22bf added logo 2021-07-26 11:04:56 +02:00
7ff133687e README update 2021-07-26 10:46:50 +02:00
0ff837baa1 updated port script 2021-07-26 10:15:44 +02:00
474054f4d8 updated cp script 2021-07-26 01:21:37 +02:00
4645b8d35b added script folder 2021-07-26 00:47:55 +02:00
4b4b75085c added helper script 2021-07-26 00:45:52 +02:00
9b2ab66c0a readme update 2021-07-26 00:42:33 +02:00
0cd814db76 ploc supervisor update available command, wip 2021-07-25 20:42:24 +02:00
8c1a5bd9ad Merge branch 'develop' into meier/plocSupervisorHandler 2021-07-25 16:24:34 +02:00
f6d43cdf46 typo in PlocSupervisorDefinitions.h 2021-07-25 16:24:10 +02:00
bbc8a3eeef README update 2021-07-24 17:20:39 +02:00
07f531a044 update core controller 2021-07-24 17:08:26 +02:00
733a89a97a arcsec star tracker update 2021-07-24 15:30:34 +02:00
0e3b67383d arcsec_star_tracker 2021-07-24 15:29:15 +02:00
c4616e3633 get boot status report wip 2021-07-24 13:57:05 +02:00
190 changed files with 12795 additions and 7095 deletions

14
.gitignore vendored
View File

@ -1,19 +1,15 @@
/build*
Debug
Debug*
Release
Release*
# Eclipse
.settings
.metadata
.project
.cproject
__pycache__
.idea
!misc/eclipse/**/.cproject
!misc/eclipse/**/.project
# Python
__pycache__
.idea
generators/*.db

2
.gitmodules vendored
View File

@ -15,7 +15,7 @@
url = https://github.com/rmspacefish/lwgps.git
[submodule "generators/fsfwgen"]
path = generators/fsfwgen
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-generators.git
url = https://egit.irs.uni-stuttgart.de/fsfw/fsfw-gen.git
[submodule "thirdparty/arcsec_star_tracker"]
path = thirdparty/arcsec_star_tracker
url = https://egit.irs.uni-stuttgart.de/eive/arcsec_star_tracker.git

View File

@ -14,11 +14,13 @@ cmake_minimum_required(VERSION 3.13)
set(CMAKE_SCRIPT_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
if(TGT_BSP MATCHES "arm/q7s")
option(Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function")
option(EIVE_BUILD_WATCHDOG "Compile the OBSW watchdog insted" OFF)
option(BUILD_Q7S_SIMPLE_MODE OFF "Simple mode with a minimal main function")
endif()
option(ADD_ETL_LIB "Add ETL library" ON)
option(ADD_JSON_LIB "Add JSON librara" ON)
option(ADD_JSON_LIB "Add JSON library" ON)
option(EIVE_SYSROOT_MAGIC "Perform sysroot magic which might not be necessary" OFF)
if(NOT FSFW_OSAL)
set(FSFW_OSAL host CACHE STRING "OS for the FSFW.")
@ -32,8 +34,13 @@ endif()
include(${CMAKE_SCRIPT_PATH}/PreProjectConfig.cmake)
pre_project_config()
set(PROJECT_NAME_TO_SET eive-obsw-$ENV{USERNAME})
if(EIVE_BUILD_WATCHDOG)
set(PROJECT_NAME_TO_SET eive-watchdog)
endif()
# Project Name
project(eive_obsw ASM C CXX)
project(${PROJECT_NAME_TO_SET} ASM C CXX)
################################################################################
# Pre-Sources preparation
@ -60,6 +67,7 @@ set(MISSION_PATH mission)
set(TEST_PATH test/testtasks)
set(LINUX_PATH linux)
set(COMMON_PATH common)
set(WATCHDOG_PATH watchdog)
set(COMMON_CONFIG_PATH ${COMMON_PATH}/config)
set(FSFW_HAL_LIB_PATH fsfw_hal)
@ -82,24 +90,27 @@ if(TGT_BSP)
OR TGT_BSP MATCHES "arm/beagleboneblack"
)
set(FSFW_CONFIG_PATH "linux/fsfwconfig")
if(NOT Q7S_SIMPLE_MODE)
if(NOT BUILD_Q7S_SIMPLE_MODE)
set(ADD_LINUX_FILES TRUE)
set(ADD_CSP_LIB TRUE)
set(FSFW_HAL_ADD_LINUX ON)
endif()
endif()
if(${TGT_BSP} MATCHES "arm/raspberrypi")
add_definitions(-DRASPBERRY_PI)
if(TGT_BSP MATCHES "arm/raspberrypi")
# Used by configure file
set(RASPBERRY_PI ON)
set(FSFW_HAL_ADD_RASPBERRY_PI ON)
endif()
if(${TGT_BSP} MATCHES "arm/beagleboneblack")
add_definitions(-DBEAGLEBONEBLACK)
if(TGT_BSP MATCHES "arm/beagleboneblack")
# Used by configure file
set(BEAGLEBONEBLACK ON)
endif()
if(${TGT_BSP} MATCHES "arm/q7s")
add_definitions(-DXIPHOS_Q7S)
if(TGT_BSP MATCHES "arm/q7s")
# Used by configure file
set(XIPHOS_Q7S ON)
endif()
else()
# Required by FSFW library
@ -107,22 +118,23 @@ else()
endif()
# Configuration files
if(NOT EIVE_BUILD_WATCHDOG)
configure_file(${COMMON_CONFIG_PATH}/commonConfig.h.in commonConfig.h)
configure_file(${FSFW_CONFIG_PATH}/FSFWConfig.h.in FSFWConfig.h)
configure_file(${FSFW_CONFIG_PATH}/OBSWConfig.h.in OBSWConfig.h)
if(${TGT_BSP} MATCHES "arm/q7s")
if(TGT_BSP MATCHES "arm/q7s")
configure_file(${BSP_PATH}/boardconfig/q7sConfig.h.in q7sConfig.h)
elseif(${TGT_BSP} MATCHES "arm/raspberrypi")
elseif(TGT_BSP MATCHES "arm/raspberrypi")
configure_file(${BSP_PATH}/boardconfig/rpiConfig.h.in rpiConfig.h)
endif()
endif()
configure_file(${WATCHDOG_PATH}/watchdogConf.h.in watchdogConf.h)
# Set common config path for FSFW
set(FSFW_ADDITIONAL_INC_PATHS
"${COMMON_PATH}/config"
${CMAKE_CURRENT_BINARY_DIR}
)
# Set for lwgps library
set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
################################################################################
# Executable and Sources
@ -131,26 +143,26 @@ set(LWGPS_CONFIG_PATH "${COMMON_PATH}/config")
# Add executable
add_executable(${TARGET_NAME})
if(ADD_CSP_LIB)
add_subdirectory(${CSP_LIB_PATH})
endif()
if(ADD_ETL_LIB)
add_subdirectory(${ETL_LIB_PATH})
endif()
if(ADD_LINUX_FILES)
add_subdirectory(${LINUX_PATH})
endif()
if(ADD_JSON_LIB)
add_subdirectory(${LIB_JSON_PATH})
endif()
if(NOT EIVE_BUILD_WATCHDOG)
if(ADD_LINUX_FILES)
add_subdirectory(${LINUX_PATH})
endif()
add_subdirectory(${BSP_PATH})
add_subdirectory(${COMMON_PATH})
if(ADD_CSP_LIB)
add_subdirectory(${CSP_LIB_PATH})
endif()
endif()
if(NOT Q7S_SIMPLE_MODE)
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
add_subdirectory(${LWGPS_LIB_PATH})
add_subdirectory(${FSFW_PATH})
add_subdirectory(${MISSION_PATH})
@ -158,6 +170,9 @@ if(NOT Q7S_SIMPLE_MODE)
add_subdirectory(${ARCSEC_LIB_PATH})
endif()
if(EIVE_BUILD_WATCHDOG)
add_subdirectory(${WATCHDOG_PATH})
endif()
################################################################################
# Post-Sources preparation
@ -165,15 +180,27 @@ endif()
set_property(CACHE FSFW_OSAL PROPERTY STRINGS host linux)
if(NOT Q7S_SIMPLE_MODE)
if((NOT BUILD_Q7S_SIMPLE_MODE) AND (NOT EIVE_BUILD_WATCHDOG))
# Add libraries for all sources.
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_FSFW_NAME}
${LIB_OS_NAME}
${LIB_LWGPS_NAME}
${LIB_ARCSEC}
${LIB_CXX_FS}
)
if(TGT_BSP MATCHES "arm/q7s")
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_ARCSEC}
)
endif()
endif()
if(NOT EIVE_BUILD_WATCHDOG)
if(ADD_CSP_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CSP_NAME}
)
endif()
endif()
if(ADD_ETL_LIB)
@ -182,18 +209,16 @@ if(ADD_ETL_LIB)
)
endif()
if(ADD_CSP_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CSP_NAME}
)
endif()
if(ADD_JSON_LIB)
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_JSON_NAME}
)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE
${LIB_CXX_FS}
)
# Add include paths for all sources.
target_include_directories(${TARGET_NAME} PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}
@ -202,6 +227,11 @@ target_include_directories(${TARGET_NAME} PRIVATE
${ARCSEC_LIB_PATH}
)
if(TGT_BSP MATCHES "arm/q7s")
target_include_directories(${TARGET_NAME} PRIVATE
${ARCSEC_LIB_PATH}
)
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(WARNING_FLAGS
@ -249,11 +279,15 @@ if(NOT CMAKE_SIZE)
endif()
endif()
if(EIVE_BUILD_WATCHDOG)
set(TARGET_STRING "OBSW Watchdog")
else()
if(TGT_BSP)
set(TARGET_STRING "Target BSP: ${TGT_BSP}")
else()
set(TARGET_STRING "Target BSP: Hosted")
endif()
endif()
string(CONCAT POST_BUILD_COMMENT
"Build directory: ${CMAKE_BINARY_DIR}\n"

202
LICENSE Normal file
View File

@ -0,0 +1,202 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

13
NOTICE Normal file
View File

@ -0,0 +1,13 @@
Copyright 2021 Institute of Space Systems (IRS), University of Stuttgart
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

926
README.md

File diff suppressed because it is too large Load Diff

19
automation/Dockerfile-q7s Normal file
View File

@ -0,0 +1,19 @@
FROM ubuntu:focal
RUN apt-get update
RUN apt-get --yes upgrade
RUN apt-get --yes install cmake libgpiod-dev xz-utils nano curl
# Q7S root filesystem, required for cross-compilation.
RUN mkdir -p /usr/rootfs; \
curl https://buggy.irs.uni-stuttgart.de/eive/tools/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
| tar -xz -C /usr/rootfs
# Cross compiler
RUN mkdir -p /usr/tools; \
curl https://buggy.irs.uni-stuttgart.de/eive/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf.tar.gz \
| tar -xz -C /usr/tools
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
ENV PATH=$PATH:"/usr/tools/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin"

49
automation/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,49 @@
pipeline {
agent any
stages {
stage('Build Container') {
when {
changeset "automation/Dockerfile-q7s"
branch 'develop'
}
steps {
sh 'docker build -t eive-fsw-build-q7s:gcc8 - < automation/Dockerfile-q7s'
}
}
stage('Clean') {
when {
anyOf {
changelog 'cleanCI'
changeset '*.cmake'
changeset 'CMakeLists.txt'
}
}
steps {
sh 'rm -rf build-q7s-debug'
}
}
stage('Build Q7S') {
agent {
docker {
image 'eive-fsw-build-q7s:gcc8'
reuseNode true
}
}
steps {
dir('build-q7s-debug') {
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug -DFSFW_OSAL=linux ..'
sh 'cmake --build . -j'
}
}
}
stage('Deploy') {
when {
tag 'v*.*.*'
}
steps {
sh 'echo Deploying'
}
}
}
}

View File

@ -6,5 +6,3 @@ target_sources(${TARGET_NAME} PUBLIC
add_subdirectory(fsfwconfig)
add_subdirectory(boardconfig)

View File

@ -70,15 +70,15 @@ void initmission::initTasks() {
}
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = udpBridgeTask->addComponent(objects::UDP_BRIDGE);
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"TMTC_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
}
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = udpPollingTask->addComponent(objects::UDP_POLLING_TASK);
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Polling failed" << std::endl;
}
@ -142,8 +142,8 @@ void initmission::initTasks() {
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
pusVerification->startTask();
pusEvents->startTask();

View File

@ -1,6 +1,5 @@
#include "ObjectFactory.h"
#include <OBSWConfig.h>
#include "OBSWConfig.h"
#include <objects/systemObjectList.h>
#include <tmtc/apid.h>
#include <tmtc/pusIds.h>
@ -11,8 +10,13 @@
#include <mission/core/GenericFactory.h>
#include <mission/utility/TmFunnel.h>
#include <fsfw/osal/common/UdpTcPollingTask.h>
#include <fsfw/osal/common/UdpTmTcBridge.h>
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
#include "fsfw/osal/common/UdpTcPollingTask.h"
#include "fsfw/osal/common/UdpTmTcBridge.h"
#else
#include "fsfw/osal/common/TcpTmTcBridge.h"
#include "fsfw/osal/common/TcpTmTcServer.h"
#endif
#include <fsfw/tmtcpacket/pus/tm.h>
@ -28,7 +32,7 @@ void Factory::setStaticFrameworkObjectIds(){
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
TmFunnel::downlinkDestination = objects::UDP_BRIDGE;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
@ -40,7 +44,18 @@ void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
#if OBSW_USE_TMTC_TCP_BRIDGE == 0
sif::info << "Setting up UDP TMTC bridge with listener port " <<
UdpTmTcBridge::DEFAULT_SERVER_PORT << std::endl;
new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
sif::info << "Setting up TCP TMTC bridge with listener port " <<
TcpTmTcServer::DEFAULT_SERVER_PORT << std::endl;
new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
new TestTask(objects::TEST_TASK);
}

View File

@ -5,7 +5,7 @@
namespace pcduSwitches {
/* Switches are uint8_t datatype and go from 0 to 255 */
enum switcherList {
enum SwitcherList {
Q7S,
PAYLOAD_PCDU_CH1,
RW,
@ -22,7 +22,7 @@ namespace pcduSwitches {
SUS_NOMINAL,
SOLAR_CELL_EXP,
PLOC,
ACS_BORAD_SIDE_A,
ACS_BOARD_SIDE_A,
NUMBER_OF_SWITCHES
};

View File

@ -1,9 +1,10 @@
#include "InitMission.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"
#include "fsfw/tasks/TaskFactory.h"
#include <OBSWVersion.h>
#include <fsfw/tasks/TaskFactory.h>
#include <iostream>
#ifdef WIN32
static const char* COMPILE_PRINTOUT = "Windows";
#elif LINUX
@ -20,8 +21,9 @@ int main(void)
{
std::cout << "-- EIVE OBSW --" << std::endl;
std::cout << "-- Compiled for " << COMPILE_PRINTOUT << " --" << std::endl;
std::cout << "-- Software version " << SW_NAME << " v" << SW_VERSION << "."
<< SW_SUBVERSION << "." << SW_REVISION << " -- " << std::endl;
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION <<
"." << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << "." <<
FSFW_REVISION << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
initmission::initMission();

View File

@ -36,6 +36,7 @@ void initmission::initMission() {
void initmission::initTasks() {
TaskFactory* factory = TaskFactory::instance();
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
if(factory == nullptr) {
/* Should never happen ! */
return;
@ -46,11 +47,11 @@ void initmission::initTasks() {
void (*missedDeadlineFunc) (void) = nullptr;
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
"DIST", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
ReturnValue_t result = tmTcDistributor->addComponent(
objects::CCSDS_PACKET_DISTRIBUTOR);
result = tmTcDistributor->addComponent(objects::CCSDS_PACKET_DISTRIBUTOR);
if(result != HasReturnvaluesIF::RETURN_OK){
sif::error << "Object add component failed" << std::endl;
}
@ -66,33 +67,82 @@ void initmission::initTasks() {
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = udpBridgeTask->addComponent(objects::UDP_BRIDGE);
result = udpBridgeTask->addComponent(objects::TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Unix Bridge failed" << std::endl;
}
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = udpPollingTask->addComponent(objects::UDP_POLLING_TASK);
result = udpPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "Add component UDP Polling failed" << std::endl;
}
/* PUS Services */
PeriodicTaskIF* pusVerification = factory->createPeriodicTask(
std::vector<PeriodicTaskIF*> pusTasks;
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
std::vector<PeriodicTaskIF*> pstTasks;
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
#if OBSW_ADD_TEST_CODE == 1
std::vector<PeriodicTaskIF*> testTasks;
createTestTasks(*factory, missedDeadlineFunc, pstTasks);
#endif /* OBSW_ADD_TEST_CODE == 1 */
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
for(const auto& task: taskVector) {
if(task != nullptr) {
task->startTask();
}
else {
sif::error << "Task in vector " << name << " is invalid!" << std::endl;
}
}
};
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
taskStarter(pusTasks, "PUS Tasks");
#if OBSW_ADD_TEST_CODE == 1
taskStarter(testTasks, "Test Tasks");
#endif /* OBSW_ADD_TEST_CODE == 1 */
taskStarter(pstTasks, "PST Tasks");
#if OBSW_ADD_TEST_PST == 1
if(startTestPst) {
pstTestTask->startTask();
}
#endif /* RPI_TEST_ACS_BOARD == 1 */
sif::info << "Tasks started.." << std::endl;
}
void initmission::createPusTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*>& taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* pusVerification = factory.createPeriodicTask(
"PUS_VERIF", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_1_VERIFICATION);
if(result != HasReturnvaluesIF::RETURN_OK){
sif::error << "Object add component failed" << std::endl;
}
taskVec.push_back(pusVerification);
PeriodicTaskIF* pusEvents = factory->createPeriodicTask(
PeriodicTaskIF* pusEvents = factory.createPeriodicTask(
"PUS_EVENTS", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusVerification->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
result = pusEvents->addComponent(objects::PUS_SERVICE_5_EVENT_REPORTING);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS5", objects::PUS_SERVICE_5_EVENT_REPORTING);
initmission::printAddObjectError("PUS_EVENTS", objects::PUS_SERVICE_5_EVENT_REPORTING);
}
result = pusEvents->addComponent(objects::EVENT_MANAGER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS_MGMT", objects::EVENT_MANAGER);
}
taskVec.push_back(pusEvents);
PeriodicTaskIF* pusHighPrio = factory->createPeriodicTask(
PeriodicTaskIF* pusHighPrio = factory.createPeriodicTask(
"PUS_HIGH_PRIO", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.200, missedDeadlineFunc);
result = pusHighPrio->addComponent(objects::PUS_SERVICE_2_DEVICE_ACCESS);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -102,8 +152,9 @@ void initmission::initTasks() {
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS9", objects::PUS_SERVICE_9_TIME_MGMT);
}
taskVec.push_back(pusHighPrio);
PeriodicTaskIF* pusMedPrio = factory->createPeriodicTask(
PeriodicTaskIF* pusMedPrio = factory.createPeriodicTask(
"PUS_MED_PRIO", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.8, missedDeadlineFunc);
result = pusMedPrio->addComponent(objects::PUS_SERVICE_8_FUNCTION_MGMT);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -121,8 +172,9 @@ void initmission::initTasks() {
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("PUS3", objects::PUS_SERVICE_3_HOUSEKEEPING);
}
taskVec.push_back(pusMedPrio);
PeriodicTaskIF* pusLowPrio = factory->createPeriodicTask(
PeriodicTaskIF* pusLowPrio = factory.createPeriodicTask(
"PUS_LOW_PRIO", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1.6, missedDeadlineFunc);
result = pusLowPrio->addComponent(objects::PUS_SERVICE_17_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -133,24 +185,34 @@ void initmission::initTasks() {
initmission::printAddObjectError("INT_ERR_RPRT",
objects::INTERNAL_ERROR_REPORTER);
}
#if OBSW_ADD_TEST_PST == 1
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("ACS_PST", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
result = pst::pstTest(pstTestTask);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "initmission::initTasks: ACS PST initialization failed!" << std::endl;
taskVec.push_back(pusLowPrio);
}
#endif /* RPI_TEST_ACS_BOARD == 1 */
PeriodicTaskIF* testTask = factory->createPeriodicTask(
void initmission::createPstTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc, std::vector<PeriodicTaskIF*> &taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"SPI_PST", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0,
missedDeadlineFunc);
result = pst::pstSpi(spiPst);
if (result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: Creating PST failed!" << std::endl;
}
taskVec.push_back(spiPst);
#endif
}
void initmission::createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*> &taskVec) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
#if OBSW_ADD_TEST_CODE == 1
result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#endif /* OBSW_ADD_TEST_CODE == 1 */
#if RPI_ADD_SPI_TEST == 1
result = testTask->addComponent(objects::SPI_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -170,23 +232,16 @@ void initmission::initTasks() {
}
#endif /* RPI_ADD_GPIO_TEST == 1 */
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
pusVerification->startTask();
pusEvents->startTask();
pusHighPrio->startTask();
pusMedPrio->startTask();
pusLowPrio->startTask();
#if OBSW_ADD_TEST_CODE == 1
testTask->startTask();
#endif /* OBSW_ADD_TEST_CODE == 1 */
bool startTestPst = true;
static_cast<void>(startTestPst);
#if OBSW_ADD_TEST_PST == 1
pstTestTask->startTask();
#endif /* RPI_TEST_ACS_BOARD == 1 */
sif::info << "Tasks started.." << std::endl;
FixedTimeslotTaskIF* pstTestTask = factory->createFixedTimeslotTask("TEST_PST", 50,
PeriodicTaskIF::MINIMUM_STACK_SIZE * 2, 2.0, missedDeadlineFunc);
result = pst::pstTest(pstTestTask);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::info << "initmission::initTasks: ACS PST empty or invalid" << std::endl;
startTestPst = false;
}
#endif /* RPI_TEST_ACS_BOARD == 1 */
}

View File

@ -1,9 +1,24 @@
#ifndef BSP_LINUX_INITMISSION_H_
#define BSP_LINUX_INITMISSION_H_
#include "fsfw/tasks/Typedef.h"
#include <vector>
class PeriodicTaskIF;
class TaskFactory;
namespace initmission {
void initMission();
void initTasks();
void createPstTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*> &taskVec);
void createTestTasks(TaskFactory& factory,
TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*> &taskVec);
void createPusTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec);
};
#endif /* BSP_LINUX_INITMISSION_H_ */

View File

@ -1,6 +1,4 @@
#include <fsfw/hal/linux/uart/UartComIF.h>
#include <fsfw/hal/linux/uart/UartCookie.h>
#include <mission/devices/GPSHyperionHandler.h>
#include <devConf.h>
#include "ObjectFactory.h"
#include "objects/systemObjectList.h"
@ -9,16 +7,13 @@
#include "OBSWConfig.h"
#include "tmtc/apid.h"
#include "tmtc/pusIds.h"
#include "spiConf.h"
#include "linux/boardtest/LibgpiodTest.h"
#include "linux/boardtest/SpiTestClass.h"
#include "linux/boardtest/UartTestClass.h"
#include "mission/core/GenericFactory.h"
#include "mission/utility/TmFunnel.h"
#include "mission/devices/MGMHandlerLIS3MDL.h"
#include "mission/devices/MGMHandlerRM3100.h"
#include <mission/devices/GPSHyperionHandler.h>
#include "mission/devices/GyroADIS16507Handler.h"
#include "fsfw/datapoollocal/LocalDataPoolManager.h"
@ -28,15 +23,24 @@
#include "fsfw/tasks/TaskFactory.h"
/* UDP server includes */
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
#include <fsfw/src/fsfw/osal/common/TcpTmTcBridge.h>
#include <fsfw/src/fsfw/osal/common/TcpTmTcServer.h>
#else
#include "fsfw/osal/common/UdpTmTcBridge.h"
#include "fsfw/osal/common/UdpTcPollingTask.h"
#endif
#include "fsfw/hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw/hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/hal/linux/rpi/GpioRPi.h"
#include "fsfw/hal/common/gpio/GpioCookie.h"
#include "fsfw/hal/linux/spi/SpiCookie.h"
#include "fsfw/hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/devicehandlers/MgmLIS3MDLHandler.h"
#include "fsfw_hal/devicehandlers/MgmRM3100Handler.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw_hal/linux/rpi/GpioRPi.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include <fsfw_hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartCookie.h>
void Factory::setStaticFrameworkObjectIds() {
PusServiceBase::packetSource = objects::PUS_PACKET_DISTRIBUTOR;
@ -45,7 +49,7 @@ void Factory::setStaticFrameworkObjectIds() {
CommandingServiceBase::defaultPacketSource = objects::PUS_PACKET_DISTRIBUTOR;
CommandingServiceBase::defaultPacketDestination = objects::TM_FUNNEL;
TmFunnel::downlinkDestination = objects::UDP_BRIDGE;
TmFunnel::downlinkDestination = objects::TMTC_BRIDGE;
// No storage object for now.
TmFunnel::storageDestination = objects::NO_OBJECT;
@ -59,12 +63,126 @@ void ObjectFactory::produce(void* args){
Factory::setStaticFrameworkObjectIds();
ObjectFactory::produceGenericObjects();
new UdpTmTcBridge(objects::UDP_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
new UdpTcPollingTask(objects::UDP_POLLING_TASK, objects::UDP_BRIDGE);
#if OBSW_USE_TMTC_TCP_BRIDGE == 1
auto tmtcBridge = new TcpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new TcpTmTcServer(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#else
auto tmtcBridge = new UdpTmTcBridge(objects::TMTC_BRIDGE, objects::CCSDS_PACKET_DISTRIBUTOR);
tmtcBridge->setMaxNumberOfPacketsStored(50);
new UdpTcPollingTask(objects::TMTC_POLLING_TASK, objects::TMTC_BRIDGE);
#endif
GpioIF* gpioIF = new LinuxLibgpioIF(objects::GPIO_IF);
GpioCookie* gpioCookie = nullptr;
static_cast<void>(gpioCookie);
new SpiComIF(objects::SPI_COM_IF, gpioIF);
std::string spiDev;
SpiCookie* spiCookie = nullptr;
static_cast<void>(spiCookie);
#if OBSW_ADD_ACS_BOARD == 1
if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
}
// TODO: Missing pin for Gyro 2
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
"MGM_0_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
"MGM_1_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN,
"MGM_2_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_3_RM3100_CS, gpio::MGM_3_BCM_PIN,
"MGM_3_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
"GYRO_1_L3G", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_2_ADIS_CS, gpio::GYRO_2_BCM_PIN,
"GYRO_2_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_3_L3G_CS, gpio::GYRO_3_BCM_PIN,
"GYRO_3_L3G", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
spiDev = "/dev/spidev0.1";
spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_0_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_2_LIS3, gpioIds::MGM_2_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
mgmLis3Handler = new MgmLIS3MDLHandler(objects::MGM_2_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmLis3Handler->setStartUpImmediately();
#if FSFW_HAL_LIS3MDL_MGM_DEBUG == 1
mgmLis3Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::MGM_3_RM3100, gpioIds::MGM_3_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
mgmRm3100Handler = new MgmRM3100Handler(objects::MGM_3_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie, 0);
mgmRm3100Handler->setStartUpImmediately();
#if FSFW_HAL_RM3100_MGM_DEBUG == 1
mgmRm3100Handler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto adisHandler = new GyroADIS16507Handler(objects::GYRO_0_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie);
adisHandler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG== 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
spiCookie = new SpiCookie(addresses::GYRO_2_ADIS, gpioIds::GYRO_2_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
adisHandler = new GyroADIS16507Handler(objects::GYRO_2_ADIS_HANDLER, objects::SPI_COM_IF,
spiCookie);
adisHandler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_3_L3G, gpioIds::GYRO_3_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_3_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie, 0);
gyroL3gHandler->setStartUpImmediately();
#if FSFW_HAL_L3GD20_GYRO_DEBUG== 1
gyroL3gHandler->setToGoToNormalMode(true);
#endif
#endif /* RPI_TEST_ACS_BOARD == 1 */
#if OBSW_ADD_TEST_CODE == 1
createTestTasks();
#endif /* OBSW_ADD_TEST_CODE == 1 */
}
void ObjectFactory::createTestTasks() {
new TestTask(objects::TEST_TASK);
#if RPI_ADD_SPI_TEST == 1
new SpiTestClass(objects::SPI_TEST, gpioIF);
#endif
@ -89,53 +207,6 @@ void ObjectFactory::produce(void* args){
new LibgpiodTest(objects::LIBGPIOD_TEST, objects::GPIO_IF, gpioCookieLoopback);
#endif /* RPI_LOOPBACK_TEST_GPIO == 1 */
new SpiComIF(objects::SPI_COM_IF, gpioIF);
std::string spiDev;
SpiCookie* spiCookie = nullptr;
static_cast<void>(spiCookie);
#if RPI_TEST_ACS_BOARD == 1
if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
}
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_0_LIS3_CS, gpio::MGM_0_BCM_PIN,
"MGM_0_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_1_RM3100_CS, gpio::MGM_1_BCM_PIN,
"MGM_1_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_2_LIS3_CS, gpio::MGM_2_BCM_PIN,
"MGM_2_LIS3", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::MGM_3_RM3100_CS, gpio::MGM_3_BCM_PIN,
"MGM_3_RM3100", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_0_ADIS_CS, gpio::GYRO_0_BCM_PIN,
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_1_L3G_CS, gpio::GYRO_1_BCM_PIN,
"GYRO_1_L3G", gpio::Direction::OUT, 1);
gpio::createRpiGpioConfig(gpioCookie, gpioIds::GYRO_2_L3G_CS, gpio::GYRO_2_BCM_PIN,
"GYRO_2_L3G", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
spiDev = "/dev/spidev0.0";
spiCookie = new SpiCookie(addresses::MGM_0_LIS3, gpioIds::MGM_0_LIS3_CS, spiDev,
MGMLIS3MDL::MAX_BUFFER_SIZE, spi::DEFAULT_LIS3_MODE, spi::DEFAULT_LIS3_SPEED);
auto mgmLis3Handler = new MGMHandlerLIS3MDL(objects::MGM_0_LIS3_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmLis3Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::MGM_1_RM3100, gpioIds::MGM_1_RM3100_CS, spiDev,
RM3100::MAX_BUFFER_SIZE, spi::DEFAULT_RM3100_MODE, spi::DEFAULT_RM3100_SPEED);
auto mgmRm3100Handler = new MGMHandlerRM3100(objects::MGM_1_RM3100_HANDLER,
objects::SPI_COM_IF, spiCookie);
mgmRm3100Handler->setStartUpImmediately();
spiCookie = new SpiCookie(addresses::GYRO_1_L3G, gpioIds::GYRO_1_L3G_CS, spiDev,
L3GD20H::MAX_BUFFER_SIZE, spi::DEFAULT_L3G_MODE, spi::DEFAULT_L3G_SPEED);
auto gyroL3gHandler = new GyroHandlerL3GD20H(objects::GYRO_1_L3G_HANDLER, objects::SPI_COM_IF,
spiCookie);
gyroL3gHandler->setStartUpImmediately();
#endif /* RPI_TEST_ACS_BOARD == 1 */
#if RPI_TEST_ADIS16507 == 1
if(gpioCookie == nullptr) {
gpioCookie = new GpioCookie();
@ -144,7 +215,7 @@ void ObjectFactory::produce(void* args){
"GYRO_0_ADIS", gpio::Direction::OUT, 1);
gpioIF->addGpios(gpioCookie);
spiDev = "/dev/spidev0.0";
spiDev = "/dev/spidev0.1";
spiCookie = new SpiCookie(addresses::GYRO_0_ADIS, gpioIds::GYRO_0_ADIS_CS, spiDev,
ADIS16507::MAXIMUM_REPLY_SIZE, spi::DEFAULT_ADIS16507_MODE, spi::DEFAULT_ADIS16507_SPEED,
nullptr, nullptr);
@ -158,7 +229,7 @@ void ObjectFactory::produce(void* args){
uartCookie->setToFlushInput(true);
uartCookie->setReadCycles(6);
GPSHyperionHandler* gpsHandler = new GPSHyperionHandler(objects::GPS0_HANDLER,
objects::UART_COM_IF, uartCookie);
objects::UART_COM_IF, uartCookie, false);
gpsHandler->setStartUpImmediately();
#endif

View File

@ -5,6 +5,8 @@
namespace ObjectFactory {
void setStatics();
void produce(void* args);
void createTestTasks();
};
#endif /* BSP_LINUX_OBJECTFACTORY_H_ */

View File

@ -15,20 +15,18 @@
#define RPI_TEST_ACS_BOARD 0
#endif
#define RPI_ADD_UART_TEST 1
#if RPI_ADD_UART_TEST == 1
#define RPI_TEST_GPS_DEVICE 0
#endif
#define RPI_ADD_UART_TEST 0
/* Adapt these values accordingly */
namespace gpio {
static constexpr uint8_t MGM_0_BCM_PIN = 0;
static constexpr uint8_t MGM_1_BCM_PIN = 1;
static constexpr uint8_t MGM_2_BCM_PIN = 17;
static constexpr uint8_t MGM_3_BCM_PIN = 27;
static constexpr uint8_t MGM_0_BCM_PIN = 17;
static constexpr uint8_t MGM_1_BCM_PIN = 27;
static constexpr uint8_t MGM_2_BCM_PIN = 22;
static constexpr uint8_t MGM_3_BCM_PIN = 23;
static constexpr uint8_t GYRO_0_BCM_PIN = 5;
static constexpr uint8_t GYRO_1_BCM_PIN = 6;
static constexpr uint8_t GYRO_2_BCM_PIN = 4;
static constexpr uint8_t GYRO_2_BCM_PIN = 13;
static constexpr uint8_t GYRO_3_BCM_PIN = 19;
}
#endif /* BSP_RPI_BOARDCONFIG_RPI_CONFIG_H_ */

View File

@ -1,4 +1,5 @@
#include "InitMission.h"
#include "OBSWConfig.h"
#include "OBSWVersion.h"
#include "fsfw/FSFWVersion.h"

View File

@ -12,5 +12,6 @@ else()
add_subdirectory(gpio)
add_subdirectory(core)
add_subdirectory(memory)
add_subdirectory(spiCallbacks)
add_subdirectory(callbacks)
add_subdirectory(devices)
endif()

View File

@ -1,35 +0,0 @@
FROM ubuntu:latest
# FROM alpine:latest
ENV TZ=Europe/Berlin
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y curl cmake g++
# Q7S root filesystem, required for cross-compilation. Use IPv6 for curl
RUN mkdir -p /usr/rootfs; \
curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/dnfMy9kGpgynN6J/download/cortexa9hf-neon-xiphos-linux-gnueabi.tar.gz \
| tar xvz -C /usr/rootfs
# Q7S C++ cross-compiler. Use IPv6 for curl
RUN mkdir -p /usr/tools; \
curl -6 https://eive-cloud.irs.uni-stuttgart.de/index.php/s/RMsbHydJc6PSqcz/download/gcc-arm-linux-gnueabi.tar.gz \
| tar xvz -C /usr/tools
# RUN apk add cmake make g++
# Required for cmake build
ENV Q7S_SYSROOT="/usr/rootfs/cortexa9hf-neon-xiphos-linux-gnueabi"
ENV PATH=$PATH:"/usr/tools/gcc-arm-linux-gnueabi/bin"
WORKDIR /usr/src/app
COPY . .
RUN set -ex; \
rm -rf build-q7s; \
mkdir build-q7s; \
cd build-q7s; \
cmake -DCMAKE_BUILD_TYPE=Release -DOS_FSFW=linux -DTGT_BSP="arm/q7s" ..;
ENTRYPOINT ["cmake", "--build", "build-q7s"]
CMD ["-j"]
# CMD ["bash"]

View File

@ -0,0 +1,100 @@
#ifndef BSP_Q7S_BOARDCONFIG_BUSCONF_H_
#define BSP_Q7S_BOARDCONFIG_BUSCONF_H_
namespace q7s {
static constexpr char SPI_DEFAULT_DEV[] = "/dev/spidev2.0";
static constexpr char SPI_RW_DEV[] = "/dev/spidev3.0";
static constexpr char I2C_DEFAULT_DEV[] = "/dev/i2c-1";
static constexpr char UART_PLOC_MPSOC_DEV[] = "/dev/ttyUL3";
static constexpr char UART_PLOC_SUPERVSIOR_DEV[] = "/dev/ttyUL4";
static constexpr char UART_SYRLINKS_DEV[] = "/dev/ttyUL5";
static constexpr char UART_STAR_TRACKER_DEV[] = "/dev/ttyUL8";
static constexpr char UART_GNSS_0_DEV[] = "/dev/ttyUL0";
static constexpr char UART_GNSS_1_DEV[] = "/dev/ttyUL2";
/**************************************************************/
/** OBC1E */
/**************************************************************/
static constexpr char GPIO_MULTIPURPOSE_1V8_OBC1D[] = "/amba_pl/gpio@42020000";
static const char* const GPIO_GYRO_ADIS_LABEL = GPIO_MULTIPURPOSE_1V8_OBC1D;
static constexpr uint32_t GPIO_GYRO_0_ADIS_CS = 0; // Package Pin: W20
static constexpr uint32_t GPIO_GYRO_2_ADIS_CS = 2; // AA22
/**************************************************************/
/** OBC1F B0 */
/**************************************************************/
static constexpr char GPIO_FLEX_OBC1F_B0[] = "/amba_pl/gpio@42030000";
static constexpr uint32_t GPIO_FLEX_OBC1F_B0_WIDTH = 20;
static const char* const GPIO_ACS_BOARD_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RW_DEFAULT_LABEL = GPIO_FLEX_OBC1F_B0;
static const char* const GPIO_RAD_SENSOR_LABEL = GPIO_FLEX_OBC1F_B0;
static constexpr uint32_t GPIO_RW_0_CS = 7; // B20
static constexpr uint32_t GPIO_RW_1_CS = 3; // G22
static constexpr uint32_t GPIO_RW_2_CS = 11; // E18
static constexpr uint32_t GPIO_RW_3_CS = 6; // B19
static constexpr uint32_t GPIO_GYRO_1_L3G_CS = 18; // N22
static constexpr uint32_t GPIO_GYRO_3_L3G_CS = 1; // M21
static constexpr uint32_t GPIO_MGM_0_LIS3_CS = 5; // C18
static constexpr uint32_t GPIO_MGM_1_RM3100_CS = 16; // A16
static constexpr uint32_t GPIO_MGM_3_RM3100_CS = 10; // C17
// Active low enable pin (needs to be driven low for regular operations)
static constexpr uint32_t GPIO_GYRO_0_ENABLE = 2; // H22
// Active low reset pin (needs to be driven high for regular operations)
static constexpr uint32_t GPIO_RESET_GNSS_0 = 9; // C22
static constexpr uint32_t GPIO_RESET_GNSS_1 = 12; // B21
static constexpr uint32_t GPIO_RAD_SENSOR_CS = 19; // R18
/**************************************************************/
/** OBC1F B1 */
/**************************************************************/
static constexpr char GPIO_FLEX_OBC1F_B1[] = "/amba_pl/gpio@42030000";
// Need to use chip name here for now because the label name is the name for
// gpiochip 5 and gpiochip6
static constexpr char GPIO_FLEX_OBC1F_B1_CHIP[] = "gpiochip6";
static const char* const GPIO_MGM2_LIS3_LABEL = GPIO_FLEX_OBC1F_B1_CHIP;
static constexpr uint32_t GPIO_MGM_2_LIS3_CS = 0; // D18
/**************************************************************/
/** OBC1C */
/**************************************************************/
static constexpr char GPIO_3V3_OBC1C[] = "/amba_pl/gpio@42040000";
static const char* const GPIO_HEATER_LABEL = GPIO_3V3_OBC1C;
static const char* const GPIO_SOLAR_ARR_DEPL_LABEL = GPIO_3V3_OBC1C;
static constexpr uint32_t GPIO_HEATER_0_PIN = 6;
static constexpr uint32_t GPIO_HEATER_1_PIN = 12;
static constexpr uint32_t GPIO_HEATER_2_PIN = 7;
static constexpr uint32_t GPIO_HEATER_3_PIN = 5;
static constexpr uint32_t GPIO_HEATER_4_PIN = 3;
static constexpr uint32_t GPIO_HEATER_5_PIN = 0;
static constexpr uint32_t GPIO_HEATER_6_PIN = 1;
static constexpr uint32_t GPIO_HEATER_7_PIN = 11;
static constexpr uint32_t GPIO_GYRO_2_ENABLE = 18; // F22
static constexpr uint32_t GPIO_SOL_DEPL_SA_0_PIN = 4;
static constexpr uint32_t GPIO_SOL_DEPL_SA_1_PIN = 2;
static constexpr char GPIO_RW_SPI_MUX_LABEL[] = "zynq_gpio";
// Uses EMIO interface to PL, starts at 54
static constexpr uint32_t GPIO_RW_SPI_MUX_CS = 54;
static constexpr uint32_t SPI_MUX_BIT_1 = 13;
static constexpr uint32_t SPI_MUX_BIT_2 = 14;
static constexpr uint32_t SPI_MUX_BIT_3 = 15;
static constexpr uint32_t SPI_MUX_BIT_4 = 16;
static constexpr uint32_t SPI_MUX_BIT_5 = 17;
static constexpr uint32_t SPI_MUX_BIT_6 = 9;
static constexpr uint32_t EN_RW_CS = 17;
}
#endif /* BSP_Q7S_BOARDCONFIG_BUSCONF_H_ */

View File

@ -5,6 +5,17 @@
#cmakedefine01 Q7S_SIMPLE_MODE
/*******************************************************************/
/** All of the following flags should be enabled for mission code */
/*******************************************************************/
//! Timers can mess up the code when debugging
//! All of this should be enabled for mission code!
/*******************************************************************/
/** Other flags */
/*******************************************************************/
#define Q7S_SD_NONE 0
#define Q7S_SD_COLD_REDUNDANT 1
#define Q7S_SD_HOT_REDUNDANT 2
@ -15,16 +26,8 @@
// Set to Q7S_HOT_REDUNDANT: On startup, turn on both SD cards and mount them
#define Q7S_SD_CARD_CONFIG Q7S_SD_COLD_REDUNDANT
#define Q7S_ADD_RTD_DEVICES 0
/* Only one of those 2 should be enabled! */
/* Add code for ACS board */
#define OBSW_ADD_ACS_BOARD 0
#if OBSW_ADD_ACS_BOARD == 0
#define Q7S_ADD_SPI_TEST 0
#endif
#define Q7S_ADD_SYRLINKS_HANDLER 1
// Probably better if this is disabled for mission code. Convenient for development
#define Q7S_CHECK_FOR_ALREADY_RUNNING_IMG 1
#define Q7S_SIMPLE_ADD_FILE_SYSTEM_TEST 0

View File

@ -4,6 +4,11 @@
#include <iostream>
#include <cstdlib>
enum SdCard {
SDC0,
SDC1
};
FileSystemTest::FileSystemTest() {
using namespace std;
SdCard sdCard = SdCard::SDC0;

View File

@ -1,11 +1,6 @@
#ifndef BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_
#define BSP_Q7S_BOARDTEST_FILESYSTEMTEST_H_
enum SdCard {
SDC0,
SDC1
};
class FileSystemTest {
public:
FileSystemTest();

View File

@ -1,3 +1,4 @@
#include <bsp_q7s/core/CoreController.h>
#include <bsp_q7s/memory/FileSystemHandler.h>
#include <fsfw/objectmanager/ObjectManager.h>
#include "Q7STestTask.h"
@ -24,8 +25,9 @@ ReturnValue_t Q7STestTask::performOneShotAction() {
//testScratchApi();
//testJsonLibDirect();
//testDummyParams();
FsOpCodes opCode = FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY;
testFileSystemHandlerDirect(opCode);
//testProtHandler();
//FsOpCodes opCode = FsOpCodes::ATTEMPT_DIR_REMOVAL_NON_EMPTY;
//testFileSystemHandlerDirect(opCode);
return TestTask::performOneShotAction();
}
@ -131,6 +133,87 @@ void Q7STestTask::testDummyParams() {
sif::info << "Test value 2 (\"blirb\" expected): " << test2 << std::endl;
}
ReturnValue_t Q7STestTask::initialize() {
coreController = ObjectManager::instance()->get<CoreController>(objects::CORE_CONTROLLER);
if(coreController == nullptr) {
sif::warning << "Q7STestTask::initialize: Could not retrieve CORE_CONTROLLER object" <<
std::endl;
}
return TestTask::initialize();
}
void Q7STestTask::testProtHandler() {
bool opPerformed = false;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// If any chips are unlocked, lock them here
result = coreController->setBootCopyProtection(
CoreController::Chip::ALL_CHIP, CoreController::Copy::ALL_COPY, true,
opPerformed, true);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
// unlock own copy
result = coreController->setBootCopyProtection(
CoreController::Chip::SELF_CHIP, CoreController::Copy::SELF_COPY, false,
opPerformed, true);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
if(not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
int retval = std::system("print-chip-prot-status.sh");
if(retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// lock own copy
result = coreController->setBootCopyProtection(
CoreController::Chip::SELF_CHIP, CoreController::Copy::SELF_COPY, true,
opPerformed, true);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
if(not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if(retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// unlock specific copy
result = coreController->setBootCopyProtection(
CoreController::Chip::CHIP_1, CoreController::Copy::COPY_1, false,
opPerformed, true);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
if(not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if(retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
// lock specific copy
result = coreController->setBootCopyProtection(
CoreController::Chip::CHIP_1, CoreController::Copy::COPY_1, true,
opPerformed, true);
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::warning << "Q7STestTask::testProtHandler: Op failed" << std::endl;
}
if(not opPerformed) {
sif::warning << "Q7STestTask::testProtHandler: No op performed" << std::endl;
}
retval = std::system("print-chip-prot-status.sh");
if(retval != 0) {
utility::handleSystemError(retval, "Q7STestTask::testProtHandler");
}
}
void Q7STestTask::testFileSystemHandlerDirect(FsOpCodes opCode) {
auto fsHandler = ObjectManager::instance()->
get<FileSystemHandler>(objects::FILE_SYSTEM_HANDLER);

View File

@ -6,7 +6,10 @@
class Q7STestTask: public TestTask {
public:
Q7STestTask(object_id_t objectId);
ReturnValue_t initialize() override;
private:
CoreController* coreController = nullptr;
ReturnValue_t performOneShotAction() override;
void testSdCard();
@ -15,6 +18,7 @@ private:
void testScratchApi();
void testJsonLibDirect();
void testDummyParams();
void testProtHandler();
enum FsOpCodes {
CREATE_EMPTY_FILE_IN_TMP,

View File

@ -1,3 +1,4 @@
target_sources(${TARGET_NAME} PRIVATE
rwSpiCallback.cpp
gnssCallback.cpp
)

View File

@ -0,0 +1,26 @@
#include "gnssCallback.h"
#include "devices/gpioIds.h"
#include "fsfw/tasks/TaskFactory.h"
ReturnValue_t gps::triggerGpioResetPin(void *args) {
ResetArgs* resetArgs = reinterpret_cast<ResetArgs*>(args);
if(args == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
if (resetArgs->gpioComIF == nullptr) {
return HasReturnvaluesIF::RETURN_FAILED;
}
gpioId_t gpioId;
if(resetArgs->gnss1) {
gpioId = gpioIds::GNSS_1_NRESET;
}
else {
gpioId = gpioIds::GNSS_0_NRESET;
}
resetArgs->gpioComIF->pullLow(gpioId);
TaskFactory::delayTask(resetArgs->waitPeriodMs);
resetArgs->gpioComIF->pullHigh(gpioId);
return HasReturnvaluesIF::RETURN_OK;
}

View File

@ -0,0 +1,19 @@
#ifndef BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#define BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_
#include "fsfw_hal/linux/gpio/LinuxLibgpioIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
struct ResetArgs {
bool gnss1 = false;
LinuxLibgpioIF* gpioComIF = nullptr;
uint32_t waitPeriodMs = 100;
};
namespace gps {
ReturnValue_t triggerGpioResetPin(void* args);
}
#endif /* BSP_Q7S_CALLBACKS_GNSSCALLBACK_H_ */

View File

@ -1,9 +1,10 @@
#include <bsp_q7s/spiCallbacks/rwSpiCallback.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
#include <mission/devices/RwHandler.h>
#include <fsfw/hal/linux/spi/SpiCookie.h>
#include <fsfw/hal/linux/UnixFileGuard.h>
#include "rwSpiCallback.h"
#include "devices/gpioIds.h"
#include "mission/devices/RwHandler.h"
#include "fsfw_hal/linux/spi/SpiCookie.h"
#include "fsfw_hal/linux/UnixFileGuard.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
namespace rwSpiCallback {
@ -24,7 +25,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
int fileDescriptor = 0;
std::string device = cookie->getSpiDevice();
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback: ");
UnixFileGuard fileHelper(device, &fileDescriptor, O_RDWR, "rwSpiCallback::spiCallback");
if(fileHelper.getOpenResult() != HasReturnvaluesIF::RETURN_OK) {
sif::error << "rwSpiCallback::spiCallback: Failed to open device file" << std::endl;
return SpiComIF::OPENING_FILE_FAILED;
@ -211,7 +212,7 @@ ReturnValue_t spiCallback(SpiComIF* comIf, SpiCookie *cookie, const uint8_t *sen
result = HasReturnvaluesIF::RETURN_OK;
}
cookie->assignTransferSize(decodedFrameLen);
cookie->setTransferSize(decodedFrameLen);
closeSpi(gpioId, gpioIF, mutex);

View File

@ -1,9 +1,9 @@
#ifndef BSP_Q7S_RW_SPI_CALLBACK_H_
#define BSP_Q7S_RW_SPI_CALLBACK_H_
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
#include <fsfw/hal/linux/spi/SpiComIF.h>
#include <fsfw/hal/common/gpio/GpioCookie.h>
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw_hal/linux/spi/SpiComIF.h"
#include "fsfw_hal/common/gpio/GpioCookie.h"
namespace rwSpiCallback {

File diff suppressed because it is too large Load Diff

View File

@ -1,20 +1,51 @@
#ifndef BSP_Q7S_CORE_CORECONTROLLER_H_
#define BSP_Q7S_CORE_CORECONTROLLER_H_
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
#include "fsfw/controller/ExtendedControllerBase.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "events/subsystemIdRanges.h"
class Timer;
class SdCardManager;
class CoreController: public ExtendedControllerBase {
public:
enum Chip: uint8_t {
CHIP_0,
CHIP_1,
NO_CHIP,
SELF_CHIP,
ALL_CHIP
};
enum Copy: uint8_t {
COPY_0,
COPY_1,
NO_COPY,
SELF_COPY,
ALL_COPY
};
static constexpr char CHIP_PROT_SCRIPT[] = "/home/root/scripts/get-chip-prot-status.sh";
static constexpr char CHIP_STATE_FILE[] = "/tmp/chip_prot_status.txt";
static constexpr char CURR_COPY_FILE[] = "/tmp/curr_copy.txt";
static constexpr char VERSION_FILE[] = "/conf/sd_status";
static constexpr ActionId_t LIST_DIRECTORY_INTO_FILE = 0;
static constexpr ActionId_t REBOOT_OBC = 32;
static constexpr ActionId_t MOUNT_OTHER_COPY = 33;
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::CORE;
static constexpr Event ALLOC_FAILURE = event::makeEvent(SUBSYSTEM_ID, 0, severity::MEDIUM);
CoreController(object_id_t objectId);
virtual~ CoreController();
ReturnValue_t initialize() override;
@ -26,24 +57,128 @@ public:
ReturnValue_t handleCommandMessage(CommandMessage *message) override;
void performControlOperation() override;
/**
* Generate a file containing the chip lock/unlock states inside /tmp/chip_prot_status.txt
* @return
*/
static ReturnValue_t generateChipStateFile();
static ReturnValue_t incrementAllocationFailureCount();
static void getCurrentBootCopy(Chip& chip, Copy& copy);
ReturnValue_t updateProtInfo(bool regenerateChipStateFile = true);
/**
* Checks whether the target chip and copy are write protected and protect set them to a target
* state where applicable.
* @param targetChip
* @param targetCopy
* @param protect Target state
* @param protOperationPerformed [out] Can be used to determine whether any operation
* was performed
* @param updateProtFile Specify whether the protection info file is updated
* @return
*/
ReturnValue_t setBootCopyProtection(Chip targetChip, Copy targetCopy,
bool protect, bool& protOperationPerformed, bool updateProtFile = true);
bool sdInitFinished() const;
private:
static Chip CURRENT_CHIP;
static Copy CURRENT_COPY;
// Designated value for rechecking FIFO open
static constexpr int RETRY_FIFO_OPEN = -2;
int watchdogFifoFd = 0;
// States for SD state machine, which is used in non-blocking mode
enum class SdStates {
NONE,
START,
GET_INFO,
SET_STATE_SELF,
MOUNT_SELF,
// Determine operations for other SD card, depending on redundancy configuration
DETERMINE_OTHER,
SET_STATE_OTHER,
// Mount or unmount other
MOUNT_UNMOUNT_OTHER,
// Skip period because the shell command used to generate the info file sometimes is
// missing the last performed operation if executed too early
SKIP_CYCLE_BEFORE_INFO_UPDATE,
UPDATE_INFO,
// SD initialization done
IDLE,
// Used if SD switches or mount commands are issued via telecommand
SET_STATE_FROM_COMMAND,
};
static constexpr bool BLOCKING_SD_INIT = false;
SdCardManager* sdcMan = nullptr;
struct SdInfo {
sd::SdCard pref = sd::SdCard::NONE;
sd::SdState prefState = sd::SdState::OFF;
sd::SdCard other = sd::SdCard::NONE;
sd::SdState otherState = sd::SdState::OFF;
std::string prefChar = "0";
std::string otherChar = "1";
SdStates state = SdStates::START;
// Used to track whether a command was executed
bool commandExecuted = true;
bool initFinished = false;
SdCardManager::SdStatePair currentState;
uint16_t cycleCount = 0;
// These two flags are related to external commanding
bool commandIssued = false;
bool commandFinished = false;
sd::SdState currentlyCommandedState = sd::SdState::OFF;
sd::SdCard commandedCard = sd::SdCard::NONE;
sd::SdState commandedState = sd::SdState::OFF;
};
SdInfo sdInfo;
/**
* Index 0: Chip 0 Copy 0
* Index 1: Chip 0 Copy 1
* Index 2: Chip 1 Copy 0
* Index 3: Chip 1 Copy 1
*/
std::array<bool, 4> protArray;
PeriodicOperationDivider opDivider;
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
LocalDataPoolManager& poolManager) override;
LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
ReturnValue_t checkModeCommand(Mode_t mode, Submode_t submode,
uint32_t *msToReachTheMode);
ReturnValue_t sdCardInit();
ReturnValue_t sdCardSetup(SdCardManager& sdcMan, SdCardManager::SdStatusPair& statusPair,
sd::SdCard sdCard, sd::SdStatus status, std::string sdString);
ReturnValue_t sdCardColdRedundantInit(SdCardManager* sdcMan,
SdCardManager::SdStatusPair& statusPair);
ReturnValue_t initVersionFile();
ReturnValue_t initBootCopy();
ReturnValue_t initWatchdogFifo();
ReturnValue_t initSdCardBlocking();
void initPrint();
ReturnValue_t versionFileInit();
ReturnValue_t sdStateMachine();
void updateSdInfoOther();
ReturnValue_t sdCardSetup(sd::SdCard sdCard, sd::SdState targetState, std::string sdChar,
bool printOutput = true);
ReturnValue_t sdColdRedundantBlockingInit();
void currentStateSetter(sd::SdCard sdCard, sd::SdState newState);
void determinePreferredSdCard();
void executeNextExternalSdCommand();
void checkExternalSdCommandStatus();
ReturnValue_t actionListDirectoryIntoFile(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t *data, size_t size);
ReturnValue_t actionPerformReboot(const uint8_t *data, size_t size);
void performWatchdogControlOperation();
ReturnValue_t handleProtInfoUpdateLine(std::string nextLine);
int handleBootCopyProtAtIndex(Chip targetChip, Copy targetCopy, bool protect,
bool &protOperationPerformed, bool selfChip, bool selfCopy, bool allChips,
bool allCopies, uint8_t arrIdx);
};
#endif /* BSP_Q7S_CORE_CORECONTROLLER_H_ */

View File

@ -57,13 +57,14 @@ void initmission::initTasks() {
void (*missedDeadlineFunc) (void) = nullptr;
#endif
#if BOARD_TE0720 == 0
PeriodicTaskIF* coreController = factory->createPeriodicTask(
"CORE_CTRL", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, missedDeadlineFunc);
result = coreController->addComponent(objects::CORE_CONTROLLER);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("CORE_CTRL", objects::CORE_CONTROLLER);
}
#endif
/* TMTC Distribution */
PeriodicTaskIF* tmTcDistributor = factory->createPeriodicTask(
@ -82,19 +83,20 @@ void initmission::initTasks() {
}
/* UDP bridge */
PeriodicTaskIF* udpBridgeTask = factory->createPeriodicTask(
PeriodicTaskIF* tmtcBridgeTask = factory->createPeriodicTask(
"UDP_UNIX_BRIDGE", 50, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.2, missedDeadlineFunc);
result = udpBridgeTask->addComponent(objects::UDP_BRIDGE);
result = tmtcBridgeTask->addComponent(objects::TMTC_BRIDGE);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UDP_BRIDGE", objects::UDP_BRIDGE);
initmission::printAddObjectError("UDP_BRIDGE", objects::TMTC_BRIDGE);
}
PeriodicTaskIF* udpPollingTask = factory->createPeriodicTask(
PeriodicTaskIF* tmtcPollingTask = factory->createPeriodicTask(
"UDP_POLLING", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = udpPollingTask->addComponent(objects::UDP_POLLING_TASK);
result = tmtcPollingTask->addComponent(objects::TMTC_POLLING_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("UDP_POLLING", objects::UDP_POLLING_TASK);
initmission::printAddObjectError("UDP_POLLING", objects::TMTC_POLLING_TASK);
}
# if BOARD_TE0720 == 0
// FS task, task interval does not matter because it runs in permanent loop, priority low
// because it is a non-essential background task
PeriodicTaskIF* fsTask = factory->createPeriodicTask(
@ -103,8 +105,9 @@ void initmission::initTasks() {
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("FILE_SYSTEM_TASK", objects::FILE_SYSTEM_HANDLER);
}
#endif /* BOARD_TE0720 */
#if TEST_CCSDS_BRIDGE == 1
#if OBSW_TEST_CCSDS_BRIDGE == 1
PeriodicTaskIF* ptmeTestTask = factory->createPeriodicTask(
"PTME_TEST", 80, PeriodicTaskIF::MINIMUM_STACK_SIZE, 2.0, missedDeadlineFunc);
result = ptmeTestTask->addComponent(objects::CCSDS_IP_CORE_BRIDGE);
@ -117,8 +120,11 @@ void initmission::initTasks() {
createPusTasks(*factory, missedDeadlineFunc, pusTasks);
std::vector<PeriodicTaskIF*> pstTasks;
createPstTasks(*factory, missedDeadlineFunc, pstTasks);
#if OBSW_ADD_TEST_CODE == 1
std::vector<PeriodicTaskIF*> testTasks;
createTestTasks(*factory, missedDeadlineFunc, testTasks);
#endif
auto taskStarter = [](std::vector<PeriodicTaskIF*>& taskVector, std::string name) {
for(const auto& task: taskVector) {
@ -133,9 +139,11 @@ void initmission::initTasks() {
sif::info << "Starting tasks.." << std::endl;
tmTcDistributor->startTask();
udpBridgeTask->startTask();
udpPollingTask->startTask();
tmtcBridgeTask->startTask();
tmtcPollingTask->startTask();
#if BOARD_TE0720 == 0
coreController->startTask();
#endif
taskStarter(pstTasks, "PST task vector");
taskStarter(pusTasks, "PUS task vector");
@ -143,10 +151,13 @@ void initmission::initTasks() {
taskStarter(testTasks, "Test task vector");
#endif
#if TEST_CCSDS_BRIDGE == 1
#if OBSW_TEST_CCSDS_BRIDGE == 1
ptmeTestTask->startTask();
#endif
#if BOARD_TE0720 == 0
fsTask->startTask();
#endif
sif::info << "Tasks started.." << std::endl;
}
@ -156,7 +167,7 @@ void initmission::createPstTasks(TaskFactory& factory,
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#if BOARD_TE0720 == 0
/* Polling Sequence Table Default */
#if Q7S_ADD_SPI_TEST == 0
#if OBSW_ADD_SPI_TEST_CODE == 0
FixedTimeslotTaskIF* spiPst = factory.createFixedTimeslotTask(
"PST_TASK_DEFAULT", 70, PeriodicTaskIF::MINIMUM_STACK_SIZE * 4, 3.0,
missedDeadlineFunc);
@ -194,9 +205,9 @@ void initmission::createPstTasks(TaskFactory& factory,
if(result != HasReturnvaluesIF::RETURN_OK) {
sif::error << "InitMission::initTasks: GomSpace PST initialization failed!" << std::endl;
}
taskVec.push_back(i2cPst);
taskVec.push_back(gomSpacePstTask);
#else /* BOARD_TE7020 == 0 */
FixedTimeslotTaskIF * pollingSequenceTaskTE0720 = factory->createFixedTimeslotTask(
FixedTimeslotTaskIF * pollingSequenceTaskTE0720 = factory.createFixedTimeslotTask(
"PST_TASK_TE0720", 30, PeriodicTaskIF::MINIMUM_STACK_SIZE * 8, 3.0,
missedDeadlineFunc);
result = pst::pollingSequenceTE0720(pollingSequenceTaskTE0720);
@ -278,25 +289,29 @@ void initmission::createPusTasks(TaskFactory &factory,
void initmission::createTestTasks(TaskFactory& factory, TaskDeadlineMissedFunction missedDeadlineFunc,
std::vector<PeriodicTaskIF*>& taskVec) {
#if OBSW_ADD_TEST_TASK == 1 || OBSW_ADD_SPI_TEST_CODE == 1 || (BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1)
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
#endif
PeriodicTaskIF* testTask = factory.createPeriodicTask(
"TEST_TASK", 60, PeriodicTaskIF::MINIMUM_STACK_SIZE, 1, missedDeadlineFunc);
#if OBSW_ADD_TEST_TASK == 1
result = testTask->addComponent(objects::TEST_TASK);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("TEST_TASK", objects::TEST_TASK);
}
#endif /* OBSW_ADD_TEST_TASK == 1 */
#if Q7S_ADD_SPI_TEST == 1
#if OBSW_ADD_SPI_TEST_CODE == 1
result = testTask->addComponent(objects::SPI_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("SPI_TEST", objects::SPI_TEST);
}
#endif
#if BOARD_TE0720 == 1 && TEST_LIBGPIOD == 1
#if BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1
result = testTask->addComponent(objects::LIBGPIOD_TEST);
if(result != HasReturnvaluesIF::RETURN_OK) {
initmission::printAddObjectError("GPIOD_TEST", objects::LIBGPIOD_TEST);
}
#endif /* BOARD_TE0720 == 1 && TEST_LIBGPIOD == 1 */
#endif /* BOARD_TE0720 == 1 && OBSW_TEST_LIBGPIOD == 1 */
taskVec.push_back(testTask);
}

File diff suppressed because it is too large Load Diff

View File

@ -2,24 +2,27 @@
#define BSP_Q7S_OBJECTFACTORY_H_
class LinuxLibgpioIF;
class UartComIF;
class SpiComIF;
namespace ObjectFactory {
void setStatics();
void produce(void* args);
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF);
void createCommunicationInterfaces(LinuxLibgpioIF** gpioComIF, UartComIF** uartComIF,
SpiComIF** spiComIF);
void createTmpComponents();
void createPcduComponents();
void createRadSensorComponent(LinuxLibgpioIF* gpioComIF);
void createSunSensorComponents(LinuxLibgpioIF* gpioComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF);
void createSunSensorComponents(LinuxLibgpioIF* gpioComIF, SpiComIF* spiComIF);
void createAcsBoardComponents(LinuxLibgpioIF* gpioComIF, UartComIF* uartComIF);
void createHeaterComponents();
void createSolarArrayDeploymentComponents();
void createSyrlinksComponents();
void createRtdComponents(LinuxLibgpioIF* gpioComIF);
void createReactionWheelComponents(LinuxLibgpioIF* gpioComIF);
void createTestComponents();
void createTestComponents(LinuxLibgpioIF* gpioComIF);
};

View File

@ -2,11 +2,15 @@
#include "OBSWVersion.h"
#include "OBSWConfig.h"
#include "InitMission.h"
#include "watchdogConf.h"
#include "fsfw/tasks/TaskFactory.h"
#include "fsfw/FSFWVersion.h"
#include <iostream>
#include <filesystem>
static int OBSW_ALREADY_RUNNING = -2;
int obsw::obsw() {
std::cout << "-- EIVE OBSW --" << std::endl;
@ -15,11 +19,20 @@ int obsw::obsw() {
#else
std::cout << "-- Compiled for Linux (TE0720) --" << std::endl;
#endif
std::cout << "-- OBSW " << SW_NAME << " v" << SW_VERSION << "." << SW_SUBVERSION <<
std::cout << "-- OBSW v" << SW_VERSION << "." << SW_SUBVERSION <<
"." << SW_REVISION << ", FSFW v" << FSFW_VERSION << "." << FSFW_SUBVERSION << "." <<
FSFW_REVISION << "--" << std::endl;
std::cout << "-- " << __DATE__ << " " << __TIME__ << " --" << std::endl;
#if Q7S_CHECK_FOR_ALREADY_RUNNING_IMG == 1
// Check special file here. This file is created or deleted by the eive-watchdog application
// or systemd service!
if(std::filesystem::exists(watchdog::RUNNING_FILE_NAME)) {
sif::warning << "File " << watchdog::RUNNING_FILE_NAME << " exists so the software might "
"already be running. Aborting.." << std::endl;
return OBSW_ALREADY_RUNNING;
}
#endif
initmission::initMission();
for(;;) {

View File

@ -0,0 +1,5 @@
target_sources(${TARGET_NAME} PRIVATE
PlocSupervisorHandler.cpp
PlocUpdater.cpp
PlocMemoryDumper.cpp
)

View File

@ -0,0 +1,206 @@
#include <fsfw/src/fsfw/serialize/SerializeAdapter.h>
#include "fsfw/ipc/QueueFactory.h"
#include "PlocMemoryDumper.h"
#include <fstream>
#include <filesystem>
#include <string>
PlocMemoryDumper::PlocMemoryDumper(object_id_t objectId) :
SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
}
PlocMemoryDumper::~PlocMemoryDumper() {
}
ReturnValue_t PlocMemoryDumper::initialize() {
ReturnValue_t result = SystemObject::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = commandActionHelper.initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = actionHelper.initialize(commandQueue);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocMemoryDumper::performOperation(uint8_t operationCode) {
readCommandQueue();
doStateMachine();
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocMemoryDumper::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
if (state != State::IDLE) {
return IS_BUSY;
}
switch (actionId) {
case DUMP_MRAM: {
size_t deserializeSize = sizeof(mram.startAddress) + sizeof(mram.endAddress);
SerializeAdapter::deSerialize(&mram.startAddress, &data, &deserializeSize,
SerializeIF::Endianness::BIG);
SerializeAdapter::deSerialize(&mram.endAddress, &data, &deserializeSize,
SerializeIF::Endianness::BIG);
if (mram.endAddress > MAX_MRAM_ADDRESS) {
return MRAM_ADDRESS_TOO_HIGH;
}
if (mram.endAddress <= mram.startAddress) {
return MRAM_INVALID_ADDRESS_COMBINATION;
}
state = State::COMMAND_FIRST_MRAM_DUMP;
break;
}
default: {
sif::warning << "PlocMemoryDumper::executeAction: Received command with invalid action id"
<< std::endl;
return INVALID_ACTION_ID;
}
}
return EXECUTION_FINISHED;
}
MessageQueueId_t PlocMemoryDumper::getCommandQueue() const {
return commandQueue->getId();
}
MessageQueueIF* PlocMemoryDumper::getCommandQueuePtr() {
return commandQueue;
}
void PlocMemoryDumper::readCommandQueue() {
CommandMessage message;
ReturnValue_t result;
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
result = commandQueue->receiveMessage(&message)) {
if (result != RETURN_OK) {
continue;
}
result = actionHelper.handleActionMessage(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
result = commandActionHelper.handleReply(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
sif::debug << "PlocMemoryDumper::readCommandQueue: Received message with invalid format"
<< std::endl;
}
}
void PlocMemoryDumper::doStateMachine() {
switch (state) {
case State::IDLE:
break;
case State::COMMAND_FIRST_MRAM_DUMP:
commandNextMramDump(PLOC_SPV::FIRST_MRAM_DUMP);
break;
case State::COMMAND_CONSECUTIVE_MRAM_DUMP:
commandNextMramDump(PLOC_SPV::CONSECUTIVE_MRAM_DUMP);
break;
case State::EXECUTING_MRAM_DUMP:
break;
default:
sif::debug << "PlocMemoryDumper::doStateMachine: Invalid state" << std::endl;
break;
}
}
void PlocMemoryDumper::stepSuccessfulReceived(ActionId_t actionId,
uint8_t step) {
}
void PlocMemoryDumper::stepFailedReceived(ActionId_t actionId, uint8_t step,
ReturnValue_t returnCode) {
}
void PlocMemoryDumper::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
}
void PlocMemoryDumper::completionSuccessfulReceived(ActionId_t actionId) {
switch (pendingCommand) {
case (PLOC_SPV::FIRST_MRAM_DUMP):
case (PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
if (mram.endAddress == mram.startAddress) {
triggerEvent(MRAM_DUMP_FINISHED);
state = State::IDLE;
}
else {
state = State::COMMAND_CONSECUTIVE_MRAM_DUMP;
}
break;
default:
sif::debug << "PlocMemoryDumper::completionSuccessfulReceived: Invalid pending command"
<< std::endl;
state = State::IDLE;
break;
}
}
void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId,
ReturnValue_t returnCode) {
switch(pendingCommand) {
case(PLOC_SPV::FIRST_MRAM_DUMP):
case(PLOC_SPV::CONSECUTIVE_MRAM_DUMP):
triggerEvent(MRAM_DUMP_FAILED, mram.lastStartAddress);
break;
default:
sif::debug << "PlocMemoryDumper::completionFailedReceived: Invalid pending command "
<< std::endl;
break;
}
state = State::IDLE;
}
void PlocMemoryDumper::commandNextMramDump(ActionId_t dumpCommand) {
ReturnValue_t result = RETURN_OK;
uint32_t tempStartAddress = 0;
uint32_t tempEndAddress = 0;
if (mram.endAddress - mram.startAddress > MAX_MRAM_DUMP_SIZE) {
tempStartAddress = mram.startAddress;
tempEndAddress = mram.startAddress + MAX_MRAM_DUMP_SIZE;
mram.startAddress += MAX_MRAM_DUMP_SIZE;
mram.lastStartAddress = tempStartAddress;
}
else {
tempStartAddress = mram.startAddress;
tempEndAddress = mram.endAddress;
mram.startAddress = mram.endAddress;
}
MemoryParams params(tempStartAddress, tempEndAddress);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
dumpCommand, &params);
if (result != RETURN_OK) {
sif::warning << "PlocMemoryDumper::commandNextMramDump: Failed to send mram dump command "
<< "with start address " << tempStartAddress << " and end address "
<< tempEndAddress << std::endl;
triggerEvent(SEND_MRAM_DUMP_FAILED, result, tempStartAddress);
state = State::IDLE;
pendingCommand = NONE;
return;
}
state = State::EXECUTING_MRAM_DUMP;
pendingCommand = dumpCommand;
return;
}

View File

@ -0,0 +1,115 @@
#ifndef MISSION_DEVICES_PLOCMEMORYDUMPER_H_
#define MISSION_DEVICES_PLOCMEMORYDUMPER_H_
#include <bsp_q7s/devices/devicedefinitions/PlocMemDumpDefinitions.h>
#include <bsp_q7s/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include "OBSWConfig.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
/**
* @brief Because the buffer of the linux tty driver is limited to 2 x 65535 bytes, this class is
* created to perform large dumps of PLOC memories.
*
* @details Currently the PLOC supervisor only implements the functionality to dump the MRAM.
*
* @author J. Meier
*/
class PlocMemoryDumper : public SystemObject,
public HasActionsIF,
public ExecutableObjectIF,
public HasReturnvaluesIF,
public CommandsActionsIF {
public:
static const ActionId_t NONE = 0;
static const ActionId_t DUMP_MRAM = 1;
PlocMemoryDumper(object_id_t objectId);
virtual ~PlocMemoryDumper();
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
MessageQueueId_t getCommandQueue() const;
ReturnValue_t initialize() override;
MessageQueueIF* getCommandQueuePtr() override;
void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override;
void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override;
void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override;
void completionSuccessfulReceived(ActionId_t actionId) override;
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
private:
static const uint32_t QUEUE_SIZE = 10;
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_MEMORY_DUMPER;
//! [EXPORT] : [COMMENT] The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.
static const ReturnValue_t MRAM_ADDRESS_TOO_HIGH = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] The specified end address is lower than the start address
static const ReturnValue_t MRAM_INVALID_ADDRESS_COMBINATION = MAKE_RETURN_CODE(0xA1);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_MEMORY_DUMPER;
//! [EXPORT] : [COMMENT] Failed to send mram dump command to supervisor handler
//! P1: Return value of commandAction function
//! P2: Start address of MRAM to dump with this command
static const Event SEND_MRAM_DUMP_FAILED = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] Received completion failure report form PLOC supervisor handler
//! P1: MRAM start address of failing dump command
static const Event MRAM_DUMP_FAILED = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] MRAM dump finished successfully
static const Event MRAM_DUMP_FINISHED = MAKE_EVENT(2, severity::LOW);
// Maximum size of mram dump which can be retrieved with one command
static const uint32_t MAX_MRAM_DUMP_SIZE = 100000;
static const uint32_t MAX_MRAM_ADDRESS = 0x7d000;
MessageQueueIF* commandQueue = nullptr;
CommandActionHelper commandActionHelper;
ActionHelper actionHelper;
enum class State: uint8_t {
IDLE,
COMMAND_FIRST_MRAM_DUMP,
COMMAND_CONSECUTIVE_MRAM_DUMP,
EXECUTING_MRAM_DUMP
};
State state = State::IDLE;
ActionId_t pendingCommand = NONE;
typedef struct MemoryInfo {
// Stores the start address of the next memory range to dump
uint32_t startAddress;
uint32_t endAddress;
// Stores the start address of the last sent dump command
uint32_t lastStartAddress;
} MemoryInfo_t;
MemoryInfo_t mram = {0, 0, 0};
void readCommandQueue();
void doStateMachine();
/**
* @brief Sends the next mram dump command to the PLOC supervisor handler.
*/
void commandNextMramDump(ActionId_t dumpCommand);
};
#endif /* MISSION_DEVICES_PLOCMEMORYDUMPER_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,11 @@
#ifndef MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#define MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_
#include "devicedefinitions/PlocSupervisorDefinitions.h"
#include <bsp_q7s/memory/SdCardManager.h>
#include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include <mission/devices/devicedefinitions/PlocSupervisorDefinitions.h>
#include <cstring>
#include <fsfw/hal/linux/uart/UartComIF.h>
#include <fsfw_hal/linux/uart/UartComIF.h>
/**
* @brief This is the device handler for the supervisor of the PLOC which is programmed by
@ -63,10 +64,30 @@ private:
static const ReturnValue_t GET_TIME_FAILURE = MAKE_RETURN_CODE(0xA4);
//! [EXPORT] : [COMMENT] Invalid communication interface specified
static const ReturnValue_t INVALID_UART_COM_IF = MAKE_RETURN_CODE(0xA5);
//! [EXPORT] : [COMMENT] Received command with invalid watchdog parameter. Valid watchdogs are 0 for PS, 1 for PL and 2 for INT
static const ReturnValue_t INVALID_WATCHDOG = MAKE_RETURN_CODE(0xA6);
//! [EXPORT] : [COMMENT] Received watchdog timeout config command with invalid timeout. Valid timeouts must be in the range between 1000 and 360000 ms.
static const ReturnValue_t INVALID_WATCHDOG_TIMEOUT = MAKE_RETURN_CODE(0xA7);
//! [EXPORT] : [COMMENT] Received latchup config command with invalid latchup ID
static const ReturnValue_t INVALID_LATCHUP_ID = MAKE_RETURN_CODE(0xA8);
//! [EXPORT] : [COMMENT] Received set adc sweep period command with invalid sweep period. Must be larger than 21.
static const ReturnValue_t SWEEP_PERIOD_TOO_SMALL = MAKE_RETURN_CODE(0xA9);
//! [EXPORT] : [COMMENT] Receive auto EM test command with invalid test param. Valid params are 1 and 2.
static const ReturnValue_t INVALID_TEST_PARAM = MAKE_RETURN_CODE(0xAA);
//! [EXPORT] : [COMMENT] Returned when scanning for MRAM dump packets failed.
static const ReturnValue_t MRAM_PACKET_PARSING_FAILURE = MAKE_RETURN_CODE(0xAB);
//! [EXPORT] : [COMMENT] Returned when the start and stop addresses of the MRAM dump or MRAM wipe commands are invalid (e.g. start address bigger than stop address)
static const ReturnValue_t INVALID_MRAM_ADDRESSES = MAKE_RETURN_CODE(0xAC);
//! [EXPORT] : [COMMENT] Expect reception of an MRAM dump packet but received space packet with other apid.
static const ReturnValue_t NO_MRAM_PACKET = MAKE_RETURN_CODE(0xAD);
//! [EXPORT] : [COMMENT] Path to PLOC directory on SD card does not exist
static const ReturnValue_t PATH_DOES_NOT_EXIST = MAKE_RETURN_CODE(0xAE);
//! [EXPORT] : [COMMENT] MRAM dump file does not exists. The file should actually already have been created with the reception of the first dump packet.
static const ReturnValue_t MRAM_FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xAF);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_SUPERVISOR_HANDLER;
//! [EXPORT] : [COMMENT] PLOC supervrisor crc failure in telemetry packet
//! [EXPORT] : [COMMENT] PLOC supervisor crc failure in telemetry packet
static const Event SUPV_MEMORY_READ_RPT_CRC_FAILURE = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] PLOC supervisor received acknowledgment failure report
static const Event SUPV_ACK_FAILURE = MAKE_EVENT(2, severity::LOW);
@ -80,18 +101,6 @@ private:
uint8_t commandBuffer[PLOC_SPV::MAX_COMMAND_SIZE];
/**
* @brief This object is incremented each time a packet is sent or received. By checking the
* packet sequence count of a received packet, no packets can be lost without noticing
* it. Only the least significant 14 bits represent the packet sequence count in a
* space packet. Thus the maximum value amounts to 16383 (0x3FFF).
* @note Normally this should never happen because the PLOC replies are always sent in a
* fixed order. However, the PLOC software checks this value and will return an ACK
* failure report in case the sequence count is not incremented with each transferred
* space packet.
*/
uint16_t packetSequenceCount = 0x3FFF;
/**
* This variable is used to store the id of the next reply to receive. This is necessary
* because the PLOC sends as reply to each command at least one acknowledgment and execution
@ -99,10 +108,34 @@ private:
*/
DeviceCommandId_t nextReplyId = PLOC_SPV::NONE;
PLOC_SPV::HkSet hkset;
UartComIF* uartComIf = nullptr;
PLOC_SPV::HkSet hkset;
PLOC_SPV::BootStatusReport bootStatusReport;
PLOC_SPV::LatchupStatusReport latchupStatusReport;
/** Number of expected replies following the MRAM dump command */
uint32_t expectedMramDumpPackets = 0;
uint32_t receivedMramDumpPackets = 0;
/** Set to true as soon as a complete space packet is present in the spacePacketBuffer */
bool packetInBuffer = false;
/** Points to the next free position in the space packet buffer */
uint16_t bufferTop = 0;
/** This buffer is used to concatenate space packets received in two different read steps */
uint8_t spacePacketBuffer[PLOC_SPV::MAX_PACKET_SIZE];
#if BOARD_TE0720 == 0
SdCardManager* sdcMan = nullptr;
#endif /* BOARD_TE0720 == 0 */
/** Path to PLOC specific files on SD card */
std::string plocFilePath = "ploc";
std::string activeMramFile;
/** Setting this variable to true will enable direct downlink of MRAM packets */
bool downlinkMramDump = false;
/**
* @brief This function checks the crc of the received PLOC reply.
*
@ -141,6 +174,14 @@ private:
*/
ReturnValue_t handleHkReport(const uint8_t* data);
/**
* @brief This function calls the function to check the CRC of the received boot status report
* and fills the associated dataset with the boot status information.
*/
ReturnValue_t handleBootStatusReport(const uint8_t* data);
ReturnValue_t handleLatchupStatusReport(const uint8_t* data);
/**
* @brief Depending on the current active command, this function sets the reply id of the
* next reply after a successful acknowledgment report has been received. This is
@ -165,7 +206,6 @@ private:
*/
void prepareEmptyCmd(uint16_t apid);
/**
* @brief This function initializes the space packet to select the boot image of the MPSoC.
*/
@ -187,6 +227,43 @@ private:
void prepareRestartTriesCmd(const uint8_t * commandData);
/**
* @brief This function fills the command buffer with the packet to enable or disable the
* watchdogs on the PLOC.
*/
void prepareWatchdogsEnableCmd(const uint8_t * commandData);
/**
* @brief This function fills the command buffer with the packet to set the watchdog timer
* of one of the three watchdogs (PS, PL, INT).
*/
ReturnValue_t prepareWatchdogsConfigTimeoutCmd(const uint8_t * commandData);
ReturnValue_t prepareLatchupConfigCmd(const uint8_t* commandData,
DeviceCommandId_t deviceCommand);
ReturnValue_t prepareAutoCalibrateAlertCmd(const uint8_t* commandData);
ReturnValue_t prepareSetAlertLimitCmd(const uint8_t* commandData);
ReturnValue_t prepareSetAlertIrqFilterCmd(const uint8_t* commandData);
ReturnValue_t prepareSetAdcSweetPeriodCmd(const uint8_t* commandData);
void prepareSetAdcEnabledChannelsCmd(const uint8_t* commandData);
void prepareSetAdcWindowAndStrideCmd(const uint8_t* commandData);
void prepareSetAdcThresholdCmd(const uint8_t* commandData);
void prepareEnableNvmsCmd(const uint8_t* commandData);
void prepareSelectNvmCmd(const uint8_t* commandData);
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
ReturnValue_t prepareWipeMramCmd(const uint8_t* commandData);
ReturnValue_t prepareDumpMramCmd(const uint8_t* commandData);
void preparePrintCpuStatsCmd(const uint8_t* commandData);
void prepareSetDbgVerbosityCmd(const uint8_t* commandData);
void prepareSetGpioCmd(const uint8_t* commandData);
void prepareReadGpioCmd(const uint8_t* commandData);
/**
* @brief Copies the content of a space packet to the command buffer.
*/
void packetToOutBuffer(uint8_t* packetData, size_t fullSize);
/**
* @brief In case an acknowledgment failure reply has been received this function disables
* all previously enabled commands and resets the exepected replies variable of an
@ -208,6 +285,58 @@ private:
* the variable expectedReplies of an active command will be set to 0.
*/
void disableExeReportReply();
/**
* @brief Function is called in scanForReply and fills the spacePacketBuffer with the read
* data until a full packet has been received.
*/
ReturnValue_t parseMramPackets(const uint8_t *packet, size_t remainingSize, size_t* foundlen);
/**
* @brief This function generates the Service 8 packets for the MRAM dump data.
*/
ReturnValue_t handleMramDumpPacket(DeviceCommandId_t id);
/**
* @brief With this function the number of expected replies following an MRAM dump command
* will be increased. This is necessary to release the command in case not all replies
* have been received.
*/
void increaseExpectedMramReplies(DeviceCommandId_t id);
/**
* @brief Function checks if the packet written to the space packet buffer is really a
* MRAM dump packet.
*/
ReturnValue_t checkMramPacketApid();
/**
* @brief Writes the data of the MRAM dump to a file. The file will be created when receiving
* the first packet.
*/
ReturnValue_t handleMramDumpFile(DeviceCommandId_t id);
/**
* @brief Extracts the length field of a spacePacket referenced by the spacePacket pointer.
*
* @param spacePacket Pointer to the buffer holding the space packet.
*
* @return The value stored in the length field of the data field.
*/
uint16_t readSpacePacketLength(uint8_t* spacePacket);
/**
* @brief Extracts the sequence flags from a space packet referenced by the spacePacket
* pointer.
*
* @param spacePacket Pointer to the buffer holding the space packet.
*
* @return uint8_t where the two least significant bits hold the sequence flags.
*/
uint8_t readSequenceFlags(uint8_t* spacePacket);
ReturnValue_t createMramDumpFile();
ReturnValue_t getTimeStampString(std::string& timeStamp);
};
#endif /* MISSION_DEVICES_PLOCSUPERVISORHANDLER_H_ */

View File

@ -0,0 +1,436 @@
#include "fsfw/ipc/QueueFactory.h"
#include "PlocUpdater.h"
#include <fstream>
#include <filesystem>
#include <string>
PlocUpdater::PlocUpdater(object_id_t objectId) :
SystemObject(objectId), commandActionHelper(this), actionHelper(this, nullptr) {
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
}
PlocUpdater::~PlocUpdater() {
}
ReturnValue_t PlocUpdater::initialize() {
#if BOARD_TE0720 == 0
sdcMan = SdCardManager::instance();
#endif
ReturnValue_t result = SystemObject::initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = commandActionHelper.initialize();
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
result = actionHelper.initialize(commandQueue);
if (result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocUpdater::performOperation(uint8_t operationCode) {
readCommandQueue();
doStateMachine();
return HasReturnvaluesIF::RETURN_OK;
}
ReturnValue_t PlocUpdater::executeAction(ActionId_t actionId,
MessageQueueId_t commandedBy, const uint8_t* data, size_t size) {
ReturnValue_t result = RETURN_FAILED;
if (state != State::IDLE) {
return IS_BUSY;
}
if (size > MAX_PLOC_UPDATE_PATH) {
return NAME_TOO_LONG;
}
switch (actionId) {
case UPDATE_A_UBOOT:
image = Image::A;
partition = Partition::UBOOT;
break;
case UPDATE_A_BITSTREAM:
image = Image::A;
partition = Partition::BITSTREAM;
break;
case UPDATE_A_LINUX:
image = Image::A;
partition = Partition::LINUX_OS;
break;
case UPDATE_A_APP_SW:
image = Image::A;
partition = Partition::APP_SW;
break;
case UPDATE_B_UBOOT:
image = Image::B;
partition = Partition::UBOOT;
break;
case UPDATE_B_BITSTREAM:
image = Image::B;
partition = Partition::BITSTREAM;
break;
case UPDATE_B_LINUX:
image = Image::B;
partition = Partition::LINUX_OS;
break;
case UPDATE_B_APP_SW:
image = Image::B;
partition = Partition::APP_SW;
break;
default:
return INVALID_ACTION_ID;
}
result = getImageLocation(data, size);
if (result != RETURN_OK) {
return result;
}
state = State::UPDATE_AVAILABLE;
return EXECUTION_FINISHED;
}
MessageQueueId_t PlocUpdater::getCommandQueue() const {
return commandQueue->getId();
}
MessageQueueIF* PlocUpdater::getCommandQueuePtr() {
return commandQueue;
}
void PlocUpdater::readCommandQueue() {
CommandMessage message;
ReturnValue_t result;
for (result = commandQueue->receiveMessage(&message); result == HasReturnvaluesIF::RETURN_OK;
result = commandQueue->receiveMessage(&message)) {
if (result != RETURN_OK) {
continue;
}
result = actionHelper.handleActionMessage(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
result = commandActionHelper.handleReply(&message);
if (result == HasReturnvaluesIF::RETURN_OK) {
continue;
}
sif::debug << "PlocUpdater::readCommandQueue: Received message with invalid format"
<< std::endl;
}
}
void PlocUpdater::doStateMachine() {
switch (state) {
case State::IDLE:
break;
case State::UPDATE_AVAILABLE:
commandUpdateAvailable();
break;
case State::UPDATE_TRANSFER:
commandUpdatePacket();
break;
case State::UPDATE_VERIFY:
commandUpdateVerify();
break;
case State::COMMAND_EXECUTING:
break;
default:
sif::debug << "PlocUpdater::doStateMachine: Invalid state" << std::endl;
break;
}
}
ReturnValue_t PlocUpdater::checkNameLength(size_t size) {
if (size > MAX_PLOC_UPDATE_PATH) {
return NAME_TOO_LONG;
}
return RETURN_OK;
}
ReturnValue_t PlocUpdater::getImageLocation(const uint8_t* data, size_t size) {
ReturnValue_t result = checkNameLength(size);
if (result != RETURN_OK) {
return result;
}
#if BOARD_TE0720 == 0
// Check if file is stored on SD card and if associated SD card is mounted
if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) == std::string(SdCardManager::SD_0_MOUNT_POINT)) {
if (!isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::prepareNvm0AUpdate: SD card 0 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
}
else if (std::string(reinterpret_cast<const char*>(data), SD_PREFIX_LENGTH) == std::string(SdCardManager::SD_1_MOUNT_POINT)) {
if (!isSdCardMounted(sd::SLOT_0)) {
sif::warning << "PlocUpdater::prepareNvm0AUpdate: SD card 1 not mounted" << std::endl;
return SD_NOT_MOUNTED;
}
}
else {
//update image not stored on SD card
}
#endif /* BOARD_TE0720 == 0 */
updateFile = std::string(reinterpret_cast<const char*>(data), size);
// Check if file exists
if(not std::filesystem::exists(updateFile)) {
return FILE_NOT_EXISTS;
}
return RETURN_OK;
}
#if BOARD_TE0720 == 0
bool PlocUpdater::isSdCardMounted(sd::SdCard sdCard) {
SdCardManager::SdStatePair active;
ReturnValue_t result = sdcMan->getSdCardActiveStatus(active);
if (result != RETURN_OK) {
sif::debug << "PlocUpdater::isSdCardMounted: Failed to get SD card active state";
return false;
}
if (sdCard == sd::SLOT_0) {
if (active.first == sd::MOUNTED) {
return true;
}
else {
return false;
}
}
else if (sdCard == sd::SLOT_1) {
if (active.second == sd::MOUNTED) {
return true;
}
else {
return false;
}
}
else {
sif::debug << "PlocUpdater::isSdCardMounted: Unknown SD card specified" << std::endl;
}
return false;
}
#endif /* #if BOARD_TE0720 == 0 */
void PlocUpdater::stepSuccessfulReceived(ActionId_t actionId,
uint8_t step) {
}
void PlocUpdater::stepFailedReceived(ActionId_t actionId, uint8_t step,
ReturnValue_t returnCode) {
}
void PlocUpdater::dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) {
}
void PlocUpdater::completionSuccessfulReceived(ActionId_t actionId) {
switch (pendingCommand) {
case (PLOC_SPV::UPDATE_AVAILABLE):
state = State::UPDATE_TRANSFER;
break;
case (PLOC_SPV::UPDATE_IMAGE_DATA):
if (remainingPackets == 0) {
packetsSent = 0; // Reset packets sent variable for next update sequence
state = State::UPDATE_VERIFY;
}
else {
state = State::UPDATE_TRANSFER;
}
break;
case (PLOC_SPV::UPDATE_VERIFY):
triggerEvent(UPDATE_FINISHED);
state = State::IDLE;
pendingCommand = PLOC_SPV::NONE;
break;
default:
sif::debug << "PlocUpdater::completionSuccessfulReceived: Invalid pending command"
<< std::endl;
state = State::IDLE;
break;
}
}
void PlocUpdater::completionFailedReceived(ActionId_t actionId,
ReturnValue_t returnCode) {
switch(pendingCommand) {
case(PLOC_SPV::UPDATE_AVAILABLE): {
triggerEvent(UPDATE_AVAILABLE_FAILED);
break;
}
case(PLOC_SPV::UPDATE_IMAGE_DATA): {
triggerEvent(UPDATE_TRANSFER_FAILED, packetsSent);
break;
}
case(PLOC_SPV::UPDATE_VERIFY): {
triggerEvent(UPDATE_VERIFY_FAILED);
break;
}
default:
sif::debug << "PlocUpdater::completionFailedReceived: Invalid pending command "
<< std::endl;
break;
}
state = State::IDLE;
}
void PlocUpdater::commandUpdateAvailable() {
ReturnValue_t result = RETURN_OK;
if (not std::filesystem::exists(updateFile)) {
triggerEvent(UPDATE_FILE_NOT_EXISTS, static_cast<uint8_t>(state));
state = State::IDLE;
return;
}
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(0, file.end);
imageSize = static_cast<size_t>(file.tellg());
file.close();
numOfUpdatePackets = imageSize / MAX_SP_DATA ;
if (imageSize % MAX_SP_DATA) {
numOfUpdatePackets++;
}
remainingPackets = numOfUpdatePackets;
packetsSent = 0;
calcImageCrc();
PLOC_SPV::UpdateInfo packet(PLOC_SPV::APID_UPDATE_AVAILABLE, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_AVAILABLE, packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, PLOC_SPV::UPDATE_AVAILABLE);
state = State::IDLE;
pendingCommand = PLOC_SPV::NONE;
return;
}
pendingCommand = PLOC_SPV::UPDATE_AVAILABLE;
state = State::COMMAND_EXECUTING;
return;
}
void PlocUpdater::commandUpdatePacket() {
ReturnValue_t result = RETURN_OK;
uint16_t payloadLength = 0;
if (not std::filesystem::exists(updateFile)) {
triggerEvent(UPDATE_FILE_NOT_EXISTS, static_cast<uint8_t>(state), packetsSent);
state = State::IDLE;
return;
}
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(packetsSent * MAX_SP_DATA, file.beg);
if (remainingPackets == 1) {
payloadLength = imageSize - static_cast<uint16_t>(file.tellg());
}
else {
payloadLength = MAX_SP_DATA;
}
PLOC_SPV::UpdatePacket packet(payloadLength);
file.read(reinterpret_cast<char*>(packet.getDataFieldPointer()), payloadLength);
file.close();
// sequence count of first packet is 1
packet.setPacketSequenceCount((packetsSent + 1) & PLOC_SPV::SEQUENCE_COUNT_MASK);
if (numOfUpdatePackets > 1) {
adjustSequenceFlags(packet);
}
packet.makeCrc();
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_IMAGE_DATA, packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, PLOC_SPV::UPDATE_IMAGE_DATA);
state = State::IDLE;
pendingCommand = PLOC_SPV::NONE;
return;
}
remainingPackets--;
packetsSent++;
pendingCommand = PLOC_SPV::UPDATE_IMAGE_DATA;
state = State::COMMAND_EXECUTING;
}
void PlocUpdater::commandUpdateVerify() {
ReturnValue_t result = RETURN_OK;
PLOC_SPV::UpdateInfo packet(PLOC_SPV::APID_UPDATE_VERIFY, static_cast<uint8_t>(image),
static_cast<uint8_t>(partition), imageSize, imageCrc, numOfUpdatePackets);
result = commandActionHelper.commandAction(objects::PLOC_SUPERVISOR_HANDLER,
PLOC_SPV::UPDATE_VERIFY, packet.getWholeData(), packet.getFullSize());
if (result != RETURN_OK) {
sif::warning << "PlocUpdater::commandUpdateAvailable: Failed to send update available"
<< " packet to supervisor handler" << std::endl;
triggerEvent(ACTION_COMMANDING_FAILED, result, PLOC_SPV::UPDATE_VERIFY);
state = State::IDLE;
pendingCommand = PLOC_SPV::NONE;
return;
}
state = State::COMMAND_EXECUTING;
pendingCommand = PLOC_SPV::UPDATE_VERIFY;
return;
}
void PlocUpdater::calcImageCrc() {
std::ifstream file(updateFile, std::ifstream::binary);
file.seekg(0, file.end);
uint32_t count;
uint32_t bit;
uint32_t remainder = INITIAL_REMAINDER_32;
char input;
for (count = 0; count < imageSize; count++) {
file.seekg(count, file.beg);
file.read(&input, 1);
remainder ^= (input << 16);
for (bit = 8; bit > 0; --bit) {
if (remainder & TOPBIT_32) {
remainder = (remainder << 1) ^ POLYNOMIAL_32;
} else {
remainder = (remainder << 1);
}
}
}
file.close();
imageCrc = (remainder ^ FINAL_XOR_VALUE_32);
}
void PlocUpdater::adjustSequenceFlags(PLOC_SPV::UpdatePacket& packet) {
if (packetsSent == 0) {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::FIRST_PKT));
}
else if (remainingPackets == 1) {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::LAST_PKT));
}
else {
packet.setSequenceFlags(static_cast<uint8_t>(PLOC_SPV::SequenceFlags::CONTINUED_PKT));
}
}

View File

@ -0,0 +1,189 @@
#ifndef MISSION_DEVICES_PLOCUPDATER_H_
#define MISSION_DEVICES_PLOCUPDATER_H_
#include "OBSWConfig.h"
#include "devicedefinitions/PlocSupervisorDefinitions.h"
#include "fsfw/action/CommandActionHelper.h"
#include "fsfw/action/ActionHelper.h"
#include "fsfw/action/HasActionsIF.h"
#include "fsfw/action/CommandsActionsIF.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include "fsfw/tasks/ExecutableObjectIF.h"
#include "fsfw/objectmanager/SystemObject.h"
#include "bsp_q7s/memory/SdCardManager.h"
#include "linux/fsfwconfig/objects/systemObjectList.h"
#include "fsfw/tmtcpacket/SpacePacket.h"
/**
* @brief An object of this class can be used to perform the software updates of the PLOC. The
* software update will be read from one of the SD cards, split into multiple space
* packets and sent to the PlocSupervisorHandler.
*
* @details The MPSoC has two boot memories (NVM0 and NVM1) where each stores two images (Partition A
* and Partition B)
*
* @author J. Meier
*/
class PlocUpdater : public SystemObject,
public HasActionsIF,
public ExecutableObjectIF,
public HasReturnvaluesIF,
public CommandsActionsIF {
public:
static const ActionId_t UPDATE_A_UBOOT = 0;
static const ActionId_t UPDATE_A_BITSTREAM = 1;
static const ActionId_t UPDATE_A_LINUX = 2;
static const ActionId_t UPDATE_A_APP_SW = 3;
static const ActionId_t UPDATE_B_UBOOT = 4;
static const ActionId_t UPDATE_B_BITSTREAM = 5;
static const ActionId_t UPDATE_B_LINUX = 6;
static const ActionId_t UPDATE_B_APP_SW = 7;
PlocUpdater(object_id_t objectId);
virtual ~PlocUpdater();
ReturnValue_t performOperation(uint8_t operationCode = 0) override;
ReturnValue_t executeAction(ActionId_t actionId, MessageQueueId_t commandedBy,
const uint8_t* data, size_t size);
MessageQueueId_t getCommandQueue() const;
ReturnValue_t initialize() override;
MessageQueueIF* getCommandQueuePtr() override;
void stepSuccessfulReceived(ActionId_t actionId, uint8_t step) override;
void stepFailedReceived(ActionId_t actionId, uint8_t step, ReturnValue_t returnCode) override;
void dataReceived(ActionId_t actionId, const uint8_t* data, uint32_t size) override;
void completionSuccessfulReceived(ActionId_t actionId) override;
void completionFailedReceived(ActionId_t actionId, ReturnValue_t returnCode) override;
private:
static const uint8_t INTERFACE_ID = CLASS_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Updater is already performing an update
static const ReturnValue_t UPDATER_BUSY = MAKE_RETURN_CODE(0xA0);
//! [EXPORT] : [COMMENT] Received update command with invalid path string (too long).
static const ReturnValue_t NAME_TOO_LONG = MAKE_RETURN_CODE(0xA1);
//! [EXPORT] : [COMMENT] Received command to initiate update but SD card with update image not mounted.
static const ReturnValue_t SD_NOT_MOUNTED = MAKE_RETURN_CODE(0xA2);
//! [EXPORT] : [COMMENT] Update file received with update command does not exist.
static const ReturnValue_t FILE_NOT_EXISTS = MAKE_RETURN_CODE(0xA3);
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::PLOC_UPDATER;
//! [EXPORT] : [COMMENT] Try to read update file but the file does not exist.
//! P1: Indicates in which state the file read fails
//! P2: During the update transfer the second parameter gives information about the number of already sent packets
static const Event UPDATE_FILE_NOT_EXISTS = MAKE_EVENT(0, severity::LOW);
//! [EXPORT] : [COMMENT] Failed to send command to supervisor handler
//! P1: Return value of CommandActionHelper::commandAction
//! P2: Action ID of command to send
static const Event ACTION_COMMANDING_FAILED = MAKE_EVENT(1, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler replied action message indicating a command execution failure of the update available command
static const Event UPDATE_AVAILABLE_FAILED = MAKE_EVENT(2, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor handler failed to transfer an update space packet.
//! P1: Parameter holds the number of update packets already sent (inclusive the failed packet)
static const Event UPDATE_TRANSFER_FAILED = MAKE_EVENT(3, severity::LOW);
//! [EXPORT] : [COMMENT] Supervisor failed to execute the update verify command.
static const Event UPDATE_VERIFY_FAILED = MAKE_EVENT(4, severity::LOW);
//! [EXPORT] : [COMMENT] MPSoC update successful completed
static const Event UPDATE_FINISHED = MAKE_EVENT(5, severity::INFO);
static const uint32_t QUEUE_SIZE = config::PLOC_UPDATER_QUEUE_SIZE;
static const size_t MAX_PLOC_UPDATE_PATH = 50;
static const size_t SD_PREFIX_LENGTH = 8;
// Maximum size of update payload data per space packet (max size of space packet is 1024 bytes)
static const size_t MAX_SP_DATA = 1016;
static const uint32_t TOPBIT_32 = (1 << 31);
static const uint32_t POLYNOMIAL_32 = 0x04C11DB7;
static const uint32_t INITIAL_REMAINDER_32 = 0xFFFFFFFF;
static const uint32_t FINAL_XOR_VALUE_32 = 0xFFFFFFFF;
MessageQueueIF* commandQueue = nullptr;
#if BOARD_TE0720 == 0
SdCardManager* sdcMan = nullptr;
#endif
CommandActionHelper commandActionHelper;
ActionHelper actionHelper;
enum class State: uint8_t {
IDLE,
UPDATE_AVAILABLE,
UPDATE_TRANSFER,
UPDATE_VERIFY,
COMMAND_EXECUTING
};
State state = State::IDLE;
ActionId_t pendingCommand = PLOC_SPV::NONE;
enum class Image: uint8_t {
NONE,
A,
B
};
Image image = Image::NONE;
enum class Partition: uint8_t {
NONE,
UBOOT,
BITSTREAM,
LINUX_OS,
APP_SW
};
Partition partition = Partition::NONE;
uint32_t packetsSent = 0;
uint32_t remainingPackets = 0;
// Number of packets required to transfer the update image
uint32_t numOfUpdatePackets = 0;
std::string updateFile;
uint32_t imageSize = 0;
uint32_t imageCrc = 0;
void readCommandQueue();
void doStateMachine();
/**
* @brief Extracts the path and name of the update image from the service 8 command data.
*/
ReturnValue_t getImageLocation(const uint8_t* data, size_t size);
ReturnValue_t checkNameLength(size_t size);
/**
* @brief Prepares and sends update available command to PLOC supervisor handler.
*/
void commandUpdateAvailable();
/**
* @brief Prepares and sends and update packet to the PLOC supervisor handler.
*/
void commandUpdatePacket();
/**
* @brief Prepares and sends the update verification packet to the PLOC supervisor handler.
*/
void commandUpdateVerify();
#if BOARD_TE0720 == 0
/**
* @brief Checks whether the SD card to read from is mounted or not.
*/
bool isSdCardMounted(sd::SdCard sdCard);
#endif
void calcImageCrc();
void adjustSequenceFlags(PLOC_SPV::UpdatePacket& packet);
};
#endif /* MISSION_DEVICES_PLOCUPDATER_H_ */

View File

@ -0,0 +1,33 @@
#ifndef BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_
#define BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_
#include <fsfw/src/fsfw/serialize/SerialLinkedListAdapter.h>
class MemoryParams: public SerialLinkedListAdapter<SerializeIF> {
public:
/**
* @brief Constructor
* @param startAddress Start of address range to dump
* @param endAddress End of address range to dump
*/
MemoryParams(uint32_t startAddress, uint32_t endAddress) :
startAddress(startAddress), endAddress(endAddress) {
setLinks();
}
private:
void setLinks() {
setStart(&startAddress);
startAddress.setNext(&endAddress);
}
SerializeElement<uint32_t> startAddress;
SerializeElement<uint32_t> endAddress;
};
#endif /* BSP_Q7S_DEVICES_DEVICEDEFINITIONS_PLOCMEMDUMPDEFINITIONS_H_ */

File diff suppressed because it is too large Load Diff

View File

@ -1,8 +1,9 @@
#include "gpioCallbacks.h"
#include "busConf.h"
#include <devices/gpioIds.h>
#include <fsfw/hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw/hal/common/gpio/GpioCookie.h>
#include <fsfw_hal/linux/gpio/LinuxLibgpioIF.h>
#include <fsfw_hal/common/gpio/GpioCookie.h>
#include <fsfw/serviceinterface/ServiceInterface.h>
@ -23,30 +24,31 @@ void initSpiCsDecoder(GpioIF* gpioComIF) {
GpioCookie* spiMuxGpios = new GpioCookie;
GpiodRegularByLabel* spiMuxBit = nullptr;
/** Setting mux bit 1 to low will disable IC21 on the interface board */
GpiodRegular* spiMuxBit1 = new GpiodRegular(std::string("gpiochip7"), 13,
std::string("SPI Mux Bit 1"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit1);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_1,
"SPI Mux Bit 1", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_1, spiMuxBit);
/** Setting mux bit 2 to low disables IC1 on the TCS board */
GpiodRegular* spiMuxBit2 = new GpiodRegular(std::string("gpiochip7"), 14,
std::string("SPI Mux Bit 2"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit2);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_2,
"SPI Mux Bit 2", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_2, spiMuxBit);
/** Setting mux bit 3 to low disables IC2 on the TCS board and IC22 on the interface board */
GpiodRegular* spiMuxBit3 = new GpiodRegular(std::string("gpiochip7"), 15,
std::string("SPI Mux Bit 3"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit3);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_3,
"SPI Mux Bit 3", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_3, spiMuxBit);
/** The following gpios can take arbitrary initial values */
GpiodRegular* spiMuxBit4 = new GpiodRegular(std::string("gpiochip7"), 16,
std::string("SPI Mux Bit 4"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit4);
GpiodRegular* spiMuxBit5 = new GpiodRegular(std::string("gpiochip7"), 17,
std::string("SPI Mux Bit 5"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit5);
GpiodRegular* spiMuxBit6 = new GpiodRegular(std::string("gpiochip7"), 18,
std::string("SPI Mux Bit 6"), gpio::OUT, 0);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit6);
GpiodRegular* enRwDecoder = new GpiodRegular(std::string("gpiochip5"), 17,
std::string("EN_RW_CS"), gpio::OUT, 1);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_4,
"SPI Mux Bit 4", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_4, spiMuxBit);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_5,
"SPI Mux Bit 5", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_5, spiMuxBit);
spiMuxBit = new GpiodRegularByLabel(q7s::GPIO_3V3_OBC1C, q7s::SPI_MUX_BIT_6,
"SPI Mux Bit 6", gpio::OUT, gpio::LOW);
spiMuxGpios->addGpio(gpioIds::SPI_MUX_BIT_6, spiMuxBit);
GpiodRegularByLabel* enRwDecoder = new GpiodRegularByLabel(q7s::GPIO_FLEX_OBC1F_B1,
q7s::EN_RW_CS, "EN_RW_CS", gpio::OUT, gpio::HIGH);
spiMuxGpios->addGpio(gpioIds::EN_RW_CS, enRwDecoder);
result = gpioComInterface->addGpios(spiMuxGpios);

View File

@ -1,8 +1,8 @@
#ifndef LINUX_GPIO_GPIOCALLBACKS_H_
#define LINUX_GPIO_GPIOCALLBACKS_H_
#include <fsfw/hal/common/gpio/gpioDefinitions.h>
#include <fsfw/hal/common/gpio/GpioIF.h>
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
#include <fsfw_hal/common/gpio/GpioIF.h>
namespace gpioCallbacks {

View File

@ -41,8 +41,10 @@ void FileSystemHandler::fileSystemHandlerLoop() {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
while(true) {
if(opCounter % 5 == 0) {
if(coreCtrl->sdInitFinished()) {
fileSystemCheckup();
}
}
result = mq->receiveMessage(&filemsg);
if(result == MessageQueueIF::EMPTY) {
break;
@ -72,16 +74,16 @@ void FileSystemHandler::fileSystemHandlerLoop() {
}
void FileSystemHandler::fileSystemCheckup() {
SdCardManager::SdStatusPair statusPair;
SdCardManager::SdStatePair statusPair;
sdcMan->getSdCardActiveStatus(statusPair);
sd::SdCard preferredSdCard;
sdcMan->getPreferredSdCard(preferredSdCard);
if((preferredSdCard == sd::SdCard::SLOT_0) and
(statusPair.first == sd::SdStatus::MOUNTED)) {
(statusPair.first == sd::SdState::MOUNTED)) {
currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
}
else if((preferredSdCard == sd::SdCard::SLOT_1) and
(statusPair.second == sd::SdStatus::MOUNTED)) {
(statusPair.second == sd::SdState::MOUNTED)) {
currentMountPrefix = SdCardManager::SD_1_MOUNT_POINT;
}
else {
@ -111,6 +113,11 @@ MessageQueueId_t FileSystemHandler::getCommandQueue() const {
}
ReturnValue_t FileSystemHandler::initialize() {
coreCtrl = ObjectManager::instance()->get<CoreController>(objects::CORE_CONTROLLER);
if(coreCtrl == nullptr) {
sif::error << "FileSystemHandler::initialize: Could not retrieve core controller handle" <<
std::endl;
}
sdcMan = SdCardManager::instance();
sd::SdCard preferredSdCard;
ReturnValue_t result = sdcMan->getPreferredSdCard(preferredSdCard);

View File

@ -11,6 +11,8 @@
#include <string>
class CoreController;
class FileSystemHandler: public SystemObject,
public ExecutableObjectIF,
public HasFileSystemIF {
@ -47,6 +49,7 @@ public:
void* args = nullptr) override;
private:
CoreController* coreCtrl = nullptr;
MessageQueueIF* mq = nullptr;
std::string currentMountPrefix = SdCardManager::SD_0_MOUNT_POINT;
static constexpr uint32_t FS_MAX_QUEUE_SIZE = config::OBSW_FILESYSTEM_HANDLER_QUEUE_SIZE;

View File

@ -1,3 +1,4 @@
#include <fsfw/osal/linux/Timer.h>
#include "SdCardManager.h"
#include "scratchApi.h"
@ -6,13 +7,16 @@
#include "fsfw/ipc/MutexFactory.h"
#include "fsfw/serviceinterface/ServiceInterface.h"
#include <unistd.h>
#include <fstream>
#include <memory>
#include <filesystem>
#include <cstring>
SdCardManager* SdCardManager::factoryInstance = nullptr;
SdCardManager::SdCardManager() {
SdCardManager::SdCardManager(): cmdExecutor(256) {
}
SdCardManager::~SdCardManager() {
@ -30,11 +34,19 @@ SdCardManager* SdCardManager::instance() {
}
ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard,
SdStatusPair* statusPair) {
SdStatePair* statusPair) {
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
std::unique_ptr<SdStatusPair> sdStatusPtr;
if(doMountSdCard) {
if(not blocking) {
sif::warning << "SdCardManager::switchOnSdCard: Two-step command but manager is"
" not configured for blocking operation. "
"Forcing blocking mode.." << std::endl;
blocking = true;
}
}
std::unique_ptr<SdStatePair> sdStatusPtr;
if(statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatusPair>();
sdStatusPtr = std::make_unique<SdStatePair>();
statusPair = sdStatusPtr.get();
result = getSdCardActiveStatus(*statusPair);
if(result != HasReturnvaluesIF::RETURN_OK) {
@ -49,20 +61,19 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
return HasReturnvaluesIF::RETURN_FAILED;
}
sd::SdStatus targetStatus;
sd::SdState currentState;
if(sdCard == sd::SdCard::SLOT_0) {
targetStatus = statusPair->first;
currentState = statusPair->first;
}
else if(sdCard == sd::SdCard::SLOT_1) {
targetStatus = statusPair->second;
currentState = statusPair->second;
}
else {
// Should not happen
targetStatus = sd::SdStatus::OFF;
currentState = sd::SdState::OFF;
}
auto switchCall = [&]() {
if(targetStatus == sd::SdStatus::ON) {
if(currentState == sd::SdState::ON) {
if(not doMountSdCard) {
return ALREADY_ON;
}
@ -70,18 +81,15 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
return mountSdCard(sdCard);
}
}
else if(targetStatus == sd::SdStatus::MOUNTED) {
return ALREADY_MOUNTED;
else if(currentState == sd::SdState::MOUNTED) {
result = ALREADY_MOUNTED;
}
else if(targetStatus == sd::SdStatus::OFF) {
return setSdCardState(sdCard, true);
else if(currentState == sd::SdState::OFF) {
result = setSdCardState(sdCard, true);
}
else {
return HasReturnvaluesIF::RETURN_FAILED;
result = HasReturnvaluesIF::RETURN_FAILED;
}
};
result = switchCall();
if(result != HasReturnvaluesIF::RETURN_OK or not doMountSdCard) {
return result;
@ -91,12 +99,19 @@ ReturnValue_t SdCardManager::switchOnSdCard(sd::SdCard sdCard, bool doMountSdCar
}
ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard,
SdStatusPair* statusPair) {
std::pair<sd::SdStatus, sd::SdStatus> active;
SdStatePair* statusPair) {
std::pair<sd::SdState, sd::SdState> active;
ReturnValue_t result = getSdCardActiveStatus(active);
if(result != HasReturnvaluesIF::RETURN_OK) {
return result;
}
if(doUnmountSdCard) {
if(not blocking) {
sif::warning << "SdCardManager::switchOffSdCard: Two-step command but manager is"
" not configured for blocking operation. Forcing blocking mode.." << std::endl;
blocking = true;
}
}
// Not allowed, this function turns off one SD card
if(sdCard == sd::SdCard::BOTH) {
sif::warning << "SdCardManager::switchOffSdCard: API does not allow sd::SdStatus::BOTH"
@ -104,12 +119,12 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
return HasReturnvaluesIF::RETURN_FAILED;
}
if(sdCard == sd::SdCard::SLOT_0) {
if(active.first == sd::SdStatus::OFF) {
if(active.first == sd::SdState::OFF) {
return ALREADY_OFF;
}
}
else if(sdCard == sd::SdCard::SLOT_1) {
if(active.second == sd::SdStatus::OFF) {
if(active.second == sd::SdState::OFF) {
return ALREADY_OFF;
}
}
@ -126,6 +141,9 @@ ReturnValue_t SdCardManager::switchOffSdCard(sd::SdCard sdCard, bool doUnmountSd
ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
using namespace std;
if(cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
return CommandExecutor::COMMAND_PENDING;
}
string sdstring = "";
string statestring = "";
if(sdCard == sd::SdCard::SLOT_0) {
@ -135,23 +153,24 @@ ReturnValue_t SdCardManager::setSdCardState(sd::SdCard sdCard, bool on) {
sdstring = "1";
}
if(on) {
currentOp = Operations::SWITCHING_ON;
statestring = "on";
}
else {
currentOp = Operations::SWITCHING_OFF;
statestring = "off";
}
ostringstream command;
command << "q7hw sd set " << sdstring << " " << statestring;
int result = system(command.str().c_str());
if(result == 0) {
return HasReturnvaluesIF::RETURN_OK;
cmdExecutor.load(command.str(), blocking, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if(blocking and result != HasReturnvaluesIF::RETURN_OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::setSdCardState");
}
sif::warning << "SdCardManager::setSdCardState: system call failed with code " <<
result << std::endl;
return SYSTEM_CALL_ERROR;
return result;
}
ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatusPair& active) {
ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatePair& active) {
using namespace std;
if(not filesystem::exists(SD_STATE_FILE)) {
return STATUS_FILE_NEXISTS;
@ -174,6 +193,9 @@ ReturnValue_t SdCardManager::getSdCardActiveStatus(SdStatusPair& active) {
ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
using namespace std;
if(cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
return CommandExecutor::COMMAND_PENDING;
}
if(sdCard == sd::SdCard::BOTH) {
sif::warning << "SdCardManager::mountSdCard: API does not allow sd::SdStatus::BOTH"
<< std::endl;
@ -195,16 +217,22 @@ ReturnValue_t SdCardManager::mountSdCard(sd::SdCard sdCard) {
return MOUNT_ERROR;
}
string sdMountCommand = "mount " + mountDev + " " + mountPoint;
int result = system(sdMountCommand.c_str());
if (result != 0) {
utility::handleSystemError(result, "SdCardManager::mountSdCard");
return SYSTEM_CALL_ERROR;
if(not blocking) {
currentOp = Operations::MOUNTING;
}
return HasReturnvaluesIF::RETURN_OK;
string sdMountCommand = "mount " + mountDev + " " + mountPoint;
cmdExecutor.load(sdMountCommand, blocking, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if(blocking and result != HasReturnvaluesIF::RETURN_OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
}
return result;
}
ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
if(cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
return CommandExecutor::COMMAND_PENDING;
}
using namespace std;
if(sdCard == sd::SdCard::BOTH) {
sif::warning << "SdCardManager::unmountSdCard: API does not allow sd::SdStatus::BOTH"
@ -229,34 +257,53 @@ ReturnValue_t SdCardManager::unmountSdCard(sd::SdCard sdCard) {
sif::warning << "SdCardManager::unmountSdCard: Mount point is empty!" << std::endl;
}
string sdUnmountCommand = "umount " + mountPoint;
int result = system(sdUnmountCommand.c_str());
if (result != 0) {
utility::handleSystemError(result, "SdCardManager::unmountSdCard");
return SYSTEM_CALL_ERROR;
if(not blocking) {
currentOp = Operations::UNMOUNTING;
}
return HasReturnvaluesIF::RETURN_OK;
cmdExecutor.load(sdUnmountCommand, blocking, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if(blocking and result != HasReturnvaluesIF::RETURN_OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::unmountSdCard");
}
return result;
}
ReturnValue_t SdCardManager::sanitizeState(SdStatusPair* statusPair, sd::SdCard prefSdCard) {
std::unique_ptr<SdStatusPair> sdStatusPtr;
ReturnValue_t SdCardManager::sanitizeState(SdStatePair* statusPair, sd::SdCard prefSdCard) {
std::unique_ptr<SdStatePair> sdStatusPtr;
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
// Enforce blocking operation for now. Be careful to reset it when returning prematurely!
bool resetNonBlockingState = false;
if(not this->blocking) {
blocking = true;
resetNonBlockingState = true;
}
if(prefSdCard == sd::SdCard::NONE) {
ReturnValue_t result = getPreferredSdCard(prefSdCard);
result = getPreferredSdCard(prefSdCard);
if(result != HasReturnvaluesIF::RETURN_OK) {}
}
if(statusPair == nullptr) {
sdStatusPtr = std::make_unique<SdStatusPair>();
sdStatusPtr = std::make_unique<SdStatePair>();
statusPair = sdStatusPtr.get();
getSdCardActiveStatus(*statusPair);
}
if(statusPair->first == sd::SdStatus::ON) {
return mountSdCard(prefSdCard);
if(statusPair->first == sd::SdState::ON) {
result = mountSdCard(prefSdCard);
}
return switchOnSdCard(prefSdCard, true, statusPair);
result = switchOnSdCard(prefSdCard, true, statusPair);
if(resetNonBlockingState) {
blocking = false;
}
return result;
}
void SdCardManager::processSdStatusLine(std::pair<sd::SdStatus, sd::SdStatus> &active,
void SdCardManager::resetState() {
cmdExecutor.reset();
currentOp = Operations::IDLE;
}
void SdCardManager::processSdStatusLine(std::pair<sd::SdState, sd::SdState> &active,
std::string& line, uint8_t& idx, sd::SdCard& currentSd) {
using namespace std;
istringstream iss(line);
@ -278,28 +325,28 @@ void SdCardManager::processSdStatusLine(std::pair<sd::SdStatus, sd::SdStatus> &a
if(word == "on") {
if(currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdStatus::ON;
active.first = sd::SdState::ON;
}
else {
active.second = sd::SdStatus::ON;
active.second = sd::SdState::ON;
}
}
else if (word == "off") {
if(currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdStatus::OFF;
active.first = sd::SdState::OFF;
}
else {
active.second = sd::SdStatus::OFF;
active.second = sd::SdState::OFF;
}
}
}
if(mountLine) {
if(currentSd == sd::SdCard::SLOT_0) {
active.first = sd::SdStatus::MOUNTED;
active.first = sd::SdState::MOUNTED;
}
else {
active.second = sd::SdStatus::MOUNTED;
active.second = sd::SdState::MOUNTED;
}
}
@ -329,15 +376,17 @@ ReturnValue_t SdCardManager::setPreferredSdCard(sd::SdCard sdCard) {
}
ReturnValue_t SdCardManager::updateSdCardStateFile() {
if(cmdExecutor.getCurrentState() == CommandExecutor::States::PENDING) {
return CommandExecutor::COMMAND_PENDING;
}
// Use q7hw utility and pipe the command output into the state file
std::string updateCmd = "q7hw sd info all > " + std::string(SD_STATE_FILE);
int result = std::system(updateCmd.c_str());
if(result == 0) {
return HasReturnvaluesIF::RETURN_OK;
cmdExecutor.load(updateCmd, blocking, printCmdOutput);
ReturnValue_t result = cmdExecutor.execute();
if(blocking and result != HasReturnvaluesIF::RETURN_OK) {
utility::handleSystemError(cmdExecutor.getLastError(), "SdCardManager::mountSdCard");
}
sif::warning << "SdCardManager::updateSdCardStateFile: system call failed with code " <<
result << std::endl;
return HasReturnvaluesIF::RETURN_FAILED;
return result;
}
std::string SdCardManager::getCurrentMountPrefix(sd::SdCard prefSdCard) {
@ -354,3 +403,56 @@ std::string SdCardManager::getCurrentMountPrefix(sd::SdCard prefSdCard) {
return SD_1_MOUNT_POINT;
}
}
SdCardManager::OpStatus SdCardManager::checkCurrentOp(Operations &currentOp) {
CommandExecutor::States state = cmdExecutor.getCurrentState();
if(state == CommandExecutor::States::IDLE or state == CommandExecutor::States::COMMAND_LOADED) {
return OpStatus::IDLE;
}
currentOp = this->currentOp;
bool bytesRead = false;
#if OBSW_ENABLE_TIMERS == 1
Timer timer;
timer.setTimer(100);
uint32_t remainingTimeMs = 0;
#endif
while(true) {
ReturnValue_t result = cmdExecutor.check(bytesRead);
// This timer can prevent deadlocks due to missconfigurations
#if OBSW_ENABLE_TIMERS == 1
timer.getTimer(&remainingTimeMs);
if(remainingTimeMs == 0) {
sif::error << "SdCardManager::checkCurrentOp: Timeout!" << std::endl;
return OpStatus::FAIL;
}
#endif
switch(result) {
case(CommandExecutor::BYTES_READ): {
continue;
}
case(CommandExecutor::EXECUTION_FINISHED): {
return OpStatus::SUCCESS;
}
case(HasReturnvaluesIF::RETURN_OK): {
return OpStatus::ONGOING;
}
case(HasReturnvaluesIF::RETURN_FAILED): {
return OpStatus::FAIL;
}
default: {
sif::warning << "SdCardManager::checkCurrentOp: Unhandled case" << std::endl;
}
}
}
}
void SdCardManager::setBlocking(bool blocking) {
this->blocking = blocking;
}
void SdCardManager::setPrintCommandOutput(bool print) {
this->printCmdOutput = print;
}

View File

@ -1,6 +1,7 @@
#ifndef BSP_Q7S_MEMORY_SDCARDACCESSMANAGER_H_
#define BSP_Q7S_MEMORY_SDCARDACCESSMANAGER_H_
#include <fsfw/osal/linux/CommandExecutor.h>
#include "definitions.h"
#include "returnvalues/classIds.h"
#include "events/subsystemIdRanges.h"
@ -8,10 +9,13 @@
#include "fsfw/events/Event.h"
#include "fsfw/returnvalues/HasReturnvaluesIF.h"
#include <poll.h>
#include <cstdint>
#include <utility>
#include <string>
#include <optional>
#include <array>
class MutexIF;
@ -22,16 +26,34 @@ class MutexIF;
class SdCardManager {
friend class SdCardAccess;
public:
using SdStatusPair = std::pair<sd::SdStatus, sd::SdStatus>;
enum class Operations {
SWITCHING_ON,
SWITCHING_OFF,
MOUNTING,
UNMOUNTING,
IDLE
};
enum class OpStatus {
IDLE,
TIMEOUT,
ONGOING,
SUCCESS,
FAIL
};
using SdStatePair = std::pair<sd::SdState, sd::SdState>;
static constexpr uint8_t INTERFACE_ID = CLASS_ID::SD_CARD_MANAGER;
static constexpr ReturnValue_t ALREADY_ON =
static constexpr ReturnValue_t OP_ONGOING =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 0);
static constexpr ReturnValue_t ALREADY_MOUNTED =
static constexpr ReturnValue_t ALREADY_ON =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 1);
static constexpr ReturnValue_t ALREADY_OFF =
static constexpr ReturnValue_t ALREADY_MOUNTED =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 2);
static constexpr ReturnValue_t ALREADY_OFF =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 3);
static constexpr ReturnValue_t STATUS_FILE_NEXISTS =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 10);
static constexpr ReturnValue_t STATUS_FILE_FORMAT_INVALID =
@ -42,6 +64,8 @@ public:
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 13);
static constexpr ReturnValue_t SYSTEM_CALL_ERROR =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 14);
static constexpr ReturnValue_t POPEN_CALL_ERROR =
HasReturnvaluesIF::makeReturnCode(INTERFACE_ID, 15);
static constexpr uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::FILE_SYSTEM;
@ -90,7 +114,7 @@ public:
* SYSTEM_CALL_ERROR on system error
*/
ReturnValue_t switchOnSdCard(sd::SdCard sdCard, bool doMountSdCard = true,
SdStatusPair* statusPair = nullptr);
SdStatePair* statusPair = nullptr);
/**
* Switch off the specified SD card.
@ -102,13 +126,15 @@ public:
* SYSTEM_CALL_ERROR on system error
*/
ReturnValue_t switchOffSdCard(sd::SdCard sdCard, bool doUnmountSdCard = true,
SdStatusPair* statusPair = nullptr);
SdStatePair* statusPair = nullptr);
/**
* Update the state file or creates one if it does not exist. You need to call this
* function before calling #sdCardActive
* @return - RETURN_OK if the state file was updated successfully
* - SYSTEM_CALL_ERROR if the call to create the status file failed
* @return
* - RETURN_OK if the state file was updated successfully
* - CommandExecutor::COMMAND_PENDING: Non-blocking command is pending
* - RETURN_FAILED: blocking command failed
*/
ReturnValue_t updateSdCardStateFile();
@ -123,7 +149,7 @@ public:
* should call #updateSdCardStateFile again in that case
* - STATUS_FILE_NEXISTS if the status file does not exist
*/
ReturnValue_t getSdCardActiveStatus(SdStatusPair& active);
ReturnValue_t getSdCardActiveStatus(SdStatePair& active);
/**
* Mount the specified SD card. This is necessary to use it.
@ -143,28 +169,43 @@ public:
* In case that there is a discrepancy between the preferred SD card and the currently
* mounted one, this function will sanitize the state by attempting to mount the
* currently preferred SD card. If the caller already has state information, it can be
* passed into the function.
* passed into the function. For now, this operation will be enforced in blocking mode.
* @param statusPair Current SD card status capture with #getSdCardActiveStatus
* @param prefSdCard Preferred SD card captured with #getPreferredSdCard
* @throws std::bad_alloc if one of the two arguments was a nullptr and an allocation failed
* @return
*/
ReturnValue_t sanitizeState(SdStatusPair* statusPair = nullptr,
ReturnValue_t sanitizeState(SdStatePair* statusPair = nullptr,
sd::SdCard prefSdCard = sd::SdCard::NONE);
/**
* If sd::SdCard::NONE is passed as an argument, this funtion will get the currently
* If sd::SdCard::NONE is passed as an argument, this function will get the currently
* preferred SD card from the scratch buffer.
* @param prefSdCardPtr
* @return
*/
std::string getCurrentMountPrefix(sd::SdCard prefSdCardPtr = sd::SdCard::NONE);
OpStatus checkCurrentOp(Operations& currentOp);
/**
* If there are issues with the state machine, it can be reset with this function
*/
void resetState();
void setBlocking(bool blocking);
void setPrintCommandOutput(bool print);
private:
CommandExecutor cmdExecutor;
Operations currentOp = Operations::IDLE;
bool blocking = false;
bool printCmdOutput = true;
SdCardManager();
ReturnValue_t setSdCardState(sd::SdCard sdCard, bool on);
void processSdStatusLine(SdStatusPair& active, std::string& line, uint8_t& idx,
void processSdStatusLine(SdStatePair& active, std::string& line, uint8_t& idx,
sd::SdCard& currentSd);
std::string currentPrefix;

View File

@ -5,7 +5,7 @@
namespace sd {
enum SdStatus: uint8_t {
enum SdState: uint8_t {
OFF = 0,
ON = 1,
// A mounted SD card is on as well

View File

@ -11,6 +11,10 @@ int simple::simple() {
{
FileSystemTest fileSystemTest;
}
#endif
#if TE0720_GPIO_TEST
#endif
return 0;
}

View File

@ -1,7 +1,7 @@
#ifndef BSP_Q7S_SPI_Q7SSPICOMIF_H_
#define BSP_Q7S_SPI_Q7SSPICOMIF_H_
#include <fsfw/hal/linux/spi/SpiComIF.h>
#include <fsfw_hal/linux/spi/SpiComIF.h>
/**

View File

@ -11,17 +11,6 @@ if(LINK_LWIP)
endif()
endif()
if(LINK_HAL)
message(STATUS "Linking against ${LIB_HAL_NAME} HAL library")
if(LIB_HAL_NAME)
target_link_libraries(${TARGET_NAME} PUBLIC
${LIB_HAL_NAME}
)
else()
message(WARNING "HAL library name not set!")
endif()
endif()
if(LINKER_SCRIPT)
target_link_options(${TARGET_NAME} PRIVATE
-T${LINKER_SCRIPT}
@ -52,11 +41,14 @@ target_compile_options(${TARGET_NAME} PRIVATE
$<$<COMPILE_LANGUAGE:ASM>:${ASM_FLAGS}>
)
set(STRIPPED_TARGET_NAME ${TARGET_NAME}-stripped)
add_custom_command(
TARGET ${TARGET_NAME}
POST_BUILD
COMMAND ${CMAKE_OBJCOPY} -O binary ${TARGET_NAME} ${TARGET_NAME}.bin
COMMENT "Generating binary file ${CMAKE_PROJECT_NAME}.bin.."
COMMAND ${CMAKE_STRIP} --strip-all ${TARGET_NAME} -o ${STRIPPED_TARGET_NAME}
BYPRODUCTS ${STRIPPED_TARGET_NAME}
COMMENT "Generating stripped executable ${STRIPPED_TARGET_NAME}.."
)
endfunction()

View File

@ -53,9 +53,9 @@ endif()
if(TGT_BSP)
if (${TGT_BSP} MATCHES "arm/raspberrypi" OR ${TGT_BSP} MATCHES "arm/beagleboneblack")
if (TGT_BSP MATCHES "arm/raspberrypi" OR TGT_BSP MATCHES "arm/beagleboneblack")
set(BSP_PATH "bsp_linux_board")
elseif(${TGT_BSP} MATCHES "arm/q7s")
elseif(TGT_BSP MATCHES "arm/q7s")
set(BSP_PATH "bsp_q7s")
else()
message(WARNING "CMake not configured for this target!")

View File

@ -1,5 +1,8 @@
if(DEFINED ENV{Q7S_SYSROOT})
set(ENV{Q7S_ROOTFS} $ENV{Q7S_SYSROOT})
endif()
# CROSS_COMPILE also needs to be set accordingly or passed to the CMake command
if(NOT DEFINED ENV{Q7S_SYSROOT})
if(NOT DEFINED ENV{Q7S_ROOTFS})
# Sysroot has not been cached yet and was not set in environment either
if(NOT DEFINED SYSROOT_PATH)
message(FATAL_ERROR
@ -7,7 +10,7 @@ if(NOT DEFINED ENV{Q7S_SYSROOT})
)
endif()
else()
set(SYSROOT_PATH "$ENV{Q7S_SYSROOT}" CACHE PATH "Q7S root filesystem path")
set(SYSROOT_PATH "$ENV{Q7S_ROOTFS}" CACHE PATH "Q7S root filesystem path")
endif()
if(NOT DEFINED ENV{CROSS_COMPILE})
@ -42,6 +45,7 @@ find_program (CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX} REQUIRED)
# Useful utilities, not strictly necessary
find_program(CMAKE_SIZE ${CROSS_COMPILE_SIZE})
find_program(CMAKE_OBJCOPY ${CROSS_COMPILE_OBJCOPY})
find_program(CMAKE_STRIP ${CROSS_COMPILE_STRIP})
set(CMAKE_CROSSCOMPILING TRUE)
set(CMAKE_SYSROOT "${SYSROOT_PATH}")
@ -54,6 +58,7 @@ set(CMAKE_SYSTEM_PROCESSOR "armv7")
set(CMAKE_C_COMPILER ${CROSS_COMPILE_CC})
set(CMAKE_CXX_COMPILER ${CROSS_COMPILE_CXX})
if(EIVE_SYSROOT_MAGIC)
# List of library dirs where LD has to look. Pass them directly through gcc.
set(LIB_DIRS
"${SYSROOT_PATH}/usr/include"
@ -69,6 +74,7 @@ set(COMMON_FLAGS "-I${SYSROOT_PATH}/usr/lib")
foreach(LIB ${LIB_DIRS})
set(COMMON_FLAGS "${COMMON_FLAGS} -L${LIB} -Wl,-rpath-link,${LIB}")
endforeach()
endif()
set(CMAKE_PREFIX_PATH
"${CMAKE_PREFIX_PATH}"

View File

@ -1,30 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Debug-BBB"
defines="LINUX_CROSS_COMPILE=OFF"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"

View File

@ -1,30 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Debug-BBB"
defines="LINUX_CROSS_COMPILE=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"

View File

@ -1,30 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Release-BBB"
defines="LINUX_CROSS_COMPILE=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"

View File

@ -1,30 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Release-BBB"
defines="LINUX_CROSS_COMPILE=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Debug-BBB"
defines="LINUX_CROSS_COMPILE=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Release-BBB"
defines="LINUX_CROSS_COMPILE=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/beagleboneblack"
build_generator=""
builddir="build-Debug-BBB"
defines="LINUX_CROSS_COMPILE=OFF"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${builddir}" -d "${defines}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -1,27 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
exit 1
fi
build_generator=""
os_fsfw="host"
build_dir="Release-Host"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -l"${build_dir}"

View File

@ -1,26 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
exit 1
fi
build_generator=""
os_fsfw="host"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "reldeb"

View File

@ -1,26 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
exit 1
fi
build_generator=""
os_fsfw="host"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "size"

View File

@ -0,0 +1,32 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
build_generator="Unix Makefiles"
os_fsfw="host"
builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -0,0 +1,32 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
build_generator="Unix Makefiles"
os_fsfw="host"
builddir="build-Release-Host"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -1,27 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
exit 1
fi
build_generator=""
build_dir="build-Debug-Host"
os_fsfw="host"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l"${build_dir}"

View File

@ -0,0 +1,32 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
build_generator="Ninja"
os_fsfw="host"
builddir="build-Debug-Host"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -26,7 +27,6 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -26,6 +27,6 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "create_cmake_cfg.sh not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -26,7 +27,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -l "${builddir}"
# Use this if commands are added which should not be printed
# set +x

View File

@ -0,0 +1,36 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Debug-Q7S"
build_generator=""
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -29,6 +30,6 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Release-Q7S"
build_generator=""
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "size" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -27,7 +28,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${build_dir}"
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -27,7 +28,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -18,7 +19,7 @@ os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Simple-Q7S"
build_generator=""
definitions="Q7S_SIMPLE_MODE=On"
definitions="BUILD_Q7S_SIMPLE_MODE=On"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py"
@ -30,6 +31,6 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${build_dir}" -d "${definitions}"
# set +x

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -18,7 +19,7 @@ os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Simple-Q7S"
build_generator="Ninja"
definitions="Q7S_SIMPLE_MODE=On"
definitions="BUILD_Q7S_SIMPLE_MODE=On"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
@ -28,7 +29,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l "${build_dir}" -d "${definitions}"
# set +x

View File

@ -0,0 +1,37 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Debug-Watchdog"
build_generator=""
definitions="EIVE_BUILD_WATCHDOG=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-d "${definitions}" -l"${build_dir}"
# set +x

View File

@ -16,8 +16,9 @@ fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Debug-Q7S"
build_dir="build-Release-Watchdog"
build_generator=""
definitions="EIVE_BUILD_WATCHDOG=ON"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
python="py"
@ -29,7 +30,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l"${build_dir}"
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
-d "${definitions} -l"${build_dir}"
# set +x

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Debug-Watchdog"
build_generator="Ninja"
definitions="EIVE_BUILD_WATCHDOG=ON"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-d "${definitions}" -l "${build_dir}"
# set +x

View File

@ -0,0 +1,35 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/q7s"
build_dir="build-Release-Watchdog"
build_generator="Ninja"
definitions="EIVE_BUILD_WATCHDOG=ON"
if [ "${OS}" = "Windows_NT" ]; then
python="py"
# Could be other OS but this works for now.
else
python="python3"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
-d "${definitions}" -l"${build_dir}"
# set +x

View File

@ -1,19 +1,21 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/raspberrypi"
build_generator=""
@ -29,7 +31,6 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -0,0 +1,33 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/raspberrypi"
build_generator=""
build_dir="build-Release-RPi"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
echo "Running command (without the leading +):"
set -x # Print command
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -1,29 +0,0 @@
#!/bin/sh
counter=0
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
exit 1
fi
os_fsfw="linux"
tgt_bsp="arm/raspberrypi"
build_generator=""
build_dir="build-Release-RPi"
if [ "${OS}" = "Windows_NT" ]; then
build_generator="MinGW Makefiles"
# Could be other OS but this works for now.
else
build_generator="Unix Makefiles"
fi
python3 cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "release" -t "${tgt_bsp}" \
-l"${build_dir}"

View File

@ -1,16 +1,17 @@
#!/bin/sh
counter=0
cfg_script_name="cmake-build-cfg.py"
while [ ${counter} -lt 5 ]
do
cd ..
if [ -f "cmake_build_config.py" ];then
if [ -f ${cfg_script_name} ];then
break
fi
counter=$((counter=counter + 1))
done
if [ "${counter}" -ge 5 ];then
echo "cmake_build_config.py not found in upper directories!"
echo "${cfg_script_name} not found in upper directories!"
exit 1
fi
@ -27,7 +28,7 @@ fi
echo "Running command (without the leading +):"
set -x # Print command
${python} cmake_build_config.py -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
${python} ${cfg_script_name} -o "${os_fsfw}" -g "${build_generator}" -b "debug" -t "${tgt_bsp}" \
-l"${build_dir}"
# set +x

View File

@ -4,7 +4,7 @@
const char* const SW_NAME = "eive";
#define SW_VERSION 1
#define SW_SUBVERSION 5
#define SW_SUBVERSION 7
#define SW_REVISION 0
#endif /* COMMON_CONFIG_OBSWVERSION_H_ */

View File

@ -13,12 +13,15 @@ enum commonClassIds: uint8_t {
HEATER_HANDLER, //HEATER
SYRLINKS_HANDLER, //SYRLINKS
IMTQ_HANDLER, //IMTQ
RW_HANDLER, //Reaction Wheels
STR_HANDLER, //Star tracker
PLOC_MPSOC_HANDLER, //PLOC MPSoC
PLOC_SUPERVISOR_HANDLER, //PLOC Supervisor
RW_HANDLER, //RWHA
STR_HANDLER, //STRH
PLOC_MPSOC_HANDLER, //PLMP
PLOC_SUPERVISOR_HANDLER, //PLSV
SUS_HANDLER, //SUSS
CCSDS_IP_CORE_BRIDGE, // IP Core interface
CCSDS_IP_CORE_BRIDGE, //IPCI
PLOC_UPDATER, //PLUD
GOM_SPACE_HANDLER, //GOMS
PLOC_MEMORY_DUMPER, //PLMEMDUMP
COMMON_CLASS_ID_END // [EXPORT] : [END]
};

View File

@ -3,5 +3,8 @@
#define OBSW_ADD_LWGPS_TEST 0
// Use TCP instead of UDP for the TMTC bridge. This allows using the TMTC client locally
// because UDP packets are not allowed in the VPN
#define OBSW_USE_TMTC_TCP_BRIDGE 1
#endif /* COMMON_CONFIG_COMMONCONFIG_H_ */

View File

@ -8,8 +8,8 @@ enum commonObjects: uint32_t {
/* First Byte 0x50-0x52 reserved for PUS Services **/
CCSDS_PACKET_DISTRIBUTOR = 0x50000100,
PUS_PACKET_DISTRIBUTOR = 0x50000200,
UDP_BRIDGE = 0x50000300,
UDP_POLLING_TASK = 0x50000400,
TMTC_BRIDGE = 0x50000300,
TMTC_POLLING_TASK = 0x50000400,
FILE_SYSTEM_HANDLER = 0x50000500,
/* 0x43 ('C') for Controllers */
@ -75,12 +75,15 @@ enum commonObjects: uint32_t {
GPS0_HANDLER = 0x44130045,
GPS1_HANDLER = 0x44130146,
RW1 = 0x44120001,
RW2 = 0x44120002,
RW3 = 0x44120003,
RW4 = 0x44120004,
RW1 = 0x44120047,
RW2 = 0x44120148,
RW3 = 0x44120249,
RW4 = 0x44120350,
START_TRACKER = 0x44130001
START_TRACKER = 0x44130001,
PLOC_UPDATER = 0x44330000,
PLOC_MEMORY_DUMPER = 0x44330001
};
}

View File

@ -17,6 +17,8 @@ enum: uint8_t {
STR_HANDLER = 114,
PLOC_SUPERVISOR_HANDLER = 115,
FILE_SYSTEM = 116,
PLOC_UPDATER = 117,
PLOC_MEMORY_DUMPER = 118,
COMMON_SUBSYSTEM_ID_END
};
}

50
common/config/devConf.h Normal file
View File

@ -0,0 +1,50 @@
#ifndef COMMON_CONFIG_DEVCONF_H_
#define COMMON_CONFIG_DEVCONF_H_
#include <cstdint>
#include <fsfw_hal/linux/spi/spiDefinitions.h>
/**
* SPI configuration will be contained here to let the device handlers remain independent
* of SPI specific properties.
*/
namespace spi {
// Default values, changing them is not supported for now
static constexpr uint32_t DEFAULT_LIS3_SPEED = 976'000;
static constexpr uint32_t LIS3_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_LIS3_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_RM3100_SPEED = 976'000;
static constexpr uint32_t RM3100_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_RM3100_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_L3G_SPEED = 976'000;
static constexpr uint32_t L3G_TRANSITION_DELAY = 10000;
static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_ADIS16507_SPEED = 976'000;
static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t RW_SPEED = 300'000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
static constexpr uint32_t RTD_SPEED = 2'000'000;
}
namespace uart {
static constexpr size_t HYPERION_GPS_REPLY_MAX_BUFFER = 1024;
static constexpr uint32_t SYRLINKS_BAUD = 38400;
static constexpr uint32_t GNSS_BAUD = 9600;
static constexpr uint32_t PLOC_MPSOC_BAUD = 115200;
static constexpr uint32_t PLOC_SUPERVISOR_BAUD = 115200;
static constexpr uint32_t STAR_TRACKER_BAUD = 115200;
}
#endif /* COMMON_CONFIG_DEVCONF_H_ */

View File

@ -1,34 +0,0 @@
#ifndef COMMON_CONFIG_SPICONF_H_
#define COMMON_CONFIG_SPICONF_H_
#include <cstdint>
#include <fsfw/hal/linux/spi/spiDefinitions.h>
/**
* SPI configuration will be contained here to let the device handlers remain independent
* of SPI specific properties.
*/
namespace spi {
/* Default values, changing them is not supported for now */
static constexpr uint32_t DEFAULT_LIS3_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_LIS3_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_RM3100_SPEED = 976'000;
static constexpr spi::SpiModes DEFAULT_RM3100_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_L3G_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_L3G_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_MAX_1227_SPEED = 3'900'000;
static constexpr spi::SpiModes DEFAULT_MAX_1227_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t DEFAULT_ADIS16507_SPEED = 976'000;
static constexpr spi::SpiModes DEFAULT_ADIS16507_MODE = spi::SpiModes::MODE_3;
static constexpr uint32_t RW_SPEED = 300000;
static constexpr spi::SpiModes RW_MODE = spi::SpiModes::MODE_0;
}
#endif /* COMMON_CONFIG_SPICONF_H_ */

BIN
doc/img/eive-logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 104 KiB

Some files were not shown because too many files have changed in this diff Show More