Skip to content

Commit 26ce7d4

Browse files
committed
Update readme: Add RIOT examples tutorial
1 parent ebbacab commit 26ce7d4

File tree

1 file changed

+25
-7
lines changed

1 file changed

+25
-7
lines changed

README.md

Lines changed: 25 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# reactor-uc
2+
23
`reactor-uc` is a task scheduling runtime implementing the reactor
34
model-of-computation target at embedded and resource-constrained 32 bit systems.
45

@@ -8,21 +9,25 @@ NB: reactor-uc is still work-in-progress and many (most?) features are not suppo
89
yet. This only documents how to run a few example programs.
910

1011
Setup the environment
12+
1113
```
1214
source env.bash
1315
```
1416

1517
Initialize submodules
18+
1619
```
1720
git submodule update --init
1821
```
1922

2023
Compile and run unit tests:
24+
2125
```
2226
make test
2327
```
2428

2529
Compile and run a simple timer test on Posix
30+
2631
```
2732
cd examples/posix
2833
cmake -Bbuild
@@ -39,10 +44,20 @@ cd examples/zephyr
3944
west build -b qemu_cortex_m3 -p always -t run
4045
```
4146

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>
4458

4559
## Lingua Franca
60+
4661
We have copied a very limited version of the Lingua Franca Compiler (lfc) into
4762
`~/lfc` of this repo. In the future, the `reactor-uc` specific code-generation
4863
will be merged back upstream. By sourcing `env.bash` or `env.fish` the Lingua
@@ -63,6 +78,7 @@ bin/HelloUc
6378
```
6479

6580
## Goals
81+
6682
- Incorporate unit testing and test-driven development from the start
6783
- Optimized for single-core 32-bit systems
6884
- Backend for LF
@@ -74,13 +90,16 @@ which enable distributed embedded systems.
7490
- Avoid malloc as much as possible (or entirely?)
7591

7692
## References
93+
7794
`reactor-uc` draws inspiration from the following existing open-source projects:
95+
7896
- [reactor-cpp](https://github.com/lf-lang/reactor-cpp)
7997
- [reactor-c](https://github.com/lf-lang/reactor-c)
8098
- [qpc](https://github.com/QuantumLeaps/qpc)
8199
- [ssm-runtime](https://github.com/QuantumLeaps/qpc)
82100

83-
## TODO for the MVP:
101+
## TODO for the MVP
102+
84103
- [x] Timers
85104
- [x] Input/Output Ports
86105
- [x] Logical Actions
@@ -93,8 +112,8 @@ which enable distributed embedded systems.
93112
- [x] Posix Platform abstractions
94113
- [x] Basic code-generation
95114

96-
97115
## More advanced topics
116+
98117
- [x] More platform abstractions (Riot, Zephyr and FlexPRET/InterPRET)
99118
- [x] Reconsider where to buffer data (outputs vs inputs)
100119
- [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.
105124
- [ ] Multiports and banks
106125
- [ ] Modal reactors
107126

108-
109127
## Troubleshooting
110128

111129
If you get the following CMake error when calling `lfc/bin/lfc-dev`
130+
112131
```
113132
CMake Error at CMakeLists.txt:7 (message):
114133
Environment variable REACTOR_UC_PATH is not set. Please source the
115134
env.bash in reactor-uc.
116135
```
117136

118-
Please source `env.bash` or `env.fish`.
119-
137+
Please source `env.bash` or `env.fish`.

0 commit comments

Comments
 (0)