Skip to content

Commit a4e8452

Browse files
committed
README updates.
- Note the existence of OpenOCD 0.11, which you should be using. - Describe directory hierarchy. - Note presence of rendered Asciidoc on Github Pages.
1 parent 7e96fcd commit a4e8452

File tree

1 file changed

+51
-12
lines changed

1 file changed

+51
-12
lines changed

README.mkdn

Lines changed: 51 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,45 @@ RFD41, but has evolved considerably since then.
88

99
# Learning
1010

11-
We have some documentation in disjointed files in the `doc/` directory. This
12-
file gives quick-start information.
11+
Developer documentation is in Asciidoc in the `doc/` directory. It gets rendered
12+
via GitHub pages, and is available at https://oxidecomputer.github.io/hubris .
13+
14+
# Navigating
15+
16+
The repo is laid out as follows.
17+
18+
- `app/` is where the top-level binary crates for applications live, e.g.
19+
`app/gimlet` contains the firmware crate for Gimlet. Generally speaking, if
20+
you want to build an image for something, look here.
21+
22+
- `build/` contains the build system and supporting crates.
23+
24+
- `doc/` contains developer documentation.
25+
26+
- `drv/` contains drivers, a mix of simple driver lib crates and fully-fledged
27+
server bin crates. Current convention is that `drv/SYSTEM-DEVICE` is the
28+
driver for `DEVICE` on `SYSTEM` (where `SYSTEM` is usually an SoC name),
29+
whereas `drv/SYSTEM-DEVICE-server` is the server bin crate.
30+
31+
- `lib/` contains assorted utility libraries we've written. If you need to make
32+
a reusable crate that doesn't fit into one of the other directories, it
33+
probably belongs here.
34+
35+
- `stage0/` is the bootloader/hypovisor, primarily for LPC55.
36+
37+
- `support/` contains some interface and programming support files, like fake
38+
certificates and programmer firmware images.
39+
40+
- `sys/` contains the "system" bits of Hubris, namely the kernel (`sys/kern`),
41+
the shared crate defining the ABI (`sys/abi`), and the user library used by
42+
tasks (`sys/userlib`).
43+
44+
- `task/` contains reusable tasks that aren't drivers. The distinction between
45+
things that live in `task` vs in `drv/something-server` is fuzzy. Use your
46+
judgement.
47+
48+
- `test/` contains the test framework and binary crates for building it for
49+
various boards.
1350

1451
# Developing
1552

@@ -30,17 +67,20 @@ submodules, so they'll fail when run from a fork.)
3067

3168
You will need:
3269

33-
- The nightly toolchain. (It will *probably* automatically install when you try
34-
to build, but people have had issues.)
70+
- A `rustup`-based toolchain install. `rustup` will take care of automatically
71+
installing our pinned toolchain version, and the cross-compilation targets,
72+
when you first try to build.
3573

36-
- `openocd` (mostly tested on 0.10) or (if using the LPC55)
37-
`pyocd` (0.27 or later). Note that the 0.10 release of OpenOCD predates the
38-
STLink v3. People are using various post-0.10 builds provided by system
39-
package managers. If you're going to use Homebrew on macOS to install
40-
OpenOCD, you need to use `brew install --head openocd` to build the tip of the
41-
main branch rather than using the latest binary release.
74+
- `openocd` (ideally 0.11) or (if using the LPC55) `pyocd` (0.27 or later).
75+
Note that the 0.10 release of OpenOCD predates the STLink v3. People are using
76+
various post-0.10, pre-0.11 builds provided by system package managers, with
77+
some success, but if your system isn't packaging 0.11 yet, pester them. If
78+
you're going to use Homebrew on macOS to install OpenOCD, you need to use
79+
`brew install --head openocd` to build the tip of the main branch rather than
80+
using the latest binary release.
4281

43-
- The appropriate Rust toolchain target installed:
82+
- The appropriate Rust toolchain target installed (note: this should happen
83+
automatically):
4484
- `rustup target add thumbv7em-none-eabihf` (for the STM32)
4585
- `rustup target add thumbv8m.main-none-eabihf` (for the LPC55)
4686

@@ -488,4 +528,3 @@ This magic happens in three parts:
488528
Note: most tasks pick up their `build.rs` behavior implicitly by depending on
489529
`userlib`. You generally do not need a `build.rs` in your task unless you need
490530
to detect compiler/architecture features or depend on board rev.
491-

0 commit comments

Comments
 (0)