1
1
# reactor-uc
2
+
2
3
` reactor-uc ` is a task scheduling runtime implementing the reactor
3
4
model-of-computation target at embedded and resource-constrained 32 bit systems.
4
5
@@ -8,21 +9,25 @@ NB: reactor-uc is still work-in-progress and many (most?) features are not suppo
8
9
yet. This only documents how to run a few example programs.
9
10
10
11
Setup the environment
12
+
11
13
```
12
14
source env.bash
13
15
```
14
16
15
17
Initialize submodules
18
+
16
19
```
17
20
git submodule update --init
18
21
```
19
22
20
23
Compile and run unit tests:
24
+
21
25
```
22
26
make test
23
27
```
24
28
25
29
Compile and run a simple timer test on Posix
30
+
26
31
```
27
32
cd examples/posix
28
33
cmake -Bbuild
@@ -39,10 +44,20 @@ cd examples/zephyr
39
44
west build -b qemu_cortex_m3 -p always -t run
40
45
```
41
46
42
- For more information on running LF programs using the reactor-uc runtime on
43
- Zephyr take a look at this template: https://github.com/lf-lang/lf-west-template/tree/reactor-uc
47
+ Compile and run a simple blinky example on RIOT.
48
+ This requires a correctly configured RIOT environment.
49
+ Make sure that the environment variable ` RIOTBASE ` points to a ` RIOT ` codebase.
50
+
51
+ ```
52
+ cd examples/riot/blinky
53
+ make BOARD=native all term
54
+ ```
55
+
56
+ For more information on running LF programs using the reactor-uc runtime on
57
+ Zephyr take a look at this template: < https://github.com/lf-lang/lf-west-template/tree/reactor-uc >
44
58
45
59
## Lingua Franca
60
+
46
61
We have copied a very limited version of the Lingua Franca Compiler (lfc) into
47
62
` ~/lfc ` of this repo. In the future, the ` reactor-uc ` specific code-generation
48
63
will be merged back upstream. By sourcing ` env.bash ` or ` env.fish ` the Lingua
@@ -63,6 +78,7 @@ bin/HelloUc
63
78
```
64
79
65
80
## Goals
81
+
66
82
- Incorporate unit testing and test-driven development from the start
67
83
- Optimized for single-core 32-bit systems
68
84
- Backend for LF
@@ -74,13 +90,16 @@ which enable distributed embedded systems.
74
90
- Avoid malloc as much as possible (or entirely?)
75
91
76
92
## References
93
+
77
94
` reactor-uc ` draws inspiration from the following existing open-source projects:
95
+
78
96
- [ reactor-cpp] ( https://github.com/lf-lang/reactor-cpp )
79
97
- [ reactor-c] ( https://github.com/lf-lang/reactor-c )
80
98
- [ qpc] ( https://github.com/QuantumLeaps/qpc )
81
99
- [ ssm-runtime] ( https://github.com/QuantumLeaps/qpc )
82
100
83
- ## TODO for the MVP:
101
+ ## TODO for the MVP
102
+
84
103
- [x] Timers
85
104
- [x] Input/Output Ports
86
105
- [x] Logical Actions
@@ -93,8 +112,8 @@ which enable distributed embedded systems.
93
112
- [x] Posix Platform abstractions
94
113
- [x] Basic code-generation
95
114
96
-
97
115
## More advanced topics
116
+
98
117
- [x] More platform abstractions (Riot, Zephyr and FlexPRET/InterPRET)
99
118
- [x] Reconsider where to buffer data (outputs vs inputs)
100
119
- [x] Consider if we should have FIFOs of pending events, not just a single for a trigger.
@@ -105,15 +124,14 @@ which enable distributed embedded systems.
105
124
- [ ] Multiports and banks
106
125
- [ ] Modal reactors
107
126
108
-
109
127
## Troubleshooting
110
128
111
129
If you get the following CMake error when calling ` lfc/bin/lfc-dev `
130
+
112
131
```
113
132
CMake Error at CMakeLists.txt:7 (message):
114
133
Environment variable REACTOR_UC_PATH is not set. Please source the
115
134
env.bash in reactor-uc.
116
135
```
117
136
118
- Please source ` env.bash ` or ` env.fish ` .
119
-
137
+ Please source ` env.bash ` or ` env.fish ` .
0 commit comments