Skip to content

Commit 5127a1a

Browse files
committed
Add README to the examples.
1 parent a00f0a6 commit 5127a1a

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

example/README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
# Examples
3+
4+
These are small examples showcasing some features of the ULP and
5+
how to access those in ulp-forth. The example_app has some convenience
6+
features such as a serial reader - for a minimal application, see the
7+
program in util/minimal_app.
8+
9+
The example program expects ulp assembly in `example_app/main/out.S`.
10+
This will be compiled by the espressif assembler so the forth should
11+
be compiled with `--assembly`. This is an esp-idf project. Note that
12+
the espressif linker has a bug and so has 12 less bytes available.
13+
14+
`cd` into the example_app directory. To compile the blink example with
15+
subroutine threading, do:
16+
```bash
17+
ulp-forth build --assembly --output main/out.S -r 8164 --subroutine ../blink.f
18+
```
19+
Or if you want to test the local version of the compiler:
20+
```bash
21+
go run ../../main.go build --assembly --output main/out.S -r 8164 --subroutine ../blink.f
22+
```
23+
Then compile and flash it with:
24+
```bash
25+
idf.py build flash monitor
26+
```

0 commit comments

Comments
 (0)